Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/pom.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/pom.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/pom.xml	(revision 369)
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.gvsig</groupId>
+	<artifactId>org.gvsig.toolbox</artifactId>
+	<packaging>pom</packaging>
+	<name>${project.artifactId}</name>
+	<version>1.0.65</version>
+
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.desktop</artifactId>
+		<version>2.0.248</version>
+	</parent>
+
+	<scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-toolbox/org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-toolbox/org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-toolbox/repository/show/org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65</url>
+    </scm>
+
+	<repositories>
+      <repository>
+        <id>gvsig-public-http-repository</id>
+        <name>gvSIG maven public HTTP repository</name>
+        <url>http://devel.gvsig.org/m2repo/j2se</url>
+        <releases>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </snapshots>
+      </repository>
+    </repositories>
+
+	<properties>
+    	<maven.compiler.source>1.6</maven.compiler.source>
+    	<maven.compiler.target>1.6</maven.compiler.target>
+	</properties>
+
+	 <build>
+
+	    <pluginManagement>
+	       <plugins>
+	          <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <version>1.7</version>
+              </plugin>
+	       </plugins>
+	    </pluginManagement>
+
+	    <plugins>
+        	<plugin>
+            	<groupId>org.apache.maven.plugins</groupId>
+            	<artifactId>maven-compiler-plugin</artifactId>
+            	<version>2.0.2</version>
+            	<configuration>
+                	<source>1.6</source>
+                	<target>1.6</target>
+                	<encoding>ISO-8859-1</encoding>
+            	</configuration>
+        	</plugin>
+
+        	<plugin>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>animal-sniffer-maven-plugin</artifactId>
+              <executions>
+                <execution>
+                    <id>check-java-api</id>
+                    <phase>test</phase>
+                    <goals>
+                        <goal>check</goal>
+                    </goals>
+                    <configuration>
+                        <signature>
+                            <groupId>org.codehaus.mojo.signature
+                            </groupId>
+                            <artifactId>java16</artifactId>
+                            <version>1.0</version>
+                        </signature>
+                    </configuration>
+                </execution>
+              </executions>
+             </plugin>
+
+             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-toolbox/org.gvsig.toolbox/tags/</tagBase>
+                    <goals>deploy</goals>
+                </configuration>
+            </plugin>
+
+    	  </plugins>
+    </build>
+
+	<dependencyManagement>
+      <dependencies>
+		<dependency>
+			<groupId>gishur</groupId>
+			<artifactId>gishur_x</artifactId>
+			<version>unknown</version>
+		</dependency>
+		<dependency>
+			<groupId>gishur</groupId>
+			<artifactId>gishur_core</artifactId>
+			<version>unknown</version>
+		</dependency>
+		<dependency>
+			<groupId>com.vividsolutions</groupId>
+			<artifactId>jts</artifactId>
+			<version>1.13</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.algorithm</artifactId>
+			<version>1.0.65</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.core</artifactId>
+			<version>1.0.65</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.gui</artifactId>
+			<version>1.0.65</version>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.math</artifactId>
+			<version>1.0.65</version>
+		</dependency>
+		<dependency>
+			<groupId>gnu.trove</groupId>
+			<artifactId>trove</artifactId>
+			<version>0.1.8</version>
+		</dependency>
+		<dependency>
+			  <groupId>org.gvsig.legacy</groupId>
+			  <artifactId>jama</artifactId>
+			  <version>1.0.2</version>
+		</dependency>
+        <dependency>
+			<groupId>org.nfunk</groupId>
+			<artifactId>jep</artifactId>
+			<version>2.4.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.8</version>
+		</dependency>
+		<dependency>
+            <groupId>es.unex</groupId>
+            <artifactId>sextante_wps</artifactId>
+            <version>0.6.0</version>
+        </dependency>
+        <dependency>
+			<groupId>es.unex</groupId>
+			<artifactId>libDocEngines</artifactId>
+			<version>0.6.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.beanshell</groupId>
+			<artifactId>bsh</artifactId>
+			<version>2.0b4</version>
+		</dependency>
+        <dependency>
+            <groupId>org.japura</groupId>
+            <artifactId>org.japura</artifactId>
+            <version>1.14.0</version>
+        </dependency>
+<!--		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.8</version>
+		</dependency>-->
+	  </dependencies>
+	</dependencyManagement>
+
+	 <modules>
+		<module>org.gvsig.toolbox.math</module>
+		<module>org.gvsig.toolbox.gui</module>
+		<module>org.gvsig.toolbox.core</module>
+		<module>org.gvsig.toolbox.algorithm</module>
+	</modules>
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_320.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_320.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_320.txt	(revision 369)
@@ -0,0 +1,40 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Shapes Buffer
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 18 -SHAPES <str> -BUFFER <str> [-BUF_TYPE <str>] [-BUF_DIST <str>] [-BUF_FIELD <str>] [-BUF_SCALE <str>] [-BUF_ZONES <num>] [-DCIRCLE <str>] [-DISSOLVE]
+  -SHAPES:<str>   	Shapes
+	Shapes (input)
+  -BUFFER:<str>   	Buffer
+	Shapes (output)
+  -BUF_TYPE:<str> 	Buffer Distance
+	Choice
+	Available Choices:
+	[0] fixed value
+	[1] attribute field
+  -BUF_DIST:<str> 	Buffer Distance (Fixed)
+	Floating point
+	Minimum: 0.000000
+  -BUF_FIELD:<str>	Buffer Distance (Attribute)
+	Table field
+  -BUF_SCALE:<str>	Scaling Factor for Attribute Value
+	Floating point
+	Minimum: 0.000000
+  -BUF_ZONES:<num>	Number of Buffer Zones
+	Integer
+	Minimum: 1.000000
+  -DCIRCLE:<str>  	Circle Point Distance [Degree]
+	Floating point
+	Value Range: 0.010000 - 45.000000
+  -DISSOLVE       	Dissolve Buffers
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_320.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_103.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_103.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_103.txt	(revision 369)
@@ -0,0 +1,60 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Resampling
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> [-KEEP_TYPE] [-TARGET <str>] [-SCALE_UP_METHOD <str>] [-SCALE_DOWN_METHOD <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -INPUT:<str>            	Grid
+	Grid (input)
+  -KEEP_TYPE              	Preserve Data Type
+	Boolean
+  -TARGET:<str>           	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -SCALE_UP_METHOD:<str>  	Interpolation Method
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+	[5] Mean Value
+	[6] Mean Value (cell area weighted)
+	[7] Minimum Value
+	[8] Maximum Value
+	[9] Majority
+  -SCALE_DOWN_METHOD:<str>	Interpolation Method
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -USER_XMIN:<str>        	Left
+	Floating point
+  -USER_XMAX:<str>        	Right
+	Floating point
+  -USER_YMIN:<str>        	Bottom
+	Floating point
+  -USER_YMAX:<str>        	Top
+	Floating point
+  -USER_SIZE:<str>        	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>        	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>        	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_103.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_36.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_36.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_36.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_points
+module name :	Spatial Point Pattern Analysis
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 4 -POINTS <str> -CENTRE <str> -STDDIST <str> [-STEP <str>] -BBOX <str>
+  -POINTS:<str> 	Points
+	Shapes (input)
+  -CENTRE:<str> 	Mean Centre
+	Shapes (output)
+  -STDDIST:<str>	Standard Distance
+	Shapes (output)
+  -STEP:<str>   	Vertex Distance [Degree]
+	Floating point
+	Value Range: 0.100000 - 20.000000
+  -BBOX:<str>   	Bounding Box
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_36.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_183.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_183.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_183.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Points Export
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 10 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -POINTS <str>
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -POINTS:<str>  	Points
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_183.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_253.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_253.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_253.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud Attribute Calculator
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 10 -PC_IN <str> -PC_OUT <str> [-FORMULA <str>] [-NAME <str>] [-TYPE <str>]
+  -PC_IN:<str>  	Point Cloud
+	Point Cloud (input)
+  -PC_OUT:<str> 	Result
+	Point Cloud (output)
+  -FORMULA:<str>	Formula
+	Text
+  -NAME:<str>   	Output Field Name
+	Text
+  -TYPE:<str>   	Field data type
+	Choice
+	Available Choices:
+	[0] 1 bit
+	[1] 1 byte unsigned integer
+	[2] 1 byte signed integer
+	[3] 2 byte unsigned integer
+	[4] 2 byte signed integer
+	[5] 4 byte unsigned integer
+	[6] 4 byte signed integer
+	[7] 4 byte floating point
+	[8] 8 byte floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_253.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_107.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_107.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_107.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Create Constant Grid
+author      :	
+_____________________________________________
+go...
+Usage: 4 -GRID <str> [-VALUE <str>]
+  -GRID:<str> 	Base Grid
+	Grid (input)
+  -VALUE:<str>	Value
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_107.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_14.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_14.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_14.txt	(revision 369)
@@ -0,0 +1,51 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Residual Analysis (Grid)
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -GRID <str> -MEAN <str> -DIFF <str> -STDDEV <str> -RANGE <str> -MIN <str> -MAX <str> -DEVMEAN <str> -PERCENT <str> [-RADIUS <num>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>]
+  -GRID:<str>                        	Grid
+	Grid (input)
+  -MEAN:<str>                        	Mean Value
+	Grid (output)
+  -DIFF:<str>                        	Difference from Mean Value
+	Grid (output)
+  -STDDEV:<str>                      	Standard Deviation
+	Grid (output)
+  -RANGE:<str>                       	Value Range
+	Grid (output)
+  -MIN:<str>                         	Minimum Value
+	Grid (output)
+  -MAX:<str>                         	Maximum Value
+	Grid (output)
+  -DEVMEAN:<str>                     	Deviation from Mean Value
+	Grid (output)
+  -PERCENT:<str>                     	Percentile
+	Grid (output)
+  -RADIUS:<num>                      	Radius (Cells)
+	Integer
+	Minimum: 1.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_14.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_38.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_38.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_38.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Multiple Regression Analysis (Points/Grids)
+author      :	O.Conrad (c) 2004
+_____________________________________________
+go...
+Usage: 1 -GRIDS <str> -SHAPES <str> [-ATTRIBUTE <str>] [-TABLE <str>] [-RESIDUAL <str>] -REGRESSION <str> [-COORDS] [-INTERPOL <str>]
+  -GRIDS:<str>     	Grids
+	Grid list (input)
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -ATTRIBUTE:<str> 	Attribute
+	Table field
+  -TABLE:<str>     	Details
+	Table (optional output)
+  -RESIDUAL:<str>  	Residuals
+	Shapes (optional output)
+  -REGRESSION:<str>	Regression
+	Grid (output)
+  -COORDS          	Include Coordinates
+	Boolean
+  -INTERPOL:<str>  	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_38.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_18.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_18.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_18.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Zonal Grid Statistics
+author      :	Copyrights (c) 2005 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 5 -ZONES <str> [-CATLIST <str>] [-STATLIST <str>] [-ASPECT <str>] -OUTTAB <str> [-SHORTNAMES]
+  -ZONES:<str>   	Zone Grid
+	Grid (input)
+  -CATLIST:<str> 	Categorial Grids
+	Grid list (optional input)
+  -STATLIST:<str>	Grids to analyse
+	Grid list (optional input)
+  -ASPECT:<str>  	Aspect
+	Grid (optional input)
+  -OUTTAB:<str>  	Zonal Statistics
+	Table (output)
+  -SHORTNAMES    	Short Field Names
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_18.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_tools.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Point Cloud Cutter
+ 2	- Point Cloud from Grid Points
+ 3	- Point Cloud from Shapes
+ 4	- Point Cloud to Grid
+ 5	- Point Cloud to Shapes
+ 6	- Point Cloud Reclassifier / Subset Extractor
+ 7	- Drop Point Cloud Attribute
+ 8	- Transform Point Cloud
+ 9	- Point Cloud Thinning (simple)
+ 10	- Point Cloud Attribute Calculator
+ 11	- Cluster Analysis for Point Clouds
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_380.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_380.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_380.txt	(revision 369)
@@ -0,0 +1,41 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Multiresolution Index of Valley Bottom Flatness (MRVBF)
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 8 -DEM <str> -MRVBF <str> -MRRTF <str> [-T_SLOPE <str>] [-T_PCTL_V <str>] [-T_PCTL_R <str>] [-P_SLOPE <str>] [-P_PCTL <str>] [-UPDATE] [-CLASSIFY] [-MAX_RES <str>]
+  -DEM:<str>     	Elevation
+	Grid (input)
+  -MRVBF:<str>   	MRVBF
+	Grid (output)
+  -MRRTF:<str>   	MRRTF
+	Grid (output)
+  -T_SLOPE:<str> 	Initial Threshold for Slope
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -T_PCTL_V:<str>	Threshold for Elevation Percentile (Lowness)
+	Floating point
+	Value Range: 0.000000 - 1.000000
+  -T_PCTL_R:<str>	Threshold for Elevation Percentile (Upness)
+	Floating point
+	Value Range: 0.000000 - 1.000000
+  -P_SLOPE:<str> 	Shape Parameter for Slope
+	Floating point
+  -P_PCTL:<str>  	Shape Parameter for Elevation Percentile
+	Floating point
+  -UPDATE        	Update Views
+	Boolean
+  -CLASSIFY      	Classify
+	Boolean
+  -MAX_RES:<str> 	Maximum Resolution (Percentage)
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_380.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_grib2.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_grib2.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_grib2.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Import GRIB2 record
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_grib2.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_193.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_193.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_193.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export Atlas Boundary File
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 7 -SHAPES <str> [-PNAME <str>] [-SNAME <str>] [-FILE <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -PNAME:<str> 	Primary Name
+	Table field
+  -SNAME:<str> 	Secondary Name
+	Table field
+  -FILE:<str>  	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_193.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_171.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_171.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_171.txt	(revision 369)
@@ -0,0 +1,57 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid_image
+module name :	Export Image (bmp, jpg, pcx, png, tif)
+author      :	O. Conrad (c) 2005
+_____________________________________________
+go...
+Usage: 0 -GRID <str> [-SHADE <str>] [-FILE <str>] [-FILE_KML] [-COL_COUNT <num>] [-COL_PALETTE <str>] [-COL_REVERT] [-LUT <str>] [-IS_RGB]
+  -GRID:<str>       	Grid
+	Grid (input)
+  -SHADE:<str>      	Shade
+	Grid (optional input)
+  -FILE:<str>       	Image File
+	File path
+  -FILE_KML         	Create KML File
+	Boolean
+  -COL_COUNT:<num>  	Number of Colors
+	Integer
+  -COL_PALETTE:<str>	Color Palette
+	Choice
+	Available Choices:
+	[0] DEFAULT
+	[1] DEFAULT_BRIGHT
+	[2] BLACK_WHITE
+	[3] BLACK_RED
+	[4] BLACK_GREEN
+	[5] BLACK_BLUE
+	[6] WHITE_RED
+	[7] WHITE_GREEN
+	[8] WHITE_BLUE
+	[9] YELLOW_RED
+	[10] YELLOW_GREEN
+	[11] YELLOW_BLUE
+	[12] RED_GREEN
+	[13] RED_BLUE
+	[14] GREEN_BLUE
+	[15] RED_GREY_BLUE
+	[16] RED_GREY_GREEN
+	[17] GREEN_GREY_BLUE
+	[18] RED_GREEN_BLUE
+	[19] RED_BLUE_GREEN
+	[20] GREEN_RED_BLUE
+	[21] RAINBOW
+	[22] NEON
+  -COL_REVERT       	Revert Palette
+	Boolean
+  -LUT:<str>        	Lookup Table
+	Table (optional input)
+  -IS_RGB           	RGB coded Grid
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_171.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_392.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_392.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_392.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Sink Removal
+author      :	O. Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 2 -DEM <str> [-SINKROUTE <str>] [-DEM_PREPROC <str>] [-METHOD <str>] [-THRESHOLD] [-THRSHEIGHT <str>]
+  -DEM:<str>        	DEM
+	Grid (input)
+  -SINKROUTE:<str>  	Sink Route
+	Grid (optional input)
+  -DEM_PREPROC:<str>	Preprocessed DEM
+	Grid (optional output)
+  -METHOD:<str>     	Method
+	Choice
+	Available Choices:
+	[0] Deepen Drainage Routes
+	[1] Fill Sinks
+  -THRESHOLD        	Threshold
+	Boolean
+  -THRSHEIGHT:<str> 	Threshold Height
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_392.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_229.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_229.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_229.txt	(revision 369)
@@ -0,0 +1,82 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_geotrans
+module name :	GeoTrans (Grid)
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 [-DATA_ELLIPSOID <str>] [-DATA_DATUM_7 <str>] [-DATA_DATUM_3 <str>] [-DATA_GEOID <str>] [-OUT_GRID <str>] [-OUT_X <str>] [-OUT_Y <str>] [-OUT_SHAPES <str>] -SOURCE <str> [-CREATE_XY] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-PROJECTION_SOURCE_DATUM <str>] [-PROJECTION_TARGET_DATUM <str>] [-PROJECTION_SOURCE_PROJECTION <str>] [-PROJECTION_TARGET_PROJECTION <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_USER_GRID <str>] [-GET_GRID_GRID <str>] [-GET_SHAPES_SHAPES <str>]
+  -DATA_ELLIPSOID:<str>              	Ellipsoids
+	File path
+  -DATA_DATUM_7:<str>                	Datums (7 Parameters)
+	File path
+  -DATA_DATUM_3:<str>                	Datums (3 Parameters)
+	File path
+  -DATA_GEOID:<str>                  	Geoid
+	File path
+  -OUT_GRID:<str>                    	Grid
+	Data Object (optional output)
+  -OUT_X:<str>                       	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>                       	Y Coordinates
+	Data Object (optional output)
+  -OUT_SHAPES:<str>                  	Shapes
+	Data Object (optional output)
+  -SOURCE:<str>                      	Source
+	Grid (input)
+  -CREATE_XY                         	Create X/Y Grids
+	Boolean
+  -INTERPOLATION:<str>               	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>                 	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -PROJECTION_SOURCE_DATUM:<str>     	Source Datum
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_TARGET_DATUM:<str>     	Target Datum
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_SOURCE_PROJECTION:<str>	Source Projection
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_TARGET_PROJECTION:<str>	Target Projection
+	Choice
+	Available Choices:
+	[0] 
+  -GET_USER_XMIN:<str>               	Left
+	Floating point
+  -GET_USER_XMAX:<str>               	Right
+	Floating point
+  -GET_USER_YMIN:<str>               	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>               	Top
+	Floating point
+  -GET_USER_SIZE:<str>               	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_USER_GRID:<str>               	Grid
+	Data Object (optional output)
+  -GET_GRID_GRID:<str>               	Grid
+	Grid (output)
+  -GET_SHAPES_SHAPES:<str>           	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_229.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_384.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_384.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_384.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Diurnal Anisotropic Heating
+author      :	J.Boehner, O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 12 -DEM <str> -DAH <str> [-ALPHA_MAX <str>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -DAH:<str>      	Diurnal Anisotropic Heating
+	Grid (output)
+  -ALPHA_MAX:<str>	Alpha Max (Degree)
+	Floating point
+	Value Range: 0.000000 - 360.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_384.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_158.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_158.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_158.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import ESRI Arc/Info Grid
+author      :	O.Conrad (c) 2007
+_____________________________________________
+go...
+Usage: 1 [-GRID <str>] [-FILE <str>] [-GRID_TYPE <str>] [-NODATA <str>] [-NODATA_VAL <str>]
+  -GRID:<str>      	Grid
+	Data Object (optional output)
+  -FILE:<str>      	File
+	File path
+  -GRID_TYPE:<str> 	Target Grid Type
+	Choice
+	Available Choices:
+	[0] Integer (2 byte)
+	[1] Integer (4 byte)
+	[2] Floating Point (4 byte)
+	[3] Floating Point (8 byte)
+  -NODATA:<str>    	NoData Value
+	Choice
+	Available Choices:
+	[0] Input File's NoData Value
+	[1] User Defined NoData Value
+  -NODATA_VAL:<str>	User Defined NoData Value
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_158.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_197.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_197.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_197.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Stereo Lithography File (STL)
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 11 [-POINTS <str>] [-SHAPES <str>] [-GRID <str>] [-FILE <str>] [-METHOD <str>] [-METHOD_RASTER <str>] [-GRID_NX <num>] [-GRID_CELL <str>] [-ROT_X <str>] [-ROT_Y <str>] [-ROT_Z <str>]
+  -POINTS:<str>       	Point Cloud
+	Data Object (optional output)
+  -SHAPES:<str>       	Shapes
+	Data Object (optional output)
+  -GRID:<str>         	Grid
+	Data Object (optional output)
+  -FILE:<str>         	File
+	File path
+  -METHOD:<str>       	Target
+	Choice
+	Available Choices:
+	[0] point cloud
+	[1] point cloud (centered)
+	[2] points
+	[3] raster
+  -METHOD_RASTER:<str>	Raster Dimension
+	Choice
+	Available Choices:
+	[0] Raster Resolution (Pixels X)
+	[1] Raster Resolution (Pixel Size)
+  -GRID_NX:<num>      	Raster Resolution (Pixels X)
+	Integer
+	Minimum: 10.000000
+  -GRID_CELL:<str>    	Raster Resolution (Pixels Size)
+	Floating point
+	Minimum: 0.000000
+  -ROT_X:<str>        	X Axis
+	Floating point
+  -ROT_Y:<str>        	Y Axis
+	Floating point
+  -ROT_Z:<str>        	Z Axis
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_197.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_396.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_396.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_396.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Burn Stream Network into DEM
+author      :	O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 6 -DEM <str> [-BURN <str>] -STREAM <str> [-METHOD <str>] [-EPSILON <str>]
+  -DEM:<str>    	DEM
+	Grid (input)
+  -BURN:<str>   	Processed DEM
+	Grid (optional output)
+  -STREAM:<str> 	Streams
+	Grid (input)
+  -METHOD:<str> 	Method
+	Choice
+	Available Choices:
+	[0] simply decrease cell's value by epsilon
+	[1] lower cell's value to neighbours minimum value minus epsilon
+  -EPSILON:<str>	Epsilon
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_396.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_388.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_388.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_388.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Terrain Ruggedness Index (TRI)
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 16 -DEM <str> -TRI <str> [-RADIUS <num>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>]
+  -DEM:<str>                         	Elevation
+	Grid (input)
+  -TRI:<str>                         	Terrain Ruggedness Index (TRI)
+	Grid (output)
+  -RADIUS:<num>                      	Radius (Cells)
+	Integer
+	Minimum: 1.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_388.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_347.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_347.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_347.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Watershed Basins (Extended)
+author      :	V.Olaya (c) 2004, O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 2 -DEM <str> -CHANNELS <str> -BASINS <str> -SUBBASINS <str> -V_BASINS <str> -V_SUBBASINS <str> -HEADS <str> -MOUTHS <str> [-DISTANCE]
+  -DEM:<str>        	DEM
+	Grid (input)
+  -CHANNELS:<str>   	Drainage Network
+	Grid (input)
+  -BASINS:<str>     	Basins
+	Grid (output)
+  -SUBBASINS:<str>  	Subbasins
+	Grid (output)
+  -V_BASINS:<str>   	Basins
+	Shapes (output)
+  -V_SUBBASINS:<str>	Subbasins
+	Shapes (output)
+  -HEADS:<str>      	River Heads
+	Shapes (output)
+  -MOUTHS:<str>     	River Mouths
+	Shapes (output)
+  -DISTANCE         	Flow Distances
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_347.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_222.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_222.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_222.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	11: Dynamic Simulation - Soil Nitrogen Dynamics
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 10 -DEM <str> -NSTORE <str> [-TIME_SPAN <str>] [-TIME_STEP <str>] [-UPDATE] [-NINIT <str>] [-NRAIN <str>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -NSTORE:<str>   	Soil Nitrogen
+	Grid (output)
+  -TIME_SPAN:<str>	Time Span [a]
+	Floating point
+	Minimum: 0.000000
+  -TIME_STEP:<str>	Time Interval [a]
+	Floating point
+	Minimum: 0.000000
+  -UPDATE         	Update View
+	Boolean
+  -NINIT:<str>    	Initial Nitrogen Content [kg/ha]
+	Floating point
+	Minimum: 0.000000
+  -NRAIN:<str>    	Nitrogen in Rainfall [kg/ha/a]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_222.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_241.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_241.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_241.txt	(revision 369)
@@ -0,0 +1,68 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Command Line Arguments, List of Grids)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+Usage: 11 [-SOURCE_PROJ <str>] [-TARGET_PROJ <str>] -SOURCE <str> [-TARGET <str>] [-SHAPES <str>] [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_SYSTEM_SYSTEM_NX <num>] [-GET_SYSTEM_SYSTEM_NY <num>] [-GET_SYSTEM_SYSTEM_X <str>] [-GET_SYSTEM_SYSTEM_Y <str>] [-GET_SYSTEM_SYSTEM_D <str>] [-GET_SHAPES_SHAPES <str>]
+  -SOURCE_PROJ:<str>         	Source Projection Parameters
+	Text
+  -TARGET_PROJ:<str>         	Target Projection Parameters
+	Text
+  -SOURCE:<str>              	Source
+	Grid list (input)
+  -TARGET:<str>              	Target
+	Grid list (optional output)
+  -SHAPES:<str>              	Shapes
+	Data Object (optional output)
+  -CREATE_XY                 	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>               	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>               	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>       	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>         	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -GET_USER_XMIN:<str>       	Left
+	Floating point
+  -GET_USER_XMAX:<str>       	Right
+	Floating point
+  -GET_USER_YMIN:<str>       	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>       	Top
+	Floating point
+  -GET_USER_SIZE:<str>       	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_SYSTEM_SYSTEM_NX:<num>	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_NY:<num>	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_X:<str> 	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_Y:<str> 	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_D:<str> 	System
+	Grid system
+  -GET_SHAPES_SHAPES:<str>   	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_241.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_330.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_330.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_330.txt	(revision 369)
@@ -0,0 +1,56 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_hydrology
+module name :	Soil Moisture Content
+author      :	(c) 2002 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 [-STA_FC <str>] [-STA_FC_DEF <str>] [-STA_PWP <str>] [-STA_PWP_DEF <str>] [-LANDUSE <str>] [-LANDUSE_DEF <num>] -DYN_W <str> [-DYN_CLIMATE <str>] [-STA_KC <str>]
+  -STA_FC:<str>     	Field Capacity [mm]
+	Grid (optional input)
+  -STA_FC_DEF:<str> 	Default
+	Floating point
+	Minimum: 0.000000
+  -STA_PWP:<str>    	Permanent Wilting Point [mm]
+	Grid (optional input)
+  -STA_PWP_DEF:<str>	Default
+	Floating point
+	Minimum: 0.000000
+  -LANDUSE:<str>    	Land Use
+	Grid (optional input)
+  -LANDUSE_DEF:<num>	Default
+	Integer
+  -DYN_W:<str>      	Soil Moisture
+	Grid (output)
+  -DYN_CLIMATE:<str>	Climate Data
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] Precipitation [mm]
+	- 2. [8 byte floating point number] Temperature (2pm) [DegreeC]
+	- 3. [8 byte floating point number] Air Humidity (2pm) [%%]
+	
+  -STA_KC:<str>     	Crop Coefficients
+	Static table
+	14 Fields:
+	- 1. [signed 4 byte integer] Land Use ID
+	- 2. [string] Name
+	- 3. [8 byte floating point number] January
+	- 4. [8 byte floating point number] February
+	- 5. [8 byte floating point number] March
+	- 6. [8 byte floating point number] April
+	- 7. [8 byte floating point number] May
+	- 8. [8 byte floating point number] June
+	- 9. [8 byte floating point number] July
+	- 10. [8 byte floating point number] August
+	- 11. [8 byte floating point number] September
+	- 12. [8 byte floating point number] October
+	- 13. [8 byte floating point number] November
+	- 14. [8 byte floating point number] December
+	

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_330.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_62.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_62.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_62.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grid Difference
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 3 -A <str> -B <str> -C <str>
+  -A:<str>	A
+	Grid (input)
+  -B:<str>	B
+	Grid (input)
+  -C:<str>	Difference (A - B)
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_62.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_112.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_112.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_112.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Threshold Buffer
+author      :	
+_____________________________________________
+go...
+Usage: 9 -FEATURES <str> -VALUE <str> [-THRESHOLDGRID <str>] -BUFFER <str> [-THRESHOLD <str>] [-THRESHOLDTYPE <str>]
+  -FEATURES:<str>     	Features Grid
+	Grid (input)
+  -VALUE:<str>        	Value Grid
+	Grid (input)
+  -THRESHOLDGRID:<str>	Threshold Grid
+	Grid (optional input)
+  -BUFFER:<str>       	Buffer Grid
+	Grid (output)
+  -THRESHOLD:<str>    	Threshold
+	Floating point
+  -THRESHOLDTYPE:<str>	Threshold Type
+	Choice
+	Available Choices:
+	[0] Absolute
+	[1] Relative from cell value

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_112.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_esri_e00_149.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_esri_e00_149.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_esri_e00_149.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_esri_e00
+module name :	Import ESRI E00 File
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 [-TABLES <str>] [-SHAPES <str>] [-GRIDS <str>] [-TABLE <str>] [-FILE <str>] [-BBND] [-BTIC] [-BTABLES]
+  -TABLES:<str>	Tables
+	Table list (optional output)
+  -SHAPES:<str>	Shapes
+	Shapes list (optional output)
+  -GRIDS:<str> 	Grids
+	Grid list (optional output)
+  -TABLE:<str> 	Table
+	Data Object (optional output)
+  -FILE:<str>  	File
+	File path
+  -BBND        	Import Extents
+	Boolean
+  -BTIC        	Import Tick Points
+	Boolean
+  -BTABLES     	Import Tables
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_esri_e00_149.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_43.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_43.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_43.txt	(revision 369)
@@ -0,0 +1,69 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Geographically Weighted Multiple Regression (Points/Grids)
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -PREDICTORS <str> -REGRESSION <str> -QUALITY <str> [-SLOPES <str>] [-PARAMETERS] -POINTS <str> [-DEPENDENT <str>] [-RESIDUALS <str>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>] [-RANGE <str>] [-RADIUS <str>] [-MODE <str>] [-NPOINTS <str>] [-MAXPOINTS <num>] [-MINPOINTS <num>]
+  -PREDICTORS:<str>                  	Predictors
+	Grid list (input)
+  -REGRESSION:<str>                  	Regression
+	Grid (output)
+  -QUALITY:<str>                     	Coefficient of Determination
+	Grid (output)
+  -SLOPES:<str>                      	Regression Parameters
+	Grid list (optional output)
+  -PARAMETERS                        	Output of Regression Parameters
+	Boolean
+  -POINTS:<str>                      	Points
+	Shapes (input)
+  -DEPENDENT:<str>                   	Dependent Variable
+	Table field
+  -RESIDUALS:<str>                   	Residuals
+	Shapes (optional output)
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>                       	Search Range
+	Choice
+	Available Choices:
+	[0] search radius (local)
+	[1] no search radius (global)
+  -RADIUS:<str>                      	Search Radius
+	Floating point
+  -MODE:<str>                        	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -NPOINTS:<str>                     	Number of Points
+	Choice
+	Available Choices:
+	[0] maximum number of observations
+	[1] all points
+  -MAXPOINTS:<num>                   	Maximum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -MINPOINTS:<num>                   	Minimum Number of Observations
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_43.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_66.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_66.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_66.txt	(revision 369)
@@ -0,0 +1,43 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Random Field
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 7 [-OUTPUT <str>] [-NX <num>] [-NY <num>] [-CELLSIZE <str>] [-XMIN <str>] [-YMIN <str>] [-METHOD <str>] [-RANGE_MIN <str>] [-RANGE_MAX <str>] [-MEAN <str>] [-STDDEV <str>]
+  -OUTPUT:<str>   	Random Field
+	Data Object (optional output)
+  -NX:<num>       	Width (Cells)
+	Integer
+	Minimum: 1.000000
+  -NY:<num>       	Height (Cells)
+	Integer
+	Minimum: 1.000000
+  -CELLSIZE:<str> 	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -XMIN:<str>     	West
+	Floating point
+  -YMIN:<str>     	South
+	Floating point
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Uniform
+	[1] Gaussian
+  -RANGE_MIN:<str>	Range
+	Value range
+  -RANGE_MAX:<str>	Range
+	Value range
+  -MEAN:<str>     	Arithmetic Mean
+	Floating point
+  -STDDEV:<str>   	Standard Deviation
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_66.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_116.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_116.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_116.txt	(revision 369)
@@ -0,0 +1,40 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Resampling
+ 1	- Aggregate
+ 3	- Merging
+ 4	- Create Constant Grid
+ 5	- Patching
+ 6	- Close One Cell Gaps
+ 7	- Close Gaps
+ 8	- Grid Buffer
+ 9	- Threshold Buffer
+ 10	- Grid Proximity Buffer
+ 11	- Convert Data Storage Type
+ 12	- Change Grid Values
+ 15	- Reclassify Grid Values
+ 17	- Crop to Data
+ 18	- Invert Data/No-Data
+ 19	- Grid Orientation
+ 20	- Combine Grids
+ 21	- Sort Grid
+ 22	- Grids from classified grid and table
+ 23	- Create Grid System
+ 24	- Grid Masking
+ 25	- Close Gaps with Spline
+ 26	- Proximity Grid
+ 27	- Tiling
+
+type -h or --help for further information
+
+error: cannot execute interactive module [13]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_116.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_201.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_201.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_201.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Point Cloud from File
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 15 [-POINTS <str>] [-FILE <str>]
+  -POINTS:<str>	Point Cloud
+	Data Object (optional output)
+  -FILE:<str>  	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_201.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_grid.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_grid.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_grid.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Fast Representativeness
+ 1	- Residual Analysis (Grid)
+ 2	- Representativeness (Grid)
+ 3	- Radius of Variance (Grid)
+ 4	- Statistics for Grids
+ 5	- Zonal Grid Statistics
+ 6	- Directional Statistics for Single Grid
+ 7	- Global Moran's I for Grids
+ 8	- Principle Components Analysis
+ 9	- Multi-Band Variation
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_grid.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_401.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_401.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_401.txt	(revision 369)
@@ -0,0 +1,38 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Grid to TIN (Surface Specific Points)
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -GRID <str> [-VALUES <str>] -TIN <str> [-METHOD <str>] [-HIGH <num>] [-FLOW_MIN <str>] [-FLOW_MAX <str>] [-PEUCKER <str>]
+  -GRID:<str>    	Grid
+	Grid (input)
+  -VALUES:<str>  	Values
+	Grid list (optional input)
+  -TIN:<str>     	TIN
+	TIN (output)
+  -METHOD:<str>  	Method
+	Choice
+	Available Choices:
+	[0] Mark Highest Neighbour
+	[1] Opposite Neighbours
+	[2] Flow Direction
+	[3] Flow Direction (up and down)
+	[4] Peucker & Douglas
+  -HIGH:<num>    	Mark Highest Neighbour
+	Integer
+	Value Range: 1.000000 - 4.000000
+  -FLOW_MIN:<str>	Flow Direction
+	Value range
+  -FLOW_MAX:<str>	Flow Direction
+	Value range
+  -PEUCKER:<str> 	Peucker & Douglas
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_401.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_esri_e00.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_esri_e00.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_esri_e00.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Import ESRI E00 File
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_esri_e00.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_356.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_356.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_356.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [3]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_356.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_405.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_405.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_405.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Flow Accumulation (Trace)
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -DEM <str> [-ZFIELD <str>] -FLOW <str>
+  -DEM:<str>   	TIN
+	TIN (input)
+  -ZFIELD:<str>	Z Values
+	Table field
+  -FLOW:<str>  	Flow Accumulation
+	TIN (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_405.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_html_8.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_html_8.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_html_8.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 1	- SVG Interactive Map
+
+type -h or --help for further information
+
+error: cannot execute interactive module [0]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_html_8.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_23.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_23.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_23.txt	(revision 369)
@@ -0,0 +1,77 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Ordinary Kriging (VF)
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -POINTS <str> [-ZFIELD <str>] [-TARGET <str>] [-TQUALITY <str>] [-DISTMAX <str>] [-DISTCOUNT <num>] [-NSKIP <num>] [-BLOCK] [-DBLOCK <str>] [-MAXRADIUS <str>] [-NPOINTS_MIN <str>] [-NPOINTS_MAX <str>] [-MODE <str>] [-FORMULA_STRING <str>] [-USER_BVARIANCE] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_VARIANCE <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -POINTS:<str>        	Points
+	Shapes (input)
+  -ZFIELD:<str>        	Attribute
+	Table field
+  -TARGET:<str>        	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -TQUALITY:<str>      	Type of Quality Measure
+	Choice
+	Available Choices:
+	[0] standard deviation
+	[1] variance
+  -DISTMAX:<str>       	Maximum Distance
+	Floating point
+  -DISTCOUNT:<num>     	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>         	Skip Number
+	Integer
+	Minimum: 1.000000
+  -BLOCK               	Block Kriging
+	Boolean
+  -DBLOCK:<str>        	Block Size
+	Floating point
+	Minimum: 0.000000
+  -MAXRADIUS:<str>     	Maximum Search Radius (map units)
+	Floating point
+	Minimum: 0.000000
+  -NPOINTS_MIN:<str>   	Min./Max. Number of m_Points
+	Value range
+  -NPOINTS_MAX:<str>   	Min./Max. Number of m_Points
+	Value range
+  -MODE:<str>          	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -FORMULA_STRING:<str>	Formula String
+	Text
+  -USER_BVARIANCE      	Create Quality Grid
+	Boolean
+  -USER_XMIN:<str>     	Left
+	Floating point
+  -USER_XMAX:<str>     	Right
+	Floating point
+  -USER_YMIN:<str>     	Bottom
+	Floating point
+  -USER_YMAX:<str>     	Top
+	Floating point
+  -USER_SIZE:<str>     	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>     	Grid
+	Data Object (optional output)
+  -USER_VARIANCE:<str> 	Quality Measure
+	Data Object (optional output)
+  -GRID_GRID:<str>     	Grid
+	Grid (output)
+  -GRID_VARIANCE:<str> 	Quality Measure
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_23.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_163.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_163.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_163.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import Grid from XYZ
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 6 [-GRID <str>] [-COUNT <str>] [-FILENAME <str>] [-CAPTION] [-CELLSIZE <str>] [-SEPARATOR <str>]
+  -GRID:<str>     	Grid
+	Data Object (optional output)
+  -COUNT:<str>    	Count
+	Data Object (optional output)
+  -FILENAME:<str> 	File Name
+	File path
+  -CAPTION        	Has Field Names
+	Boolean
+  -CELLSIZE:<str> 	Target Cellsize
+	Floating point
+	Minimum: 0.000000
+  -SEPARATOR:<str>	Separator
+	Choice
+	Available Choices:
+	[0] space
+	[1] tabulator
+	[2] ,
+	[3] ;

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_163.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_27.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_27.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_27.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Variogram (Dialog))
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 4 -POINTS <str> [-ATTRIBUTE <str>] -RESULT <str> [-DISTMAX <str>] [-DISTCOUNT <num>] [-NSKIP <num>] [-FORMULA_STRING <str>]
+  -POINTS:<str>        	Points
+	Shapes (input)
+  -ATTRIBUTE:<str>     	Attribute
+	Table field
+  -RESULT:<str>        	Semi-Variances
+	Table (output)
+  -DISTMAX:<str>       	Maximum Distance
+	Floating point
+  -DISTCOUNT:<num>     	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>         	Skip Number
+	Integer
+	Minimum: 1.000000
+  -FORMULA_STRING:<str>	Formula String
+	Text

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_27.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_167.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_167.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_167.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Export True Color Bitmap
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 10 -IMAGE <str> [-FILE <str>]
+  -IMAGE:<str>	Image Grid
+	Grid (input)
+  -FILE:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_167.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_293.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_293.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_293.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygon Centroids
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -POLYGONS <str> -CENTROIDS <str> [-METHOD]
+  -POLYGONS:<str> 	Polygons
+	Shapes (input)
+  -CENTROIDS:<str>	Centroids
+	Shapes (output)
+  -METHOD         	Centroids for each part
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_293.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_282.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_282.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_282.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Fit N Points to shape
+author      :	
+_____________________________________________
+go...
+Usage: 4 -POINTS <str> -SHAPES <str> [-NUMPOINTS <num>]
+  -POINTS:<str>   	Points
+	Shapes (output)
+  -SHAPES:<str>   	Shapes
+	Shapes (input)
+  -NUMPOINTS:<num>	Number of points
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_282.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_89.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_89.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_89.txt	(revision 369)
@@ -0,0 +1,66 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Shapes to Grid
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> [-FIELD <str>] [-MULTIPLE <str>] [-LINE_TYPE <str>] [-GRID_TYPE <str>] [-TARGET <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_COUNT <str>] [-USER_BCOUNT] [-GRID_GRID <str>] [-GRID_COUNT <str>]
+  -INPUT:<str>     	Shapes
+	Shapes (input)
+  -FIELD:<str>     	Attribute
+	Table field
+  -MULTIPLE:<str>  	Method for Multiple Values
+	Choice
+	Available Choices:
+	[0] first
+	[1] last
+	[2] minimum
+	[3] maximum
+	[4] mean
+  -LINE_TYPE:<str> 	Method for Lines
+	Choice
+	Available Choices:
+	[0] thin
+	[1] thick
+  -GRID_TYPE:<str> 	Preferred Target Grid Type
+	Choice
+	Available Choices:
+	[0] Integer (1 byte)
+	[1] Integer (2 byte)
+	[2] Integer (4 byte)
+	[3] Floating Point (4 byte)
+	[4] Floating Point (8 byte)
+  -TARGET:<str>    	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -USER_XMIN:<str> 	Left
+	Floating point
+  -USER_XMAX:<str> 	Right
+	Floating point
+  -USER_YMIN:<str> 	Bottom
+	Floating point
+  -USER_YMAX:<str> 	Top
+	Floating point
+  -USER_SIZE:<str> 	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str> 	Grid
+	Data Object (optional output)
+  -USER_COUNT:<str>	Number of Values
+	Data Object (optional output)
+  -USER_BCOUNT     	Number of Values
+	Boolean
+  -GRID_GRID:<str> 	Grid
+	Grid (output)
+  -GRID_COUNT:<str>	Number of Values
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_89.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_336.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_336.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_336.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Table calculator for shapes
+author      :	
+_____________________________________________
+go...
+Usage: 2 -SHAPES <str> [-FORMULA <str>] [-NAME <str>] -RESULT <str>
+  -SHAPES:<str> 	Shapes
+	Shapes (input)
+  -FORMULA:<str>	Formula
+	Text
+  -NAME:<str>   	Field Name
+	Text
+  -RESULT:<str> 	Result
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_336.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_297.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_297.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_297.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygon Dissolve
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 5 -POLYGONS <str> [-FIELD_1 <str>] [-FIELD_2 <str>] [-FIELD_3 <str>] -DISSOLVED <str> [-ALL <str>]
+  -POLYGONS:<str> 	Polygons
+	Shapes (input)
+  -FIELD_1:<str>  	1. Attribute
+	Table field
+  -FIELD_2:<str>  	2. Attribute
+	Table field
+  -FIELD_3:<str>  	3. Attribute
+	Table field
+  -DISSOLVED:<str>	Dissolved Polygons
+	Shapes (output)
+  -ALL:<str>      	Dissolve...
+	Choice
+	Available Choices:
+	[0] polygons with same attribute value
+	[1] all polygons

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_297.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_286.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_286.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_286.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Clip Points with Polygons
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 8 -POINTS <str> -POLYGONS <str> [-FIELD <str>] -CLIPS <str> [-METHOD <str>]
+  -POINTS:<str>  	Points
+	Shapes (input)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)
+  -FIELD:<str>   	Add Attribute to Clipped Points
+	Table field
+  -CLIPS:<str>   	Clipped Points
+	Shapes list (output)
+  -METHOD:<str>  	Clipping Options
+	Choice
+	Available Choices:
+	[0] one layer for all points
+	[1] separate layer for each polygon

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_286.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_10.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_10.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_10.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	docs_pdf
+module name :	Shapes Summary Report
+author      :	
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> [-FIELD <str>] -TABLE <str> [-PDF] [-OUTPUTPATH <str>]
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -FIELD:<str>     	Field
+	Table field
+  -TABLE:<str>     	Summary Table
+	Table (output)
+  -PDF             	Create PDF Docs
+	Boolean
+  -OUTPUTPATH:<str>	Folder
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_10.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_points.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_points.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_points.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Convert Table to Points
+ 1	- Count Points in Polygons
+ 2	- Create Point Grid
+ 3	- Distance Matrix
+ 4	- Fit N Points to shape
+ 5	- Convert Lines to Points
+ 6	- Add Coordinates to points
+ 7	- Remove Duplicate Points
+ 8	- Clip Points with Polygons
+ 9	- Separate points by direction
+ 10	- Add Polygon Attributes to Points
+ 11	- Points Filter
+ 12	- Convex Hull
+ 14	- Points Thinning
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_points.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_328.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_328.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_328.txt	(revision 369)
@@ -0,0 +1,49 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_fire_spreading
+module name :	Fire Risk Analysis
+author      :	(c) 2004 Victor Olaya
+_____________________________________________
+go...
+Usage: 0 -DEM <str> -FUEL <str> -WINDSPD <str> -WINDDIR <str> -M1H <str> -M10H <str> -M100H <str> -MHERB <str> -MWOOD <str> [-VALUE <str>] [-BASEPROB <str>] -DANGER <str> -COMPPROB <str> -PRIORITY <str> [-MONTECARLO <num>] [-INTERVAL <str>]
+  -DEM:<str>       	DEM
+	Grid (input)
+  -FUEL:<str>      	Fuel Model
+	Grid (input)
+  -WINDSPD:<str>   	Wind Speed
+	Grid (input)
+  -WINDDIR:<str>   	Wind Direction
+	Grid (input)
+  -M1H:<str>       	Dead Fuel Moisture 1H
+	Grid (input)
+  -M10H:<str>      	Dead Fuel Moisture 10H
+	Grid (input)
+  -M100H:<str>     	Dead Fuel Moisture 100H
+	Grid (input)
+  -MHERB:<str>     	Herbaceous Fuel Moisture
+	Grid (input)
+  -MWOOD:<str>     	Wood Fuel Moisture
+	Grid (input)
+  -VALUE:<str>     	Value
+	Grid (optional input)
+  -BASEPROB:<str>  	Base Probability
+	Grid (optional input)
+  -DANGER:<str>    	Danger
+	Grid (output)
+  -COMPPROB:<str>  	Compound Probability
+	Grid (output)
+  -PRIORITY:<str>  	Priority Index
+	Grid (output)
+  -MONTECARLO:<num>	Number of Events
+	Integer
+	Minimum: 1.000000
+  -INTERVAL:<str>  	Fire Length
+	Floating point
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_328.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_71.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_71.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_71.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Fuzzy Intersection (AND)
+author      :	Antonio Boggia and Gianluca Massei (c) 2004
+_____________________________________________
+go...
+Usage: 12 -GRIDS <str> -AND <str> [-TYPE <str>]
+  -GRIDS:<str>	Grids
+	Grid list (input)
+  -AND:<str>  	Intersection
+	Grid (output)
+  -TYPE:<str> 	Operator Type
+	Choice
+	Available Choices:
+	[0] min(a, b) (non-interactive)
+	[1] a * b
+	[2] max(0, a + b - 1)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_71.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_303.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_303.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_303.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Join a Table
+author      :	V. Olaya, O. Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> [-SHAPES_ID <str>] -TABLE <str> [-TABLE_ID <str>] -SHAPES_OUT <str> [-METHOD <str>] [-ADDALL <str>]
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -SHAPES_ID:<str> 	Identifier
+	Table field
+  -TABLE:<str>     	Table
+	Table (input)
+  -TABLE_ID:<str>  	Identifier
+	Table field
+  -SHAPES_OUT:<str>	Resulting Shapes
+	Shapes (output)
+  -METHOD:<str>    	Attributes
+	Choice
+	Available Choices:
+	[0] append
+	[1] replace
+  -ADDALL:<str>    	Copy Rule
+	Choice
+	Available Choices:
+	[0] all shapes
+	[1] only shapes with table entry

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_303.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_121.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_121.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_121.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Invert Data/No-Data
+author      :	
+_____________________________________________
+go...
+Usage: 18 -INPUT <str> -OUTPUT <str>
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -OUTPUT:<str>	Result
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_121.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_rga.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_rga.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_rga.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Fast Region Growing Algorithm
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_rga.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_75.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_75.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_75.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Gradient Vector from Polar to Cartesian Coordinates
+author      :	Victor Olaya & Volker Wichmann (c) 2004-2010
+_____________________________________________
+go...
+Usage: 16 -DIR <str> -LEN <str> -DX <str> -DY <str> [-UNITS <str>] [-SYSTEM <str>] [-SYSTEM_ZERO <str>] [-SYSTEM_ORIENT <str>]
+  -DIR:<str>          	Direction
+	Grid (input)
+  -LEN:<str>          	Length
+	Grid (input)
+  -DX:<str>           	X Component
+	Grid (output)
+  -DY:<str>           	Y Component
+	Grid (output)
+  -UNITS:<str>        	Polar Angle Units
+	Choice
+	Available Choices:
+	[0] radians
+	[1] degree
+  -SYSTEM:<str>       	Polar Coordinate System
+	Choice
+	Available Choices:
+	[0] mathematical
+	[1] geographical
+	[2] user defined
+  -SYSTEM_ZERO:<str>  	User defined Zero Direction
+	Floating point
+	Value Range: 0.000000 - 360.000000
+  -SYSTEM_ORIENT:<str>	User defined Orientation
+	Choice
+	Available Choices:
+	[0] clockwise
+	[1] counterclockwise

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_75.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_307.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_307.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_307.txt	(revision 369)
@@ -0,0 +1,34 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Select by Location...
+author      :	V.Olaya (c) 2004, O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 5 -SHAPES <str> -LOCATIONS <str> [-CONDITION <str>] [-METHOD <str>]
+  -SHAPES:<str>   	Shapes to Select From
+	Shapes (input)
+  -LOCATIONS:<str>	Locations
+	Shapes (input)
+  -CONDITION:<str>	Condition
+	Choice
+	Available Choices:
+	[0] intersect
+	[1] are completely within
+	[2] completely contain
+	[3] have their centroid in
+	[4] contain the centeroid of
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] new selection
+	[1] add to current selection
+	[2] select from current selection
+	[3] remove from current selection

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_307.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_125.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_125.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_125.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Grids from classified grid and table
+author      :	
+_____________________________________________
+go...
+Usage: 22 -TABLE <str> [-ID_FIELD <str>] -CLASSES <str> [-GRIDS <str>]
+  -TABLE:<str>   	Table
+	Table (input)
+  -ID_FIELD:<str>	Attribute
+	Table field
+  -CLASSES:<str> 	Classes
+	Grid (input)
+  -GRIDS:<str>   	Grids
+	Grid list (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_125.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_361.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_361.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_361.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [8]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_361.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_44.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_44.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_44.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Accumulated Cost (Isotropic)
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 0 -COST <str> -POINTS <str> -ACCCOST <str> -CLOSESTPT <str> [-THRESHOLD <str>]
+  -COST:<str>     	Cost Grid
+	Grid (input)
+  -POINTS:<str>   	Destination Points
+	Grid (input)
+  -ACCCOST:<str>  	Accumulated Cost
+	Grid (output)
+  -CLOSESTPT:<str>	Closest Point
+	Grid (output)
+  -THRESHOLD:<str>	Threshold for different route
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_44.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_301.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_301.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_301.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygons to Edges and Nodes
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 9 -POLYGONS <str> -EDGES <str> -NODES <str>
+  -POLYGONS:<str>	Polygons
+	Shapes (input)
+  -EDGES:<str>   	Edges
+	Shapes (output)
+  -NODES:<str>   	Nodes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_301.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_365.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_365.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_365.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [12]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_365.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_48.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_48.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_48.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Accumulated Cost (Isotropic)
+ 1	- Accumulated Cost (Anisotropic)
+ 5	- Least Cost Paths
+ 6	- Change Vector Analysis
+ 7	- Covered Distance
+ 8	- Pattern Analysis
+ 9	- Layer of extreme value
+ 10	- Analytical Hierarchy Process
+ 11	- Ordered Weighted Averaging (OWA)
+ 12	- Aggregation Index
+ 13	- Cross-Classification and Tabulation
+ 14	- Soil Texture Classification
+ 15	- Fragmentation (Standard)
+ 16	- Fragmentation (Alternative)
+ 17	- Fragmentation Classes from Density and Connectivity
+
+type -h or --help for further information
+
+error: cannot execute interactive module [4]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_48.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_90.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_90.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_90.txt	(revision 369)
@@ -0,0 +1,70 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Inverse Distance Weighted
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-WEIGHTING <str>] [-POWER <str>] [-BANDWIDTH <str>] [-RANGE <str>] [-RADIUS <str>] [-MODE <str>] [-POINTS <str>] [-NPOINTS <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] inverse distance to a power
+	[1] linearly decreasing within search radius
+	[2] exponential weighting scheme
+	[3] gaussian weighting scheme
+  -POWER:<str>    	Inverse Distance Power
+	Floating point
+  -BANDWIDTH:<str>	Exponential and Gaussian Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>    	Search Range
+	Choice
+	Available Choices:
+	[0] search radius (local)
+	[1] no search radius (global)
+  -RADIUS:<str>   	Search Radius
+	Floating point
+  -MODE:<str>     	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -POINTS:<str>   	Number of Points
+	Choice
+	Available Choices:
+	[0] maximum number of points
+	[1] all points
+  -NPOINTS:<num>  	Maximum Number of Points
+	Integer
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_90.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_83.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_83.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_83.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	User Defined Filter
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 4 -INPUT <str> -RESULT <str> [-FILTER <str>] [-FILTER_3X3 <str>]
+  -INPUT:<str>     	Grid
+	Grid (input)
+  -RESULT:<str>    	Filtered Grid
+	Grid (output)
+  -FILTER:<str>    	Filter Matrix
+	Table (optional input)
+  -FILTER_3X3:<str>	Default Filter Matrix (3x3)
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] 1
+	- 2. [8 byte floating point number] 2
+	- 3. [8 byte floating point number] 3
+	

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_83.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_viewer.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_viewer.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_viewer.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Point Cloud Viewer
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pointcloud_viewer.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_94.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_94.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_94.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Triangulation
+author      :	O.Conrad (c) 2004
+_____________________________________________
+go...
+Usage: 5 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_94.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_87.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_87.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_87.txt	(revision 369)
@@ -0,0 +1,34 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Morphological Filter
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 8 -INPUT <str> [-RESULT <str>] [-MODE <str>] [-RADIUS <num>] [-METHOD <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Filtered Grid
+	Grid (optional output)
+  -MODE:<str>  	Search Mode
+	Choice
+	Available Choices:
+	[0] Square
+	[1] Circle
+  -RADIUS:<num>	Radius
+	Integer
+	Minimum: 1.000000
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Dilation
+	[1] Erosion
+	[2] Opening
+	[3] Closing

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_87.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_341.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_341.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_341.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Principle Components Analysis
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 7 -TABLE <str> [-PCA <str>] [-METHOD <str>] [-NFIRST <num>]
+  -TABLE:<str> 	Table
+	Table (input)
+  -PCA:<str>   	Principle Components
+	Table (optional output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] correlation matrix
+	[1] variance-covariance matrix
+	[2] sums-of-squares-and-cross-products matrix
+  -NFIRST:<num>	Number of Components
+	Integer
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_341.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_291.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_291.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_291.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Convert Table to Points
+ 1	- Count Points in Polygons
+ 2	- Create Point Grid
+ 3	- Distance Matrix
+ 4	- Fit N Points to shape
+ 5	- Convert Lines to Points
+ 6	- Add Coordinates to points
+ 7	- Remove Duplicate Points
+ 8	- Clip Points with Polygons
+ 9	- Separate points by direction
+ 10	- Add Polygon Attributes to Points
+ 11	- Points Filter
+ 12	- Convex Hull
+ 14	- Points Thinning
+
+type -h or --help for further information
+
+error: cannot execute interactive module [13]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_291.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_100.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_100.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_100.txt	(revision 369)
@@ -0,0 +1,52 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Multilevel B-Spline Interpolation
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-METHOD <str>] [-EPSILON <str>] [-LEVEL_MAX <num>] [-UPDATE] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] without B-spline refinement
+	[1] with B-spline refinement
+  -EPSILON:<str>  	Threshold Error
+	Floating point
+	Minimum: 0.000000
+  -LEVEL_MAX:<num>	Maximum Level
+	Integer
+	Value Range: 1.000000 - 14.000000
+  -UPDATE         	Update View
+	Boolean
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_100.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_261.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_261.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_261.txt	(revision 369)
@@ -0,0 +1,38 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Grid Statistics for Polygons
+author      :	(c) 2003 by Olaf Conrad, Quantile Calculation (c) 2007 by Johan Van de Wauw
+_____________________________________________
+go...
+Usage: 2 -GRIDS <str> -POLYGONS <str> [-RESULT <str>] [-COUNT] [-MIN] [-MAX] [-RANGE] [-MEAN] [-VAR] [-STDDEV] [-QUANTILE <num>]
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)
+  -RESULT:<str>  	Statistics
+	Shapes (optional output)
+  -COUNT         	Number of Cells
+	Boolean
+  -MIN           	Minimum
+	Boolean
+  -MAX           	Maximum
+	Boolean
+  -RANGE         	Range
+	Boolean
+  -MEAN          	Mean
+	Boolean
+  -VAR           	Variance
+	Boolean
+  -STDDEV        	Standard Deviation
+	Boolean
+  -QUANTILE:<num>	Quantiles
+	Integer
+	Value Range: 0.000000 - 50.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_261.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_99.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_99.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_99.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	B-Spline Approximation
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-LEVEL <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -LEVEL:<str>    	Resolution
+	Floating point
+	Minimum: 0.001000
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_99.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_2.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_2.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_2.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Average With Thereshold 3
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 2 -INPUT <str> -RESULT <str> [-RX <num>] [-RY <num>] [-THRESH <str>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -RESULT:<str>	AWT Grid
+	Grid (output)
+  -RX:<num>    	Radius X
+	Integer
+	Minimum: 1.000000
+  -RY:<num>    	Radius Y
+	Integer
+	Minimum: 1.000000
+  -THRESH:<str>	Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_2.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_131.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_131.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_131.txt	(revision 369)
@@ -0,0 +1,53 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Create 3D Image
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -DEM <str> -IMAGE <str> [-SHAPES <str>] [-ZEXAGG <str>] [-ZEXAGG_MIN <str>] [-Z_ROTATE <str>] [-X_ROTATE <str>] [-X_ROTATE_LEVEL <str>] [-PANBREAK <str>] [-PROJECTION <str>] [-NX <num>] [-NY <num>] [-RGB <str>] [-RGB_Z <str>]
+  -DEM:<str>           	Elevation
+	Grid (input)
+  -IMAGE:<str>         	Overlay Image
+	Grid (input)
+  -SHAPES:<str>        	Shapes to project
+	Shapes list (optional input)
+  -ZEXAGG:<str>        	Exaggeration
+	Floating point
+  -ZEXAGG_MIN:<str>    	Minimum Exaggeration [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -Z_ROTATE:<str>      	Image Rotation [Degree]
+	Floating point
+  -X_ROTATE:<str>      	Local Rotation [Degree]
+	Floating point
+  -X_ROTATE_LEVEL:<str>	Local Rotation Base Level
+	Choice
+	Available Choices:
+	[0] Zero
+	[1] Mean Elevation
+  -PANBREAK:<str>      	Panorama Break [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -PROJECTION:<str>    	Projection
+	Choice
+	Available Choices:
+	[0] Panorama
+	[1] Circular
+  -NX:<num>            	3D Image Width
+	Integer
+	Minimum: 1.000000
+  -NY:<num>            	3D Image Height
+	Integer
+	Minimum: 1.000000
+  -RGB:<str>           	3D Image
+	Grid (optional output)
+  -RGB_Z:<str>         	Projected Height
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_131.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_265.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_265.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_265.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Vectorising Grid Classes
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 -GRID <str> -POLYGONS <str> [-CLASS_ALL <str>] [-CLASS_ID <str>] [-SPLIT <str>]
+  -GRID:<str>     	Grid
+	Grid (input)
+  -POLYGONS:<str> 	Polygons
+	Shapes (output)
+  -CLASS_ALL:<str>	Class Selection
+	Choice
+	Available Choices:
+	[0] one single class specified by class identifier
+	[1] all classes
+  -CLASS_ID:<str> 	Class Identifier
+	Floating point
+  -SPLIT:<str>    	Vectorised class as...
+	Choice
+	Available Choices:
+	[0] one single (multi-)polygon object
+	[1] each island as separated polygon

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_265.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_6.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_6.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_6.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Destriping 2
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> -MASK <str> -RESULT3 <str> -RESULT1 <str> -RESULT2 <str> [-ANG <str>] [-R <str>] [-D <str>] [-MIN <str>] [-MAX <str>] [-MMIN <str>] [-MMAX <str>]
+  -INPUT:<str>  	Input
+	Grid (input)
+  -MASK:<str>   	Mask Grid
+	Grid (input)
+  -RESULT3:<str>	Destriped Grid
+	Grid (output)
+  -RESULT1:<str>	Low-pass 1
+	Grid (output)
+  -RESULT2:<str>	Low-pass 2
+	Grid (output)
+  -ANG:<str>    	Angle (in degrees)
+	Floating point
+  -R:<str>      	Radius
+	Floating point
+  -D:<str>      	Stripes distance
+	Floating point
+  -MIN:<str>    	Min
+	Floating point
+  -MAX:<str>    	Max
+	Floating point
+  -MMIN:<str>   	Mask Min
+	Floating point
+  -MMAX:<str>   	Mask Max
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_6.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_269.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_269.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_269.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Grid System Extent
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 10 [-PARAMETERS_GRID_SYSTEM_NX <num>] [-PARAMETERS_GRID_SYSTEM_NY <num>] [-PARAMETERS_GRID_SYSTEM_X <str>] [-PARAMETERS_GRID_SYSTEM_Y <str>] [-PARAMETERS_GRID_SYSTEM_D <str>] -SHAPES <str> [-CELLS <str>]
+  -PARAMETERS_GRID_SYSTEM_NX:<num>	Grid system
+	Grid system
+  -PARAMETERS_GRID_SYSTEM_NY:<num>	Grid system
+	Grid system
+  -PARAMETERS_GRID_SYSTEM_X:<str> 	Grid system
+	Grid system
+  -PARAMETERS_GRID_SYSTEM_Y:<str> 	Grid system
+	Grid system
+  -PARAMETERS_GRID_SYSTEM_D:<str> 	Grid system
+	Grid system
+  -SHAPES:<str>                   	Extent
+	Shapes (output)
+  -CELLS:<str>                    	Border
+	Choice
+	Available Choices:
+	[0] grid cells
+	[1] grid nodes

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_269.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_312.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_312.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_312.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Transform Shapes
+author      :	(c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 10 -OUT <str> -IN <str> [-DX <str>] [-DY <str>] [-ANGLE <str>] [-SCALEX <str>] [-SCALEY <str>] [-ANCHORX <str>] [-ANCHORY <str>]
+  -OUT:<str>    	Output
+	Shapes (output)
+  -IN:<str>     	Shapes
+	Shapes (input)
+  -DX:<str>     	dX
+	Floating point
+  -DY:<str>     	dY
+	Floating point
+  -ANGLE:<str>  	Angle
+	Floating point
+  -SCALEX:<str> 	Scale Factor X
+	Floating point
+  -SCALEY:<str> 	Scale Factor Y
+	Floating point
+  -ANCHORX:<str>	X
+	Floating point
+  -ANCHORY:<str>	Y
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_312.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_256.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_256.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_256.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	recreations_fractals
+module name :	Pythagoras' Tree
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -RESULT <str> [-TYPE <str>] [-ANGLE <str>] [-MINSIZE <str>] [-METHOD <str>] [-VARRANGE_MIN <str>] [-VARRANGE_MAX <str>]
+  -RESULT:<str>      	Pythagoras' Tree
+	Shapes (output)
+  -TYPE:<str>        	Shape Type
+	Choice
+	Available Choices:
+	[0] Lines
+	[1] Polygons
+  -ANGLE:<str>       	Angle [Degree]
+	Floating point
+	Value Range: 0.000000 - 90.000000
+  -MINSIZE:<str>     	Minimum Size [%]
+	Floating point
+	Value Range: 0.001000 - 100.000000
+  -METHOD:<str>      	Method
+	Choice
+	Available Choices:
+	[0] Fixed angle
+	[1] Constant variation range
+	[2] Low variation for low sizes
+	[3] High variation for low sizes
+  -VARRANGE_MIN:<str>	Constant Variation Range [Degree]
+	Value range
+  -VARRANGE_MAX:<str>	Constant Variation Range [Degree]
+	Value range

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_256.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_175.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_175.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_175.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	ODBC Commit/Rollback Transaction
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 2 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] [-SERVERS <str>] [-TRANSACT <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -SERVERS:<str> 	Server
+	Choice
+	Available Choices:
+	[0] [not set]
+  -TRANSACT:<str>	Transactions
+	Choice
+	Available Choices:
+	[0] rollback
+	[1] commit

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_175.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_245.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_245.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_245.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud from Grid Points
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 2 -GRID <str> [-GRIDS <str>] -POINTS <str>
+  -GRID:<str>  	Z Value
+	Grid (input)
+  -GRIDS:<str> 	Additional Values
+	Grid list (optional input)
+  -POINTS:<str>	Points
+	Point Cloud (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_245.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_316.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_316.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_316.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Create New Shapes Layer
+ 1	- Join a Table
+ 2	- Merge Shapes Layers
+ 3	- Select by Attributes... (Numerical Expression)
+ 4	- Select by Attributes... (String Expression)
+ 5	- Select by Location...
+ 6	- Copy Selection to New Shapes Layer
+ 7	- Delete Selection from Shapes Layer
+ 8	- Invert Selection of Shapes Layer
+ 9	- Split Shapes Layer Completely
+ 10	- Transform Shapes
+ 11	- Create Chart Layer (bars/sectors)
+ 12	- Create graticule
+ 13	- Cut Shapes Layer
+ 15	- Split Shapes Layer
+ 16	- Split Shapes Layer Randomly
+ 17	- Split Table/Shapes by Attribute
+ 18	- Shapes Buffer
+ 19	- Get Shapes Extents
+ 20	- QuadTree Structure to Shapes
+
+type -h or --help for further information
+
+error: cannot execute interactive module [14]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_316.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_179.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_179.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_179.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Table Export
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 6 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -TABLE <str> [-NAME <str>] [-EXISTS <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -TABLE:<str>   	Table
+	Table (input)
+  -NAME:<str>    	Table Name
+	Text
+  -EXISTS:<str>  	If table exists...
+	Choice
+	Available Choices:
+	[0] abort export
+	[1] replace existing table
+	[2] append records, if table structure allows

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_179.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_249.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_249.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_249.txt	(revision 369)
@@ -0,0 +1,86 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud Reclassifier / Subset Extractor
+author      :	Volker Wichmann (c) 2009, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> [-ATTRIB <str>] -RESULT <str> [-MODE <str>] [-METHOD <str>] [-OLD <str>] [-NEW <str>] [-SOPERATOR <str>] [-MIN <str>] [-MAX <str>] [-RNEW <str>] [-ROPERATOR <str>] [-RETAB <str>] [-TOPERATOR <str>] [-RETAB_2 <str>] [-F_MIN <str>] [-F_MAX <str>] [-F_CODE <str>] [-NODATAOPT] [-NODATA <str>] [-OTHEROPT] [-OTHERS <str>]
+  -INPUT:<str>    	Point Cloud
+	Point Cloud (input)
+  -ATTRIB:<str>   	Attribute
+	Table field
+  -RESULT:<str>   	Result
+	Point Cloud (output)
+  -MODE:<str>     	Mode of operation
+	Choice
+	Available Choices:
+	[0] Reclassify
+	[1] Extract Subset
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] single
+	[1] range
+	[2] simple table
+	[3] user supplied table
+  -OLD:<str>      	old value
+	Floating point
+  -NEW:<str>      	new value
+	Floating point
+  -SOPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] =
+	[1] <
+	[2] <=
+	[3] >=
+	[4] >
+  -MIN:<str>      	minimum value
+	Floating point
+  -MAX:<str>      	maximum value
+	Floating point
+  -RNEW:<str>     	new value
+	Floating point
+  -ROPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] <=
+	[1] <
+  -RETAB:<str>    	Lookup Table
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] minimum
+	- 2. [8 byte floating point number] maximum
+	- 3. [8 byte floating point number] new
+	
+  -TOPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] min <= value < max
+	[1] min <= value <= max
+	[2] min < value <= max
+	[3] min < value < max
+  -RETAB_2:<str>  	Lookup Table
+	Table (optional input)
+  -F_MIN:<str>    	minimum value
+	Table field
+  -F_MAX:<str>    	maximum value
+	Table field
+  -F_CODE:<str>   	new value
+	Table field
+  -NODATAOPT      	no data values
+	Boolean
+  -NODATA:<str>   	no data values >> value
+	Floating point
+  -OTHEROPT       	other values
+	Boolean
+  -OTHERS:<str>   	other values >> value
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_249.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_53.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_53.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_53.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Layer of extreme value
+author      :	
+_____________________________________________
+go...
+Usage: 9 -GRIDS <str> -RESULT <str> [-CRITERIA <str>]
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -RESULT:<str>  	Result
+	Grid (output)
+  -CRITERIA:<str>	Method
+	Choice
+	Available Choices:
+	[0] Maximum
+	[1] Minimum

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_53.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_spline.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_spline.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_spline.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Thin Plate Spline (Global)
+ 1	- Thin Plate Spline (Local)
+ 2	- Thin Plate Spline (TIN)
+ 3	- B-Spline Approximation
+ 4	- Multilevel B-Spline Interpolation
+ 5	- Multilevel B-Spline Interpolation (from Grid)
+ 6	- Cubic Spline Approximation
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_spline.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_144.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_144.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_144.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_segmentation
+module name :	Grid Skeletonization
+author      :	O.Conrad (c) 2002
+_____________________________________________
+go...
+Usage: 1 -INPUT <str> -RESULT <str> [-VECTOR <str>] [-METHOD <str>] [-INIT_METHOD <str>] [-INIT_THRESHOLD <str>] [-CONVERGENCE <num>]
+  -INPUT:<str>         	Grid
+	Grid (input)
+  -RESULT:<str>        	Skeleton
+	Grid (output)
+  -VECTOR:<str>        	Skeleton
+	Shapes (optional output)
+  -METHOD:<str>        	Method
+	Choice
+	Available Choices:
+	[0] Standard
+	[1] Hilditch's Algorithm
+	[2] Channel Skeleton
+  -INIT_METHOD:<str>   	Initialisation
+	Choice
+	Available Choices:
+	[0] Less than
+	[1] Greater than
+  -INIT_THRESHOLD:<str>	Threshold (Init.)
+	Floating point
+  -CONVERGENCE:<num>   	Convergence
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_144.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_57.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_57.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_57.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Cross-Classification and Tabulation
+author      :	
+_____________________________________________
+go...
+Usage: 13 -INPUT <str> -INPUT2 <str> -RESULTGRID <str> -RESULTTABLE <str> [-MAXNUMCLASS <num>]
+  -INPUT:<str>      	Input Grid 1
+	Grid (input)
+  -INPUT2:<str>     	Input Grid 2
+	Grid (input)
+  -RESULTGRID:<str> 	Cross-Classification Grid
+	Grid (output)
+  -RESULTTABLE:<str>	Cross-Tabulation Table
+	Table (output)
+  -MAXNUMCLASS:<num>	Max. Number of Classes
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_57.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_contrib_a_perego.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_contrib_a_perego.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_contrib_a_perego.txt	(revision 369)
@@ -0,0 +1,20 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Average With Thereshold 1
+ 1	- Average With Thereshold 2
+ 2	- Average With Thereshold 3
+ 3	- Average With Mask 1
+ 4	- Average With Mask 2
+ 5	- Destriping 1
+ 6	- Destriping 2
+ 7	- Directional Average 1
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_contrib_a_perego.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_372.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_372.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_372.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Slope, Aspect, Curvature
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 0 -ELEVATION <str> -SLOPE <str> -ASPECT <str> [-CURV <str>] [-HCURV <str>] [-VCURV <str>] [-METHOD <str>]
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -SLOPE:<str>    	Slope
+	Grid (output)
+  -ASPECT:<str>   	Aspect
+	Grid (output)
+  -CURV:<str>     	Curvature
+	Grid (optional output)
+  -HCURV:<str>    	Plan Curvature
+	Grid (optional output)
+  -VCURV:<str>    	Profile Curvature
+	Grid (optional output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Maximum Slope (Travis et al. 1975)
+	[1] Maximum Triangle Slope (Tarboton 1997)
+	[2] Least Squares Fitted Plane (Horn 1981, Costa-Cabral & Burgess 1996)
+	[3] Fit 2.Degree Polynom (Bauer, Rohdenburg, Bork 1985)
+	[4] Fit 2.Degree Polynom (Heerdegen & Beran 1982)
+	[5] Fit 2.Degree Polynom (Zevenbergen & Thorne 1987)
+	[6] Fit 3.Degree Polynom (Haralick 1983)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_372.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_136.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_136.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_136.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ihacres
+module name :	IHACRES Basin
+author      :	copyrights (c) 2008 Stefan Liersch
+_____________________________________________
+go...
+Usage: 2 [-TABLEout <str>] [-NSUBBASINS <str>] [-IHACVERS <str>] [-STORAGE <str>] [-SNOW_MODULE]
+  -TABLEout:<str>  	Table
+	Data Object (optional output)
+  -NSUBBASINS:<str>	Number of sub-basins
+	Choice
+	Available Choices:
+	[0] 2
+	[1] 3
+	[2] 4
+	[3] 5
+	[4] 6
+	[5] 7
+	[6] 8
+	[7] 9
+	[8] 10
+  -IHACVERS:<str>  	IHACRES Version
+	Choice
+	Available Choices:
+	[0] Jakeman & Hornberger (1993)
+	[1] Croke et al. (2005) !!! not yet implemented !!!
+  -STORAGE:<str>   	Storage
+	Choice
+	Available Choices:
+	[0] Single Storage
+	[1] Two Parallel Storages
+	[2] Two Storages in Series !!! not yet implemented !!!
+  -SNOW_MODULE     	Using the snow-melt module?
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_136.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_208.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_208.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_208.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_table
+module name :	Export Text Table
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 0 -TABLE <str> [-HEADLINE] [-STRQUOTA] [-SEPARATOR <str>] [-SEP_OTHER <str>] [-FILENAME <str>]
+  -TABLE:<str>    	Table
+	Table (input)
+  -HEADLINE       	Save Headline
+	Boolean
+  -STRQUOTA       	Strings in Quota
+	Boolean
+  -SEPARATOR:<str>	Separator
+	Choice
+	Available Choices:
+	[0] tabulator
+	[1] ;
+	[2] ,
+	[3] other
+  -SEP_OTHER:<str>	Separator (other)
+	Text
+  -FILENAME:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_208.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_hydrology.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_hydrology.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_hydrology.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_hydrology.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_273.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_273.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_273.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Convert Points to Line(s)
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 1 -LINES <str> -POINTS <str> [-ORDER <str>] [-SEPARATE <str>]
+  -LINES:<str>   	Lines
+	Shapes (output)
+  -POINTS:<str>  	Points
+	Shapes (input)
+  -ORDER:<str>   	Order by...
+	Table field
+  -SEPARATE:<str>	Separate by...
+	Table field

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_273.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_376.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_376.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_376.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Curvature Classification
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -CPLAN <str> -CPROF <str> [-THRESHOLD <str>] -CLASS <str>
+  -CPLAN:<str>    	Plan Curvature
+	Grid (input)
+  -CPROF:<str>    	Profile Curvature
+	Grid (input)
+  -THRESHOLD:<str>	Threshold for plane
+	Floating point
+	Minimum: 0.000000
+  -CLASS:<str>    	Curvature Classification
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_376.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_9.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_9.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_9.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	docs_pdf
+module name :	Shapes Report
+author      :	(c) 2005 by O.Conrad, V.Olaya
+_____________________________________________
+go...
+Usage: 0 -SHAPES <str> [-SUBTITLE <str>] [-FILENAME <str>] [-PAPER_SIZE <str>] [-LAYOUT_MODE <str>] [-LAYOUT_BREAK <str>] [-COLUMNS <num>] [-CELL_MODE <str>] [-CELL_HEIGHT <num>]
+  -SHAPES:<str>      	Shapes
+	Shapes (input)
+  -SUBTITLE:<str>    	Subtitle
+	Table field
+  -FILENAME:<str>    	PDF File
+	File path
+  -PAPER_SIZE:<str>  	Paper Format
+	Choice
+	Available Choices:
+	[0] A4 Portrait
+	[1] A4 Landscape
+	[2] A3 Portrait
+	[3] A3 Landscape
+  -LAYOUT_MODE:<str> 	Layout
+	Choice
+	Available Choices:
+	[0] horizontal
+	[1] vertical
+  -LAYOUT_BREAK:<str>	Map/Table Size Ratio [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -COLUMNS:<num>     	Columns
+	Integer
+	Minimum: 1.000000
+  -CELL_MODE:<str>   	Cell Sizes
+	Choice
+	Available Choices:
+	[0] fit to page
+	[1] fixed cell height
+  -CELL_HEIGHT:<num> 	Cell Height
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_9.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_398.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_398.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_398.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 3	- Cross Profiles
+ 4	- Profiles from Lines
+ 5	- Profile from points
+
+type -h or --help for further information
+
+error: cannot execute interactive module [1]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_398.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_189.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_189.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_189.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Shapes from XYZ
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-X_FIELD <num>] [-Y_FIELD <num>] [-FILENAME <str>]
+  -SHAPES:<str>  	Points
+	Shapes (output)
+  -X_FIELD:<num> 	X Column
+	Integer
+	Minimum: 1.000000
+  -Y_FIELD:<num> 	Y Column
+	Integer
+	Minimum: 1.000000
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_189.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_ecosystems_hugget.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_ecosystems_hugget.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_ecosystems_hugget.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- 01: A Simple Litter System
+ 1	- 02: Carbon Cycle Simulation for Terrestrial Biomes
+ 2	- 03: Spatially Distributed Simulation of Soil Nitrogen Dynamics
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_ecosystems_hugget.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_277.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_277.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_277.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Line Dissolve
+author      :	O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 5 -LINES <str> [-FIELD_1 <str>] [-FIELD_2 <str>] [-FIELD_3 <str>] -DISSOLVED <str> [-ALL <str>]
+  -LINES:<str>    	Lines
+	Shapes (input)
+  -FIELD_1:<str>  	1. Attribute
+	Table field
+  -FIELD_2:<str>  	2. Attribute
+	Table field
+  -FIELD_3:<str>  	3. Attribute
+	Table field
+  -DISSOLVED:<str>	Dissolved Lines
+	Shapes (output)
+  -ALL:<str>      	Dissolve...
+	Choice
+	Available Choices:
+	[0] lines with same attribute value(s)
+	[1] all lines

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_277.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_214.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_214.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_214.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	03: Direct neighbours
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 2 -INPUT <str> -OUTPUT <str> [-METHOD <str>]
+  -INPUT:<str> 	Input grid
+	Grid (input)
+  -OUTPUT:<str>	Output
+	Grid (output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Difference to left neighbour
+	[1] Difference to left neighbour (using a while loop)
+	[2] Slope gradient to left neighbour [%%]
+	[3] Slope gradient to left neighbour [Degree]

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_214.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_233.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_233.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_233.txt	(revision 369)
@@ -0,0 +1,77 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Coordinate Transformation (Grid List)
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 [-CRS_METHOD <str>] [-CRS_PROJ4 <str>] [-CRS_FILE <str>] [-CRS_EPSG <num>] -SOURCE <str> [-TARGET <str>] [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-TARGET_AREA] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_SYSTEM_SYSTEM_NX <num>] [-GET_SYSTEM_SYSTEM_NY <num>] [-GET_SYSTEM_SYSTEM_X <str>] [-GET_SYSTEM_SYSTEM_Y <str>] [-GET_SYSTEM_SYSTEM_D <str>] [-POINTS_POINTS <str>]
+  -CRS_METHOD:<str>          	Get CRS Definition from...
+	Choice
+	Available Choices:
+	[0] Proj4 Parameters
+	[1] EPSG Code
+	[2] Well Known Text File
+  -CRS_PROJ4:<str>           	Proj4 Parameters
+	Long text
+  -CRS_FILE:<str>            	Well Known Text File
+	File path
+  -CRS_EPSG:<num>            	EPSG Code
+	Integer
+	Value Range: 2000.000000 - 32766.000000
+  -SOURCE:<str>              	Source
+	Grid list (input)
+  -TARGET:<str>              	Target
+	Grid list (optional output)
+  -CREATE_XY                 	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>               	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>               	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>       	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>         	Target
+	Choice
+	Available Choices:
+	[0] user defined grid system
+	[1] existing grid system
+	[2] points
+  -TARGET_AREA               	Use Target Area Polygon
+	Boolean
+  -GET_USER_XMIN:<str>       	Left
+	Floating point
+  -GET_USER_XMAX:<str>       	Right
+	Floating point
+  -GET_USER_YMIN:<str>       	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>       	Top
+	Floating point
+  -GET_USER_SIZE:<str>       	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_SYSTEM_SYSTEM_NX:<num>	Grid System
+	Grid system
+  -GET_SYSTEM_SYSTEM_NY:<num>	Grid System
+	Grid system
+  -GET_SYSTEM_SYSTEM_X:<str> 	Grid System
+	Grid system
+  -GET_SYSTEM_SYSTEM_Y:<str> 	Grid System
+	Grid system
+  -GET_SYSTEM_SYSTEM_D:<str> 	Grid System
+	Grid system
+  -POINTS_POINTS:<str>       	Points
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_233.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_270.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_270.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_270.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Add Grid Values to Points
+ 1	- Add Grid Values to Shapes
+ 2	- Grid Statistics for Polygons
+ 3	- Grid Values to Shapes
+ 4	- Grid Values to Points (randomly)
+ 5	- Contour Lines from Grid
+ 6	- Vectorising Grid Classes
+ 7	- Clip Grid with Polygon
+ 9	- Local Minima and Maxima
+ 10	- Grid System Extent
+ 15	- Gradient Vectors from Surface
+ 16	- Gradient Vectors from Direction and Length
+ 17	- Gradient Vectors from Directional Components
+
+type -h or --help for further information
+
+error: module not found [11]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_270.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_image.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_image.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_image.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Export Image (bmp, jpg, pcx, png, tif)
+ 1	- Import Image (bmp, jpg, png, tif, gif, pnm, xpm)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid_image.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_218.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_218.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_218.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	07: Extended neighbourhoods - catchment areas (trace flow)
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 6 -ELEVATION <str> -AREA <str> -LENGTH <str> [-STEP <num>] [-METHOD <str>] [-ONECELL] [-XCELL <num>] [-YCELL <num>]
+  -ELEVATION:<str>	Elevation grid
+	Grid (input)
+  -AREA:<str>     	Catchment area
+	Grid (output)
+  -LENGTH:<str>   	Flow Path Length
+	Grid (output)
+  -STEP:<num>     	Step
+	Integer
+	Minimum: 1.000000
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Needs less memory, but is slow
+	[1] Needs more memory, but is quicker
+  -ONECELL        	Single Cell
+	Boolean
+  -XCELL:<num>    	X Position
+	Integer
+  -YCELL:<num>    	Y Position
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_218.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_237.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_237.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_237.txt	(revision 369)
@@ -0,0 +1,60 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Command Line Arguments, Grid)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+Usage: 7 [-SOURCE_PROJ <str>] [-TARGET_PROJ <str>] -SOURCE <str> [-SHAPES <str>] [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_USER_GRID <str>] [-GET_GRID_GRID <str>] [-GET_SHAPES_SHAPES <str>]
+  -SOURCE_PROJ:<str>      	Source Projection Parameters
+	Text
+  -TARGET_PROJ:<str>      	Target Projection Parameters
+	Text
+  -SOURCE:<str>           	Source
+	Grid (input)
+  -SHAPES:<str>           	Shapes
+	Data Object (optional output)
+  -CREATE_XY              	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>            	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>            	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>    	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>      	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -GET_USER_XMIN:<str>    	Left
+	Floating point
+  -GET_USER_XMAX:<str>    	Right
+	Floating point
+  -GET_USER_YMIN:<str>    	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>    	Top
+	Floating point
+  -GET_USER_SIZE:<str>    	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_USER_GRID:<str>    	Grid
+	Data Object (optional output)
+  -GET_GRID_GRID:<str>    	Grid
+	Grid (output)
+  -GET_SHAPES_SHAPES:<str>	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_237.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_152.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_152.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_152.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gdal
+module name :	GDAL: Export Raster to GeoTIFF
+author      :	O.Conrad (c) 2007
+_____________________________________________
+go...
+Usage: 2 -GRIDS <str> [-FILE <str>]
+  -GRIDS:<str>	Grid(s)
+	Grid list (input)
+  -FILE:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_152.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_33.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_33.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_33.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_points
+module name :	Variogram Cloud
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -POINTS <str> [-FIELD <str>] -RESULT <str> [-DISTMAX <str>] [-NSKIP <num>]
+  -POINTS:<str> 	Points
+	Shapes (input)
+  -FIELD:<str>  	Attribute
+	Table field
+  -RESULT:<str> 	Variogram Cloud
+	Table (output)
+  -DISTMAX:<str>	Maximum Distance
+	Floating point
+	Minimum: 0.000000
+  -NSKIP:<num>  	Skip Number
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_33.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_180.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_180.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_180.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Table Deletion
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 7 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] [-TABLES <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -TABLES:<str>  	Tables
+	Choice
+	Available Choices:
+	[0] --- no table available ---

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_180.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_250.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_250.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_250.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Drop Point Cloud Attribute
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 7 -INPUT <str> [-ATTRIB <str>] [-OUTPUT <str>]
+  -INPUT:<str> 	Input
+	Point Cloud (input)
+  -ATTRIB:<str>	Attribute to drop
+	Table field
+  -OUTPUT:<str>	Output
+	Point Cloud (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_250.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_321.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_321.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_321.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Get Shapes Extents
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 19 -SHAPES <str> -EXTENTS <str> [-PARTS]
+  -SHAPES:<str> 	Shapes
+	Shapes (input)
+  -EXTENTS:<str>	Extents
+	Shapes (output)
+  -PARTS        	Parts
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_321.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_104.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_104.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_104.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Aggregate
+author      :	Copyrights (c) 2005 by Victor Olaya
+_____________________________________________
+go...
+Usage: 1 -INPUT <str> [-SIZE <num>] [-METHOD <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -SIZE:<num>  	Aggregation Size
+	Integer
+	Minimum: 2.000000
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Sum
+	[1] Min
+	[2] Max

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_104.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_184.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_184.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_184.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	PostGIS Shapes Import
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 11 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -SHAPES <str> [-TABLES <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -SHAPES:<str>  	Shapes
+	Shapes (output)
+  -TABLES:<str>  	Tables
+	Choice
+	Available Choices:
+	[0] --- no table available ---

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_184.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_lighting.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_lighting.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_lighting.txt	(revision 369)
@@ -0,0 +1,16 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Analytical Hillshading
+ 2	- Potential Incoming Solar Radiation
+ 3	- Sky View Factor
+ 4	- Topographic Correction
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_lighting.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_108.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_108.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_108.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Patching
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -ORIGINAL <str> -ADDITIONAL <str> -COMPLETED <str> [-INTERPOLATION <str>]
+  -ORIGINAL:<str>     	Grid
+	Grid (input)
+  -ADDITIONAL:<str>   	Patch Grid
+	Grid (input)
+  -COMPLETED:<str>    	Completed Grid
+	Grid (output)
+  -INTERPOLATION:<str>	Interpolation Method
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_108.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_205.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_205.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_205.txt	(revision 369)
@@ -0,0 +1,66 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes_las
+module name :	Export LAS Files
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 0 -POINTS <str> [-T <str>] [-i <str>] [-a <str>] [-r <str>] [-n <str>] [-c <str>] [-u <str>] [-R <str>] [-G <str>] [-B <str>] [-e <str>] [-d <str>] [-p <str>] [-RGB <str>] [-OFF_X <str>] [-OFF_Y <str>] [-OFF_Z <str>] [-SCALE_X <str>] [-SCALE_Y <str>] [-SCALE_Z <str>] [-FORMAT <str>] [-FILE <str>]
+  -POINTS:<str> 	Point Cloud
+	Point Cloud (input)
+  -T:<str>      	gps-time
+	Table field
+  -i:<str>      	intensity
+	Table field
+  -a:<str>      	scan angle
+	Table field
+  -r:<str>      	number of the return
+	Table field
+  -n:<str>      	number of returns of given pulse
+	Table field
+  -c:<str>      	classification
+	Table field
+  -u:<str>      	user data
+	Table field
+  -R:<str>      	red channel color
+	Table field
+  -G:<str>      	green channel color
+	Table field
+  -B:<str>      	blue channel color
+	Table field
+  -e:<str>      	edge of flight line flag
+	Table field
+  -d:<str>      	direction of scan flag
+	Table field
+  -p:<str>      	point source ID
+	Table field
+  -RGB:<str>    	SAGA RGB color
+	Table field
+  -OFF_X:<str>  	Offset X
+	Floating point
+  -OFF_Y:<str>  	Offset Y
+	Floating point
+  -OFF_Z:<str>  	Offset Z
+	Floating point
+  -SCALE_X:<str>	Scale X
+	Floating point
+  -SCALE_Y:<str>	Scale Y
+	Floating point
+  -SCALE_Z:<str>	Scale Z
+	Floating point
+  -FORMAT:<str> 	Point Data Record Format
+	Choice
+	Available Choices:
+	[0] 0
+	[1] 1
+	[2] 2
+	[3] 3
+  -FILE:<str>   	Output File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_205.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_15.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_15.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_15.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Representativeness (Grid)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -INPUT <str> -RESULT <str> [-RADIUS <num>] [-EXPONENT <str>]
+  -INPUT:<str>   	Grid
+	Grid (input)
+  -RESULT:<str>  	Representativeness
+	Grid (output)
+  -RADIUS:<num>  	Radius (Cells)
+	Integer
+  -EXPONENT:<str>	Exponent
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_15.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_39.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_39.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_39.txt	(revision 369)
@@ -0,0 +1,58 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Polynomial Regression
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 2 -POINTS <str> [-ATTRIBUTE <str>] [-RESIDUALS <str>] [-POLYNOM <str>] [-XORDER <num>] [-YORDER <num>] [-TORDER <num>] [-TARGET <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -POINTS:<str>   	Points
+	Shapes (input)
+  -ATTRIBUTE:<str>	Attribute
+	Table field
+  -RESIDUALS:<str>	Residuals
+	Shapes (optional output)
+  -POLYNOM:<str>  	Polynom
+	Choice
+	Available Choices:
+	[0] simple planar surface
+	[1] bi-linear saddle
+	[2] quadratic surface
+	[3] cubic surface
+	[4] user defined
+  -XORDER:<num>   	Maximum X Order
+	Integer
+	Minimum: 1.000000
+  -YORDER:<num>   	Maximum Y Order
+	Integer
+	Minimum: 1.000000
+  -TORDER:<num>   	Maximum Total Order
+	Integer
+	Minimum: 0.000000
+  -TARGET:<str>   	Trend Surface
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_39.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_odbc.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_odbc.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_odbc.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- ODBC Connect
+ 1	- ODBC Disconnect
+ 2	- ODBC Commit/Rollback Transaction
+ 3	- ODBC Execute SQL
+ 4	- Table Field Description
+ 5	- Table Import
+ 6	- Table Export
+ 7	- Table Deletion
+ 8	- Table from Query
+ 9	- Points Import
+ 10	- Points Export
+ 11	- PostGIS Shapes Import
+ 12	- PostGIS Shapes Export
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_odbc.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_190.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_190.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_190.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export Shapes to Generate
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -SHAPES <str> [-FIELD <str>] [-FILENAME <str>]
+  -SHAPES:<str>  	Shapes
+	Shapes (input)
+  -FIELD:<str>   	Attribute
+	Table field
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_190.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_19.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_19.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_19.txt	(revision 369)
@@ -0,0 +1,66 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Directional Statistics for Single Grid
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -GRID <str> [-MEAN <str>] [-DIFMEAN <str>] [-MIN <str>] [-MAX <str>] [-RANGE <str>] [-VAR <str>] [-STDDEV <str>] [-STDDEVLO <str>] [-STDDEVHI <str>] [-DEVMEAN <str>] [-PERCENT <str>] [-POINTS <str>] [-POINTS_OUT <str>] [-DIRECTION <str>] [-TOLERANCE <str>] [-MAXDISTANCE <num>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>]
+  -GRID:<str>                        	Grid
+	Grid (input)
+  -MEAN:<str>                        	Arithmetic Mean
+	Grid (optional output)
+  -DIFMEAN:<str>                     	Difference from Arithmetic Mean
+	Grid (optional output)
+  -MIN:<str>                         	Minimum
+	Grid (optional output)
+  -MAX:<str>                         	Maximum
+	Grid (optional output)
+  -RANGE:<str>                       	Range
+	Grid (optional output)
+  -VAR:<str>                         	Variance
+	Grid (optional output)
+  -STDDEV:<str>                      	Standard Deviation
+	Grid (optional output)
+  -STDDEVLO:<str>                    	Mean less Standard Deviation
+	Grid (optional output)
+  -STDDEVHI:<str>                    	Mean plus Standard Deviation
+	Grid (optional output)
+  -DEVMEAN:<str>                     	Deviation from Arithmetic Mean
+	Grid (optional output)
+  -PERCENT:<str>                     	Percentile
+	Grid (optional output)
+  -POINTS:<str>                      	Points
+	Shapes (optional input)
+  -POINTS_OUT:<str>                  	Directional Statistics for Points
+	Shapes (optional output)
+  -DIRECTION:<str>                   	Direction [Degree]
+	Floating point
+  -TOLERANCE:<str>                   	Tolerance [Degree]
+	Floating point
+	Value Range: 0.000000 - 45.000000
+  -MAXDISTANCE:<num>                 	Maximum Distance [Cells]
+	Integer
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_19.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_381.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_381.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_381.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Downslope Distance Gradient
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 9 -DEM <str> -GRADIENT <str> [-DIFFERENCE <str>] [-DISTANCE <str>] [-OUTPUT <str>]
+  -DEM:<str>       	Elevation
+	Grid (input)
+  -GRADIENT:<str>  	Gradient
+	Grid (output)
+  -DIFFERENCE:<str>	Gradient Difference
+	Grid (optional output)
+  -DISTANCE:<str>  	Vertical Distance
+	Floating point
+	Minimum: 0.000000
+  -OUTPUT:<str>    	Output
+	Choice
+	Available Choices:
+	[0] distance
+	[1] gradient (tangens)
+	[2] gradient (degree)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_381.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_194.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_194.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_194.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Atlas Boundary File
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 8 [-FILE <str>]
+  -FILE:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_194.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_172.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_172.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_172.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid_image
+module name :	Import Image (bmp, jpg, png, tif, gif, pnm, xpm)
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 [-OUT_GRID <str>] [-OUT_RED <str>] [-OUT_GREEN <str>] [-OUT_BLUE <str>] [-FILE <str>] [-METHOD <str>]
+  -OUT_GRID:<str> 	Image
+	Data Object (optional output)
+  -OUT_RED:<str>  	Image (Red Channel)
+	Data Object (optional output)
+  -OUT_GREEN:<str>	Image (Green Channel)
+	Data Object (optional output)
+  -OUT_BLUE:<str> 	Image (Blue Channel)
+	Data Object (optional output)
+  -FILE:<str>     	Image File
+	File path
+  -METHOD:<str>   	Options
+	Choice
+	Available Choices:
+	[0] Standard
+	[1] Split Channels
+	[2] Enforce True Color

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_image_172.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_393.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_393.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_393.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Fill Sinks (Planchon/Darboux, 2001)
+author      :	Copyrights (c) 2003 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 3 -DEM <str> -RESULT <str> [-MINSLOPE <str>]
+  -DEM:<str>     	DEM
+	Grid (input)
+  -RESULT:<str>  	Filled DEM
+	Grid (output)
+  -MINSLOPE:<str>	Minimum Slope [Degree]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_393.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_385.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_385.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_385.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Land Surface Temperature
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 13 -DEM <str> -SWR <str> -LAI <str> -LST <str> [-Z_REFERENCE <str>] [-T_REFERENCE <str>] [-T_GRADIENT <str>] [-C_FACTOR <str>]
+  -DEM:<str>        	Elevation [m]
+	Grid (input)
+  -SWR:<str>        	Short Wave Radiation [kW/m2]
+	Grid (input)
+  -LAI:<str>        	Leaf Area Index
+	Grid (input)
+  -LST:<str>        	Land Surface Temperature [Deg.Celsius]
+	Grid (output)
+  -Z_REFERENCE:<str>	Elevation at Reference Station [m]
+	Floating point
+  -T_REFERENCE:<str>	Temperature at Reference Station [Deg.Celsius]
+	Floating point
+  -T_GRADIENT:<str> 	Temperature Gradient [Deg.Celsius/km]
+	Floating point
+  -C_FACTOR:<str>   	C Factor
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_385.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_159.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_159.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_159.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Export Surfer Grid
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -GRID <str> [-FILE <str>] [-FORMAT <str>] [-NODATA]
+  -GRID:<str>  	Grid
+	Grid (input)
+  -FILE:<str>  	File
+	File path
+  -FORMAT:<str>	Format
+	Choice
+	Available Choices:
+	[0] binary
+	[1] ASCII
+  -NODATA      	Use Surfer's No-Data Value
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_159.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_198.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_198.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_198.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export TIN to Stereo Lithography File (STL)
+author      :	Navaladi, Schoeller, Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 12 -TIN <str> [-ZFIELD <str>] [-FILE <str>] [-BINARY <str>]
+  -TIN:<str>   	TIN
+	TIN (input)
+  -ZFIELD:<str>	Z Attribute
+	Table field
+  -FILE:<str>  	File
+	File path
+  -BINARY:<str>	Output Type
+	Choice
+	Available Choices:
+	[0] ASCII
+	[1] binary

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_198.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_226.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_226.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_226.txt	(revision 369)
@@ -0,0 +1,18 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 1	- Georeferencing - Grids
+ 2	- Georeferencing - Shapes
+
+type -h or --help for further information
+
+error: cannot execute interactive module [0]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_226.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_389.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_389.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_389.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Vector Ruggedness Measure (VRM)
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 17 -DEM <str> -VRM <str> [-RADIUS <num>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>]
+  -DEM:<str>                         	Elevation
+	Grid (input)
+  -VRM:<str>                         	Vector Terrain Ruggedness (VRM)
+	Grid (output)
+  -RADIUS:<num>                      	Radius (Cells)
+	Integer
+	Minimum: 1.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_389.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_223.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_223.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_223.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	12: First steps with shapes
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 11 -INPUT <str> -OUTPUT <str> [-DX <str>] [-DY <str>]
+  -INPUT:<str> 	Input
+	Shapes (input)
+  -OUTPUT:<str>	Output
+	Shapes (output)
+  -DX:<str>    	Translation: X
+	Floating point
+  -DY:<str>    	Translation: Y
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_223.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_348.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_348.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_348.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Vertical Distance to Channel Network
+author      :	(c) 2002 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -ELEVATION <str> -CHANNELS <str> -ALTITUDE <str> [-BASELEVEL <str>] [-THRESHOLD <str>] [-NOUNDERGROUND]
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -CHANNELS:<str> 	Channel Network
+	Grid (input)
+  -ALTITUDE:<str> 	Vertical Distance to Channel Network
+	Grid (output)
+  -BASELEVEL:<str>	Channel Network Base Level
+	Grid (optional output)
+  -THRESHOLD:<str>	Tension Threshold [m]
+	Floating point
+  -NOUNDERGROUND  	Keep Base Level below Surface
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_348.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_242.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_242.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_242.txt	(revision 369)
@@ -0,0 +1,932 @@
+Usage: 12 [-SOURCE_PROJ_PROJ_TYPE <str>] [-SOURCE_PROJ_DATUM_DEF <str>] [-SOURCE_PROJ_DATUM <str>] [-SOURCE_PROJ_DATUM_GRID <str>] [-SOURCE_PROJ_ELLIPSOID <str>] [-SOURCE_PROJ_ELLPS_PREDEF <str>] [-SOURCE_PROJ_ELLPS_A <str>] [-SOURCE_PROJ_ELLPS_B <str>] [-SOURCE_PROJ_ELLPS_F <str>] [-SOURCE_PROJ_ELLPS_RF <str>] [-SOURCE_PROJ_ELLPS_E <str>] [-SOURCE_PROJ_ELLPS_ES <str>] [-SOURCE_PROJ_DATUM_SHIFT <str>] [-SOURCE_PROJ_DS_DX <str>] [-SOURCE_PROJ_DS_DY <str>] [-SOURCE_PROJ_DS_DZ <str>] [-SOURCE_PROJ_DS_RX <str>] [-SOURCE_PROJ_DS_RY <str>] [-SOURCE_PROJ_DS_RZ <str>] [-SOURCE_PROJ_DS_SC <str>] [-SOURCE_PROJ_LON_0 <str>] [-SOURCE_PROJ_LAT_0 <str>] [-SOURCE_PROJ_X_0 <str>] [-SOURCE_PROJ_Y_0 <str>] [-SOURCE_PROJ_K_0 <str>] [-SOURCE_PROJ_UNIT <str>] [-TARGET_PROJ_PROJ_TYPE <str>] [-TARGET_PROJ_DATUM_DEF <str>] [-TARGET_PROJ_DATUM <str>] [-TARGET_PROJ_DATUM_GRID <str>] [-TARGET_PROJ_ELLIPSOID <str>] [-TARGET_PROJ_ELLPS_PREDEF <str>] [-TARGET_PROJ_ELLPS_A <str>] [-TARGET_PROJ_ELLPS_B <str>] [-TARGET_PROJ_ELLPS_F <str>] [-TARGET_PROJ_ELLPS_RF <str>] [-TARGET_PROJ_ELLPS_E <str>] [-TARGET_PROJ_ELLPS_ES <str>] [-TARGET_PROJ_DATUM_SHIFT <str>] [-TARGET_PROJ_DS_DX <str>] [-TARGET_PROJ_DS_DY <str>] [-TARGET_PROJ_DS_DZ <str>] [-TARGET_PROJ_DS_RX <str>] [-TARGET_PROJ_DS_RY <str>] [-TARGET_PROJ_DS_RZ <str>] [-TARGET_PROJ_DS_SC <str>] [-TARGET_PROJ_LON_0 <str>] [-TARGET_PROJ_LAT_0 <str>] [-TARGET_PROJ_X_0 <str>] [-TARGET_PROJ_Y_0 <str>] [-TARGET_PROJ_K_0 <str>] [-TARGET_PROJ_UNIT <str>] -SOURCE <str> [-TARGET <str>] [-SHAPES <str>] [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_SYSTEM_SYSTEM_NX <num>] [-GET_SYSTEM_SYSTEM_NY <num>] [-GET_SYSTEM_SYSTEM_X <str>] [-GET_SYSTEM_SYSTEM_Y <str>] [-GET_SYSTEM_SYSTEM_D <str>] [-GET_SHAPES_SHAPES <str>]
+  -SOURCE_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -SOURCE_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -SOURCE_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -SOURCE_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -SOURCE_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -SOURCE_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -SOURCE_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -SOURCE_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -SOURCE_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -SOURCE_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -SOURCE_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -SOURCE_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -SOURCE_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -SOURCE_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -SOURCE_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -SOURCE_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -SOURCE_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -SOURCE_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -SOURCE_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -SOURCE_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -SOURCE_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -SOURCE_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -SOURCE_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -SOURCE_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -SOURCE_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -SOURCE_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -TARGET_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -TARGET_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -TARGET_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -TARGET_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -TARGET_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -TARGET_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -TARGET_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -TARGET_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -TARGET_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -TARGET_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -TARGET_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -TARGET_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -TARGET_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -TARGET_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -TARGET_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -TARGET_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -TARGET_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -TARGET_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -TARGET_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -TARGET_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -TARGET_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -TARGET_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -TARGET_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -TARGET_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -TARGET_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -TARGET_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -SOURCE:<str>                  	Source
+	Grid list (input)
+  -TARGET:<str>                  	Target
+	Grid list (optional output)
+  -SHAPES:<str>                  	Shapes
+	Data Object (optional output)
+  -CREATE_XY                     	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>                   	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>                   	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>           	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>             	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<s_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Dialog, List of Grids)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+tr>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -GET_USER_XMIN:<str>           	Left
+	Floating point
+  -GET_USER_XMAX:<str>           	Right
+	Floating point
+  -GET_USER_YMIN:<str>           	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>           	Top
+	Floating point
+  -GET_USER_SIZE:<str>           	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_SYSTEM_SYSTEM_NX:<num>    	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_NY:<num>    	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_X:<str>     	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_Y:<str>     	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_D:<str>     	System
+	Grid system
+  -GET_SHAPES_SHAPES:<str>       	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_242.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_331.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_331.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_331.txt	(revision 369)
@@ -0,0 +1,46 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_hydrology
+module name :	Overland Flow - Kinematic Wave D8
+author      :	O. Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -DEM <str> -FLOW <str> [-GAUGES <str>] [-GAUGES_FLOW <str>] [-TIME_SPAN <str>] [-TIME_STEP <str>] [-ROUGHNESS <str>] [-NEWTON_MAXITER <num>] [-NEWTON_EPSILON <str>] [-PRECIP <str>] [-THRESHOLD <str>]
+  -DEM:<str>           	Elevation
+	Grid (input)
+  -FLOW:<str>          	Runoff
+	Grid (output)
+  -GAUGES:<str>        	Gauges
+	Shapes (optional input)
+  -GAUGES_FLOW:<str>   	Flow at Gauges
+	Table (optional output)
+  -TIME_SPAN:<str>     	Simulation Time [h]
+	Floating point
+	Minimum: 0.000000
+  -TIME_STEP:<str>     	Simulation Time Step [h]
+	Floating point
+	Minimum: 0.000000
+  -ROUGHNESS:<str>     	Manning's Roughness
+	Floating point
+	Minimum: 0.000000
+  -NEWTON_MAXITER:<num>	Max. Iterations
+	Integer
+	Minimum: 1.000000
+  -NEWTON_EPSILON:<str>	Epsilon
+	Floating point
+	Minimum: 0.000000
+  -PRECIP:<str>        	Precipitation
+	Choice
+	Available Choices:
+	[0] Homogenous
+	[1] Above Elevation
+	[2] Left Half
+  -THRESHOLD:<str>     	Threshold Elevation
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_331.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_278.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_278.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_278.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Convert Table to Points
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 0 -POINTS <str> -TABLE <str> [-X <str>] [-Y <str>]
+  -POINTS:<str>	Points
+	Shapes (output)
+  -TABLE:<str> 	Table
+	Table (input)
+  -X:<str>     	X
+	Table field
+  -Y:<str>     	Y
+	Table field

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_278.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ihacres.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ihacres.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ihacres.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- IHACRES Calibration (2)
+ 1	- IHACRES Version 1.0
+ 2	- IHACRES Basin
+ 3	- IHACRES Elevation Bands
+ 4	- IHACRES Elevation Bands Calibration
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ihacres.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_channels.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_channels.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_channels.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Channel Network
+ 1	- Watershed Basins
+ 2	- Watershed Basins (Extended)
+ 3	- Vertical Distance to Channel Network
+ 4	- Overland Flow Distance to Channel Network
+ 5	- D8 Flow Analysis
+ 6	- Strahler Order
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_channels.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_63.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_63.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_63.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Function
+author      :	Copyrights (c) 2003 by Andre Ringeler
+_____________________________________________
+go...
+Usage: 4 -RESULT <str> [-XMIN <str>] [-XMAX <str>] [-YMIN <str>] [-YMAX <str>] [-FORMUL <str>]
+  -RESULT:<str>	Function
+	Grid (output)
+  -XMIN:<str>  	xmin
+	Floating point
+  -XMAX:<str>  	xmax
+	Floating point
+  -YMIN:<str>  	ymin
+	Floating point
+  -YMAX:<str>  	ymax
+	Floating point
+  -FORMUL:<str>	Formula
+	Text

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_63.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_grib2_170.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_grib2_170.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_grib2_170.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid_grib2
+module name :	Import GRIB2 record
+author      :	Copyright (c) 2007 by Thomas Schorr
+_____________________________________________
+go...
+Usage: 0 [-OUT_GRID <str>] [-FILE <str>]
+  -OUT_GRID:<str>	Grid
+	Data Object (optional output)
+  -FILE:<str>    	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_grib2_170.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_40.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_40.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_40.txt	(revision 369)
@@ -0,0 +1,89 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Geographically Weighted Regression
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 -POINTS <str> [-DEPENDENT <str>] [-PREDICTOR <str>] [-TARGET <str>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>] [-RANGE <str>] [-RADIUS <str>] [-MODE <str>] [-NPOINTS <str>] [-MAXPOINTS <num>] [-MINPOINTS <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_QUALITY <str>] [-USER_INTERCEPT <str>] [-USER_SLOPE <str>] [-GRID_QUALITY <str>] [-GRID_INTERCEPT <str>] [-GRID_SLOPE <str>]
+  -POINTS:<str>                      	Points
+	Shapes (input)
+  -DEPENDENT:<str>                   	Dependent Variable
+	Table field
+  -PREDICTOR:<str>                   	Predictor
+	Table field
+  -TARGET:<str>                      	Target Grids
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>                       	Search Range
+	Choice
+	Available Choices:
+	[0] search radius (local)
+	[1] no search radius (global)
+  -RADIUS:<str>                      	Search Radius
+	Floating point
+  -MODE:<str>                        	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -NPOINTS:<str>                     	Number of Points
+	Choice
+	Available Choices:
+	[0] maximum number of observations
+	[1] all points
+  -MAXPOINTS:<num>                   	Maximum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -MINPOINTS:<num>                   	Minimum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -USER_XMIN:<str>                   	Left
+	Floating point
+  -USER_XMAX:<str>                   	Right
+	Floating point
+  -USER_YMIN:<str>                   	Bottom
+	Floating point
+  -USER_YMAX:<str>                   	Top
+	Floating point
+  -USER_SIZE:<str>                   	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>                   	Grid
+	Data Object (optional output)
+  -USER_QUALITY:<str>                	Quality
+	Data Object (optional output)
+  -USER_INTERCEPT:<str>              	Intercept
+	Data Object (optional output)
+  -USER_SLOPE:<str>                  	Slope
+	Data Object (optional output)
+  -GRID_QUALITY:<str>                	Quality
+	Grid (output)
+  -GRID_INTERCEPT:<str>              	Intercept
+	Grid (output)
+  -GRID_SLOPE:<str>                  	Slope
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_40.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_113.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_113.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_113.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Grid Proximity Buffer
+author      :	Copyrights (c) 2006 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 10 -SOURCE <str> -DISTANCE <str> -ALLOC <str> -BUFFER <str> [-DIST <str>] [-IVAL <num>]
+  -SOURCE:<str>  	Source Grid
+	Grid (input)
+  -DISTANCE:<str>	Distance Grid
+	Grid (output)
+  -ALLOC:<str>   	Allocation Grid
+	Grid (output)
+  -BUFFER:<str>  	Buffer Grid
+	Grid (output)
+  -DIST:<str>    	Buffer distance
+	Floating point
+  -IVAL:<num>    	Equidistance
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_113.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_20.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_20.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_20.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Global Moran's I for Grids
+author      :	Jan Papmeier (c) 2010
+_____________________________________________
+go...
+Usage: 7 -GRID <str> -RESULT <str> [-CONTIGUITY <str>] [-DIALOG]
+  -GRID:<str>      	Grid
+	Grid (input)
+  -RESULT:<str>    	Result
+	Table (output)
+  -CONTIGUITY:<str>	Case of contiguity
+	Choice
+	Available Choices:
+	[0] Rook
+	[1] Queen
+  -DIALOG          	Show Result in Dialog
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_20.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_67.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_67.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_67.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grids Sum
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 8 -GRIDS <str> -RESULT <str>
+  -GRIDS:<str> 	Grids
+	Grid list (input)
+  -RESULT:<str>	Sum
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_67.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_202.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_202.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_202.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Point Cloud from Text File
+author      :	V. Wichmann, LASERDATA GmbH (c) 2009
+_____________________________________________
+go...
+Usage: 16 [-POINTS <str>] [-FILE <str>] [-XFIELD <num>] [-YFIELD <num>] [-ZFIELD <num>] [-ATTRIBS <num>] [-SKIP_HEADER] [-FIELDSEP <str>]
+  -POINTS:<str>  	Point Cloud
+	Data Object (optional output)
+  -FILE:<str>    	Text File
+	File path
+  -XFIELD:<num>  	X is Column ...
+	Integer
+	Minimum: 1.000000
+  -YFIELD:<num>  	Y is Column ...
+	Integer
+	Minimum: 1.000000
+  -ZFIELD:<num>  	Z is Column ...
+	Integer
+	Minimum: 1.000000
+  -ATTRIBS:<num> 	Number of Attributes
+	Integer
+	Minimum: 0.000000
+  -SKIP_HEADER   	Skip first line
+	Boolean
+  -FIELDSEP:<str>	Field Separator
+	Choice
+	Available Choices:
+	[0] tabulator
+	[1] space
+	[2] comma

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_202.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_117.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_117.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_117.txt	(revision 369)
@@ -0,0 +1,40 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Resampling
+ 1	- Aggregate
+ 3	- Merging
+ 4	- Create Constant Grid
+ 5	- Patching
+ 6	- Close One Cell Gaps
+ 7	- Close Gaps
+ 8	- Grid Buffer
+ 9	- Threshold Buffer
+ 10	- Grid Proximity Buffer
+ 11	- Convert Data Storage Type
+ 12	- Change Grid Values
+ 15	- Reclassify Grid Values
+ 17	- Crop to Data
+ 18	- Invert Data/No-Data
+ 19	- Grid Orientation
+ 20	- Combine Grids
+ 21	- Sort Grid
+ 22	- Grids from classified grid and table
+ 23	- Create Grid System
+ 24	- Grid Masking
+ 25	- Close Gaps with Spline
+ 26	- Proximity Grid
+ 27	- Tiling
+
+type -h or --help for further information
+
+error: cannot execute interactive module [14]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_117.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_353.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_353.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_353.txt	(revision 369)
@@ -0,0 +1,64 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Catchment Area (Parallel)
+author      :	O.Conrad (c) 2001-2010, T.Grabs portions (c) 2010
+_____________________________________________
+go...
+Usage: 0 -ELEVATION <str> [-SINKROUTE <str>] [-WEIGHT <str>] [-MATERIAL <str>] [-TARGET <str>] -CAREA <str> [-CHEIGHT <str>] [-CSLOPE <str>] [-ACCU_TOT <str>] [-ACCU_LEFT <str>] [-ACCU_RIGHT <str>] [-STEP <num>] [-CASPECT <str>] [-FLWPATH <str>] [-Method <str>] [-DOLINEAR] [-LINEARTHRS <str>] [-LINEARTHRS_GRID <str>] [-CHDIR_GRID <str>] [-CONVERGENCE <str>]
+  -ELEVATION:<str>      	Elevation
+	Grid (input)
+  -SINKROUTE:<str>      	Sink Routes
+	Grid (optional input)
+  -WEIGHT:<str>         	Weight
+	Grid (optional input)
+  -MATERIAL:<str>       	Material
+	Grid (optional input)
+  -TARGET:<str>         	Target
+	Grid (optional input)
+  -CAREA:<str>          	Catchment Area
+	Grid (output)
+  -CHEIGHT:<str>        	Catchment Height
+	Grid (optional output)
+  -CSLOPE:<str>         	Catchment Slope
+	Grid (optional output)
+  -ACCU_TOT:<str>       	Total accumulated Material
+	Grid (optional output)
+  -ACCU_LEFT:<str>      	Accumulated Material from _left_ side
+	Grid (optional output)
+  -ACCU_RIGHT:<str>     	Accumulated Material from _right_ side
+	Grid (optional output)
+  -STEP:<num>           	Step
+	Integer
+	Minimum: 1.000000
+  -CASPECT:<str>        	Catchment Aspect
+	Grid (optional output)
+  -FLWPATH:<str>        	Flow Path Length
+	Grid (optional output)
+  -Method:<str>         	Method
+	Choice
+	Available Choices:
+	[0] Deterministic 8
+	[1] Rho 8
+	[2] Braunschweiger Reliefmodell
+	[3] Deterministic Infinity
+	[4] Multiple Flow Direction
+	[5] Multiple Triangular Flow Directon
+  -DOLINEAR             	Linear Flow
+	Boolean
+  -LINEARTHRS:<str>     	Linear Flow Threshold
+	Floating point
+  -LINEARTHRS_GRID:<str>	Linear Flow Threshold Grid
+	Grid (optional input)
+  -CHDIR_GRID:<str>     	Channel Direction
+	Grid (optional input)
+  -CONVERGENCE:<str>    	Convergence
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_353.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_402.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_402.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_402.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Shapes to TIN
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -SHAPES <str> -TIN <str>
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -TIN:<str>   	TIN
+	TIN (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_402.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_357.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_357.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_357.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Upslope Area
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -TARGET <str> -ELEVATION <str> [-SINKROUTE <str>] -AREA <str> [-METHOD <str>] [-CONVERGE <str>]
+  -TARGET:<str>   	Target Area
+	Grid (input)
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -SINKROUTE:<str>	Sink Routes
+	Grid (optional input)
+  -AREA:<str>     	Upslope Area
+	Grid (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Deterministic 8
+	[1] Deterministic Infinity
+	[2] Multiple Flow Direction
+  -CONVERGE:<str> 	Convergence
+	Floating point
+	Minimum: 0.001000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_357.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_160.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_160.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_160.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import Surfer Grid
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 [-GRID <str>] [-FILE <str>] [-NODATA <str>] [-NODATA_VAL <str>]
+  -GRID:<str>      	Grid
+	Data Object (optional output)
+  -FILE:<str>      	File
+	File path
+  -NODATA:<str>    	No Data Value
+	Choice
+	Available Choices:
+	[0] Surfer's No Data Value
+	[1] User Defined
+  -NODATA_VAL:<str>	User Defined No Data Value
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_160.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_visualisation.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_visualisation.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_visualisation.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Color Palette Rotation
+ 1	- Color Blending
+ 2	- Fit Color Palette to Grid Values
+ 3	- RGB Composite
+ 4	- Create 3D Image
+ 5	- Color Triangle Composite
+ 6	- Histogram Surface
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_visualisation.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_406.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_406.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_406.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Flow Accumulation (Parallel)
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 -DEM <str> [-ZFIELD <str>] -FLOW <str> [-METHOD <str>]
+  -DEM:<str>   	TIN
+	TIN (input)
+  -ZFIELD:<str>	Z Values
+	Table field
+  -FLOW:<str>  	Flow Accumulation
+	TIN (output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Single Flow Direction
+	[1] Multiple Flow Direction

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_406.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_24.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_24.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_24.txt	(revision 369)
@@ -0,0 +1,65 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Ordinary Kriging (VF, Global)
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -POINTS <str> [-ZFIELD <str>] [-TARGET <str>] [-TQUALITY <str>] [-DISTMAX <str>] [-DISTCOUNT <num>] [-NSKIP <num>] [-BLOCK] [-DBLOCK <str>] [-FORMULA_STRING <str>] [-USER_BVARIANCE] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_VARIANCE <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -POINTS:<str>        	Points
+	Shapes (input)
+  -ZFIELD:<str>        	Attribute
+	Table field
+  -TARGET:<str>        	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -TQUALITY:<str>      	Type of Quality Measure
+	Choice
+	Available Choices:
+	[0] standard deviation
+	[1] variance
+  -DISTMAX:<str>       	Maximum Distance
+	Floating point
+  -DISTCOUNT:<num>     	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>         	Skip Number
+	Integer
+	Minimum: 1.000000
+  -BLOCK               	Block Kriging
+	Boolean
+  -DBLOCK:<str>        	Block Size
+	Floating point
+	Minimum: 0.000000
+  -FORMULA_STRING:<str>	Formula String
+	Text
+  -USER_BVARIANCE      	Create Quality Grid
+	Boolean
+  -USER_XMIN:<str>     	Left
+	Floating point
+  -USER_XMAX:<str>     	Right
+	Floating point
+  -USER_YMIN:<str>     	Bottom
+	Floating point
+  -USER_YMAX:<str>     	Top
+	Floating point
+  -USER_SIZE:<str>     	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>     	Grid
+	Data Object (optional output)
+  -USER_VARIANCE:<str> 	Quality Measure
+	Data Object (optional output)
+  -GRID_GRID:<str>     	Grid
+	Grid (output)
+  -GRID_VARIANCE:<str> 	Quality Measure
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_24.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_139.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_139.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_139.txt	(revision 369)
@@ -0,0 +1,52 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_classification
+module name :	Supervised Classification
+author      :	O.Conrad (c) 2005
+_____________________________________________
+go...
+Usage: 0 -GRIDS <str> -ROI <str> [-ROI_ID <str>] -CLASS_INFO <str> -CLASSES <str> [-QUALITY <str>] [-METHOD <str>] [-NORMALISE] [-THRESHOLD_DIST <str>] [-THRESHOLD_PROB <str>] [-RELATIVE_PROB <str>] [-THRESHOLD_ANGLE <str>]
+  -GRIDS:<str>          	Grids
+	Grid list (input)
+  -ROI:<str>            	Training Areas
+	Shapes (input)
+  -ROI_ID:<str>         	Class Identifier
+	Table field
+  -CLASS_INFO:<str>     	Class Information
+	Table (output)
+  -CLASSES:<str>        	Classification
+	Grid (output)
+  -QUALITY:<str>        	Quality
+	Grid (optional output)
+  -METHOD:<str>         	Method
+	Choice
+	Available Choices:
+	[0] parallelepiped
+	[1] minimum distance
+	[2] mahalanobis distance
+	[3] maximum likelihood
+	[4] spectral angle mapping
+	[5] binary encoding
+  -NORMALISE            	Normalise
+	Boolean
+  -THRESHOLD_DIST:<str> 	Distance Threshold
+	Floating point
+	Minimum: 0.000000
+  -THRESHOLD_PROB:<str> 	Probability Threshold (Percent)
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -RELATIVE_PROB:<str>  	Probability Reference
+	Choice
+	Available Choices:
+	[0] absolute
+	[1] relative
+  -THRESHOLD_ANGLE:<str>	Spectral Angle Threshold (Degree)
+	Floating point
+	Value Range: 0.000000 - 90.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_139.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_164.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_164.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_164.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import USGS SRTM Grid
+author      :	O.Conrad (c) 2004
+_____________________________________________
+go...
+Usage: 7 [-GRIDS <str>] [-FILE <str>] [-RESOLUTION <str>]
+  -GRIDS:<str>     	Grids
+	Grid list (optional output)
+  -FILE:<str>      	Files
+	File path
+  -RESOLUTION:<str>	Resolution
+	Choice
+	Available Choices:
+	[0] 1 arc-second
+	[1] 3 arc-second

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_164.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_28.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_28.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_28.txt	(revision 369)
@@ -0,0 +1,98 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Ordinary Kriging
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 [-GRID <str>] [-VARIANCE <str>] -SHAPES <str> [-FIELD <str>] [-BVARIANCE] [-TARGET <str>] [-MODEL <str>] [-BLOCK] [-DBLOCK <str>] [-BLOG] [-NUGGET <str>] [-SILL <str>] [-RANGE <str>] [-LIN_B <str>] [-EXP_B <str>] [-POW_A <str>] [-POW_B <str>] [-MAXRADIUS <str>] [-NPOINTS_MIN <str>] [-NPOINTS_MAX <str>] [-USER_CELL_SIZE <str>] [-USER_FIT_EXTENT] [-USER_X_EXTENT_MIN <str>] [-USER_X_EXTENT_MAX <str>] [-USER_Y_EXTENT_MIN <str>] [-USER_Y_EXTENT_MAX <str>] [-SYSTEM_SYSTEM_NX <num>] [-SYSTEM_SYSTEM_NY <num>] [-SYSTEM_SYSTEM_X <str>] [-SYSTEM_SYSTEM_Y <str>] [-SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -GRID:<str>             	Grid
+	Data Object (optional output)
+  -VARIANCE:<str>         	Variance
+	Data Object (optional output)
+  -SHAPES:<str>           	Points
+	Shapes (input)
+  -FIELD:<str>            	Attribute
+	Table field
+  -BVARIANCE              	Create Variance Grid
+	Boolean
+  -TARGET:<str>           	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid system
+	[2] grid
+  -MODEL:<str>            	Variogram Model
+	Choice
+	Available Choices:
+	[0] Spherical Model
+	[1] Exponential Model
+	[2] Gaussian Model
+	[3] Linear Regression
+	[4] Exponential Regression
+	[5] Power Function Regression
+  -BLOCK                  	Block Kriging
+	Boolean
+  -DBLOCK:<str>           	Block Size
+	Floating point
+	Minimum: 0.000000
+  -BLOG                   	Logarithmic Transformation
+	Boolean
+  -NUGGET:<str>           	Nugget
+	Floating point
+	Minimum: 0.000000
+  -SILL:<str>             	Sill
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>            	Range
+	Floating point
+	Minimum: 0.000000
+  -LIN_B:<str>            	Linear Regression
+	Floating point
+  -EXP_B:<str>            	Exponential Regression
+	Floating point
+  -POW_A:<str>            	Power Function - A
+	Floating point
+  -POW_B:<str>            	Power Function - B
+	Floating point
+  -MAXRADIUS:<str>        	Maximum Search Radius (map units)
+	Floating point
+	Minimum: 0.000000
+  -NPOINTS_MIN:<str>      	Min./Max. Number of m_Points
+	Value range
+  -NPOINTS_MAX:<str>      	Min./Max. Number of m_Points
+	Value range
+  -USER_CELL_SIZE:<str>   	Grid Size
+	Floating point
+	Minimum: 0.000000
+  -USER_FIT_EXTENT        	Fit Extent
+	Boolean
+  -USER_X_EXTENT_MIN:<str>	X-Extent
+	Value range
+  -USER_X_EXTENT_MAX:<str>	X-Extent
+	Value range
+  -USER_Y_EXTENT_MIN:<str>	Y-Extent
+	Value range
+  -USER_Y_EXTENT_MAX:<str>	Y-Extent
+	Value range
+  -SYSTEM_SYSTEM_NX:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_NY:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_X:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_Y:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_D:<str>  	Grid System
+	Grid system
+  -GRID_GRID:<str>        	Grid
+	Grid (input)
+  -GRID_VARIANCE:<str>    	Variance
+	Grid (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_28.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_79.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_79.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_79.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Simple Filter
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> [-RESULT <str>] [-MODE <str>] [-METHOD <str>] [-RADIUS <num>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Filtered Grid
+	Grid (optional output)
+  -MODE:<str>  	Search Mode
+	Choice
+	Available Choices:
+	[0] Square
+	[1] Circle
+  -METHOD:<str>	Filter
+	Choice
+	Available Choices:
+	[0] Smooth
+	[1] Sharpen
+	[2] Edge
+  -RADIUS:<num>	Radius
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_79.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_168.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_168.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_168.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import Erdas LAN/GIS
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 11 [-GRIDS <str>] [-FILE <str>]
+  -GRIDS:<str>	Grids
+	Grid list (optional output)
+  -FILE:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_168.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_283.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_283.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_283.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Convert Lines to Points
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 5 -POINTS <str> -LINES <str> [-ADD] [-DIST <str>]
+  -POINTS:<str>	Points
+	Shapes (output)
+  -LINES:<str> 	Lines
+	Shapes (input)
+  -ADD         	Insert Additional Points
+	Boolean
+  -DIST:<str>  	Insert Distance
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_283.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_294.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_294.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_294.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Geometrical Properties of Polygons
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 2 -POLYG <str> [-SAVE]
+  -POLYG:<str>	Polygons
+	Shapes (input)
+  -SAVE       	Save Shapefile
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_294.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Export GStat Shapes
+ 1	- Import GStat Shapes
+ 2	- Export Shapes to XYZ
+ 3	- Import Shapes from XYZ
+ 4	- Export Shapes to Generate
+ 5	- Export Surfer Blanking File
+ 6	- Import Surfer Blanking Files
+ 7	- Export Atlas Boundary File
+ 8	- Import Atlas Boundary File
+ 9	- Export WASP terrain map file
+ 10	- Import WASP terrain map file
+ 11	- Import Stereo Lithography File (STL)
+ 12	- Export TIN to Stereo Lithography File (STL)
+ 13	- Import GPX
+ 14	- Export GPX
+ 15	- Import Point Cloud from File
+ 16	- Import Point Cloud from Text File
+ 17	- Export Scalable Vector Graphics (SVG) File
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_337.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_337.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_337.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Trend for Table Data
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -TABLE <str> [-FIELD_X <str>] [-FIELD_Y <str>] [-FORMULA <str>] [-FORMULAS <str>] [-TREND <str>]
+  -TABLE:<str>   	Table
+	Table (input)
+  -FIELD_X:<str> 	X Values
+	Table field
+  -FIELD_Y:<str> 	Y Values
+	Table field
+  -FORMULA:<str> 	Formula
+	Text
+  -FORMULAS:<str>	Pre-defined Formulas
+	Choice
+	Available Choices:
+	[0] Linear: a + b * x
+	[1] Quadric: a + b * x + c * x^2
+	[2] Cubic: a + b * x + c * x^2 + d * x^3
+	[3] Logarithmic: a + b * ln(x)
+	[4] Power: a + b * x^c
+	[5] a + b / x
+	[6] a + b * (1 - exp(-x / c))
+	[7] a + b * (1 - exp(-(x / c)^2))
+  -TREND:<str>   	Table (with Trend)
+	Table (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_337.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_viewer.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_viewer.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_viewer.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- TIN Viewer
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_viewer.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_287.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_287.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_287.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Separate points by direction
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 9 -OUTPUT <str> -POINTS <str> [-DIRECTIONS <str>] [-TOLERANCE <str>]
+  -OUTPUT:<str>    	Ouput
+	Shapes list (output)
+  -POINTS:<str>    	Points
+	Shapes (input)
+  -DIRECTIONS:<str>	Number of Directions
+	Floating point
+	Minimum: 2.000000
+  -TOLERANCE:<str> 	Tolerance (Degree)
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_287.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_298.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_298.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_298.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Convert Polygon/Line Vertices to Points
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 6 -SHAPES <str> -POINTS <str>
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -POINTS:<str>	Points
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_298.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_11.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_11.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_11.txt	(revision 369)
@@ -0,0 +1,38 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	docs_pdf
+module name :	Terrain Path Cross Sections
+author      :	
+_____________________________________________
+go...
+Usage: 2 -DEM <str> -LINES <str> -SECTIONS <str> [-NUMPOINTS <num>] [-INTERVAL <str>] [-STEP <num>] [-PDF] [-OUTPUTPATH <str>] [-WIDTH <str>] [-SLOPE <str>] [-THRESHOLD <str>]
+  -DEM:<str>       	DEM
+	Grid (input)
+  -LINES:<str>     	Path
+	Shapes (input)
+  -SECTIONS:<str>  	Cross Sections
+	Shapes (output)
+  -NUMPOINTS:<num> 	Number of points
+	Integer
+	Minimum: 1.000000
+  -INTERVAL:<str>  	Interval
+	Floating point
+  -STEP:<num>      	n
+	Integer
+  -PDF             	Create PDF Documents
+	Boolean
+  -OUTPUTPATH:<str>	Folder for PDF Files
+	File path
+  -WIDTH:<str>     	Road Width
+	Floating point
+  -SLOPE:<str>     	Side Slope
+	Floating point
+  -THRESHOLD:<str> 	Height Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_docs_pdf_11.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_329.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_329.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_329.txt	(revision 369)
@@ -0,0 +1,43 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_fire_spreading
+module name :	Simulation
+author      :	(c) 2004 Victor Olaya
+_____________________________________________
+go...
+Usage: 1 -DEM <str> -FUEL <str> -WINDSPD <str> -WINDDIR <str> -M1H <str> -M10H <str> -M100H <str> -MHERB <str> -MWOOD <str> -IGNITION <str> -TIME <str> -FLAME <str> -INTENSITY <str> [-UPDATEVIEW]
+  -DEM:<str>      	DEM
+	Grid (input)
+  -FUEL:<str>     	Fuel Model
+	Grid (input)
+  -WINDSPD:<str>  	Wind Speed
+	Grid (input)
+  -WINDDIR:<str>  	Wind Direction
+	Grid (input)
+  -M1H:<str>      	Dead Fuel Moisture 1H
+	Grid (input)
+  -M10H:<str>     	Dead Fuel Moisture 10H
+	Grid (input)
+  -M100H:<str>    	Dead Fuel Moisture 100H
+	Grid (input)
+  -MHERB:<str>    	Herbaceous Fuel Moisture
+	Grid (input)
+  -MWOOD:<str>    	Wood Fuel Moisture
+	Grid (input)
+  -IGNITION:<str> 	Ignition Points
+	Grid (input)
+  -TIME:<str>     	Time
+	Grid (output)
+  -FLAME:<str>    	Flame Length
+	Grid (output)
+  -INTENSITY:<str>	Intensity
+	Grid (output)
+  -UPDATEVIEW     	Update View
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_fire_spreading_329.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_72.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_72.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_72.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Fuzzy Union (OR)
+author      :	Antonio Boggia and Gianluca Massei (c) 2004
+_____________________________________________
+go...
+Usage: 13 -GRIDS <str> -OR <str> [-TYPE <str>]
+  -GRIDS:<str>	Grids
+	Grid list (input)
+  -OR:<str>   	Union
+	Grid (output)
+  -TYPE:<str> 	Operator Type
+	Choice
+	Available Choices:
+	[0] max(a, b) (non-interactive)
+	[1] a + b - a * b
+	[2] min(1, a + b)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_72.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_127.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_127.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_127.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Color Palette Rotation
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -GRID <str> [-DIR]
+  -GRID:<str>	Grid
+	Grid (input)
+  -DIR       	Down
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_127.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_304.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_304.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_304.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Merge Shapes Layers
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 2 -OUT <str> -MAIN <str> [-LAYERS <str>]
+  -OUT:<str>   	Merged Layer
+	Shapes (output)
+  -MAIN:<str>  	Main Layer
+	Shapes (input)
+  -LAYERS:<str>	Additional Layers
+	Shapes list (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_304.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_368.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_368.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_368.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_lighting
+module name :	Analytical Hillshading
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -ELEVATION <str> -SHADE <str> [-METHOD <str>] [-AZIMUTH <str>] [-DECLINATION <str>] [-EXAGGERATION <str>]
+  -ELEVATION:<str>   	Elevation
+	Grid (input)
+  -SHADE:<str>       	Analytical Hillshading
+	Grid (output)
+  -METHOD:<str>      	Shading Method
+	Choice
+	Available Choices:
+	[0] Standard
+	[1] Standard (max. 90Degree)
+	[2] Combined Shading
+	[3] Ray Tracing
+  -AZIMUTH:<str>     	Azimuth [Degree]
+	Floating point
+  -DECLINATION:<str> 	Declination [Degree]
+	Floating point
+  -EXAGGERATION:<str>	Exaggeration
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_368.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_122.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_122.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_122.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Grid Orientation
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 19 -INPUT <str> [-RESULT <str>] [-METHOD <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Changed Grid
+	Grid (optional output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Copy
+	[1] Flip
+	[2] Mirror
+	[3] Invert

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_122.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_76.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_76.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_76.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Polynomial Trend from Grids
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 17 -GRIDS <str> [-Y_GRIDS <str>] [-Y_TABLE <str>] -PARMS <str> [-QUALITY <str>] [-POLYNOM <str>]
+  -GRIDS:<str>  	Dependent Variables
+	Grid list (input)
+  -Y_GRIDS:<str>	Independent Variable (per Grid and Cell)
+	Grid list (optional input)
+  -Y_TABLE:<str>	Independent Variable (per Grid)
+	Static table
+	1 Fields:
+	- 1. [8 byte floating point number] Value
+	
+  -PARMS:<str>  	Polynomial Coefficients
+	Grid list (output)
+  -QUALITY:<str>	Coefficient of Determination
+	Grid (optional output)
+  -POLYNOM:<str>	Type of Approximated Function
+	Choice
+	Available Choices:
+	[0] first order polynom (linear regression)
+	[1] second order polynom
+	[2] third order polynom
+	[3] fourth order polynom
+	[4] fifth order polynom

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_76.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_140.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_140.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_140.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_classification
+module name :	Cluster Analysis for Grids
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 1 -GRIDS <str> -CLUSTER <str> -STATISTICS <str> [-METHOD <str>] [-NCLUSTER <num>] [-NORMALISE] [-OLDVERSION] [-UPDATEVIEW]
+  -GRIDS:<str>     	Grids
+	Grid list (input)
+  -CLUSTER:<str>   	Clusters
+	Grid (output)
+  -STATISTICS:<str>	Statistics
+	Table (output)
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] Iterative Minimum Distance (Forgy 1965)
+	[1] Hill-Climbing (Rubin 1967)
+	[2] Combined Minimum Distance / Hillclimbing
+  -NCLUSTER:<num>  	Clusters
+	Integer
+	Minimum: 2.000000
+  -NORMALISE       	Normalise
+	Boolean
+  -OLDVERSION      	Old Version
+	Boolean
+  -UPDATEVIEW      	Update View
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_140.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_308.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_308.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_308.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Copy Selection to New Shapes Layer
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> -OUTPUT <str>
+  -INPUT:<str> 	Input
+	Shapes (input)
+  -OUTPUT:<str>	Output
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_308.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_126.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_126.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_126.txt	(revision 369)
@@ -0,0 +1,59 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Create Grid System
+author      :	Copyrights (c) 2007 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 23 [-GRID <str>] [-M_EXTENT <str>] [-XMIN <str>] [-YMIN <str>] [-XMAX <str>] [-YMAX <str>] [-NX <num>] [-NY <num>] [-CELLSIZE <str>] [-ADJUST <str>] [-USEOFF] [-XOFFSET <str>] [-YOFFSET <str>] [-INIT <str>] [-SHAPESLIST <str>] [-GRIDLIST <str>]
+  -GRID:<str>      	Dummy Grid
+	Data Object (optional output)
+  -M_EXTENT:<str>  	Set extent by
+	Choice
+	Available Choices:
+	[0] xMin, yMin, NX, NY
+	[1] xMin, yMin, xMax, yMax
+	[2] Shape(s)
+	[3] Grid(s)
+  -XMIN:<str>      	xMin
+	Floating point
+  -YMIN:<str>      	yMin
+	Floating point
+  -XMAX:<str>      	xMax
+	Floating point
+  -YMAX:<str>      	yMax
+	Floating point
+  -NX:<num>        	NX
+	Integer
+	Minimum: 1.000000
+  -NY:<num>        	NY
+	Integer
+	Minimum: 1.000000
+  -CELLSIZE:<str>  	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -ADJUST:<str>    	Adjust
+	Choice
+	Available Choices:
+	[0] Extent to CellSize
+	[1] CellSize to W-E Extent
+	[2] CellSize to S-N Extent
+  -USEOFF          	Use Offset
+	Boolean
+  -XOFFSET:<str>   	X offset
+	Floating point
+  -YOFFSET:<str>   	Y offset
+	Floating point
+  -INIT:<str>      	Initialization Value
+	Floating point
+  -SHAPESLIST:<str>	Shape(s)
+	Shapes list (optional input)
+  -GRIDLIST:<str>  	Grid(s)
+	Grid list (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_126.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_362.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_362.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_362.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [9]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_362.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_gridding.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_gridding.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_gridding.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Shapes to Grid
+ 1	- Inverse Distance Weighted
+ 2	- Nearest Neighbour
+ 3	- Natural Neighbour
+ 4	- Modifed Quadratic Shepard
+ 5	- Triangulation
+ 6	- Kernel Density Estimation
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_gridding.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_45.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_45.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_45.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Accumulated Cost (Anisotropic)
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 1 -COST <str> -DIRECTION <str> -POINTS <str> -ACCCOST <str> [-K <str>] [-THRESHOLD <str>]
+  -COST:<str>     	Cost Grid
+	Grid (input)
+  -DIRECTION:<str>	Direction of max cost
+	Grid (input)
+  -POINTS:<str>   	Destination Points
+	Grid (input)
+  -ACCCOST:<str>  	Accumulated Cost
+	Grid (output)
+  -K:<str>        	k factor
+	Floating point
+  -THRESHOLD:<str>	Threshold for different route
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_45.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_80.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_80.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_80.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Gaussian Filter
+author      :	Copyrights (c) 2003 by Andre Ringeler
+_____________________________________________
+go...
+Usage: 1 -INPUT <str> [-RESULT <str>] [-SIGMA <str>] [-MODE <str>] [-RADIUS <num>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Filtered Grid
+	Grid (optional output)
+  -SIGMA:<str> 	Standard Deviation
+	Floating point
+	Minimum: 0.000100
+  -MODE:<str>  	Search Mode
+	Choice
+	Available Choices:
+	[0] Square
+	[1] Circle
+  -RADIUS:<num>	Search Radius
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_80.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_366.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_366.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_366.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Edge Contamination
+author      :	V.Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 13 -DEM <str> -CONTAMINATION <str>
+  -DEM:<str>          	Elevation
+	Grid (input)
+  -CONTAMINATION:<str>	Edge Contamination
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_366.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_49.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_49.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_49.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Least Cost Paths
+author      :	O. Conrad, V. Olaya, V. Wichmann (c) 2004-2010
+_____________________________________________
+go...
+Usage: 5 -SOURCE <str> -DEM <str> [-VALUES <str>] -POINTS <str> -LINE <str>
+  -SOURCE:<str>	Source Point(s)
+	Shapes (input)
+  -DEM:<str>   	Accumulated cost
+	Grid (input)
+  -VALUES:<str>	Values
+	Grid list (optional input)
+  -POINTS:<str>	Profile (points)
+	Shapes list (output)
+  -LINE:<str>  	Profile (lines)
+	Shapes list (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_49.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_91.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_91.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_91.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Nearest Neighbour
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_91.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_84.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_84.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_84.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Filter Clumps
+author      :	
+_____________________________________________
+go...
+Usage: 5 -GRID <str> -OUTPUT <str> [-THRESHOLD <num>]
+  -GRID:<str>     	Input Grid
+	Grid (input)
+  -OUTPUT:<str>   	Filtered Grid
+	Grid (output)
+  -THRESHOLD:<num>	Min. Size
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_84.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_viewer_407.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_viewer_407.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_viewer_407.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_viewer
+module name :	TIN Viewer
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 0 -TIN <str> [-HEIGHT <str>] [-COLOR <str>] [-RGB <str>]
+  -TIN:<str>   	TIN
+	TIN (input)
+  -HEIGHT:<str>	Elevation
+	Table field
+  -COLOR:<str> 	Color
+	Table field
+  -RGB:<str>   	Map
+	Grid (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_viewer_407.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_95.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_95.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_95.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Kernel Density Estimation
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -POINTS <str> [-POPULATION <str>] [-RADIUS <str>] [-KERNEL <str>] [-TARGET <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -POINTS:<str>    	Points
+	Shapes (input)
+  -POPULATION:<str>	Population
+	Table field
+  -RADIUS:<str>    	Radius
+	Floating point
+	Minimum: 0.000000
+  -KERNEL:<str>    	Kernel
+	Choice
+	Available Choices:
+	[0] quartic kernel
+	[1] gaussian kernel
+  -TARGET:<str>    	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -USER_XMIN:<str> 	Left
+	Floating point
+  -USER_XMAX:<str> 	Right
+	Floating point
+  -USER_YMIN:<str> 	Bottom
+	Floating point
+  -USER_YMAX:<str> 	Top
+	Floating point
+  -USER_SIZE:<str> 	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str> 	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str> 	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_95.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_88.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_88.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_88.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Rank Filter
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 9 -INPUT <str> [-RESULT <str>] [-MODE <str>] [-RADIUS <num>] [-RANK <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Filtered Grid
+	Grid (optional output)
+  -MODE:<str>  	Search Mode
+	Choice
+	Available Choices:
+	[0] Square
+	[1] Circle
+  -RADIUS:<num>	Radius
+	Integer
+	Minimum: 1.000000
+  -RANK:<str>  	Rank [Percent]
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_88.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_96.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_96.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_96.txt	(revision 369)
@@ -0,0 +1,41 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Thin Plate Spline (Global)
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-REGUL <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -REGUL:<str>    	Regularisation
+	Floating point
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_96.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_101.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_101.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_101.txt	(revision 369)
@@ -0,0 +1,55 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Multilevel B-Spline Interpolation (from Grid)
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -GRIDPOINTS <str> [-TARGET <str>] [-METHOD <str>] [-EPSILON <str>] [-LEVEL_MAX <num>] [-UPDATE] [-DATATYPE <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -GRIDPOINTS:<str>	Grid
+	Grid (input)
+  -TARGET:<str>    	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] without B-spline refinement
+	[1] with B-spline refinement
+  -EPSILON:<str>   	Threshold Error
+	Floating point
+	Minimum: 0.000000
+  -LEVEL_MAX:<num> 	Maximum Level
+	Integer
+	Value Range: 1.000000 - 14.000000
+  -UPDATE          	Update View
+	Boolean
+  -DATATYPE:<str>  	Data Type
+	Choice
+	Available Choices:
+	[0] same as input grid
+	[1] floating point
+  -USER_XMIN:<str> 	Left
+	Floating point
+  -USER_XMAX:<str> 	Right
+	Floating point
+  -USER_YMIN:<str> 	Bottom
+	Floating point
+  -USER_YMAX:<str> 	Top
+	Floating point
+  -USER_SIZE:<str> 	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str> 	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str> 	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_101.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_polygons.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_polygons.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_polygons.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Polygon Intersection
+ 1	- Polygon Centroids
+ 2	- Geometrical Properties of Polygons
+ 3	- Convert Lines to Polygons
+ 4	- Point Statistics for Polygons
+ 5	- Polygon Dissolve
+ 6	- Convert Polygon/Line Vertices to Points
+ 7	- Polygon Shape Indices
+ 8	- Polygon-Line Intersection
+ 9	- Polygons to Edges and Nodes
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_polygons.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_262.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_262.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_262.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Grid Values to Shapes
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 3 -GRIDS <str> [-POLYGONS <str>] -SHAPES <str> [-NODATA] [-TYPE <str>]
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -POLYGONS:<str>	Polygons
+	Shapes (optional input)
+  -SHAPES:<str>  	Shapes
+	Shapes (output)
+  -NODATA        	Exclude NoData Cells
+	Boolean
+  -TYPE:<str>    	Type
+	Choice
+	Available Choices:
+	[0] nodes
+	[1] cells

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_262.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_3.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_3.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_3.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Average With Mask 1
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 3 -INPUT <str> -MASK <str> -RESULT <str> [-V <str>] [-RX <num>] [-RY <num>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -MASK:<str>  	Mask Grid
+	Grid (input)
+  -RESULT:<str>	AWM1 Grid
+	Grid (output)
+  -V:<str>     	Mask value
+	Floating point
+  -RX:<num>    	Radius X
+	Integer
+	Minimum: 1.000000
+  -RY:<num>    	Radius Y
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_3.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_132.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_132.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_132.txt	(revision 369)
@@ -0,0 +1,80 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Color Triangle Composite
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -A_GRID <str> [-A_METHOD <str>] [-A_RANGE_MIN <str>] [-A_RANGE_MAX <str>] [-A_PERCTL_MIN <str>] [-A_PERCTL_MAX <str>] [-A_PERCENT <str>] -B_GRID <str> [-B_METHOD <str>] [-B_RANGE_MIN <str>] [-B_RANGE_MAX <str>] [-B_PERCTL_MIN <str>] [-B_PERCTL_MAX <str>] [-B_PERCENT <str>] -C_GRID <str> [-C_METHOD <str>] [-C_RANGE_MIN <str>] [-C_RANGE_MAX <str>] [-C_PERCTL_MIN <str>] [-C_PERCTL_MAX <str>] [-C_PERCENT <str>] -GRID <str>
+  -A_GRID:<str>      	A
+	Grid (input)
+  -A_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 1
+	[1] Rescale to 0 - 1
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -A_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -A_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -A_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -A_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -A_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -B_GRID:<str>      	B
+	Grid (input)
+  -B_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 1
+	[1] Rescale to 0 - 1
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -B_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -B_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -B_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -B_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -B_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -C_GRID:<str>      	C
+	Grid (input)
+  -C_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 1.0
+	[1] Rescale to 0 - 1.0
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -C_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -C_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -C_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -C_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -C_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -GRID:<str>        	Composite
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_132.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_266.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_266.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_266.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Clip Grid with Polygon
+author      :	copyrights (c) 2006 Stefan Liersch
+_____________________________________________
+go...
+Usage: 7 -OUTPUT <str> -INPUT <str> -POLYGONS <str>
+  -OUTPUT:<str>  	Output
+	Grid list (output)
+  -INPUT:<str>   	Input
+	Grid list (input)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_266.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_7.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_7.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_7.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Directional Average 1
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 7 -INPUT <str> -RESULT <str> [-ANG <str>] [-R1 <str>] [-R2 <str>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -RESULT:<str>	Output Grid
+	Grid (output)
+  -ANG:<str>   	Angle (in degrees)
+	Floating point
+  -R1:<str>    	Main Radius
+	Floating point
+  -R2:<str>    	Transversal radius
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_7.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_313.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_313.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_313.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Create Chart Layer (bars/sectors)
+author      :	
+_____________________________________________
+go...
+Usage: 11 -INPUT <str> [-SIZE <str>] [-MAXSIZE <str>] [-MINSIZE <str>] [-TYPE <str>]
+  -INPUT:<str>  	Shapes
+	Shapes (input)
+  -SIZE:<str>   	Size field
+	Table field
+  -MAXSIZE:<str>	Maximum size
+	Floating point
+	Minimum: 0.000000
+  -MINSIZE:<str>	Minimum size
+	Floating point
+	Minimum: 0.000000
+  -TYPE:<str>   	Type
+	Choice
+	Available Choices:
+	[0] Sectors
+	[1] Bars

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_313.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_257.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_257.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_257.txt	(revision 369)
@@ -0,0 +1,20 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Bifurcation
+ 1	- Pythagoras' Tree
+ 3	- Fractal Dimension of Grid Surface
+ 5	- Gaussian Landscapes
+
+type -h or --help for further information
+
+error: cannot execute interactive module [2]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_257.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_lectures_introduction.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_lectures_introduction.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_lectures_introduction.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- 01: My first module
+ 1	- 02: Pixel by pixel operations with two grids
+ 2	- 03: Direct neighbours
+ 3	- 04: Direct neighbours - more...
+ 4	- 05: Direct neighbours - slope and aspect
+ 5	- 06: Extended neighbourhoods
+ 6	- 07: Extended neighbourhoods - catchment areas (trace flow)
+ 7	- 08: Extended neighbourhoods - catchment areas (parallel)
+ 8	- 09: Extended neighbourhoods - catchment areas (recursive)
+ 9	- 10: Dynamic Simulation - Life
+ 10	- 11: Dynamic Simulation - Soil Nitrogen Dynamics
+ 11	- 12: First steps with shapes
+ 12	- 13: Reprojecting a shapes layer
+ 13	- 14: Vectorising channel lines
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_lectures_introduction.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_246.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_246.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_246.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud from Shapes
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-ZFIELD <str>] -POINTS <str> [-OUTPUT <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -ZFIELD:<str>	Z Value
+	Table field
+  -POINTS:<str>	Points
+	Point Cloud (output)
+  -OUTPUT:<str>	Output
+	Choice
+	Available Choices:
+	[0] only z
+	[1] all attributes

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_246.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_viewer_254.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_viewer_254.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_viewer_254.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_viewer
+module name :	Point Cloud Viewer
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 0 -POINTS <str>
+  -POINTS:<str>	Points
+	Point Cloud (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_viewer_254.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_176.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_176.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_176.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	ODBC Execute SQL
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] [-SQL <str>] [-COMMIT] [-STOP]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -SQL:<str>     	SQL Statment
+	Long text
+  -COMMIT        	Commit
+	Boolean
+  -STOP          	Stop on Error
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_176.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_grid.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_grid.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_grid.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Add Grid Values to Points
+ 1	- Add Grid Values to Shapes
+ 2	- Grid Statistics for Polygons
+ 3	- Grid Values to Shapes
+ 4	- Grid Values to Points (randomly)
+ 5	- Contour Lines from Grid
+ 6	- Vectorising Grid Classes
+ 7	- Clip Grid with Polygon
+ 9	- Local Minima and Maxima
+ 10	- Grid System Extent
+ 15	- Gradient Vectors from Surface
+ 16	- Gradient Vectors from Direction and Length
+ 17	- Gradient Vectors from Directional Components
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_grid.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_50.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_50.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_50.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Change Vector Analysis
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 6 -A1 <str> -A2 <str> -B1 <str> -B2 <str> -DIST <str> -ANGLE <str>
+  -A1:<str>   	Grid A. Init
+	Grid (input)
+  -A2:<str>   	Grid A. Final
+	Grid (input)
+  -B1:<str>   	Grid B. Init
+	Grid (input)
+  -B2:<str>   	Grid B. Final
+	Grid (input)
+  -DIST:<str> 	Distance
+	Grid (output)
+  -ANGLE:<str>	Angle
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_50.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_317.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_317.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_317.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Split Shapes Layer
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 15 -SHAPES <str> [-CUTS <str>] [-EXTENT <str>] [-NX <num>] [-NY <num>] [-METHOD <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -CUTS:<str>  	Tiles
+	Shapes list (optional output)
+  -EXTENT:<str>	Extent
+	Shapes (optional output)
+  -NX:<num>    	Number of horizontal tiles
+	Integer
+	Minimum: 1.000000
+  -NY:<num>    	Number of vertical tiles
+	Integer
+	Minimum: 1.000000
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] completely contained
+	[1] intersects
+	[2] center

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_317.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_342.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_342.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_342.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_tools
+module name :	Create Empty Table
+author      :	O. Conrad (c) 2005
+_____________________________________________
+go...
+Usage: 0 -TABLE <str> [-NAME <str>] [-FIELDS <num>]
+  -TABLE:<str> 	Table
+	Table (output)
+  -NAME:<str>  	Name
+	Text
+  -FIELDS:<num>	Number of Fields
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_342.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_54.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_54.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_54.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Analytical Hierarchy Process
+author      :	
+_____________________________________________
+go...
+Usage: 10 -GRIDS <str> -TABLE <str> -OUTPUT <str>
+  -GRIDS:<str> 	Input Grids
+	Grid list (input)
+  -TABLE:<str> 	Pairwise Comparisons Table 
+	Table (input)
+  -OUTPUT:<str>	Output Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_54.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_dxf_204.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_dxf_204.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_dxf_204.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes_dxf
+module name :	Import DXF Files
+author      :	(c) 2007 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 [-SHAPES <str>] [-TABLES <str>] [-FILE <str>] [-FILTER <str>] [-DCIRCLE <str>]
+  -SHAPES:<str> 	Shapes
+	Shapes list (optional output)
+  -TABLES:<str> 	Tables
+	Shapes list (optional output)
+  -FILE:<str>   	File
+	File path
+  -FILTER:<str> 	Import Filter
+	Choice
+	Available Choices:
+	[0] all entities
+	[1] only entities with layer definition
+	[2] only entities without layer definition
+  -DCIRCLE:<str>	Circle Point Distance [Degree]
+	Floating point
+	Value Range: 0.010000 - 45.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_dxf_204.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_325.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_325.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_325.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_ecosystems_hugget
+module name :	01: A Simple Litter System
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -TABLE <str> [-TIME_SPAN <str>] [-TIME_STEP <str>] [-C_INIT <str>] [-C_INPUT <str>] [-C_OUTPUT <str>]
+  -TABLE:<str>    	Results
+	Table (output)
+  -TIME_SPAN:<str>	Time Span
+	Floating point
+	Minimum: 0.000000
+  -TIME_STEP:<str>	Time Interval [a]
+	Floating point
+	Minimum: 0.000000
+  -C_INIT:<str>   	Initial Litter Storage [g/m�2]
+	Floating point
+	Minimum: 0.000000
+  -C_INPUT:<str>  	Litterfall Rate [g/m�2/a]
+	Floating point
+	Minimum: 0.000000
+  -C_OUTPUT:<str> 	Rate Constant for Litter Loss [1/a]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_325.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_145.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_145.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_145.txt	(revision 369)
@@ -0,0 +1,45 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_segmentation
+module name :	Seed Generation
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 2 -GRIDS <str> -SURFACE <str> [-SEEDS_GRID <str>] -SEEDS <str> [-FACTOR <str>] [-TYPE_SURFACE <str>] [-TYPE_SEEDS <str>] [-TYPE_MERGE <str>] [-NORMALIZE]
+  -GRIDS:<str>       	Features
+	Grid list (input)
+  -SURFACE:<str>     	Surface
+	Grid (output)
+  -SEEDS_GRID:<str>  	Seeds Grid
+	Grid (optional output)
+  -SEEDS:<str>       	Seeds
+	Shapes (output)
+  -FACTOR:<str>      	Bandwidth (Cells)
+	Floating point
+	Minimum: 1.000000
+  -TYPE_SURFACE:<str>	Type of Surface
+	Choice
+	Available Choices:
+	[0] smoothed surface
+	[1] variance (a)
+	[2] variance (b)
+  -TYPE_SEEDS:<str>  	Extraction of...
+	Choice
+	Available Choices:
+	[0] minima
+	[1] maxima
+	[2] minima and maxima
+  -TYPE_MERGE:<str>  	Feature Aggregation
+	Choice
+	Available Choices:
+	[0] additive
+	[1] multiplicative
+  -NORMALIZE         	Normalized
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_145.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_58.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_58.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_58.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Soil Texture Classification
+author      :	Gianluca Massei (c) 2007 (g_massa@libero.it)
+_____________________________________________
+go...
+Usage: 14 [-SAND <str>] [-SILT <str>] [-CLAY <str>] -TEXTURE <str> [-SUM <str>]
+  -SAND:<str>   	Sand
+	Grid (optional input)
+  -SILT:<str>   	Silt
+	Grid (optional input)
+  -CLAY:<str>   	Clay
+	Grid (optional input)
+  -TEXTURE:<str>	Soil Texture
+	Grid (output)
+  -SUM:<str>    	Sum
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_58.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_373.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_373.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_373.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Convergence Index
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 1 -ELEVATION <str> -RESULT <str> [-METHOD <str>] [-NEIGHBOURS <str>]
+  -ELEVATION:<str> 	Elevation
+	Grid (input)
+  -RESULT:<str>    	Convergence Index
+	Grid (output)
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] Aspect
+	[1] Gradient
+  -NEIGHBOURS:<str>	Gradient Calculation
+	Choice
+	Available Choices:
+	[0] 2 x 2
+	[1] 3 x 3

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_373.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_209.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_209.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_209.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_table
+module name :	Import Text Table
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 1 -TABLE <str> [-HEADLINE] [-SEPARATOR <str>] [-SEP_OTHER <str>] [-FILENAME <str>]
+  -TABLE:<str>    	Table
+	Table (output)
+  -HEADLINE       	File contains headline
+	Boolean
+  -SEPARATOR:<str>	Separator
+	Choice
+	Available Choices:
+	[0] tabulator
+	[1] ;
+	[2] ,
+	[3] space
+  -SEP_OTHER:<str>	Separator (other)
+	Text
+  -FILENAME:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_209.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_186.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_186.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_186.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export GStat Shapes
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -SHAPES <str> [-FILENAME <str>]
+  -SHAPES:<str>  	Shapes
+	Shapes (input)
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_186.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_137.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_137.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_137.txt	(revision 369)
@@ -0,0 +1,44 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ihacres
+module name :	IHACRES Elevation Bands
+author      :	copyrights (c) 2008 Stefan Liersch
+_____________________________________________
+go...
+Usage: 3 [-TABLEout <str>] [-NELEVBANDS <str>] [-AREA_tot <str>] [-IHACVERS <str>] [-STORAGE <str>] [-SNOW_MODULE]
+  -TABLEout:<str>  	Table
+	Data Object (optional output)
+  -NELEVBANDS:<str>	Number of elevation bands
+	Choice
+	Available Choices:
+	[0] 2
+	[1] 3
+	[2] 4
+	[3] 5
+	[4] 6
+	[5] 7
+	[6] 8
+	[7] 9
+	[8] 10
+  -AREA_tot:<str>  	Total Catchment Area [km2]
+	Floating point
+  -IHACVERS:<str>  	IHACRES Version
+	Choice
+	Available Choices:
+	[0] Jakeman & Hornberger (1993)
+	[1] Croke et al. (2005) !!! not yet implemented !!!
+  -STORAGE:<str>   	Storage
+	Choice
+	Available Choices:
+	[0] Single Storage
+	[1] Two Parallel Storages
+	[2] Two Storages in Series !!! not yet implemented !!!
+  -SNOW_MODULE     	Using the snow-melt module?
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_137.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_274.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_274.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_274.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Line Properties
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 2 -LINES <str> [-OUTPUT <str>]
+  -LINES:<str> 	Lines
+	Shapes (input)
+  -OUTPUT:<str>	Lines with Property Attributes added
+	Shapes (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_274.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_377.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_377.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_377.txt	(revision 369)
@@ -0,0 +1,38 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Hypsometry
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -ELEVATION <str> -TABLE <str> [-COUNT <num>] [-SORTING <str>] [-METHOD <str>] [-BZRANGE] [-ZRANGE_MIN <str>] [-ZRANGE_MAX <str>]
+  -ELEVATION:<str> 	Elevation
+	Grid (input)
+  -TABLE:<str>     	Hypsometry
+	Table (output)
+  -COUNT:<num>     	Number of Classes
+	Integer
+	Minimum: 1.000000
+  -SORTING:<str>   	Sort
+	Choice
+	Available Choices:
+	[0] up
+	[1] down
+  -METHOD:<str>    	Classification Constant
+	Choice
+	Available Choices:
+	[0] height
+	[1] area
+  -BZRANGE         	Use Z-Range
+	Boolean
+  -ZRANGE_MIN:<str>	Z-Range
+	Value range
+  -ZRANGE_MAX:<str>	Z-Range
+	Value range

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_377.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_230.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_230.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_230.txt	(revision 369)
@@ -0,0 +1,34 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Set Coordinate Reference System
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 0 [-CRS_METHOD <str>] [-CRS_PROJ4 <str>] [-CRS_FILE <str>] [-CRS_EPSG <num>] [-GRIDS <str>] [-SHAPES <str>] [-TINS <str>]
+  -CRS_METHOD:<str>	Get CRS Definition from...
+	Choice
+	Available Choices:
+	[0] Proj4 Parameters
+	[1] EPSG Code
+	[2] Well Known Text File
+  -CRS_PROJ4:<str> 	Proj4 Parameters
+	Long text
+  -CRS_FILE:<str>  	Well Known Text File
+	File path
+  -CRS_EPSG:<num>  	EPSG Code
+	Integer
+	Value Range: 2000.000000 - 32766.000000
+  -GRIDS:<str>     	Grids
+	Grid list (optional input)
+  -SHAPES:<str>    	Shapes
+	Shapes list (optional input)
+  -TINS:<str>      	TINs
+	TIN list (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_230.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_399.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_399.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_399.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 3	- Cross Profiles
+ 4	- Profiles from Lines
+ 5	- Profile from points
+
+type -h or --help for further information
+
+error: cannot execute interactive module [2]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_399.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_transect_322.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_transect_322.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_transect_322.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_transect
+module name :	Transect through polygon shapefile
+author      :	Copyrights (c) 2009 Johan Van de Wauw
+_____________________________________________
+go...
+Usage: 0 -TRANSECT <str> -THEME <str> [-THEME_FIELD <str>] -TRANSECT_RESULT <str>
+  -TRANSECT:<str>       	Line Transect(s)
+	Shapes (input)
+  -THEME:<str>          	Theme
+	Shapes (input)
+  -THEME_FIELD:<str>    	Theme Field
+	Table field
+  -TRANSECT_RESULT:<str>	Result table
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_transect_322.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_215.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_215.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_215.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	04: Direct neighbours - more...
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 3 -INPUT <str> -OUTPUT <str> [-METHOD <str>]
+  -INPUT:<str> 	Input grid
+	Grid (input)
+  -OUTPUT:<str>	Output
+	Grid (output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Arithmetic mean (version 1)
+	[1] Arithmetic mean (version 2)
+	[2] Difference from all neighbour's mean
+	[3] Variance (version 1)
+	[4] Variance (version 2)
+	[5] Standard deviation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_215.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_dxf.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_dxf.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_dxf.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Import DXF Files
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_dxf.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_234.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_234.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_234.txt	(revision 369)
@@ -0,0 +1,69 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Coordinate Transformation (Grid)
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 4 [-CRS_METHOD <str>] [-CRS_PROJ4 <str>] [-CRS_FILE <str>] [-CRS_EPSG <num>] -SOURCE <str> [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-TARGET_AREA] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_USER_GRID <str>] [-GET_GRID_GRID <str>] [-POINTS_POINTS <str>]
+  -CRS_METHOD:<str>   	Get CRS Definition from...
+	Choice
+	Available Choices:
+	[0] Proj4 Parameters
+	[1] EPSG Code
+	[2] Well Known Text File
+  -CRS_PROJ4:<str>    	Proj4 Parameters
+	Long text
+  -CRS_FILE:<str>     	Well Known Text File
+	File path
+  -CRS_EPSG:<num>     	EPSG Code
+	Integer
+	Value Range: 2000.000000 - 32766.000000
+  -SOURCE:<str>       	Source
+	Grid (input)
+  -CREATE_XY          	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>        	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>        	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>  	Target
+	Choice
+	Available Choices:
+	[0] user defined grid system
+	[1] existing grid system
+	[2] points
+  -TARGET_AREA        	Use Target Area Polygon
+	Boolean
+  -GET_USER_XMIN:<str>	Left
+	Floating point
+  -GET_USER_XMAX:<str>	Right
+	Floating point
+  -GET_USER_YMIN:<str>	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>	Top
+	Floating point
+  -GET_USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GET_GRID_GRID:<str>	Grid
+	Grid (output)
+  -POINTS_POINTS:<str>	Points
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_234.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Export ESRI Arc/Info Grid
+ 1	- Import ESRI Arc/Info Grid
+ 2	- Export Surfer Grid
+ 3	- Import Surfer Grid
+ 4	- Import Binary Raw Data
+ 5	- Export Grid to XYZ
+ 6	- Import Grid from XYZ
+ 7	- Import USGS SRTM Grid
+ 8	- Import MOLA Grid (MEGDR)
+ 9	- Import SRTM30 DEM
+ 10	- Export True Color Bitmap
+ 11	- Import Erdas LAN/GIS
+ 12	- Import Grid from Table
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_grid.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_tools.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Vegetation Index[distance based]
+ 1	- Vegetation Index[slope based]
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_271.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_271.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_271.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Add Grid Values to Points
+ 1	- Add Grid Values to Shapes
+ 2	- Grid Statistics for Polygons
+ 3	- Grid Values to Shapes
+ 4	- Grid Values to Points (randomly)
+ 5	- Contour Lines from Grid
+ 6	- Vectorising Grid Classes
+ 7	- Clip Grid with Polygon
+ 9	- Local Minima and Maxima
+ 10	- Grid System Extent
+ 15	- Gradient Vectors from Surface
+ 16	- Gradient Vectors from Direction and Length
+ 17	- Gradient Vectors from Directional Components
+
+type -h or --help for further information
+
+error: module not found [12]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_271.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_219.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_219.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_219.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	08: Extended neighbourhoods - catchment areas (parallel)
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 7 -ELEVATION <str> -AREA <str> [-METHOD <str>]
+  -ELEVATION:<str>	Elevation grid
+	Grid (input)
+  -AREA:<str>     	Catchment area
+	Grid (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] D8
+	[1] MFD

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_219.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_238.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_238.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_238.txt	(revision 369)
@@ -0,0 +1,924 @@
+Usage: 8 [-SOURCE_PROJ_PROJ_TYPE <str>] [-SOURCE_PROJ_DATUM_DEF <str>] [-SOURCE_PROJ_DATUM <str>] [-SOURCE_PROJ_DATUM_GRID <str>] [-SOURCE_PROJ_ELLIPSOID <str>] [-SOURCE_PROJ_ELLPS_PREDEF <str>] [-SOURCE_PROJ_ELLPS_A <str>] [-SOURCE_PROJ_ELLPS_B <str>] [-SOURCE_PROJ_ELLPS_F <str>] [-SOURCE_PROJ_ELLPS_RF <str>] [-SOURCE_PROJ_ELLPS_E <str>] [-SOURCE_PROJ_ELLPS_ES <str>] [-SOURCE_PROJ_DATUM_SHIFT <str>] [-SOURCE_PROJ_DS_DX <str>] [-SOURCE_PROJ_DS_DY <str>] [-SOURCE_PROJ_DS_DZ <str>] [-SOURCE_PROJ_DS_RX <str>] [-SOURCE_PROJ_DS_RY <str>] [-SOURCE_PROJ_DS_RZ <str>] [-SOURCE_PROJ_DS_SC <str>] [-SOURCE_PROJ_LON_0 <str>] [-SOURCE_PROJ_LAT_0 <str>] [-SOURCE_PROJ_X_0 <str>] [-SOURCE_PROJ_Y_0 <str>] [-SOURCE_PROJ_K_0 <str>] [-SOURCE_PROJ_UNIT <str>] [-TARGET_PROJ_PROJ_TYPE <str>] [-TARGET_PROJ_DATUM_DEF <str>] [-TARGET_PROJ_DATUM <str>] [-TARGET_PROJ_DATUM_GRID <str>] [-TARGET_PROJ_ELLIPSOID <str>] [-TARGET_PROJ_ELLPS_PREDEF <str>] [-TARGET_PROJ_ELLPS_A <str>] [-TARGET_PROJ_ELLPS_B <str>] [-TARGET_PROJ_ELLPS_F <str>] [-TARGET_PROJ_ELLPS_RF <str>] [-TARGET_PROJ_ELLPS_E <str>] [-TARGET_PROJ_ELLPS_ES <str>] [-TARGET_PROJ_DATUM_SHIFT <str>] [-TARGET_PROJ_DS_DX <str>] [-TARGET_PROJ_DS_DY <str>] [-TARGET_PROJ_DS_DZ <str>] [-TARGET_PROJ_DS_RX <str>] [-TARGET_PROJ_DS_RY <str>] [-TARGET_PROJ_DS_RZ <str>] [-TARGET_PROJ_DS_SC <str>] [-TARGET_PROJ_LON_0 <str>] [-TARGET_PROJ_LAT_0 <str>] [-TARGET_PROJ_X_0 <str>] [-TARGET_PROJ_Y_0 <str>] [-TARGET_PROJ_K_0 <str>] [-TARGET_PROJ_UNIT <str>] -SOURCE <str> [-SHAPES <str>] [-CREATE_XY] [-OUT_X <str>] [-OUT_Y <str>] [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_USER_GRID <str>] [-GET_GRID_GRID <str>] [-GET_SHAPES_SHAPES <str>]
+  -SOURCE_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -SOURCE_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -SOURCE_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -SOURCE_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -SOURCE_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -SOURCE_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -SOURCE_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -SOURCE_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -SOURCE_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -SOURCE_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -SOURCE_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -SOURCE_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -SOURCE_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -SOURCE_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -SOURCE_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -SOURCE_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -SOURCE_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -SOURCE_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -SOURCE_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -SOURCE_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -SOURCE_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -SOURCE_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -SOURCE_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -SOURCE_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -SOURCE_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -SOURCE_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -TARGET_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -TARGET_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -TARGET_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -TARGET_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -TARGET_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -TARGET_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -TARGET_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -TARGET_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -TARGET_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -TARGET_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -TARGET_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -TARGET_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -TARGET_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -TARGET_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -TARGET_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -TARGET_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -TARGET_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -TARGET_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -TARGET_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -TARGET_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -TARGET_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -TARGET_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -TARGET_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -TARGET_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -TARGET_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -TARGET_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -SOURCE:<str>                  	Source
+	Grid (input)
+  -SHAPES:<str>                  	Shapes
+	Data Object (optional output)
+  -CREATE_XY                     	Create X/Y Grids
+	Boolean
+  -OUT_X:<str>                   	X Coordinates
+	Data Object (optional output)
+  -OUT_Y:<str>                   	Y Coordinates
+	Data Object (optional output)
+  -INTERPOLATION:<str>           	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>             	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -v_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Dialog, Grid)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+itk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -GET_USER_XMIN:<str>           	Left
+	Floating point
+  -GET_USER_XMAX:<str>           	Right
+	Floating point
+  -GET_USER_YMIN:<str>           	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>           	Top
+	Floating point
+  -GET_USER_SIZE:<str>           	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_USER_GRID:<str>           	Grid
+	Data Object (optional output)
+  -GET_GRID_GRID:<str>           	Grid
+	Grid (output)
+  -GET_SHAPES_SHAPES:<str>       	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_238.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_153.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_153.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_153.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gdal
+module name :	OGR: Import Vector Data
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-FILES <str>]
+  -SHAPES:<str>	Shapes
+	Shapes list (output)
+  -FILES:<str> 	Files
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_153.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_251.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_251.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_251.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Transform Point Cloud
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 8 -IN <str> -OUT <str> [-DX <str>] [-DY <str>] [-ANGLE <str>] [-SCALEX <str>] [-SCALEY <str>] [-ANCHORX <str>] [-ANCHORY <str>]
+  -IN:<str>     	Input
+	Point Cloud (input)
+  -OUT:<str>    	Output
+	Point Cloud (output)
+  -DX:<str>     	dX
+	Floating point
+  -DY:<str>     	dY
+	Floating point
+  -ANGLE:<str>  	Angle
+	Floating point
+  -SCALEX:<str> 	Scale Factor X
+	Floating point
+  -SCALEY:<str> 	Scale Factor Y
+	Floating point
+  -ANCHORX:<str>	X
+	Floating point
+  -ANCHORY:<str>	Y
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_251.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_181.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_181.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_181.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Table from Query
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 8 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -TABLE <str> [-TABLES <str>] [-FIELDS <str>] [-WHERE <str>] [-GROUP <str>] [-HAVING <str>] [-ORDER <str>] [-DISTINCT]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -TABLE:<str>   	Table from SQL Query
+	Table (output)
+  -TABLES:<str>  	Tables
+	Text
+  -FIELDS:<str>  	Fields
+	Text
+  -WHERE:<str>   	Where
+	Text
+  -GROUP:<str>   	Group by
+	Text
+  -HAVING:<str>  	Having
+	Text
+  -ORDER:<str>   	Order by
+	Text
+  -DISTINCT      	Distinct
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_181.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_34.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_34.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_34.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_points
+module name :	Variogram Surface
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 2 -POINTS <str> [-FIELD <str>] [-COUNT <str>] [-VARIANCE <str>] [-COVARIANCE <str>] [-DISTCOUNT <num>] [-NSKIP <num>]
+  -POINTS:<str>    	Points
+	Shapes (input)
+  -FIELD:<str>     	Attribute
+	Table field
+  -COUNT:<str>     	Number of Pairs
+	Data Object (optional output)
+  -VARIANCE:<str>  	Variogram Surface
+	Data Object (optional output)
+  -COVARIANCE:<str>	Covariance Surface
+	Data Object (optional output)
+  -DISTCOUNT:<num> 	Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>     	Skip Number
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_34.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_regression.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_regression.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_regression.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Regression Analysis (Points/Grid)
+ 1	- Multiple Regression Analysis (Points/Grids)
+ 2	- Polynomial Regression
+ 3	- Geographically Weighted Regression
+ 4	- Geographically Weighted Regression (Points/Grid)
+ 5	- Geographically Weighted Multiple Regression
+ 6	- Geographically Weighted Multiple Regression (Points/Grids)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_regression.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_105.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_105.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_105.txt	(revision 369)
@@ -0,0 +1,40 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Resampling
+ 1	- Aggregate
+ 3	- Merging
+ 4	- Create Constant Grid
+ 5	- Patching
+ 6	- Close One Cell Gaps
+ 7	- Close Gaps
+ 8	- Grid Buffer
+ 9	- Threshold Buffer
+ 10	- Grid Proximity Buffer
+ 11	- Convert Data Storage Type
+ 12	- Change Grid Values
+ 15	- Reclassify Grid Values
+ 17	- Crop to Data
+ 18	- Invert Data/No-Data
+ 19	- Grid Orientation
+ 20	- Combine Grids
+ 21	- Sort Grid
+ 22	- Grids from classified grid and table
+ 23	- Create Grid System
+ 24	- Grid Masking
+ 25	- Close Gaps with Spline
+ 26	- Proximity Grid
+ 27	- Tiling
+
+type -h or --help for further information
+
+error: cannot execute interactive module [2]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_105.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_hydrology.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_hydrology.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_hydrology.txt	(revision 369)
@@ -0,0 +1,16 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Soil Moisture Content
+ 1	- Overland Flow - Kinematic Wave D8
+ 2	- TOPMODEL
+ 3	- Water Retention Capacity
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_hydrology.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_185.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_185.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_185.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	PostGIS Shapes Export
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 12 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -SHAPES <str> [-NAME <str>] [-SRID <str>] [-EXISTS <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -SHAPES:<str>  	Shapes
+	Shapes (input)
+  -NAME:<str>    	Table Name
+	Text
+  -SRID:<str>    	Spatial Reference
+	Choice
+	Available Choices:
+	[0] --- not available ---
+  -EXISTS:<str>  	If table exists...
+	Choice
+	Available Choices:
+	[0] abort export
+	[1] replace existing table
+	[2] append records, if table structure allows

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_185.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_59.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_59.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_59.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grid Normalisation
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> -OUTPUT <str> [-RANGE_MIN <str>] [-RANGE_MAX <str>]
+  -INPUT:<str>    	Grid
+	Grid (input)
+  -OUTPUT:<str>   	Normalised Grid
+	Grid (output)
+  -RANGE_MIN:<str>	Target Range
+	Value range
+  -RANGE_MAX:<str>	Target Range
+	Value range

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_59.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_323.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_323.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_323.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_cellular_automata
+module name :	Conway's Life
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 [-GRID <str>] [-NX <num>] [-NY <num>] [-FADECOLOR <num>]
+  -GRID:<str>     	Grid
+	Data Object (optional output)
+  -NX:<num>       	Width (Cells)
+	Integer
+	Minimum: 1.000000
+  -NY:<num>       	Height (Cells)
+	Integer
+	Minimum: 1.000000
+  -FADECOLOR:<num>	Fade Color Count
+	Integer
+	Value Range: 1.000000 - 255.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_323.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_109.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_109.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_109.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Close One Cell Gaps
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> -RESULT <str>
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Changed Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_109.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_16.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_16.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_16.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Radius of Variance (Grid)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -INPUT <str> -RESULT <str> [-VARIANCE <str>] [-RADIUS <num>] [-OUTPUT <str>]
+  -INPUT:<str>   	Grid
+	Grid (input)
+  -RESULT:<str>  	Variance Radius
+	Grid (output)
+  -VARIANCE:<str>	Standard Deviation
+	Floating point
+  -RADIUS:<num>  	Maximum Search Radius (cells)
+	Integer
+  -OUTPUT:<str>  	Type of Output
+	Choice
+	Available Choices:
+	[0] Cells
+	[1] Map Units

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_16.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_206.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_206.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_206.txt	(revision 369)
@@ -0,0 +1,54 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes_las
+module name :	Import LAS Files
+author      :	O. Conrad, V. Wichmann (c) 2009
+_____________________________________________
+go...
+Usage: 1 [-POINTS <str>] [-FILE <str>] [-T] [-i] [-a] [-r] [-c] [-u] [-n] [-R] [-G] [-B] [-e] [-d] [-p] [-C] [-VALID] [-RGB_RANGE <str>]
+  -POINTS:<str>   	Point Cloud
+	Data Object (optional output)
+  -FILE:<str>     	Input File
+	File path
+  -T              	gps-time
+	Boolean
+  -i              	intensity
+	Boolean
+  -a              	scan angle
+	Boolean
+  -r              	number of the return
+	Boolean
+  -c              	classification
+	Boolean
+  -u              	user data
+	Boolean
+  -n              	number of returns of given pulse
+	Boolean
+  -R              	red channel color
+	Boolean
+  -G              	green channel color
+	Boolean
+  -B              	blue channel color
+	Boolean
+  -e              	edge of flight line flag
+	Boolean
+  -d              	direction of scan flag
+	Boolean
+  -p              	point source ID
+	Boolean
+  -C              	rgb color
+	Boolean
+  -VALID          	Check Point Validity
+	Boolean
+  -RGB_RANGE:<str>	R,G,B value range
+	Choice
+	Available Choices:
+	[0] 16 bit
+	[1] 8 bit

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_206.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_210.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_210.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_210.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_table
+module name :	Import Text Table with Numbers only
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 2 -TABLE <str> [-HEADLINE] [-SEPARATOR <str>] [-SEP_OTHER <str>] [-FILENAME <str>]
+  -TABLE:<str>    	Table
+	Table (output)
+  -HEADLINE       	File contains headline
+	Boolean
+  -SEPARATOR:<str>	Separator
+	Choice
+	Available Choices:
+	[0] tabulator
+	[1] ;
+	[2] ,
+	[3] other
+  -SEP_OTHER:<str>	Separator (other)
+	Text
+  -FILENAME:<str> 	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_210.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_191.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_191.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_191.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export Surfer Blanking File
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -SHAPES <str> [-NAME <str>] [-DESC <str>] [-ZVAL <str>] [-BNAME] [-BDESC] [-BZVAL] [-FILE <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -NAME:<str>  	Name
+	Table field
+  -DESC:<str>  	Description
+	Table field
+  -ZVAL:<str>  	z values
+	Table field
+  -BNAME       	Export names
+	Boolean
+  -BDESC       	Export descriptions
+	Boolean
+  -BZVAL       	Export z values
+	Boolean
+  -FILE:<str>  	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_191.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_382.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_382.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_382.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Mass Balance Index
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 10 -DEM <str> [-HREL <str>] -MBI <str> [-TSLOPE <str>] [-TCURVE <str>] [-THREL <str>]
+  -DEM:<str>   	Elevation
+	Grid (input)
+  -HREL:<str>  	Vertical Distance to Channel Network
+	Grid (optional input)
+  -MBI:<str>   	Mass Balance Index
+	Grid (output)
+  -TSLOPE:<str>	T Slope
+	Floating point
+	Minimum: 0.000000
+  -TCURVE:<str>	T Curvature
+	Floating point
+	Minimum: 0.000000
+  -THREL:<str> 	T Vertical Distance to Channel Network
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_382.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_390.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_390.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_390.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Flat Detection
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 0 -DEM <str> [-NOFLATS <str>] [-FLATS <str>] [-FLAT_OUTPUT <str>]
+  -DEM:<str>        	DEM
+	Grid (input)
+  -NOFLATS:<str>    	No Flats
+	Grid (optional output)
+  -FLATS:<str>      	Flat Areas
+	Grid (optional output)
+  -FLAT_OUTPUT:<str>	Flat Area Values
+	Choice
+	Available Choices:
+	[0] elevation
+	[1] enumeration

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_390.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_195.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_195.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_195.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export WASP terrain map file
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 9 -SHAPES <str> [-ELEVATION <str>] [-FILE <str>]
+  -SHAPES:<str>   	Contour Lines
+	Shapes (input)
+  -ELEVATION:<str>	Map File
+	Table field
+  -FILE:<str>     	File Name
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_195.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_cellular_automata.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_cellular_automata.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_cellular_automata.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Conway's Life
+ 1	- Wa-Tor
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_cellular_automata.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_386.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_386.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_386.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Relative Heights and Slope Positions
+author      :	J.Boehner, O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 14 -DEM <str> -HO <str> -HU <str> -NH <str> -SH <str> -MS <str> [-W <str>] [-T <str>] [-E <str>]
+  -DEM:<str>	Elevation
+	Grid (input)
+  -HO:<str> 	Slope Height
+	Grid (output)
+  -HU:<str> 	Valley Depth
+	Grid (output)
+  -NH:<str> 	Normalized Height
+	Grid (output)
+  -SH:<str> 	Standardized Height
+	Grid (output)
+  -MS:<str> 	Mid-Slope Positon
+	Grid (output)
+  -W:<str>  	w
+	Floating point
+	Minimum: 0.000000
+  -T:<str>  	t
+	Floating point
+	Minimum: 0.000000
+  -E:<str>  	e
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_386.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_394.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_394.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_394.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Fill Sinks (Wang & Liu)
+author      :	Copyrights (c) 2007 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 4 -ELEV <str> -FILLED <str> -FDIR <str> -WSHED <str> [-MINSLOPE <str>]
+  -ELEV:<str>    	DEM
+	Grid (input)
+  -FILLED:<str>  	Filled DEM
+	Grid (output)
+  -FDIR:<str>    	Flow Directions
+	Grid (output)
+  -WSHED:<str>   	Watershed Basins
+	Grid (output)
+  -MINSLOPE:<str>	Minimum Slope [Degree]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_394.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_220.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_220.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_220.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	09: Extended neighbourhoods - catchment areas (recursive)
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 8 -ELEVATION <str> -AREA <str>
+  -ELEVATION:<str>	Elevation grid
+	Grid (input)
+  -AREA:<str>     	Catchment area
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_220.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_345.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_345.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_345.txt	(revision 369)
@@ -0,0 +1,44 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Channel Network
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -ELEVATION <str> [-SINKROUTE <str>] -CHNLNTWRK <str> -CHNLROUTE <str> -SHAPES <str> -INIT_GRID <str> [-INIT_METHOD <str>] [-INIT_VALUE <str>] [-DIV_GRID <str>] [-DIV_CELLS <num>] [-TRACE_WEIGHT <str>] [-MINLEN <num>]
+  -ELEVATION:<str>   	Elevation
+	Grid (input)
+  -SINKROUTE:<str>   	Flow Direction
+	Grid (optional input)
+  -CHNLNTWRK:<str>   	Channel Network
+	Grid (output)
+  -CHNLROUTE:<str>   	Channel Direction
+	Grid (output)
+  -SHAPES:<str>      	Channel Network
+	Shapes (output)
+  -INIT_GRID:<str>   	Initiation Grid
+	Grid (input)
+  -INIT_METHOD:<str> 	Initiation Type
+	Choice
+	Available Choices:
+	[0] Less than
+	[1] Equals
+	[2] Greater than
+  -INIT_VALUE:<str>  	Initiation Threshold
+	Floating point
+  -DIV_GRID:<str>    	Divergence
+	Grid (optional input)
+  -DIV_CELLS:<num>   	Tracing: Max. Divergence
+	Integer
+	Minimum: 1.000000
+  -TRACE_WEIGHT:<str>	Tracing: Weight
+	Grid (optional input)
+  -MINLEN:<num>      	Min. Segment Length
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_345.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_las.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_las.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_las.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Export LAS Files
+ 1	- Import LAS Files
+ 2	- LAS Info
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_shapes_las.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_199.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_199.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_199.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import GPX
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 13 [-SHAPES <str>] [-FILE <str>] [-TIME]
+  -SHAPES:<str>	GPX Import
+	Shapes list (optional output)
+  -FILE:<str>  	File
+	File path
+  -TIME        	Time Stamp without date
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_199.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_227.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_227.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_227.txt	(revision 369)
@@ -0,0 +1,58 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_georeference
+module name :	Georeferencing - Grids
+author      :	(c) 2004 Ringeler, (c) 2006 O.Conrad
+_____________________________________________
+go...
+Usage: 1 [-SHAPES <str>] -REF_SOURCE <str> [-REF_TARGET <str>] [-XFIELD <str>] [-YFIELD <str>] -SOURCE <str> [-INTERPOLATION <str>] [-TARGET_TYPE <str>] [-GET_USER_XMIN <str>] [-GET_USER_XMAX <str>] [-GET_USER_YMIN <str>] [-GET_USER_YMAX <str>] [-GET_USER_SIZE <str>] [-GET_USER_GRID <str>] [-GET_GRID_GRID <str>] [-GET_SHAPES_SHAPES <str>]
+  -SHAPES:<str>           	Shapes
+	Data Object (optional output)
+  -REF_SOURCE:<str>       	Reference Points (Origin)
+	Shapes (input)
+  -REF_TARGET:<str>       	Reference Points (Projection)
+	Shapes (optional input)
+  -XFIELD:<str>           	x Position
+	Table field
+  -YFIELD:<str>           	y Position
+	Table field
+  -SOURCE:<str>           	Source
+	Grid (input)
+  -INTERPOLATION:<str>    	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neigbhor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -TARGET_TYPE:<str>      	Target
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+	[2] shapes
+  -GET_USER_XMIN:<str>    	Left
+	Floating point
+  -GET_USER_XMAX:<str>    	Right
+	Floating point
+  -GET_USER_YMIN:<str>    	Bottom
+	Floating point
+  -GET_USER_YMAX:<str>    	Top
+	Floating point
+  -GET_USER_SIZE:<str>    	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -GET_USER_GRID:<str>    	Grid
+	Data Object (optional output)
+  -GET_GRID_GRID:<str>    	Grid
+	Grid (output)
+  -GET_SHAPES_SHAPES:<str>	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_georeference_227.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_224.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_224.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_224.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	13: Reprojecting a shapes layer
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 12 -INPUT <str> -OUTPUT <str> [-METHOD <str>] [-TRANS_X <str>] [-TRANS_Y <str>] [-SCALE_X <str>] [-SCALE_Y <str>] [-SHEAR_X <str>] [-SHEAR_Y <str>] [-ROTAT <str>]
+  -INPUT:<str>  	Input
+	Shapes (input)
+  -OUTPUT:<str> 	Output
+	Shapes (output)
+  -METHOD:<str> 	Method
+	Choice
+	Available Choices:
+	[0] Translation
+	[1] Scaling
+	[2] Shearing
+	[3] Rotation
+	[4] Combination A
+	[5] Combination B
+  -TRANS_X:<str>	X
+	Floating point
+  -TRANS_Y:<str>	Y
+	Floating point
+  -SCALE_X:<str>	X
+	Floating point
+  -SCALE_Y:<str>	Y
+	Floating point
+  -SHEAR_X:<str>	X
+	Floating point
+  -SHEAR_Y:<str>	Y
+	Floating point
+  -ROTAT:<str>  	Rotation angle [Degree]
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_224.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_349.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_349.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_349.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Overland Flow Distance to Channel Network
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -ELEVATION <str> -CHANNELS <str> -DISTANCE <str> -DISTVERT <str> -DISTHORZ <str> [-METHOD <str>]
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -CHANNELS:<str> 	Channel Network
+	Grid (input)
+  -DISTANCE:<str> 	Overland Flow Distance
+	Grid (output)
+  -DISTVERT:<str> 	Vertical Overland Flow Distance
+	Grid (output)
+  -DISTHORZ:<str> 	Horizontal Overland Flow Distance
+	Grid (output)
+  -METHOD:<str>   	Flow Algorithm
+	Choice
+	Available Choices:
+	[0] D8
+	[1] MFD

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_349.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_332.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_332.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_332.txt	(revision 369)
@@ -0,0 +1,52 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_hydrology
+module name :	TOPMODEL
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -ATANB <str> [-MOIST <str>] -CLIMATE <str> -TABLE <str> [-DTIME <str>] [-NCLASSES <num>] [-P_QS0 <str>] [-P_LNTE <str>] [-P_MODEL <str>] [-P_SR0 <str>] [-P_SRZMAX <str>] [-P_SUZ_TD <str>] [-P_VCH <str>] [-P_VR <str>] [-P_K0 <str>] [-P_PSI <str>] [-P_DTHETA <str>] [-BINF]
+  -ATANB:<str>   	A / tan(ß)
+	Grid (input)
+  -MOIST:<str>   	Soil Moisture Deficit
+	Grid (optional output)
+  -CLIMATE:<str> 	Climate Data (P, EP)
+	Table (input)
+  -TABLE:<str>   	Simulation Output
+	Table (output)
+  -DTIME:<str>   	Time Step [h]
+	Floating point
+  -NCLASSES:<num>	Number of Classes
+	Integer
+	Minimum: 1.000000
+  -P_QS0:<str>   	Initial subsurface flow per unit area [m/h]
+	Floating point
+  -P_LNTE:<str>  	Areal average of ln(T0) = ln(Te) [ln(m^2/h)]
+	Floating point
+  -P_MODEL:<str> 	Model parameter [m]
+	Floating point
+  -P_SR0:<str>   	Initial root zone storage deficit [m]
+	Floating point
+  -P_SRZMAX:<str>	Maximum root zone storage deficit [m]
+	Floating point
+  -P_SUZ_TD:<str>	Unsaturated zone time delay per unit storage deficit [h]
+	Floating point
+  -P_VCH:<str>   	Main channel routing velocity [m/h]
+	Floating point
+  -P_VR:<str>    	Internal subcatchment routing velocity [m/h]
+	Floating point
+  -P_K0:<str>    	Surface hydraulic conductivity [m/h]
+	Floating point
+  -P_PSI:<str>   	Wetting front suction [m]
+	Floating point
+  -P_DTHETA:<str>	Water content change across the wetting front
+	Floating point
+  -BINF          	Green-Ampt Infiltration
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_332.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_279.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_279.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_279.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Count Points in Polygons
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 1 -POINTS <str> -POLYGONS <str>
+  -POINTS:<str>  	Points
+	Shapes (input)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_279.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_table.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_table.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_table.txt	(revision 369)
@@ -0,0 +1,16 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Export Text Table
+ 1	- Import Text Table
+ 2	- Import Text Table with Numbers only
+ 3	- Import Text Table (Fixed Column Sizes)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_table.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_60.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_60.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_60.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grid Calculator
+author      :	Copyrights (c) 2003 by Andre Ringeler
+_____________________________________________
+go...
+Usage: 1 -GRIDS <str> -RESULT <str> [-FORMULA <str>] [-NAME <str>] [-FNAME]
+  -GRIDS:<str>  	Grids
+	Grid list (input)
+  -RESULT:<str> 	Result
+	Grid (output)
+  -FORMULA:<str>	Formula
+	Text
+  -NAME:<str>   	Name
+	Text
+  -FNAME        	Take Formula
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_60.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_110.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_110.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_110.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Close Gaps
+author      :	(c) 2002 by O.Conrad
+_____________________________________________
+go...
+Usage: 7 -INPUT <str> [-MASK <str>] [-RESULT <str>] [-THRESHOLD <str>]
+  -INPUT:<str>    	Grid
+	Grid (input)
+  -MASK:<str>     	Mask
+	Grid (optional input)
+  -RESULT:<str>   	Changed Grid
+	Grid (optional output)
+  -THRESHOLD:<str>	Tension Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_110.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_64.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_64.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_64.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Geometric Figures
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 [-RESULT <str>] [-CELL_COUNT <num>] [-CELL_SIZE <str>] [-FIGURE <str>] [-PLANE <str>]
+  -RESULT:<str>    	Result
+	Grid list (optional output)
+  -CELL_COUNT:<num>	Cell Count
+	Integer
+	Minimum: 2.000000
+  -CELL_SIZE:<str> 	Cell Size
+	Floating point
+	Minimum: 0.000000
+  -FIGURE:<str>    	Figure
+	Choice
+	Available Choices:
+	[0] Cone (up)
+	[1] Cone (down)
+	[2] Plane
+  -PLANE:<str>     	Direction of Plane [Degree]
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_64.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_41.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_41.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_41.txt	(revision 369)
@@ -0,0 +1,69 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Geographically Weighted Regression (Points/Grid)
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 4 -PREDICTOR <str> -REGRESSION <str> [-QUALITY <str>] [-INTERCEPT <str>] [-SLOPE <str>] -POINTS <str> [-DEPENDENT <str>] [-RESIDUALS <str>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>] [-RANGE <str>] [-RADIUS <str>] [-MODE <str>] [-NPOINTS <str>] [-MAXPOINTS <num>] [-MINPOINTS <num>]
+  -PREDICTOR:<str>                   	Predictor
+	Grid (input)
+  -REGRESSION:<str>                  	Regression
+	Grid (output)
+  -QUALITY:<str>                     	Coefficient of Determination
+	Grid (optional output)
+  -INTERCEPT:<str>                   	Intercept
+	Grid (optional output)
+  -SLOPE:<str>                       	Slope
+	Grid (optional output)
+  -POINTS:<str>                      	Points
+	Shapes (input)
+  -DEPENDENT:<str>                   	Dependent Variable
+	Table field
+  -RESIDUALS:<str>                   	Residuals
+	Shapes (optional output)
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>                       	Search Range
+	Choice
+	Available Choices:
+	[0] search radius (local)
+	[1] no search radius (global)
+  -RADIUS:<str>                      	Search Radius
+	Floating point
+  -MODE:<str>                        	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -NPOINTS:<str>                     	Number of Points
+	Choice
+	Available Choices:
+	[0] maximum number of observations
+	[1] all points
+  -MAXPOINTS:<num>                   	Maximum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -MINPOINTS:<num>                   	Minimum Number of Observations
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_41.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_114.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_114.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_114.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Convert Data Storage Type
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 11 -INPUT <str> [-OUTPUT <str>] [-TYPE <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -OUTPUT:<str>	Converted Grid
+	Grid (optional output)
+  -TYPE:<str>  	Data storage type
+	Choice
+	Available Choices:
+	[0] bit
+	[1] unsigned 1 byte integer
+	[2] signed 1 byte integer
+	[3] unsigned 2 byte integer
+	[4] signed 2 byte integer
+	[5] unsigned 4 byte integer
+	[6] signed 4 byte integer
+	[7] 4 byte floating point number
+	[8] 8 byte floating point number

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_114.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_21.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_21.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_21.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Principle Components Analysis
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 8 -GRIDS <str> -PCA <str> [-METHOD <str>] [-NFIRST <num>]
+  -GRIDS:<str> 	Grids
+	Grid list (input)
+  -PCA:<str>   	Principle Components
+	Grid list (output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] correlation matrix
+	[1] variance-covariance matrix
+	[2] sums-of-squares-and-cross-products matrix
+  -NFIRST:<num>	Number of Components
+	Integer
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_21.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_fire_spreading.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_fire_spreading.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_fire_spreading.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Fire Risk Analysis
+ 1	- Simulation
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_sim_fire_spreading.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_68.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_68.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_68.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grids Product
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 9 -GRIDS <str> -RESULT <str>
+  -GRIDS:<str> 	Grids
+	Grid list (input)
+  -RESULT:<str>	Product
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_68.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_203.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_203.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_203.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export Scalable Vector Graphics (SVG) File
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 17 -SHAPES <str> [-FILE <str>]
+  -SHAPES:<str>	Shapes
+	Shapes list (input)
+  -FILE:<str>  	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_203.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_118.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_118.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_118.txt	(revision 369)
@@ -0,0 +1,79 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Reclassify Grid Values
+author      :	Copyrights (c) 2005 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 15 -INPUT <str> -RESULT <str> [-METHOD <str>] [-OLD <str>] [-NEW <str>] [-SOPERATOR <str>] [-MIN <str>] [-MAX <str>] [-RNEW <str>] [-ROPERATOR <str>] [-RETAB <str>] [-TOPERATOR <str>] [-RETAB_2 <str>] [-F_MIN <str>] [-F_MAX <str>] [-F_CODE <str>] [-NODATAOPT] [-NODATA <str>] [-OTHEROPT] [-OTHERS <str>]
+  -INPUT:<str>    	Grid
+	Grid (input)
+  -RESULT:<str>   	Reclassified Grid
+	Grid (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] single
+	[1] range
+	[2] simple table
+	[3] user supplied table
+  -OLD:<str>      	old value
+	Floating point
+  -NEW:<str>      	new value
+	Floating point
+  -SOPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] =
+	[1] <
+	[2] <=
+	[3] >=
+	[4] >
+  -MIN:<str>      	minimum value
+	Floating point
+  -MAX:<str>      	maximum value
+	Floating point
+  -RNEW:<str>     	new value
+	Floating point
+  -ROPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] <=
+	[1] <
+  -RETAB:<str>    	Lookup Table
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] minimum
+	- 2. [8 byte floating point number] maximum
+	- 3. [8 byte floating point number] new
+	
+  -TOPERATOR:<str>	operator
+	Choice
+	Available Choices:
+	[0] min <= value < max
+	[1] min <= value <= max
+	[2] min < value <= max
+	[3] min < value < max
+  -RETAB_2:<str>  	Lookup Table
+	Table (optional input)
+  -F_MIN:<str>    	minimum value
+	Table field
+  -F_MAX:<str>    	maximum value
+	Table field
+  -F_CODE:<str>   	new value
+	Table field
+  -NODATAOPT      	no data values
+	Boolean
+  -NODATA:<str>   	no data values >> value
+	Floating point
+  -OTHEROPT       	other values
+	Boolean
+  -OTHERS:<str>   	other values >> value
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_118.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_354.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_354.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_354.txt	(revision 369)
@@ -0,0 +1,53 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Catchment Area (Recursive)
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 1 -ELEVATION <str> [-SINKROUTE <str>] [-WEIGHT <str>] [-MATERIAL <str>] [-TARGET <str>] -CAREA <str> [-CHEIGHT <str>] [-CSLOPE <str>] [-ACCU_TOT <str>] [-ACCU_LEFT <str>] [-ACCU_RIGHT <str>] [-STEP <num>] [-TARGETS <str>] [-FLOWLEN <str>] [-Method <str>] [-CONVERGENCE <str>]
+  -ELEVATION:<str>  	Elevation
+	Grid (input)
+  -SINKROUTE:<str>  	Sink Routes
+	Grid (optional input)
+  -WEIGHT:<str>     	Weight
+	Grid (optional input)
+  -MATERIAL:<str>   	Material
+	Grid (optional input)
+  -TARGET:<str>     	Target
+	Grid (optional input)
+  -CAREA:<str>      	Catchment Area
+	Grid (output)
+  -CHEIGHT:<str>    	Catchment Height
+	Grid (optional output)
+  -CSLOPE:<str>     	Catchment Slope
+	Grid (optional output)
+  -ACCU_TOT:<str>   	Total accumulated Material
+	Grid (optional output)
+  -ACCU_LEFT:<str>  	Accumulated Material from _left_ side
+	Grid (optional output)
+  -ACCU_RIGHT:<str> 	Accumulated Material from _right_ side
+	Grid (optional output)
+  -STEP:<num>       	Step
+	Integer
+	Minimum: 1.000000
+  -TARGETS:<str>    	Target Areas
+	Grid (optional input)
+  -FLOWLEN:<str>    	Flow Path Length
+	Grid (optional output)
+  -Method:<str>     	Method
+	Choice
+	Available Choices:
+	[0] Deterministic 8
+	[1] Rho 8
+	[2] Deterministic Infinity
+	[3] Multiple Flow Direction
+  -CONVERGENCE:<str>	Convergence
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_354.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_403.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_403.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_403.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	TIN to Shapes
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -TIN <str> -POINTS <str> -CENTER <str> -EDGES <str> -TRIANGLES <str> -POLYGONS <str>
+  -TIN:<str>      	TIN
+	TIN (input)
+  -POINTS:<str>   	Points
+	Shapes (output)
+  -CENTER:<str>   	Center of Triangles
+	Shapes (output)
+  -EDGES:<str>    	Edges
+	Shapes (output)
+  -TRIANGLES:<str>	Triangles
+	Shapes (output)
+  -POLYGONS:<str> 	Polygons
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_403.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_358.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_358.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_358.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [5]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_358.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_161.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_161.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_161.txt	(revision 369)
@@ -0,0 +1,62 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import Binary Raw Data
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 [-GRID <str>] [-FILE_DATA <str>] [-NX <num>] [-NY <num>] [-DXY <str>] [-XMIN <str>] [-YMIN <str>] [-UNIT <str>] [-ZFACTOR <str>] [-NODATA <str>] [-DATA_OFFSET <num>] [-LINE_OFFSET <num>] [-LINE_ENDSET <num>] [-DATA_TYPE <str>] [-BYTEORDER_BIG <str>] [-TOPDOWN <str>]
+  -GRID:<str>         	Grid
+	Data Object (optional output)
+  -FILE_DATA:<str>    	Raw Data File
+	File path
+  -NX:<num>           	Cell Count (X)
+	Integer
+  -NY:<num>           	Cell Count (Y)
+	Integer
+  -DXY:<str>          	Cell Size
+	Floating point
+  -XMIN:<str>         	Left Border (X)
+	Floating point
+  -YMIN:<str>         	Lower Border (Y)
+	Floating point
+  -UNIT:<str>         	Unit Name
+	Text
+  -ZFACTOR:<str>      	Z Multiplier
+	Floating point
+  -NODATA:<str>       	No Data Value
+	Floating point
+  -DATA_OFFSET:<num>  	Data Offset (Bytes)
+	Integer
+  -LINE_OFFSET:<num>  	Line Offset (Bytes)
+	Integer
+  -LINE_ENDSET:<num>  	Line Endset (Bytes)
+	Integer
+  -DATA_TYPE:<str>    	Data Type
+	Choice
+	Available Choices:
+	[0] 1 Byte Integer (unsigned)
+	[1] 1 Byte Integer (signed)
+	[2] 2 Byte Integer (unsigned)
+	[3] 2 Byte Integer (signed)
+	[4] 4 Byte Integer (unsigned)
+	[5] 4 Byte Integer (signed)
+	[6] 4 Byte Floating Point
+	[7] 8 Byte Floating Point
+  -BYTEORDER_BIG:<str>	Byte Order
+	Choice
+	Available Choices:
+	[0] Little Endian (Intel)
+	[1] Big Endian (Motorola)
+  -TOPDOWN:<str>      	Line Order
+	Choice
+	Available Choices:
+	[0] Bottom to Top
+	[1] Top to Bottom

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_161.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_25.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_25.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_25.txt	(revision 369)
@@ -0,0 +1,89 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Universal Kriging (VF)
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -POINTS <str> [-ZFIELD <str>] [-TARGET <str>] [-TQUALITY <str>] [-DISTMAX <str>] [-DISTCOUNT <num>] [-NSKIP <num>] [-BLOCK] [-DBLOCK <str>] [-GRIDS <str>] [-INTERPOL <str>] [-COORDS] [-MAXRADIUS <str>] [-NPOINTS_MIN <str>] [-NPOINTS_MAX <str>] [-MODE <str>] [-FORMULA_STRING <str>] [-USER_BVARIANCE] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_VARIANCE <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -POINTS:<str>        	Points
+	Shapes (input)
+  -ZFIELD:<str>        	Attribute
+	Table field
+  -TARGET:<str>        	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -TQUALITY:<str>      	Type of Quality Measure
+	Choice
+	Available Choices:
+	[0] standard deviation
+	[1] variance
+  -DISTMAX:<str>       	Maximum Distance
+	Floating point
+  -DISTCOUNT:<num>     	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>         	Skip Number
+	Integer
+	Minimum: 1.000000
+  -BLOCK               	Block Kriging
+	Boolean
+  -DBLOCK:<str>        	Block Size
+	Floating point
+	Minimum: 0.000000
+  -GRIDS:<str>         	Grids
+	Grid list (optional input)
+  -INTERPOL:<str>      	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -COORDS              	Coordinates
+	Boolean
+  -MAXRADIUS:<str>     	Maximum Search Radius (map units)
+	Floating point
+	Minimum: 0.000000
+  -NPOINTS_MIN:<str>   	Min./Max. Number of m_Points
+	Value range
+  -NPOINTS_MAX:<str>   	Min./Max. Number of m_Points
+	Value range
+  -MODE:<str>          	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -FORMULA_STRING:<str>	Formula String
+	Text
+  -USER_BVARIANCE      	Create Quality Grid
+	Boolean
+  -USER_XMIN:<str>     	Left
+	Floating point
+  -USER_XMAX:<str>     	Right
+	Floating point
+  -USER_YMIN:<str>     	Bottom
+	Floating point
+  -USER_YMAX:<str>     	Top
+	Floating point
+  -USER_SIZE:<str>     	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>     	Grid
+	Data Object (optional output)
+  -USER_VARIANCE:<str> 	Quality Measure
+	Data Object (optional output)
+  -GRID_GRID:<str>     	Grid
+	Grid (output)
+  -GRID_VARIANCE:<str> 	Quality Measure
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_25.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_350.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_350.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_350.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	D8 Flow Analysis
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -DEM <str> -DIRECTION <str> -CONNECTION <str> -NETWORK <str> [-MINCON <num>]
+  -DEM:<str>       	DEM
+	Grid (input)
+  -DIRECTION:<str> 	Flow Direction
+	Grid (output)
+  -CONNECTION:<str>	Flow Connectivity
+	Grid (output)
+  -NETWORK:<str>   	Flow Network
+	Shapes (output)
+  -MINCON:<num>    	Minimum Connectivity
+	Integer
+	Value Range: 0.000000 - 8.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_350.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_165.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_165.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_165.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import MOLA Grid (MEGDR)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 8 [-GRID <str>] [-FILE <str>] [-TYPE <str>] [-ORIENT <str>]
+  -GRID:<str>  	Grid
+	Data Object (optional output)
+  -FILE:<str>  	File
+	File path
+  -TYPE:<str>  	Grid Type
+	Choice
+	Available Choices:
+	[0] 2 byte integer
+	[1] 4 byte floating point
+  -ORIENT:<str>	Orientation
+	Choice
+	Available Choices:
+	[0] normal
+	[1] down under

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_165.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_280.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_280.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_280.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Create Point Grid
+author      :	
+_____________________________________________
+go...
+Usage: 2 -POINTS <str> [-X_EXTENT_MIN <str>] [-X_EXTENT_MAX <str>] [-Y_EXTENT_MIN <str>] [-Y_EXTENT_MAX <str>] [-DIST <str>]
+  -POINTS:<str>      	Point Grid
+	Shapes (output)
+  -X_EXTENT_MIN:<str>	X-Extent
+	Value range
+  -X_EXTENT_MAX:<str>	X-Extent
+	Value range
+  -Y_EXTENT_MIN:<str>	Y-Extent
+	Value range
+  -Y_EXTENT_MAX:<str>	Y-Extent
+	Value range
+  -DIST:<str>        	Distance
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_280.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_147.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_147.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_147.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_tools
+module name :	Vegetation Index[distance based]
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 0 -NIR <str> -RED <str> [-SLOPE <str>] [-INTERCEPT <str>] -PVI <str> [-PVI1 <str>] [-PVI2 <str>] [-PVI3 <str>]
+  -NIR:<str>      	Near Infrared Band
+	Grid (input)
+  -RED:<str>      	Red Band
+	Grid (input)
+  -SLOPE:<str>    	Slope of the soil line
+	Floating point
+  -INTERCEPT:<str>	Intercept of the soil line
+	Floating point
+  -PVI:<str>      	PVI (Richardson and Wiegand)
+	Grid (output)
+  -PVI1:<str>     	PVI (Perry & Lautenschlager)
+	Grid (optional output)
+  -PVI2:<str>     	PVI (Walther & Shabaani)
+	Grid (optional output)
+  -PVI3:<str>     	PVI (Qi, et al) 
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_147.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_tools.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Resampling
+ 1	- Aggregate
+ 3	- Merging
+ 4	- Create Constant Grid
+ 5	- Patching
+ 6	- Close One Cell Gaps
+ 7	- Close Gaps
+ 8	- Grid Buffer
+ 9	- Threshold Buffer
+ 10	- Grid Proximity Buffer
+ 11	- Convert Data Storage Type
+ 12	- Change Grid Values
+ 15	- Reclassify Grid Values
+ 17	- Crop to Data
+ 18	- Invert Data/No-Data
+ 19	- Grid Orientation
+ 20	- Combine Grids
+ 21	- Sort Grid
+ 22	- Grids from classified grid and table
+ 23	- Create Grid System
+ 24	- Grid Masking
+ 25	- Close Gaps with Spline
+ 26	- Proximity Grid
+ 27	- Tiling
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_29.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_29.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_29.txt	(revision 369)
@@ -0,0 +1,91 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Ordinary Kriging (Global)
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 [-GRID <str>] [-VARIANCE <str>] -SHAPES <str> [-FIELD <str>] [-BVARIANCE] [-TARGET <str>] [-MODEL <str>] [-BLOCK] [-DBLOCK <str>] [-BLOG] [-NUGGET <str>] [-SILL <str>] [-RANGE <str>] [-LIN_B <str>] [-EXP_B <str>] [-POW_A <str>] [-POW_B <str>] [-USER_CELL_SIZE <str>] [-USER_FIT_EXTENT] [-USER_X_EXTENT_MIN <str>] [-USER_X_EXTENT_MAX <str>] [-USER_Y_EXTENT_MIN <str>] [-USER_Y_EXTENT_MAX <str>] [-SYSTEM_SYSTEM_NX <num>] [-SYSTEM_SYSTEM_NY <num>] [-SYSTEM_SYSTEM_X <str>] [-SYSTEM_SYSTEM_Y <str>] [-SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -GRID:<str>             	Grid
+	Data Object (optional output)
+  -VARIANCE:<str>         	Variance
+	Data Object (optional output)
+  -SHAPES:<str>           	Points
+	Shapes (input)
+  -FIELD:<str>            	Attribute
+	Table field
+  -BVARIANCE              	Create Variance Grid
+	Boolean
+  -TARGET:<str>           	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid system
+	[2] grid
+  -MODEL:<str>            	Variogram Model
+	Choice
+	Available Choices:
+	[0] Spherical Model
+	[1] Exponential Model
+	[2] Gaussian Model
+	[3] Linear Regression
+	[4] Exponential Regression
+	[5] Power Function Regression
+  -BLOCK                  	Block Kriging
+	Boolean
+  -DBLOCK:<str>           	Block Size
+	Floating point
+	Minimum: 0.000000
+  -BLOG                   	Logarithmic Transformation
+	Boolean
+  -NUGGET:<str>           	Nugget
+	Floating point
+	Minimum: 0.000000
+  -SILL:<str>             	Sill
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>            	Range
+	Floating point
+	Minimum: 0.000000
+  -LIN_B:<str>            	Linear Regression
+	Floating point
+  -EXP_B:<str>            	Exponential Regression
+	Floating point
+  -POW_A:<str>            	Power Function - A
+	Floating point
+  -POW_B:<str>            	Power Function - B
+	Floating point
+  -USER_CELL_SIZE:<str>   	Grid Size
+	Floating point
+	Minimum: 0.000000
+  -USER_FIT_EXTENT        	Fit Extent
+	Boolean
+  -USER_X_EXTENT_MIN:<str>	X-Extent
+	Value range
+  -USER_X_EXTENT_MAX:<str>	X-Extent
+	Value range
+  -USER_Y_EXTENT_MIN:<str>	Y-Extent
+	Value range
+  -USER_Y_EXTENT_MAX:<str>	Y-Extent
+	Value range
+  -SYSTEM_SYSTEM_NX:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_NY:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_X:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_Y:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_D:<str>  	Grid System
+	Grid system
+  -GRID_GRID:<str>        	Grid
+	Grid (input)
+  -GRID_VARIANCE:<str>    	Variance
+	Grid (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_29.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_334.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_334.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_334.txt	(revision 369)
@@ -0,0 +1,34 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Function Fit
+author      :	
+_____________________________________________
+go...
+Usage: 0 -SOURCE <str> [-YFIELD <str>] [-USE_X <str>] [-XFIELD <str>] [-FORMEL <str>] [-ITER <num>] [-LAMDA <str>]
+  -SOURCE:<str>	Source
+	Table (input)
+  -YFIELD:<str>	y - Values
+	Table field
+  -USE_X:<str> 	Use x -Values
+	Choice
+	Available Choices:
+	[0] No
+	[1] Yes
+  -XFIELD:<str>	x - Values
+	Table field
+  -FORMEL:<str>	Formula
+	Text
+  -ITER:<num>  	Iterationen
+	Integer
+	Minimum: 1.000000
+  -LAMDA:<str> 	Max Lamda
+	Floating point
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_334.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_169.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_169.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_169.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import Grid from Table
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 12 [-GRID <str>] [-FILE_DATA <str>] [-DXY <str>] [-XMIN <str>] [-YMIN <str>] [-UNIT <str>] [-ZFACTOR <str>] [-NODATA <str>] [-DATA_TYPE <str>] [-TOPDOWN <str>]
+  -GRID:<str>     	Grid
+	Data Object (optional output)
+  -FILE_DATA:<str>	Table
+	File path
+  -DXY:<str>      	Cell Size
+	Floating point
+  -XMIN:<str>     	Left Border (X)
+	Floating point
+  -YMIN:<str>     	Lower Border (Y)
+	Floating point
+  -UNIT:<str>     	Unit Name
+	Text
+  -ZFACTOR:<str>  	Z Multiplier
+	Floating point
+  -NODATA:<str>   	No Data Value
+	Floating point
+  -DATA_TYPE:<str>	Data Type
+	Choice
+	Available Choices:
+	[0] 1 Byte Integer (unsigned)
+	[1] 1 Byte Integer (signed)
+	[2] 2 Byte Integer (unsigned)
+	[3] 2 Byte Integer (signed)
+	[4] 4 Byte Integer (unsigned)
+	[5] 4 Byte Integer (signed)
+	[6] 4 Byte Floating Point
+	[7] 8 Byte Floating Point
+  -TOPDOWN:<str>  	Line Order
+	Choice
+	Available Choices:
+	[0] Bottom to Top
+	[1] Top to Bottom

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_169.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_284.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_284.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_284.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Add Coordinates to points
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> [-OUTPUT <str>]
+  -INPUT:<str> 	Points
+	Shapes (input)
+  -OUTPUT:<str>	Output
+	Shapes (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_284.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_rga_142.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_rga_142.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_rga_142.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_rga
+module name :	Fast Region Growing Algorithm
+author      :	A.Ringeler (c) 2009
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> -START <str> [-REP <str>] -RESULT <str> -MEAN <str>
+  -INPUT:<str> 	Input Grids
+	Grid list (input)
+  -START:<str> 	Seeds Grid
+	Grid (input)
+  -REP:<str>   	Smooth Rep
+	Grid (optional input)
+  -RESULT:<str>	Segmente
+	Grid (output)
+  -MEAN:<str>  	Mean
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_rga_142.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_295.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_295.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_295.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Convert Lines to Polygons
+author      :	O.Conrad (c) 2005
+_____________________________________________
+go...
+Usage: 3 -POLYGONS <str> -LINES <str>
+  -POLYGONS:<str>	Polygons
+	Shapes (output)
+  -LINES:<str>   	Lines
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_295.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_tools.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Grid to TIN
+ 1	- Grid to TIN (Surface Specific Points)
+ 2	- Shapes to TIN
+ 3	- TIN to Shapes
+ 4	- Gradient
+ 5	- Flow Accumulation (Trace)
+ 6	- Flow Accumulation (Parallel)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_tin_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_338.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_338.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_338.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Trend for Shapes Data
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -TABLE <str> [-FIELD_X <str>] [-FIELD_Y <str>] [-FORMULA <str>] [-FORMULAS <str>] [-TREND <str>]
+  -TABLE:<str>   	Shapes
+	Shapes (input)
+  -FIELD_X:<str> 	X Values
+	Table field
+  -FIELD_Y:<str> 	Y Values
+	Table field
+  -FORMULA:<str> 	Formula
+	Text
+  -FORMULAS:<str>	Pre-defined Formulas
+	Choice
+	Available Choices:
+	[0] Linear: a + b * x
+	[1] Quadric: a + b * x + c * x^2
+	[2] Cubic: a + b * x + c * x^2 + d * x^3
+	[3] Logarithmic: a + b * ln(x)
+	[4] Power: a + b * x^c
+	[5] a + b / x
+	[6] a + b * (1 - exp(-x / c))
+	[7] a + b * (1 - exp(-(x / c)^2))
+  -TREND:<str>   	Table (with Trend)
+	Table (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_338.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_288.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_288.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_288.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Add Polygon Attributes to Points
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 10 -INPUT <str> [-OUTPUT <str>] -POLYGONS <str> [-FIELD <str>]
+  -INPUT:<str>   	Points
+	Shapes (input)
+  -OUTPUT:<str>  	Result
+	Shapes (optional output)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)
+  -FIELD:<str>   	Attribute
+	Table field

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_288.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_lines.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_lines.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_lines.txt	(revision 369)
@@ -0,0 +1,18 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Convert Polygons to Lines
+ 1	- Convert Points to Line(s)
+ 2	- Line Properties
+ 3	- Line-Polygon Intersection
+ 4	- Line Simplification
+ 5	- Line Dissolve
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_lines.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_299.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_299.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_299.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygon Shape Indices
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 7 -SHAPES <str> [-INDEX <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -INDEX:<str> 	Shape Index
+	Shapes (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_299.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_128.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_128.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_128.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Color Blending
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -GRID <str> -GRIDS <str> [-NSTEPS <num>] [-RANGE <str>]
+  -GRID:<str>  	Grid
+	Grid (output)
+  -GRIDS:<str> 	Grids
+	Grid list (input)
+  -NSTEPS:<num>	Interpolation Steps
+	Integer
+	Minimum: 0.000000
+  -RANGE:<str> 	Color Stretch
+	Choice
+	Available Choices:
+	[0] fit to each grid
+	[1] fit to overall range
+	[2] fit to overall 1.5 standard deviation
+	[3] fit to overall 2.0 standard deviation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_128.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_73.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_73.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_73.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Metric Conversions
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 14 -GRID <str> -CONV <str> [-CONVERSION <str>]
+  -GRID:<str>      	Grid
+	Grid (input)
+  -CONV:<str>      	Converted Grid
+	Grid (output)
+  -CONVERSION:<str>	Conversion
+	Choice
+	Available Choices:
+	[0] radians to degree
+	[1] degree to radians
+	[2] Celsius to Fahrenheit
+	[3] Fahrenheit to Celsius

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_73.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_transect.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_transect.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_transect.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Transect through polygon shapefile
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_transect.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_123.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_123.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_123.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Combine Grids
+author      :	
+_____________________________________________
+go...
+Usage: 20 -GRID1 <str> -GRID2 <str> -RESULT <str> [-LOOKUP <str>]
+  -GRID1:<str> 	Grid 1
+	Grid (input)
+  -GRID2:<str> 	Grid 2
+	Grid (input)
+  -RESULT:<str>	Result
+	Grid (output)
+  -LOOKUP:<str>	LookUp Table
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] Value in Grid 1
+	- 2. [8 byte floating point number] Value in Grid 2
+	- 3. [8 byte floating point number] Resulting Value
+	

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_123.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_305.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_305.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_305.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Select by Attributes... (Numerical Expression)
+author      :	V.Olaya (c) 2004, O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-FIELD <str>] [-EXPRESSION <str>] [-METHOD <str>]
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -FIELD:<str>     	Attribute
+	Table field
+  -EXPRESSION:<str>	Expression
+	Text
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] new selection
+	[1] add to current selection
+	[2] select from current selection
+	[3] remove from current selection

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_305.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_proj4.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_proj4.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_proj4.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Set Coordinate Reference System
+ 1	- Coordinate Transformation (Shapes List)
+ 2	- Coordinate Transformation (Shapes)
+ 3	- Coordinate Transformation (Grid List)
+ 4	- Coordinate Transformation (Grid)
+ 5	- Proj.4 (Command Line Arguments, Shapes)
+ 6	- Proj.4 (Dialog, Shapes)
+ 7	- Proj.4 (Command Line Arguments, Grid)
+ 8	- Proj.4 (Dialog, Grid)
+ 9	- Proj.4 (Command Line Arguments, List of Shapes Layers)
+ 10	- Proj.4 (Dialog, List of Shapes Layers)
+ 11	- Proj.4 (Command Line Arguments, List of Grids)
+ 12	- Proj.4 (Dialog, List of Grids)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_proj4.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_369.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_369.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_369.txt	(revision 369)
@@ -0,0 +1,20 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Analytical Hillshading
+ 2	- Potential Incoming Solar Radiation
+ 3	- Sky View Factor
+ 4	- Topographic Correction
+
+type -h or --help for further information
+
+error: cannot execute interactive module [1]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_369.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_141.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_141.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_141.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_classification
+module name :	Change Detection
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 2 -INITIAL <str> [-INI_LUT <str>] [-INI_LUT_MIN <str>] [-INI_LUT_MAX <str>] [-INI_LUT_NAM <str>] -FINAL <str> [-FIN_LUT <str>] [-FIN_LUT_MIN <str>] [-FIN_LUT_MAX <str>] [-FIN_LUT_NAM <str>] -CHANGE <str> [-NOCHANGE] -CHANGES <str> [-OUTPUT <str>]
+  -INITIAL:<str>    	Initial State
+	Grid (input)
+  -INI_LUT:<str>    	Look-up Table
+	Table (optional input)
+  -INI_LUT_MIN:<str>	Value
+	Table field
+  -INI_LUT_MAX:<str>	Value (Maximum)
+	Table field
+  -INI_LUT_NAM:<str>	Name
+	Table field
+  -FINAL:<str>      	Final State
+	Grid (input)
+  -FIN_LUT:<str>    	Look-up Table
+	Table (optional input)
+  -FIN_LUT_MIN:<str>	Value
+	Table field
+  -FIN_LUT_MAX:<str>	Value (Maximum)
+	Table field
+  -FIN_LUT_NAM:<str>	Name
+	Table field
+  -CHANGE:<str>     	Changes
+	Grid (output)
+  -NOCHANGE         	Report Unchanged Classes
+	Boolean
+  -CHANGES:<str>    	Changes
+	Table (output)
+  -OUTPUT:<str>     	Output as...
+	Choice
+	Available Choices:
+	[0] cells
+	[1] percent
+	[2] area

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_classification_141.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_309.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_309.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_309.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Delete Selection from Shapes Layer
+author      :	O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 7 -INPUT <str>
+  -INPUT:<str>	Input
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_309.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_363.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_363.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_363.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Cell Balance
+author      :	(c) 2004 by V.Olaya, (c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 10 -DEM <str> [-WEIGHTS <str>] [-WEIGHT <str>] -BALANCE <str> [-METHOD <str>]
+  -DEM:<str>    	Elevation
+	Grid (input)
+  -WEIGHTS:<str>	Parameter
+	Grid (optional input)
+  -WEIGHT:<str> 	Default Weight
+	Floating point
+  -BALANCE:<str>	Cell Balance
+	Grid (output)
+  -METHOD:<str> 	Method
+	Choice
+	Available Choices:
+	[0] Deterministic 8
+	[1] Multiple Flow Direction

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_363.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_46.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_46.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_46.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Accumulated Cost (Isotropic)
+ 1	- Accumulated Cost (Anisotropic)
+ 5	- Least Cost Paths
+ 6	- Change Vector Analysis
+ 7	- Covered Distance
+ 8	- Pattern Analysis
+ 9	- Layer of extreme value
+ 10	- Analytical Hierarchy Process
+ 11	- Ordered Weighted Averaging (OWA)
+ 12	- Aggregation Index
+ 13	- Cross-Classification and Tabulation
+ 14	- Soil Texture Classification
+ 15	- Fragmentation (Standard)
+ 16	- Fragmentation (Alternative)
+ 17	- Fragmentation Classes from Density and Connectivity
+
+type -h or --help for further information
+
+error: module not found [2]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_46.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_30.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_30.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_30.txt	(revision 369)
@@ -0,0 +1,108 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Universal Kriging
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 7 [-GRID <str>] [-VARIANCE <str>] -SHAPES <str> [-FIELD <str>] [-BVARIANCE] [-TARGET <str>] [-MODEL <str>] [-BLOCK] [-DBLOCK <str>] [-BLOG] [-NUGGET <str>] [-SILL <str>] [-RANGE <str>] [-LIN_B <str>] [-EXP_B <str>] [-POW_A <str>] [-POW_B <str>] -GRIDS <str> [-INTERPOL <str>] [-MAXRADIUS <str>] [-NPOINTS_MIN <str>] [-NPOINTS_MAX <str>] [-USER_CELL_SIZE <str>] [-USER_FIT_EXTENT] [-USER_X_EXTENT_MIN <str>] [-USER_X_EXTENT_MAX <str>] [-USER_Y_EXTENT_MIN <str>] [-USER_Y_EXTENT_MAX <str>] [-SYSTEM_SYSTEM_NX <num>] [-SYSTEM_SYSTEM_NY <num>] [-SYSTEM_SYSTEM_X <str>] [-SYSTEM_SYSTEM_Y <str>] [-SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -GRID:<str>             	Grid
+	Data Object (optional output)
+  -VARIANCE:<str>         	Variance
+	Data Object (optional output)
+  -SHAPES:<str>           	Points
+	Shapes (input)
+  -FIELD:<str>            	Attribute
+	Table field
+  -BVARIANCE              	Create Variance Grid
+	Boolean
+  -TARGET:<str>           	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid system
+	[2] grid
+  -MODEL:<str>            	Variogram Model
+	Choice
+	Available Choices:
+	[0] Spherical Model
+	[1] Exponential Model
+	[2] Gaussian Model
+	[3] Linear Regression
+	[4] Exponential Regression
+	[5] Power Function Regression
+  -BLOCK                  	Block Kriging
+	Boolean
+  -DBLOCK:<str>           	Block Size
+	Floating point
+	Minimum: 0.000000
+  -BLOG                   	Logarithmic Transformation
+	Boolean
+  -NUGGET:<str>           	Nugget
+	Floating point
+	Minimum: 0.000000
+  -SILL:<str>             	Sill
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>            	Range
+	Floating point
+	Minimum: 0.000000
+  -LIN_B:<str>            	Linear Regression
+	Floating point
+  -EXP_B:<str>            	Exponential Regression
+	Floating point
+  -POW_A:<str>            	Power Function - A
+	Floating point
+  -POW_B:<str>            	Power Function - B
+	Floating point
+  -GRIDS:<str>            	Grids
+	Grid list (input)
+  -INTERPOL:<str>         	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -MAXRADIUS:<str>        	Maximum Search Radius (map units)
+	Floating point
+	Minimum: 0.000000
+  -NPOINTS_MIN:<str>      	Min./Max. Number of m_Points
+	Value range
+  -NPOINTS_MAX:<str>      	Min./Max. Number of m_Points
+	Value range
+  -USER_CELL_SIZE:<str>   	Grid Size
+	Floating point
+	Minimum: 0.000000
+  -USER_FIT_EXTENT        	Fit Extent
+	Boolean
+  -USER_X_EXTENT_MIN:<str>	X-Extent
+	Value range
+  -USER_X_EXTENT_MAX:<str>	X-Extent
+	Value range
+  -USER_Y_EXTENT_MIN:<str>	Y-Extent
+	Value range
+  -USER_Y_EXTENT_MAX:<str>	Y-Extent
+	Value range
+  -SYSTEM_SYSTEM_NX:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_NY:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_X:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_Y:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_D:<str>  	Grid System
+	Grid system
+  -GRID_GRID:<str>        	Grid
+	Grid (input)
+  -GRID_VARIANCE:<str>    	Variance
+	Grid (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_30.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_81.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_81.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_81.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Laplacian Filter
+author      :	(c) 2003 by A. Ringeler, (c) 2008 by O. Conrad
+_____________________________________________
+go...
+Usage: 2 -INPUT <str> [-RESULT <str>] [-METHOD <str>] [-SIGMA <str>] [-RADIUS <num>] [-MODE <str>]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -RESULT:<str>	Filtered Grid
+	Grid (optional output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] standard kernel 1
+	[1] standard kernel 2
+	[2] Standard kernel 3
+	[3] user defined kernel
+  -SIGMA:<str> 	Standard Deviation (Percent of Radius)
+	Floating point
+	Minimum: 0.000010
+  -RADIUS:<num>	Radius
+	Integer
+	Minimum: 1.000000
+  -MODE:<str>  	Search Mode
+	Choice
+	Available Choices:
+	[0] square
+	[1] circle

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_81.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_367.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_367.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_367.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: module not found [14]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_367.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_85.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_85.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_85.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Majority Filter
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -INPUT <str> [-RESULT <str>] [-MODE <str>] [-RADIUS <num>] [-THRESHOLD <str>]
+  -INPUT:<str>    	Grid
+	Grid (input)
+  -RESULT:<str>   	Filtered Grid
+	Grid (optional output)
+  -MODE:<str>     	Search Mode
+	Choice
+	Available Choices:
+	[0] Square
+	[1] Circle
+  -RADIUS:<num>   	Radius
+	Integer
+	Minimum: 1.000000
+  -THRESHOLD:<str>	Threshold [Percent]
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_85.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_92.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_92.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_92.txt	(revision 369)
@@ -0,0 +1,41 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Natural Neighbour
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-SIBSON] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -SIBSON         	Sibson
+	Boolean
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_92.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_profiles.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_profiles.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_profiles.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 3	- Cross Profiles
+ 4	- Profiles from Lines
+ 5	- Profile from points
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_profiles.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_97.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_97.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_97.txt	(revision 369)
@@ -0,0 +1,56 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Thin Plate Spline (Local)
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-REGUL <str>] [-RADIUS <str>] [-MODE <str>] [-SELECT <str>] [-MAXPOINTS <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -REGUL:<str>    	Regularisation
+	Floating point
+  -RADIUS:<str>   	Search Radius
+	Floating point
+  -MODE:<str>     	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -SELECT:<str>   	Points Selection
+	Choice
+	Available Choices:
+	[0] all points in search radius
+	[1] maximum number of points
+  -MAXPOINTS:<num>	Maximum Number of Points
+	Integer
+	Minimum: 1.000000
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_97.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_0.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_0.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_0.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Average With Thereshold 1
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> -RESULT <str> [-RX <num>] [-RY <num>] [-THRESH <str>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -RESULT:<str>	AWT Grid
+	Grid (output)
+  -RX:<num>    	Radius X
+	Integer
+	Minimum: 1.000000
+  -RY:<num>    	Radius Y
+	Integer
+	Minimum: 1.000000
+  -THRESH:<str>	Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_0.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_102.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_102.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_102.txt	(revision 369)
@@ -0,0 +1,51 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Cubic Spline Approximation
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 6 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-NPMIN <num>] [-NPMAX <num>] [-NPPC <str>] [-K <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -NPMIN:<num>    	Minimal Number of Points
+	Integer
+	Minimum: 0.000000
+  -NPMAX:<num>    	Maximal Number of Points
+	Integer
+	Value Range: 11.000000 - 59.000000
+  -NPPC:<str>     	Points per Square
+	Floating point
+	Minimum: 1.000000
+  -K:<num>        	Tolerance
+	Integer
+	Minimum: 0.000000
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_102.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_263.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_263.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_263.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Grid Values to Points (randomly)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -GRID <str> [-FREQ <num>] -POINTS <str>
+  -GRID:<str>  	Grid
+	Grid (input)
+  -FREQ:<num>  	Frequency
+	Integer
+	Minimum: 1.000000
+  -POINTS:<str>	Points
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_263.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_370.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_370.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_370.txt	(revision 369)
@@ -0,0 +1,223 @@
+Usage: 2 -GRD_DEM <str> [-GRD_SVF <str>] [-GRD_VAPOUR <str>] [-GRD_LAT <str>] [-GRD_LON <str>] -GRD_DIRECT <str> -GRD_DIFFUS <str> [-GRD_TOTAL <str>] [-GRD_RATIO <str>] [-DURATION <str>] [-SUNRISE <str>] [-SUNSET <str>] [-SOLARCONST <str>] [-LOCALSVF] [-UNITS <str>] [-LATITUDE <str>] [-BENDING_BENDING] [-BENDING_RADIUS <str>] [-BENDING_LAT_OFFSET <str>] [-BENDING_LAT_REF_USER <str>] [-BENDING_LON_OFFSET <str>] [-BENDING_LON_REF_USER <str>] [-PERIOD <str>] [-MOMENT <str>] [-HOUR_RANGE_MIN <str>] [-HOUR_RANGE_MAX <str>] [-DHOUR <str>] [-DDAYS <num>] [-UPDATE <str>] [-DAY_A <str>] [-MON_A <str>] [-DAY_B <str>] [-MON_B <str>] [-METHOD <str>] [-ATMOSPHERE <str>] [-VAPOUR <str>] [-PRESSURE <str>] [-WATER <str>] [-DUST <str>] [-LUMPED <str>]
+  -GRD_DEM:<str>             	Elevation
+	Grid (input)
+  -GRD_SVF:<str>             	Sky View Factor
+	Grid (optional input)
+  -GRD_VAPOUR:<str>          	Water Vapour Pressure [mbar]
+	Grid (optional input)
+  -GRD_LAT:<str>             	Latitude [degree]
+	Grid (optional input)
+  -GRD_LON:<str>             	Longitude [degree]
+	Grid (optional input)
+  -GRD_DIRECT:<str>          	Direct Insolation
+	Grid (output)
+  -GRD_DIFFUS:<str>          	Diffuse Insolation
+	Grid (output)
+  -GRD_TOTAL:<str>           	Total Insolation
+	Grid (optional output)
+  -GRD_RATIO:<str>           	Direct to Diffuse Ratio
+	Grid (optional output)
+  -DURATION:<str>            	Duration of Insolation
+	Grid (optional output)
+  -SUNRISE:<str>             	Sunrise
+	Grid (optional output)
+  -SUNSET:<str>              	Sunset
+	Grid (optional output)
+  -SOLARCONST:<str>          	Solar Constant [W / m2]
+	Floating point
+	Minimum: 0.000000
+  -LOCALSVF                  	Local Sky View Factor
+	Boolean
+  -UNITS:<str>               	Units
+	Choice
+	Available Choices:
+	[0] kWh / m2
+	[1] kJ / m2
+	[2] J / cm2
+  -LATITUDE:<str>            	Latitude
+	Degree
+	Value Range: -90.000000 - 90.000000
+  -BENDING_BENDING           	Include Planetery Bending
+	Boolean
+  -BENDING_RADIUS:<str>      	Planetary Radius
+	Floating point
+	Minimum: 0.000000
+  -BENDING_LAT_OFFSET:<str>  	Latitude relates to grid's...
+	Choice
+	Available Choices:
+	[0] bottom
+	[1] center
+	[2] top
+	[3] user defined reference
+  -BENDING_LAT_REF_USER:<str>	Latitude (user defined reference)
+	Floating point
+  -BENDING_LON_OFFSET:<str>  	Local time relates to grid's...
+	Choice
+	Available Choices:
+	[0] left
+	[1] center
+	[2] right
+	[3] user defined reference
+  -BENDING_LON_REF_USER:<str>	Local Time (user defined reference)
+	Floating point
+  -PERIOD:<str>              	Time Period
+	Choice
+	Available Choices:
+	[0] moment
+	[1] day
+	[2] range of days
+  -MOMENT:<str>              	Moment [h]
+	Floating point
+	Value Range: 0.000000 - 24.000000
+  -HOUR_RANGE_MIN:<str>      	Time Span [h]
+	Value range
+  -HOUR_RANGE_MAX:<str>      	Time Span [h]
+	Value range
+  -DHOUR:<str>               	Time Resolution [h]: Day
+	Floating point
+	Value Range: 0.000000 - 24.000000
+  -DDAYS:<num>               	Time Resolution [d]: Range of Days
+	Integer
+	Minimum: 1.000000
+  -UPDATE:<str>              	Update
+	Choice
+	Available Choices:
+	[0] do not update
+	[1] update, colour stretch for each time step
+	[2] update, fixed colour stretch
+  -DAY_A:<str>               	Day of Month
+	Choice
+	Available Choices:
+	[0] 1
+	[1] 2
+	[2] 3
+	[3] 4
+	[4] 5
+	[5] 6
+	[6] 7
+	[7] 8
+	[8] 9
+	[9] 10
+	[10] 11
+	[11] 12
+	[12] 13
+	[13] 14
+	[14] 15
+	[15] 16
+	[16] 17
+	[17] 18
+	[18] 19
+	[19] 20
+	[20] 21
+	[21] 22
+	[22] 23
+	[23] 24
+	[24] 25
+	[25] 26
+	[26] 27
+	[27] 28
+	[28] 29
+	[29] 30
+	[30] 31
+  -MON_A:<str>               	Month
+	Choice
+	Available Choices:
+	[0] January
+	[1] February
+	[2] March
+	[3] April
+	[4] May
+	[5] June
+	[6] July
+	[7] August
+	[8] September
+	[9] October
+	[10] November
+	[11] December
+  -DAY_B:<str>               	Day of Month
+	Choice
+	Available Choices:
+	[0] 1
+	[1] 2
+	[2] 3
+	[3] 4
+	[4] 5
+	[5] 6
+	[6] 7
+	[7] 8
+	[8] 9
+	[9] 10
+	[10] 11
+	[11] 12
+	[12] 13
+	[13] 14
+	[14] 15
+	[15] 16
+	[16] 17
+	[17] 18
+	[18] 19
+	[19] 20
+	[20] 21
+	[21] 22
+	[22] 23
+	[23] 24
+	[24] 25
+	[25] 26
+	[26] 27
+	[27] 28
+	[28] 29
+	[29] 30
+	[30] 31
+  -MON_B:<str>            _____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_lighting
+module name :	Potential Incoming Solar Radiation
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+   	Month
+	Choice
+	Available Choices:
+	[0] January
+	[1] February
+	[2] March
+	[3] April
+	[4] May
+	[5] June
+	[6] July
+	[7] August
+	[8] September
+	[9] October
+	[10] November
+	[11] December
+  -METHOD:<str>              	Atmospheric Effects
+	Choice
+	Available Choices:
+	[0] Height of Atmosphere and Vapour Pressure
+	[1] Air Pressure, Water and Dust Content
+	[2] Lumped Atmospheric Transmittance
+  -ATMOSPHERE:<str>          	Height of Atmosphere [m]
+	Floating point
+	Minimum: 0.000000
+  -VAPOUR:<str>              	Water Vapour Pressure [mbar]
+	Floating point
+	Minimum: 0.000000
+  -PRESSURE:<str>            	Atmospheric Pressure [mbar]
+	Floating point
+	Minimum: 0.000000
+  -WATER:<str>               	Water Content [cm]
+	Floating point
+	Minimum: 0.000000
+  -DUST:<str>                	Dust [ppm]
+	Floating point
+	Minimum: 0.000000
+  -LUMPED:<str>              	Lumped Atmospheric Transmittance [Percent]
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_370.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_4.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_4.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_4.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Average With Mask 2
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 4 -INPUT <str> -MASK <str> -RESULT <str> [-V <str>] [-RX <num>] [-RY <num>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -MASK:<str>  	Mask Grid
+	Grid (input)
+  -RESULT:<str>	AWM2 Grid
+	Grid (output)
+  -V:<str>     	Mask value
+	Floating point
+  -RX:<num>    	Radius X
+	Integer
+	Minimum: 1.000000
+  -RY:<num>    	Radius Y
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_4.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_133.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_133.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_133.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Histogram Surface
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -GRID <str> [-HIST <str>] [-METHOD <str>]
+  -GRID:<str>  	Grid
+	Grid (input)
+  -HIST:<str>  	Histogram
+	Data Object (optional output)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] rows
+	[1] columns
+	[2] circle

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_133.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_310.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_310.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_310.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Invert Selection of Shapes Layer
+author      :	O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 8 -INPUT <str>
+  -INPUT:<str>	Input
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_310.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_267.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_267.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_267.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Add Grid Values to Points
+ 1	- Add Grid Values to Shapes
+ 2	- Grid Statistics for Polygons
+ 3	- Grid Values to Shapes
+ 4	- Grid Values to Points (randomly)
+ 5	- Contour Lines from Grid
+ 6	- Vectorising Grid Classes
+ 7	- Clip Grid with Polygon
+ 9	- Local Minima and Maxima
+ 10	- Grid System Extent
+ 15	- Gradient Vectors from Surface
+ 16	- Gradient Vectors from Direction and Length
+ 17	- Gradient Vectors from Directional Components
+
+type -h or --help for further information
+
+error: module not found [8]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_267.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_243.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_243.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_243.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud Cutter
+author      :	O.C onrad, V. Wichmann (c) 2009-10
+_____________________________________________
+go...
+Usage: 0 -POINTS <str> -CUT <str> [-AREA <str>] [-INVERSE]
+  -POINTS:<str>	Points
+	Point Cloud (input)
+  -CUT:<str>   	Cut
+	Point Cloud (output)
+  -AREA:<str>  	Choose Cut from ...
+	Choice
+	Available Choices:
+	[0] User Defined Extent
+	[1] Grid System Extent
+	[2] Shapes Extent
+	[3] Polygons
+  -INVERSE     	Inverse
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_243.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_173.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_173.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_173.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	ODBC Connect
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 0 [-SERVERS <str>] [-USERNAME <str>] [-PASSWORD <str>]
+  -SERVERS:<str> 	Server
+	Choice
+	Available Choices:
+	[0] [not set]
+  -USERNAME:<str>	User
+	Text
+  -PASSWORD:<str>	Password
+	Text

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_173.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_314.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_314.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_314.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Create graticule
+author      :	
+_____________________________________________
+go...
+Usage: 12 -LINES <str> [-LIMIT_SHAPES <str>] [-X_EXTENT_MIN <str>] [-X_EXTENT_MAX <str>] [-Y_EXTENT_MIN <str>] [-Y_EXTENT_MAX <str>] [-DISTX <str>] [-DISTY <str>] [-TYPE <str>]
+  -LINES:<str>       	Graticule
+	Shapes (output)
+  -LIMIT_SHAPES:<str>	Boundaries
+	Shapes (optional input)
+  -X_EXTENT_MIN:<str>	Width
+	Value range
+  -X_EXTENT_MAX:<str>	Width
+	Value range
+  -Y_EXTENT_MIN:<str>	Height
+	Value range
+  -Y_EXTENT_MAX:<str>	Height
+	Value range
+  -DISTX:<str>       	Distance X
+	Floating point
+  -DISTY:<str>       	Distance Y
+	Floating point
+  -TYPE:<str>        	Graticule type
+	Choice
+	Available Choices:
+	[0] Lines
+	[1] Rectangles

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_314.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_analysis.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_analysis.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_analysis.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Accumulated Cost (Isotropic)
+ 1	- Accumulated Cost (Anisotropic)
+ 5	- Least Cost Paths
+ 6	- Change Vector Analysis
+ 7	- Covered Distance
+ 8	- Pattern Analysis
+ 9	- Layer of extreme value
+ 10	- Analytical Hierarchy Process
+ 11	- Ordered Weighted Averaging (OWA)
+ 12	- Aggregation Index
+ 13	- Cross-Classification and Tabulation
+ 14	- Soil Texture Classification
+ 15	- Fragmentation (Standard)
+ 16	- Fragmentation (Alternative)
+ 17	- Fragmentation Classes from Density and Connectivity
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_analysis.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_258.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_258.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_258.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	recreations_fractals
+module name :	Fractal Dimension of Grid Surface
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -INPUT <str> -RESULT <str>
+  -INPUT:<str> 	Input
+	Grid (input)
+  -RESULT:<str>	Result
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_258.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_247.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_247.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_247.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud to Grid
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 4 -POINTS <str> [-GRID <str>] [-COUNT <str>] [-GRIDS <str>] [-OUTPUT <str>] [-AGGREGATION <str>] [-CELLSIZE <str>]
+  -POINTS:<str>     	Points
+	Point Cloud (input)
+  -GRID:<str>       	Z Value
+	Data Object (optional output)
+  -COUNT:<str>      	Number of Points in Cell
+	Data Object (optional output)
+  -GRIDS:<str>      	Attributes
+	Grid list (optional output)
+  -OUTPUT:<str>     	Output
+	Choice
+	Available Choices:
+	[0] only z
+	[1] all attributes
+  -AGGREGATION:<str>	Aggregation
+	Choice
+	Available Choices:
+	[0] first value
+	[1] last value
+	[2] mean value
+	[3] lowest z
+	[4] highest z
+  -CELLSIZE:<str>   	Cellsize
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_247.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_177.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_177.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_177.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Table Field Description
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 4 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -TABLE <str> [-TABLES <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -TABLE:<str>   	Field Description
+	Table (output)
+  -TABLES:<str>  	Tables
+	Choice
+	Available Choices:
+	[0] --- no table available ---

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_177.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_51.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_51.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_51.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Covered Distance
+author      :	V. Olaya (c) 2005
+_____________________________________________
+go...
+Usage: 7 -INPUT <str> -RESULT <str>
+  -INPUT:<str> 	Grids
+	Grid list (input)
+  -RESULT:<str>	Covered Distance
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_51.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_77.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_77.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_77.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus_bsl
+module name :	BSL
+author      :	SAGA User Group Associaton (c) 2009
+_____________________________________________
+go...
+Usage: 0 [-OUTPUT <str>] [-BSL <str>] [-PROGRESS]
+  -OUTPUT:<str>	Output
+	Grid list (optional output)
+  -BSL:<str>   	BSL Script
+	Long text
+  -PROGRESS    	Show Progress
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_77.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_318.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_318.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_318.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Split Shapes Layer Randomly
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 16 -SHAPES <str> -A <str> -B <str> [-PERCENT <str>]
+  -SHAPES:<str> 	Shapes
+	Shapes (input)
+  -A:<str>      	Group A
+	Shapes (output)
+  -B:<str>      	Group B
+	Shapes (output)
+  -PERCENT:<str>	Relation B / A
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_318.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_343.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_343.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_343.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_tools
+module name :	Rotate Table
+author      :	
+_____________________________________________
+go...
+Usage: 1 -INPUT <str> -OUTPUT <str>
+  -INPUT:<str> 	Input
+	Table (input)
+  -OUTPUT:<str>	Output
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_343.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_55.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_55.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_55.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Ordered Weighted Averaging (OWA)
+author      :	
+_____________________________________________
+go...
+Usage: 11 -GRIDS <str> [-WEIGHTS <str>] -OUTPUT <str>
+  -GRIDS:<str>  	Input Grids
+	Grid list (input)
+  -WEIGHTS:<str>	Weights
+	Static table
+	1 Fields:
+	- 1. [8 byte floating point number] Weight
+	
+  -OUTPUT:<str> 	Output Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_55.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gdal.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gdal.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gdal.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- GDAL: Import Raster
+ 1	- GDAL: Export Raster
+ 2	- GDAL: Export Raster to GeoTIFF
+ 3	- OGR: Import Vector Data
+ 4	- OGR: Export Vector Data
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gdal.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_kriging.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_kriging.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_kriging.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Ordinary Kriging (VF)
+ 1	- Ordinary Kriging (VF, Global)
+ 2	- Universal Kriging (VF)
+ 3	- Universal Kriging (VF, Global)
+ 4	- Variogram (Dialog))
+ 5	- Ordinary Kriging
+ 6	- Ordinary Kriging (Global)
+ 7	- Universal Kriging
+ 8	- Universal Kriging (Global)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_kriging.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/sagalibs.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/sagalibs.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/sagalibs.txt	(revision 369)
@@ -0,0 +1,74 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+available module libraries:
+- contrib_a_perego.dll
+- docs_html.dll
+- docs_pdf.dll
+- garden_3d_viewer.dll
+- geostatistics_grid.dll
+- geostatistics_kriging.dll
+- geostatistics_points.dll
+- geostatistics_regression.dll
+- grid_analysis.dll
+- grid_calculus.dll
+- grid_calculus_bsl.dll
+- grid_filter.dll
+- grid_gridding.dll
+- grid_spline.dll
+- grid_tools.dll
+- grid_visualisation.dll
+- ihacres.dll
+- imagery_classification.dll
+- imagery_rga.dll
+- imagery_segmentation.dll
+- imagery_tools.dll
+- io_esri_e00.dll
+- io_gdal.dll
+- io_gps.dll
+- io_grid.dll
+- io_grid_grib2.dll
+- io_grid_image.dll
+- io_odbc.dll
+- io_shapes.dll
+- io_shapes_dxf.dll
+- io_shapes_las.dll
+- io_table.dll
+- lectures_introduction.dll
+- pj_georeference.dll
+- pj_geotrans.dll
+- pj_proj4.dll
+- pointcloud_tools.dll
+- pointcloud_viewer.dll
+- recreations_fractals.dll
+- shapes_grid.dll
+- shapes_lines.dll
+- shapes_points.dll
+- shapes_polygons.dll
+- shapes_tools.dll
+- shapes_transect.dll
+- sim_cellular_automata.dll
+- sim_ecosystems_hugget.dll
+- sim_fire_spreading.dll
+- sim_hydrology.dll
+- table_calculus.dll
+- table_tools.dll
+- ta_channels.dll
+- ta_compound.dll
+- ta_hydrology.dll
+- ta_lighting.dll
+- ta_morphometry.dll
+- ta_preprocessor.dll
+- ta_profiles.dll
+- tin_tools.dll
+- tin_viewer.dll
+
+60 SAGA Module Libraries
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/sagalibs.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_326.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_326.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_326.txt	(revision 369)
@@ -0,0 +1,65 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_ecosystems_hugget
+module name :	02: Carbon Cycle Simulation for Terrestrial Biomes
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -TABLE <str> [-TIME_SPAN <str>] [-TIME_STEP <str>] [-PRIMPROD <str>] [-CHUMIFY <str>] [-CCARBON <str>] [-P_LEAV <str>] [-P_BRAN <str>] [-P_STEM <str>] [-P_ROOT <str>] [-K_LEAV_LITT <str>] [-K_BRAN_LITT <str>] [-K_STEM_LITT <str>] [-K_ROOT_HUMU <str>] [-K_LITT_HUMU <str>] [-K_HUMU_COAL <str>] [-K_COAL_ENVI <str>]
+  -TABLE:<str>      	Results
+	Table (output)
+  -TIME_SPAN:<str>  	Time Span
+	Floating point
+	Minimum: 0.000000
+  -TIME_STEP:<str>  	Time Interval [a]
+	Floating point
+	Minimum: 0.000000
+  -PRIMPROD:<str>   	Net Primary Production [Gt Carbon / a]
+	Floating point
+	Minimum: 0.000000
+  -CHUMIFY:<str>    	Humification Factor
+	Floating point
+	Minimum: 0.000000
+  -CCARBON:<str>    	Carbonization Factor
+	Floating point
+	Minimum: 0.000000
+  -P_LEAV:<str>     	Leaves
+	Floating point
+	Minimum: 0.000000
+  -P_BRAN:<str>     	Branches
+	Floating point
+	Minimum: 0.000000
+  -P_STEM:<str>     	Stems
+	Floating point
+	Minimum: 0.000000
+  -P_ROOT:<str>     	Roots
+	Floating point
+	Minimum: 0.000000
+  -K_LEAV_LITT:<str>	Leaves to Litter
+	Floating point
+	Minimum: 0.000000
+  -K_BRAN_LITT:<str>	Branches to Litter
+	Floating point
+	Minimum: 0.000000
+  -K_STEM_LITT:<str>	Stems to Litter
+	Floating point
+	Minimum: 0.000000
+  -K_ROOT_HUMU:<str>	Roots to Humus
+	Floating point
+	Minimum: 0.000000
+  -K_LITT_HUMU:<str>	Litter to Humus
+	Floating point
+	Minimum: 0.000000
+  -K_HUMU_COAL:<str>	Humus to Charcoal
+	Floating point
+	Minimum: 0.000000
+  -K_COAL_ENVI:<str>	Charcoal to Environment
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_326.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_146.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_146.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_146.txt	(revision 369)
@@ -0,0 +1,49 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_segmentation
+module name :	Simple Region Growing
+author      :	B. Bechtel, O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 3 -SEEDS <str> -FEATURES <str> -SEGMENTS <str> -SIMILARITY <str> -TABLE <str> [-METHOD <str>] [-NEIGHBOUR <str>] [-SIG_1 <str>] [-SIG_2 <str>] [-THRESHOLD <str>] [-REFRESH] [-LEAFSIZE <num>]
+  -SEEDS:<str>     	Seeds
+	Grid (input)
+  -FEATURES:<str>  	Features
+	Grid list (input)
+  -SEGMENTS:<str>  	Segments
+	Grid (output)
+  -SIMILARITY:<str>	Similarity
+	Grid (output)
+  -TABLE:<str>     	Seeds
+	Table (output)
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] feature space and position
+	[1] feature space
+  -NEIGHBOUR:<str> 	Neighbourhood
+	Choice
+	Available Choices:
+	[0] 4 (von Neumann)
+	[1] 8 (Moore)
+  -SIG_1:<str>     	Variance in Feature Space
+	Floating point
+	Minimum: 0.000000
+  -SIG_2:<str>     	Variance in Position Space
+	Floating point
+	Minimum: 0.000000
+  -THRESHOLD:<str> 	Threshold - Similarity
+	Floating point
+	Minimum: 0.000000
+  -REFRESH         	Refresh
+	Boolean
+  -LEAFSIZE:<num>  	Leaf Size (for Speed Optimisation)
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_146.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_134.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_134.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_134.txt	(revision 369)
@@ -0,0 +1,56 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ihacres
+module name :	IHACRES Calibration (2)
+author      :	copyrights (c) 2008 Stefan Liersch
+_____________________________________________
+go...
+Usage: 0 [-TABLEout <str>] -TABLE <str> [-DATE_Field <str>] [-DISCHARGE_Field <str>] [-PCP_Field <str>] [-TMP_Field <str>] [-INFLOW_Field <str>] [-bUPSTREAM] [-USE_TMP] [-NSIM <num>] [-AREA <str>] [-STORAGE <str>] [-IHACVERS <str>] [-SNOW_MODULE] [-TABLEout <str>] [-TABLEparms <str>]
+  -TABLEout:<str>       	Table
+	Data Object (optional output)
+  -TABLE:<str>          	Table
+	Table (input)
+  -DATE_Field:<str>     	Date Column
+	Table field
+  -DISCHARGE_Field:<str>	Streamflow Column
+	Table field
+  -PCP_Field:<str>      	Precipitation Column
+	Table field
+  -TMP_Field:<str>      	Temperature Column
+	Table field
+  -INFLOW_Field:<str>   	Subbasin Inflow
+	Table field
+  -bUPSTREAM            	Is the subbasin upstream (no external inflow)
+	Boolean
+  -USE_TMP              	Using temperature data?
+	Boolean
+  -NSIM:<num>           	Number of Simulations
+	Integer
+	Value Range: 1.000000 - 10000000.000000
+  -AREA:<str>           	Area of the Watershed in [km2]
+	Floating point
+	Minimum: 0.000010
+  -STORAGE:<str>        	Storage
+	Choice
+	Available Choices:
+	[0] Single Storage
+	[1] Two Parallel Storages
+	[2] Two Storages in Series
+  -IHACVERS:<str>       	IHACRES Version
+	Choice
+	Available Choices:
+	[0] Jakeman & Hornberger (1993)
+	[1] Croke et al. (2005)
+  -SNOW_MODULE          	Snow Module on/off
+	Boolean
+  -TABLEout:<str>       	Table
+	Data Object (optional output)
+  -TABLEparms:<str>     	Table
+	Data Object (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_134.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_374.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_374.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_374.txt	(revision 369)
@@ -0,0 +1,44 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Convergence Index (Search Radius)
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 2 -ELEVATION <str> -CONVERGENCE <str> [-RADIUS <str>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>] [-SLOPE] [-DIFFERENCE <str>]
+  -ELEVATION:<str>                   	Elevation
+	Grid (input)
+  -CONVERGENCE:<str>                 	Convergence Index
+	Grid (output)
+  -RADIUS:<str>                      	Radius [Cells]
+	Floating point
+	Minimum: 1.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -SLOPE                             	Gradient
+	Boolean
+  -DIFFERENCE:<str>                  	Difference
+	Choice
+	Available Choices:
+	[0] direction to the center cell
+	[1] center cell's aspect direction

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_374.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_187.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_187.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_187.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import GStat Shapes
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> [-FILENAME <str>]
+  -SHAPES:<str>  	Shapes
+	Shapes (output)
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_187.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_138.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_138.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_138.txt	(revision 369)
@@ -0,0 +1,58 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ihacres
+module name :	IHACRES Elevation Bands Calibration
+author      :	copyrights (c) 2008 Stefan Liersch
+_____________________________________________
+go...
+Usage: 4 [-TABLEout <str>] [-TABLEparms <str>] [-NELEVBANDS <str>] [-NSIM <num>] [-AREA_tot <str>] [-IHACVERS <str>] [-STORAGE <str>] [-SNOW_MODULE] [-OBJ_FUNC <str>] [-NSEMIN <str>]
+  -TABLEout:<str>  	Table
+	Data Object (optional output)
+  -TABLEparms:<str>	Table
+	Data Object (optional output)
+  -NELEVBANDS:<str>	Number of elevation bands
+	Choice
+	Available Choices:
+	[0] 2
+	[1] 3
+	[2] 4
+	[3] 5
+	[4] 6
+	[5] 7
+	[6] 8
+	[7] 9
+	[8] 10
+  -NSIM:<num>      	Number of Simulations
+	Integer
+	Value Range: 1.000000 - 10000000.000000
+  -AREA_tot:<str>  	Total Catchment Area [km2]
+	Floating point
+  -IHACVERS:<str>  	IHACRES Version
+	Choice
+	Available Choices:
+	[0] Jakeman & Hornberger (1993)
+	[1] Croke et al. (2005) !!! not yet implemented !!!
+  -STORAGE:<str>   	Storage
+	Choice
+	Available Choices:
+	[0] Single Storage
+	[1] Two Parallel Storages
+	[2] Two Storages in Series !!! not yet implemented !!!
+  -SNOW_MODULE     	Using the snow-melt module?
+	Boolean
+  -OBJ_FUNC:<str>  	Objective Function
+	Choice
+	Available Choices:
+	[0] NSE
+	[1] NSE high flow
+	[2] NSE low flow
+  -NSEMIN:<str>    	Minimum Nash-Sutcliffe Efficiency
+	Floating point
+	Value Range: 0.100000 - 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_138.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_155.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_155.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_155.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gps
+module name :	GPX to shapefile
+author      :	
+_____________________________________________
+go...
+Usage: 0 [-BASEPATH <str>] [-FILE <str>] [-TRACKPOINTS] [-WAYPOINTS] [-ROUTES] [-ADD]
+  -BASEPATH:<str>	Gpx2shp path
+	File path
+  -FILE:<str>    	GPX file
+	File path
+  -TRACKPOINTS   	Convert track points
+	Boolean
+  -WAYPOINTS     	Convert way points
+	Boolean
+  -ROUTES        	Convert routes
+	Boolean
+  -ADD           	Load shapefile
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_155.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_378.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_378.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_378.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Real Area Calculation
+author      :	
+_____________________________________________
+go...
+Usage: 6 -DEM <str> -AREA <str>
+  -DEM:<str> 	Elevation
+	Grid (input)
+  -AREA:<str>	Real Area Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_378.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_275.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_275.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_275.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Line-Polygon Intersection
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 -LINES <str> -POLYGONS <str> -INTERSECT <str> [-METHOD <str>]
+  -LINES:<str>    	Lines
+	Shapes (input)
+  -POLYGONS:<str> 	Polygons
+	Shapes (input)
+  -INTERSECT:<str>	Intersection
+	Shapes (output)
+  -METHOD:<str>   	Output
+	Choice
+	Available Choices:
+	[0] one multi-line per polygon
+	[1] keep original line attributes

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_275.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_garden_3d_viewer.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_garden_3d_viewer.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_garden_3d_viewer.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- 3D Shapes Viewer
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_garden_3d_viewer.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_212.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_212.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_212.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	01: My first module
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> -OUTPUT <str> [-FACTOR <str>] [-METHOD <str>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -OUTPUT:<str>	Output
+	Grid (output)
+  -FACTOR:<str>	Factor
+	Floating point
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Addition
+	[1] Subtraction
+	[2] Multiplication
+	[3] Division

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_212.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_231.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_231.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_231.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Coordinate Transformation (Shapes List)
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 1 [-CRS_METHOD <str>] [-CRS_PROJ4 <str>] [-CRS_FILE <str>] [-CRS_EPSG <num>] -SOURCE <str> [-TARGET <str>]
+  -CRS_METHOD:<str>	Get CRS Definition from...
+	Choice
+	Available Choices:
+	[0] Proj4 Parameters
+	[1] EPSG Code
+	[2] Well Known Text File
+  -CRS_PROJ4:<str> 	Proj4 Parameters
+	Long text
+  -CRS_FILE:<str>  	Well Known Text File
+	File path
+  -CRS_EPSG:<num>  	EPSG Code
+	Integer
+	Value Range: 2000.000000 - 32766.000000
+  -SOURCE:<str>    	Source
+	Shapes list (input)
+  -TARGET:<str>    	Target
+	Shapes list (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_231.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_216.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_216.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_216.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	05: Direct neighbours - slope and aspect
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 4 -ELEVATION <str> -SLOPE <str> -ASPECT <str> [-METHOD <str>]
+  -ELEVATION:<str>	Input grid
+	Grid (input)
+  -SLOPE:<str>    	Slope
+	Grid (output)
+  -ASPECT:<str>   	Aspect
+	Grid (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Steepest gradient (first version)
+	[1] Steepest gradient (second version)
+	[2] Zevenbergen & Thorne

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_216.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_235.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_235.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_235.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Command Line Arguments, Shapes)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+Usage: 5 [-SOURCE_PROJ <str>] [-TARGET_PROJ <str>] -SOURCE <str> -TARGET <str>
+  -SOURCE_PROJ:<str>	Source Projection Parameters
+	Text
+  -TARGET_PROJ:<str>	Target Projection Parameters
+	Text
+  -SOURCE:<str>     	Source
+	Shapes (input)
+  -TARGET:<str>     	Target
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_235.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gps.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gps.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gps.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- GPX to shapefile
+ 1	- GPSBabel
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_io_gps.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_150.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_150.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_150.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gdal
+module name :	GDAL: Import Raster
+author      :	(c) 2007 by O.Conrad (A.Ringeler)
+_____________________________________________
+go...
+Usage: 0 [-GRIDS <str>] [-FILES <str>]
+  -GRIDS:<str>	Grids
+	Grid list (optional output)
+  -FILES:<str>	Files
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_150.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_239.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_239.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_239.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Command Line Arguments, List of Shapes Layers)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+Usage: 9 [-SOURCE_PROJ <str>] [-TARGET_PROJ <str>] -SOURCE <str> [-TARGET <str>]
+  -SOURCE_PROJ:<str>	Source Projection Parameters
+	Text
+  -TARGET_PROJ:<str>	Target Projection Parameters
+	Text
+  -SOURCE:<str>     	Source
+	Shapes list (input)
+  -TARGET:<str>     	Target
+	Shapes list (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_239.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_calculus.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_calculus.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_calculus.txt	(revision 369)
@@ -0,0 +1,20 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Function Fit
+ 1	- Table calculator
+ 2	- Table calculator for shapes
+ 3	- Trend for Table Data
+ 4	- Trend for Shapes Data
+ 5	- Running Average
+ 6	- Cluster Analysis
+ 7	- Principle Components Analysis
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_calculus.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_154.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_154.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_154.txt	(revision 369)
@@ -0,0 +1,58 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gdal
+module name :	OGR: Export Vector Data
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 4 -SHAPES <str> [-FILE <str>] [-FORMAT <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -FILE:<str>  	File
+	File path
+  -FORMAT:<str>	Format
+	Choice
+	Available Choices:
+	[0] ESRI Shapefile
+	[1] MapInfo File
+	[2] UK .NTF
+	[3] SDTS
+	[4] TIGER
+	[5] S57
+	[6] DGN
+	[7] VRT
+	[8] REC
+	[9] Memory
+	[10] BNA
+	[11] CSV
+	[12] GML
+	[13] GPX
+	[14] KML
+	[15] GeoJSON
+	[16] GMT
+	[17] ODBC
+	[18] PGeo
+	[19] MSSQLSpatial
+	[20] PCIDSK
+	[21] XPlane
+	[22] AVCBin
+	[23] AVCE00
+	[24] DXF
+	[25] Geoconcept
+	[26] GeoRSS
+	[27] GPSTrackMaker
+	[28] VFK
+	[29] PGDump
+	[30] GPSBabel
+	[31] SUA
+	[32] OpenAir
+	[33] PDS
+	[34] HTF
+	[35] AeronavFAA

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_154.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_35.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_35.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_35.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_points
+module name :	Minimum Distance Analysis
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 -POINTS <str> -TABLE <str>
+  -POINTS:<str>	Points
+	Shapes (input)
+  -TABLE:<str> 	Minimum Distance Analysis
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_35.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_182.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_182.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_182.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Points Import
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 9 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -POINTS <str> [-TABLES <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -POINTS:<str>  	Points
+	Shapes (output)
+  -TABLES:<str>  	Tables
+	Choice
+	Available Choices:
+	[0] --- no table available ---

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_182.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_252.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_252.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_252.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud Thinning (simple)
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 9 -INPUT <str> -RESULT <str> [-STEP <num>]
+  -INPUT:<str> 	Input
+	Point Cloud (input)
+  -RESULT:<str>	Result
+	Point Cloud (output)
+  -STEP:<num>  	Stepwidth
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_252.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_106.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_106.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_106.txt	(revision 369)
@@ -0,0 +1,49 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Merging
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -GRIDS <str> [-GRID_TARGET <str>] [-MERGED <str>] [-TYPE <str>] [-INTERPOL <str>] [-OVERLAP <str>] [-MERGE_INFO_MESH_SIZE <str>]
+  -GRIDS:<str>               	Grids to Merge
+	Grid list (input)
+  -GRID_TARGET:<str>         	Target Grid
+	Grid (optional output)
+  -MERGED:<str>              	Merged Grid
+	Data Object (optional output)
+  -TYPE:<str>                	Preferred data storage type
+	Choice
+	Available Choices:
+	[0] 1 bit
+	[1] 1 byte unsigned integer
+	[2] 1 byte signed integer
+	[3] 2 byte unsigned integer
+	[4] 2 byte signed integer
+	[5] 4 byte unsigned integer
+	[6] 4 byte signed integer
+	[7] 4 byte floating point
+	[8] 8 byte floating point
+  -INTERPOL:<str>            	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -OVERLAP:<str>             	Overlapping Cells
+	Choice
+	Available Choices:
+	[0] mean value
+	[1] first value in order of grid list
+  -MERGE_INFO_MESH_SIZE:<str>	Cell Size
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_106.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_13.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_13.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_13.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Fast Representativeness
+author      :	A.Ringeler (c) 2009
+_____________________________________________
+go...
+Usage: 0 -INPUT <str> -RESULT <str> -RESULT_LOD <str> -SEEDS <str> [-LOD <str>]
+  -INPUT:<str>     	Input
+	Grid (input)
+  -RESULT:<str>    	Output
+	Grid (output)
+  -RESULT_LOD:<str>	Output Lod
+	Grid (output)
+  -SEEDS:<str>     	Output Seeds
+	Grid (output)
+  -LOD:<str>       	Level of Generalisation
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_13.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_37.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_37.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_37.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Regression Analysis (Points/Grid)
+author      :	O.Conrad (c) 2004
+_____________________________________________
+go...
+Usage: 0 -GRID <str> -SHAPES <str> [-ATTRIBUTE <str>] -REGRESSION <str> [-RESIDUAL <str>] [-INTERPOL <str>] [-METHOD <str>]
+  -GRID:<str>      	Grid
+	Grid (input)
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -ATTRIBUTE:<str> 	Attribute
+	Table field
+  -REGRESSION:<str>	Regression
+	Grid (output)
+  -RESIDUAL:<str>  	Residuals
+	Shapes (optional output)
+  -INTERPOL:<str>  	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -METHOD:<str>    	Regression Function
+	Choice
+	Available Choices:
+	[0] Y = a + b * X (linear)
+	[1] Y = a + b / X
+	[2] Y = a / (b - X)
+	[3] Y = a * X^b (power)
+	[4] Y = a e^(b * X) (exponential)
+	[5] Y = a + b * ln(X) (logarithmic)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_37.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_324.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_324.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_324.txt	(revision 369)
@@ -0,0 +1,44 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_cellular_automata
+module name :	Wa-Tor
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 [-GRID <str>] [-NX <num>] [-NY <num>] [-RESULT <str>] [-REFRESH] [-INIT_FISH <str>] [-INIT_SHARK <str>] -TABLE <str> [-FISH_BIRTH <num>] [-SHARK_BIRTH <num>] [-SHARK_STARVE <num>]
+  -GRID:<str>        	Grid
+	Data Object (optional output)
+  -NX:<num>          	Width (Cells)
+	Integer
+	Minimum: 1.000000
+  -NY:<num>          	Height (Cells)
+	Integer
+	Minimum: 1.000000
+  -RESULT:<str>      	Wa-Tor
+	Grid (optional output)
+  -REFRESH           	Refresh
+	Boolean
+  -INIT_FISH:<str>   	Initial Number of Fishes [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -INIT_SHARK:<str>  	Initial Number of Sharks [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -TABLE:<str>       	Cycles
+	Table (output)
+  -FISH_BIRTH:<num>  	Birth Rate of Fishes
+	Integer
+	Minimum: 0.000000
+  -SHARK_BIRTH:<num> 	Birth Rate of Sharks
+	Integer
+	Minimum: 0.000000
+  -SHARK_STARVE:<num>	Max. Starvation Time for Sharks
+	Integer
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_cellular_automata_324.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_207.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_207.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_207.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes_las
+module name :	LAS Info
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 2 [-FILE <str>] [-HEADER]
+  -FILE:<str>	LAS File
+	File path
+  -HEADER    	Only Header Info
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_las_207.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_17.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_17.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_17.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Statistics for Grids
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -GRIDS <str> [-MEAN <str>] [-MIN <str>] [-MAX <str>] [-VAR <str>] [-STDDEV <str>] [-STDDEVLO <str>] [-STDDEVHI <str>]
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -MEAN:<str>    	Arithmetic Mean
+	Grid (optional output)
+  -MIN:<str>     	Minimum
+	Grid (optional output)
+  -MAX:<str>     	Maximum
+	Grid (optional output)
+  -VAR:<str>     	Variance
+	Grid (optional output)
+  -STDDEV:<str>  	Standard Deviation
+	Grid (optional output)
+  -STDDEVLO:<str>	Mean less Standard Deviation
+	Grid (optional output)
+  -STDDEVHI:<str>	Mean plus Standard Deviation
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_17.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_211.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_211.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_211.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_table
+module name :	Import Text Table (Fixed Column Sizes)
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 3 -TABLE <str> [-HEADLINE] [-FIELDDEF <str>] [-NFIELDS <num>] [-FILENAME <str>]
+  -TABLE:<str>   	Table
+	Table (output)
+  -HEADLINE      	File contains headline
+	Boolean
+  -FIELDDEF:<str>	Field Definition
+	Choice
+	Available Choices:
+	[0] mark breaks in first line
+	[1] specify fields with type
+  -NFIELDS:<num> 	Numver of Fields
+	Integer
+	Minimum: 1.000000
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_table_211.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_192.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_192.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_192.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import Surfer Blanking Files
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 -SHAPES <str> [-TABLE <str>] [-FILE <str>] [-TYPE <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (output)
+  -TABLE:<str> 	Look up table (Points)
+	Table (optional output)
+  -FILE:<str>  	File
+	File path
+  -TYPE:<str>  	Shape Type
+	Choice
+	Available Choices:
+	[0] points
+	[1] lines
+	[2] polygons

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_192.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_383.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_383.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_383.txt	(revision 369)
@@ -0,0 +1,46 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Effective Air Flow Heights
+author      :	J.Boehner, O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 11 -DEM <str> -AFH <str> [-DIR <str>] [-LEN <str>] [-DIR_CONST <str>] [-OLDVER] [-MAXDIST <str>] [-ACCEL <str>] [-PYRAMIDS] [-LEEFACT <str>] [-LUVFACT <str>] [-DIR_UNITS <str>] [-LEN_SCALE <str>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -AFH:<str>      	Effective Air Flow Heights
+	Grid (output)
+  -DIR:<str>      	Wind Direction
+	Grid (optional input)
+  -LEN:<str>      	Wind Speed
+	Grid (optional input)
+  -DIR_CONST:<str>	Constant Wind Direction [Degree]
+	Floating point
+  -OLDVER         	Old Version
+	Boolean
+  -MAXDIST:<str>  	Search Distance [km]
+	Floating point
+	Minimum: 0.000000
+  -ACCEL:<str>    	Acceleration
+	Floating point
+	Minimum: 1.000000
+  -PYRAMIDS       	Use Pyramids with New Version
+	Boolean
+  -LEEFACT:<str>  	Lee Factor
+	Floating point
+  -LUVFACT:<str>  	Luv Factor
+	Floating point
+  -DIR_UNITS:<str>	Wind Direction Units
+	Choice
+	Available Choices:
+	[0] radians
+	[1] degree
+  -LEN_SCALE:<str>	Wind Speed Scale Factor
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_383.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_228.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_228.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_228.txt	(revision 369)
@@ -0,0 +1,43 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_geotrans
+module name :	GeoTRANS (Shapes)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 [-DATA_ELLIPSOID <str>] [-DATA_DATUM_7 <str>] [-DATA_DATUM_3 <str>] [-DATA_GEOID <str>] -SOURCE <str> -TARGET <str> [-PROJECTION_SOURCE_DATUM <str>] [-PROJECTION_TARGET_DATUM <str>] [-PROJECTION_SOURCE_PROJECTION <str>] [-PROJECTION_TARGET_PROJECTION <str>]
+  -DATA_ELLIPSOID:<str>              	Ellipsoids
+	File path
+  -DATA_DATUM_7:<str>                	Datums (7 Parameters)
+	File path
+  -DATA_DATUM_3:<str>                	Datums (3 Parameters)
+	File path
+  -DATA_GEOID:<str>                  	Geoid
+	File path
+  -SOURCE:<str>                      	Source
+	Shapes (input)
+  -TARGET:<str>                      	Target
+	Shapes (output)
+  -PROJECTION_SOURCE_DATUM:<str>     	Source Datum
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_TARGET_DATUM:<str>     	Target Datum
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_SOURCE_PROJECTION:<str>	Source Projection
+	Choice
+	Available Choices:
+	[0] 
+  -PROJECTION_TARGET_PROJECTION:<str>	Target Projection
+	Choice
+	Available Choices:
+	[0] 

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_geotrans_228.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_391.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_391.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_391.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Sink Drainage Route Detection
+author      :	O. Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 1 -ELEVATION <str> -SINKROUTE <str> [-THRESHOLD] [-THRSHEIGHT <str>]
+  -ELEVATION:<str> 	Elevation
+	Grid (input)
+  -SINKROUTE:<str> 	Sink Route
+	Grid (output)
+  -THRESHOLD       	Threshold
+	Boolean
+  -THRSHEIGHT:<str>	Threshold Height
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_391.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_157.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_157.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_157.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Export ESRI Arc/Info Grid
+author      :	O.Conrad (c) 2007
+_____________________________________________
+go...
+Usage: 0 -GRID <str> [-FILE <str>] [-FORMAT <str>] [-GEOREF <str>] [-PREC <num>] [-DECSEP <str>]
+  -GRID:<str>  	Grid
+	Grid (input)
+  -FILE:<str>  	File
+	File path
+  -FORMAT:<str>	Format
+	Choice
+	Available Choices:
+	[0] binary
+	[1] ASCII
+  -GEOREF:<str>	Geo-Reference
+	Choice
+	Available Choices:
+	[0] corner
+	[1] center
+  -PREC:<num>  	ASCII Precision
+	Integer
+	Minimum: -1.000000
+  -DECSEP:<str>	ASCII Decimal Separator
+	Choice
+	Available Choices:
+	[0] point (.)
+	[1] comma (,)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_157.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_196.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_196.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_196.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Import WASP terrain map file
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 10 -SHAPES <str> [-FILE <str>] [-METHOD <str>]
+  -SHAPES:<str>	Contour Lines
+	Shapes (output)
+  -FILE:<str>  	File Name
+	File path
+  -METHOD:<str>	Input Specification
+	Choice
+	Available Choices:
+	[0] elevation
+	[1] roughness
+	[2] elevation and roughness

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_196.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_387.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_387.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_387.txt	(revision 369)
@@ -0,0 +1,46 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Wind Effect (Windward / Leeward Index)
+author      :	J.Boehner, A.Ringeler (c) 2008, O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 15 -DEM <str> [-DIR <str>] [-LEN <str>] -EFFECT <str> [-LUV <str>] [-LEE <str>] [-DIR_CONST <str>] [-OLDVER] [-MAXDIST <str>] [-ACCEL <str>] [-PYRAMIDS] [-DIR_UNITS <str>] [-LEN_SCALE <str>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -DIR:<str>      	Wind Direction
+	Grid (optional input)
+  -LEN:<str>      	Wind Speed
+	Grid (optional input)
+  -EFFECT:<str>   	Wind Effect
+	Grid (output)
+  -LUV:<str>      	Windward Effect
+	Grid (optional output)
+  -LEE:<str>      	Leeward Effect
+	Grid (optional output)
+  -DIR_CONST:<str>	Constant Wind Direction [Degree]
+	Floating point
+  -OLDVER         	Old Version
+	Boolean
+  -MAXDIST:<str>  	Search Distance [km]
+	Floating point
+	Minimum: 0.000000
+  -ACCEL:<str>    	Acceleration
+	Floating point
+	Minimum: 1.000000
+  -PYRAMIDS       	Use Pyramids
+	Boolean
+  -DIR_UNITS:<str>	Wind Direction Units
+	Choice
+	Available Choices:
+	[0] radians
+	[1] degree
+  -LEN_SCALE:<str>	Wind Speed Scale Factor
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_387.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_395.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_395.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_395.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_preprocessor
+module name :	Fill Sinks XXL (Wang & Liu)
+author      :	Copyrights (c) 2007 by Volker Wichmann
+_____________________________________________
+go...
+Usage: 5 -ELEV <str> -FILLED <str> [-MINSLOPE <str>]
+  -ELEV:<str>    	DEM
+	Grid (input)
+  -FILLED:<str>  	Filled DEM
+	Grid (output)
+  -MINSLOPE:<str>	Minimum Slope [Degree]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_preprocessor_395.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_compound.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_compound.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_compound.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Standard Terrain Analysis
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_compound.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_346.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_346.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_346.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Watershed Basins
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 1 -ELEVATION <str> -CHANNELS <str> [-SINKROUTE <str>] -BASINS <str> [-MINSIZE <num>]
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -CHANNELS:<str> 	Channel Network
+	Grid (input)
+  -SINKROUTE:<str>	Sink Route
+	Grid (optional input)
+  -BASINS:<str>   	Watershed Basins
+	Grid (output)
+  -MINSIZE:<num>  	Min. Size
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_346.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_221.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_221.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_221.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	10: Dynamic Simulation - Life
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 9 -RESULT <str> [-REFRESH] [-COLORS <num>]
+  -RESULT:<str>	Life
+	Grid (output)
+  -REFRESH     	Refresh
+	Boolean
+  -COLORS:<num>	Fade Color Count
+	Integer
+	Value Range: 3.000000 - 255.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_221.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_240.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_240.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_240.txt	(revision 369)
@@ -0,0 +1,887 @@
+Usage: 10 [-SOURCE_PROJ_PROJ_TYPE <str>] [-SOURCE_PROJ_DATUM_DEF <str>] [-SOURCE_PROJ_DATUM <str>] [-SOURCE_PROJ_DATUM_GRID <str>] [-SOURCE_PROJ_ELLIPSOID <str>] [-SOURCE_PROJ_ELLPS_PREDEF <str>] [-SOURCE_PROJ_ELLPS_A <str>] [-SOURCE_PROJ_ELLPS_B <str>] [-SOURCE_PROJ_ELLPS_F <str>] [-SOURCE_PROJ_ELLPS_RF <str>] [-SOURCE_PROJ_ELLPS_E <str>] [-SOURCE_PROJ_ELLPS_ES <str>] [-SOURCE_PROJ_DATUM_SHIFT <str>] [-SOURCE_PROJ_DS_DX <str>] [-SOURCE_PROJ_DS_DY <str>] [-SOURCE_PROJ_DS_DZ <str>] [-SOURCE_PROJ_DS_RX <str>] [-SOURCE_PROJ_DS_RY <str>] [-SOURCE_PROJ_DS_RZ <str>] [-SOURCE_PROJ_DS_SC <str>] [-SOURCE_PROJ_LON_0 <str>] [-SOURCE_PROJ_LAT_0 <str>] [-SOURCE_PROJ_X_0 <str>] [-SOURCE_PROJ_Y_0 <str>] [-SOURCE_PROJ_K_0 <str>] [-SOURCE_PROJ_UNIT <str>] [-TARGET_PROJ_PROJ_TYPE <str>] [-TARGET_PROJ_DATUM_DEF <str>] [-TARGET_PROJ_DATUM <str>] [-TARGET_PROJ_DATUM_GRID <str>] [-TARGET_PROJ_ELLIPSOID <str>] [-TARGET_PROJ_ELLPS_PREDEF <str>] [-TARGET_PROJ_ELLPS_A <str>] [-TARGET_PROJ_ELLPS_B <str>] [-TARGET_PROJ_ELLPS_F <str>] [-TARGET_PROJ_ELLPS_RF <str>] [-TARGET_PROJ_ELLPS_E <str>] [-TARGET_PROJ_ELLPS_ES <str>] [-TARGET_PROJ_DATUM_SHIFT <str>] [-TARGET_PROJ_DS_DX <str>] [-TARGET_PROJ_DS_DY <str>] [-TARGET_PROJ_DS_DZ <str>] [-TARGET_PROJ_DS_RX <str>] [-TARGET_PROJ_DS_RY <str>] [-TARGET_PROJ_DS_RZ <str>] [-TARGET_PROJ_DS_SC <str>] [-TARGET_PROJ_LON_0 <str>] [-TARGET_PROJ_LAT_0 <str>] [-TARGET_PROJ_X_0 <str>] [-TARGET_PROJ_Y_0 <str>] [-TARGET_PROJ_K_0 <str>] [-TARGET_PROJ_UNIT <str>] -SOURCE <str> [-TARGET <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>]
+  -SOURCE_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -SOURCE_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -SOURCE_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -SOURCE_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -SOURCE_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -SOURCE_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -SOURCE_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -SOURCE_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -SOURCE_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -SOURCE_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -SOURCE_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -SOURCE_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -SOURCE_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -SOURCE_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -SOURCE_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -SOURCE_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -SOURCE_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -SOURCE_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -SOURCE_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -SOURCE_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -SOURCE_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -SOURCE_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -SOURCE_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -SOURCE_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -SOURCE_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -SOURCE_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -TARGET_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -TARGET_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -TARGET_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -TARGET_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -TARGET_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -TARGET_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -TARGET_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -TARGET_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -TARGET_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -TARGET_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -TARGET_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -TARGET_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -TARGET_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -TARGET_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -TARGET_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -TARGET_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -TARGET_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -TARGET_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -TARGET_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -TARGET_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -TARGET_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -TARGET_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -TARGET_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -TARGET_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -TARGET_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -TARGET_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -SOURCE:<str>                  	Source
+	Shapes list (input)
+  -TARGET:<str>                  	Target
+	Shapes list (optional output)
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Dialog, List of Shapes Layers)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_240.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_geotrans.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_geotrans.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_geotrans.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- GeoTRANS (Shapes)
+ 1	- GeoTrans (Grid)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_geotrans.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_225.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_225.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_225.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	14: Vectorising channel lines
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 13 -ELEVATION <str> -CHANNELS <str> -SHAPES <str> [-THRESHOLD <num>]
+  -ELEVATION:<str>	Elevation grid
+	Grid (input)
+  -CHANNELS:<str> 	Channels (Raster)
+	Grid (output)
+  -SHAPES:<str>   	Channels (Vector)
+	Shapes (output)
+  -THRESHOLD:<num>	Threshold
+	Integer
+	Value Range: 0.000000 - 8.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_225.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_333.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_333.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_333.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_hydrology
+module name :	Water Retention Capacity
+author      :	
+_____________________________________________
+go...
+Usage: 3 -SHAPES <str> -OUTPUT <str> -DEM <str> -RETENTION <str>
+  -SHAPES:<str>   	Plot Holes
+	Shapes (input)
+  -OUTPUT:<str>   	Final Parameters
+	Shapes (output)
+  -DEM:<str>      	DEM
+	Grid (input)
+  -RETENTION:<str>	Water Retention Capacity
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_hydrology_333.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus_bsl.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus_bsl.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus_bsl.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- BSL
+ 1	- BSL from File
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus_bsl.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_georeference.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_georeference.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_georeference.txt	(revision 369)
@@ -0,0 +1,14 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 1	- Georeferencing - Grids
+ 2	- Georeferencing - Shapes
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_pj_georeference.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_61.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_61.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_61.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grid Volume
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -GRID <str> [-METHOD <str>] [-LEVEL <str>]
+  -GRID:<str>  	Grid
+	Grid (input)
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Count Only Above Base Level
+	[1] Count Only Below Base Level
+	[2] Subtract Volumes Below Base Level
+	[3] Add Volumes Below Base Level
+  -LEVEL:<str> 	Base Level
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_61.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_111.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_111.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_111.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Grid Buffer
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 8 -FEATURES <str> -BUFFER <str> [-DIST <str>] [-BUFFERTYPE <str>]
+  -FEATURES:<str>  	Features Grid
+	Grid (input)
+  -BUFFER:<str>    	Buffer Grid
+	Grid (output)
+  -DIST:<str>      	Distance
+	Floating point
+  -BUFFERTYPE:<str>	Buffer Distance
+	Choice
+	Available Choices:
+	[0] Fixed
+	[1] Cell value

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_111.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_42.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_42.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_42.txt	(revision 369)
@@ -0,0 +1,81 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_regression
+module name :	Geographically Weighted Multiple Regression
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 5 -POINTS <str> [-DEPENDENT <str>] [-TARGET <str>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>] [-RANGE <str>] [-RADIUS <str>] [-MODE <str>] [-NPOINTS <str>] [-MAXPOINTS <num>] [-MINPOINTS <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_QUALITY <str>] [-USER_INTERCEPT <str>] [-GRID_QUALITY <str>] [-GRID_INTERCEPT <str>]
+  -POINTS:<str>                      	Points
+	Shapes (input)
+  -DEPENDENT:<str>                   	Dependent Variable
+	Table field
+  -TARGET:<str>                      	Target Grids
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>                       	Search Range
+	Choice
+	Available Choices:
+	[0] search radius (local)
+	[1] no search radius (global)
+  -RADIUS:<str>                      	Search Radius
+	Floating point
+  -MODE:<str>                        	Search Mode
+	Choice
+	Available Choices:
+	[0] all directions
+	[1] quadrants
+  -NPOINTS:<str>                     	Number of Points
+	Choice
+	Available Choices:
+	[0] maximum number of observations
+	[1] all points
+  -MAXPOINTS:<num>                   	Maximum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -MINPOINTS:<num>                   	Minimum Number of Observations
+	Integer
+	Minimum: 2.000000
+  -USER_XMIN:<str>                   	Left
+	Floating point
+  -USER_XMAX:<str>                   	Right
+	Floating point
+  -USER_YMIN:<str>                   	Bottom
+	Floating point
+  -USER_YMAX:<str>                   	Top
+	Floating point
+  -USER_SIZE:<str>                   	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_QUALITY:<str>                	Quality
+	Data Object (optional output)
+  -USER_INTERCEPT:<str>              	Intercept
+	Data Object (optional output)
+  -GRID_QUALITY:<str>                	Quality
+	Grid (output)
+  -GRID_INTERCEPT:<str>              	Intercept
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_regression_42.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_65.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_65.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_65.txt	(revision 369)
@@ -0,0 +1,48 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Random Terrain Generation
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 6 [-RADIUS <num>] [-ITERATIONS <num>] [-TARGET_TYPE <str>] [-TARGET_GRID <str>] [-USER_CELL_SIZE <str>] [-USER_COLS <num>] [-USER_ROWS <num>] [-GET_SYSTEM_SYSTEM_NX <num>] [-GET_SYSTEM_SYSTEM_NY <num>] [-GET_SYSTEM_SYSTEM_X <str>] [-GET_SYSTEM_SYSTEM_Y <str>] [-GET_SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>]
+  -RADIUS:<num>              	Radius (cells)
+	Integer
+  -ITERATIONS:<num>          	Iterations
+	Integer
+  -TARGET_TYPE:<str>         	Target Dimensions
+	Choice
+	Available Choices:
+	[0] User defined
+	[1] Grid Project
+	[2] Grid
+  -TARGET_GRID:<str>         	Grid
+	Grid list (optional output)
+  -USER_CELL_SIZE:<str>      	Grid Size
+	Floating point
+	Minimum: 0.000000
+  -USER_COLS:<num>           	Cols
+	Integer
+	Minimum: 0.000000
+  -USER_ROWS:<num>           	Rows
+	Integer
+	Minimum: 0.000000
+  -GET_SYSTEM_SYSTEM_NX:<num>	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_NY:<num>	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_X:<str> 	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_Y:<str> 	System
+	Grid system
+  -GET_SYSTEM_SYSTEM_D:<str> 	System
+	Grid system
+  -GRID_GRID:<str>           	Grid
+	Grid (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_65.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_115.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_115.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_115.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Change Grid Values
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 12 -GRID_IN <str> [-GRID_OUT <str>] [-METHOD <str>] [-LOOKUP <str>]
+  -GRID_IN:<str> 	Grid
+	Grid (input)
+  -GRID_OUT:<str>	Changed Grid
+	Grid (optional output)
+  -METHOD:<str>  	Replace Condition
+	Choice
+	Available Choices:
+	[0] Grid value equals low value
+	[1] Low value < grid value < high value
+	[2] Low value <= grid value < high value
+  -LOOKUP:<str>  	Lookup Table
+	Static table
+	3 Fields:
+	- 1. [8 byte floating point number] Low Value
+	- 2. [8 byte floating point number] High Value
+	- 3. [8 byte floating point number] Replace with
+	

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_115.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_200.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_200.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_200.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export GPX
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 14 -SHAPES <str> [-FILE <str>] [-ELE <str>] [-NAME <str>] [-CMT <str>] [-DESC <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -FILE:<str>  	File
+	File path
+  -ELE:<str>   	Elevation
+	Table field
+  -NAME:<str>  	Name
+	Table field
+  -CMT:<str>   	Comment
+	Table field
+  -DESC:<str>  	Description
+	Table field

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_200.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_22.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_22.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_22.txt	(revision 369)
@@ -0,0 +1,41 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_grid
+module name :	Multi-Band Variation
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 9 -BANDS <str> -MEAN <str> -STDDEV <str> -DIFF <str> [-RADIUS <num>] [-DISTANCE_WEIGHTING_WEIGHTING <str>] [-DISTANCE_WEIGHTING_IDW_POWER <str>] [-DISTANCE_WEIGHTING_IDW_OFFSET] [-DISTANCE_WEIGHTING_BANDWIDTH <str>]
+  -BANDS:<str>                       	Grids
+	Grid list (input)
+  -MEAN:<str>                        	Mean Distance
+	Grid (output)
+  -STDDEV:<str>                      	Standard Deviation
+	Grid (output)
+  -DIFF:<str>                        	Distance
+	Grid (output)
+  -RADIUS:<num>                      	Radius [Cells]
+	Integer
+	Minimum: 1.000000
+  -DISTANCE_WEIGHTING_WEIGHTING:<str>	Distance Weighting
+	Choice
+	Available Choices:
+	[0] no distance weighting
+	[1] inverse distance to a power
+	[2] exponential
+	[3] gaussian weighting
+  -DISTANCE_WEIGHTING_IDW_POWER:<str>	Inverse Distance Weighting Power
+	Floating point
+	Minimum: 0.000000
+  -DISTANCE_WEIGHTING_IDW_OFFSET     	Inverse Distance Offset
+	Boolean
+  -DISTANCE_WEIGHTING_BANDWIDTH:<str>	Gaussian and Exponential Weighting Bandwidth
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_grid_22.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_400.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_400.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_400.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Grid to TIN
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -GRID <str> [-VALUES <str>] -TIN <str>
+  -GRID:<str>  	Grid
+	Grid (input)
+  -VALUES:<str>	Values
+	Grid list (optional input)
+  -TIN:<str>   	TIN
+	TIN (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_400.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_69.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_69.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_69.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Grid Standardisation
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 10 -INPUT <str> -OUTPUT <str> [-STRETCH <str>]
+  -INPUT:<str>  	Grid
+	Grid (input)
+  -OUTPUT:<str> 	Standardised Grid
+	Grid (output)
+  -STRETCH:<str>	Stretch Factor
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_69.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_119.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_119.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_119.txt	(revision 369)
@@ -0,0 +1,40 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Resampling
+ 1	- Aggregate
+ 3	- Merging
+ 4	- Create Constant Grid
+ 5	- Patching
+ 6	- Close One Cell Gaps
+ 7	- Close Gaps
+ 8	- Grid Buffer
+ 9	- Threshold Buffer
+ 10	- Grid Proximity Buffer
+ 11	- Convert Data Storage Type
+ 12	- Change Grid Values
+ 15	- Reclassify Grid Values
+ 17	- Crop to Data
+ 18	- Invert Data/No-Data
+ 19	- Grid Orientation
+ 20	- Combine Grids
+ 21	- Sort Grid
+ 22	- Grids from classified grid and table
+ 23	- Create Grid System
+ 24	- Grid Masking
+ 25	- Close Gaps with Spline
+ 26	- Proximity Grid
+ 27	- Tiling
+
+type -h or --help for further information
+
+error: cannot execute interactive module [16]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_119.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_355.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_355.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_355.txt	(revision 369)
@@ -0,0 +1,51 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Catchment Area (Flow Tracing)
+author      :	O.Conrad (c) 2001
+_____________________________________________
+go...
+Usage: 2 -ELEVATION <str> [-SINKROUTE <str>] [-WEIGHT <str>] [-MATERIAL <str>] [-TARGET <str>] -CAREA <str> [-CHEIGHT <str>] [-CSLOPE <str>] [-ACCU_TOT <str>] [-ACCU_LEFT <str>] [-ACCU_RIGHT <str>] [-STEP <num>] [-Method <str>] [-MINDQV <str>] [-CORRECT]
+  -ELEVATION:<str> 	Elevation
+	Grid (input)
+  -SINKROUTE:<str> 	Sink Routes
+	Grid (optional input)
+  -WEIGHT:<str>    	Weight
+	Grid (optional input)
+  -MATERIAL:<str>  	Material
+	Grid (optional input)
+  -TARGET:<str>    	Target
+	Grid (optional input)
+  -CAREA:<str>     	Catchment Area
+	Grid (output)
+  -CHEIGHT:<str>   	Catchment Height
+	Grid (optional output)
+  -CSLOPE:<str>    	Catchment Slope
+	Grid (optional output)
+  -ACCU_TOT:<str>  	Total accumulated Material
+	Grid (optional output)
+  -ACCU_LEFT:<str> 	Accumulated Material from _left_ side
+	Grid (optional output)
+  -ACCU_RIGHT:<str>	Accumulated Material from _right_ side
+	Grid (optional output)
+  -STEP:<num>      	Step
+	Integer
+	Minimum: 1.000000
+  -Method:<str>    	Method
+	Choice
+	Available Choices:
+	[0] Rho 8
+	[1] Kinematic Routing Algorithm
+	[2] DEMON
+  -MINDQV:<str>    	DEMON - Min. DQV
+	Floating point
+	Value Range: 0.000000 - 1.000000
+  -CORRECT         	Flow Correction
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_355.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_compound_352.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_compound_352.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_compound_352.txt	(revision 369)
@@ -0,0 +1,58 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_compound
+module name :	Standard Terrain Analysis
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -ELEVATION <str> -SHADE <str> [-SHADE_AZIM <str>] [-SHADE_DECL <str>] [-SHADE_EXAG <str>] -SLOPE <str> -ASPECT <str> -CURV <str> -HCURV <str> -VCURV <str> -CONVERGENCE <str> -CURVCLASS <str> -CAREA <str> -WETNESS <str> -LSFACTOR <str> -CHNL_GRID <str> -CHNL_SHAPES <str> [-CHNL_INIT <str>] -CHNL_ALTI <str> -CHNL_BASE <str> -BASINS <str>
+  -ELEVATION:<str>  	Elevation
+	Grid (input)
+  -SHADE:<str>      	Analytical Hillshading
+	Grid (output)
+  -SHADE_AZIM:<str> 	Azimuth []
+	Floating point
+  -SHADE_DECL:<str> 	Declination []
+	Floating point
+  -SHADE_EXAG:<str> 	Exaggeration
+	Floating point
+  -SLOPE:<str>      	Slope
+	Grid (output)
+  -ASPECT:<str>     	Aspect
+	Grid (output)
+  -CURV:<str>       	Curvature
+	Grid (output)
+  -HCURV:<str>      	Plan Curvature
+	Grid (output)
+  -VCURV:<str>      	Profile Curvature
+	Grid (output)
+  -CONVERGENCE:<str>	Convergence Index
+	Grid (output)
+  -CURVCLASS:<str>  	Curvature Classification
+	Grid (output)
+  -CAREA:<str>      	Catchment Area
+	Grid (output)
+  -WETNESS:<str>    	Wetness Index
+	Grid (output)
+  -LSFACTOR:<str>   	LS-Factor
+	Grid (output)
+  -CHNL_GRID:<str>  	Channel Network
+	Grid (output)
+  -CHNL_SHAPES:<str>	Channel Network
+	Shapes (output)
+  -CHNL_INIT:<str>  	Network Density [%]
+	Floating point
+	Value Range: 0.000000 - 100.000000
+  -CHNL_ALTI:<str>  	Altitude above Channel Network
+	Grid (output)
+  -CHNL_BASE:<str>  	Channel Network Base Level
+	Grid (output)
+  -BASINS:<str>     	Watershed Subbasins
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_compound_352.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_404.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_404.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_404.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	tin_tools
+module name :	Gradient
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 4 -TIN <str> [-ZFIELD <str>] -GRADIENT <str> [-DEGREE <str>]
+  -TIN:<str>     	TIN
+	TIN (input)
+  -ZFIELD:<str>  	Z Values
+	Table field
+  -GRADIENT:<str>	TIN_Gradient
+	Shapes (output)
+  -DEGREE:<str>  	Output Unit
+	Choice
+	Available Choices:
+	[0] Radians
+	[1] Degree

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_tin_tools_404.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_162.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_162.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_162.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Export Grid to XYZ
+author      :	O. Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 5 -GRIDS <str> [-FILENAME <str>] [-CAPTION] [-EX_NODATA]
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -FILENAME:<str>	File Name
+	File path
+  -CAPTION       	Write Field Names
+	Boolean
+  -EX_NODATA     	Exclude NoData Cells
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_162.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_359.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_359.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_359.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Flow Path Length
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 6 -ELEVATION <str> [-SEED <str>] -LENGTH <str> [-SEEDS_ONLY] [-METHOD <str>] [-CONVERGENCE <str>]
+  -ELEVATION:<str>  	Elevation
+	Grid (input)
+  -SEED:<str>       	Seeds
+	Grid (optional input)
+  -LENGTH:<str>     	Flow Path Length
+	Grid (output)
+  -SEEDS_ONLY       	Seeds Only
+	Boolean
+  -METHOD:<str>     	Flow Routing Algorithm
+	Choice
+	Available Choices:
+	[0] Deterministic 8 (D8)
+	[1] Multiple Flow Direction (FD8)
+  -CONVERGENCE:<str>	Convergence (FD8)
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_359.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_26.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_26.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_26.txt	(revision 369)
@@ -0,0 +1,77 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Universal Kriging (VF, Global)
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -POINTS <str> [-ZFIELD <str>] [-TARGET <str>] [-TQUALITY <str>] [-DISTMAX <str>] [-DISTCOUNT <num>] [-NSKIP <num>] [-BLOCK] [-DBLOCK <str>] [-GRIDS <str>] [-INTERPOL <str>] [-COORDS] [-FORMULA_STRING <str>] [-USER_BVARIANCE] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-USER_VARIANCE <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -POINTS:<str>        	Points
+	Shapes (input)
+  -ZFIELD:<str>        	Attribute
+	Table field
+  -TARGET:<str>        	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -TQUALITY:<str>      	Type of Quality Measure
+	Choice
+	Available Choices:
+	[0] standard deviation
+	[1] variance
+  -DISTMAX:<str>       	Maximum Distance
+	Floating point
+  -DISTCOUNT:<num>     	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -NSKIP:<num>         	Skip Number
+	Integer
+	Minimum: 1.000000
+  -BLOCK               	Block Kriging
+	Boolean
+  -DBLOCK:<str>        	Block Size
+	Floating point
+	Minimum: 0.000000
+  -GRIDS:<str>         	Grids
+	Grid list (optional input)
+  -INTERPOL:<str>      	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -COORDS              	Coordinates
+	Boolean
+  -FORMULA_STRING:<str>	Formula String
+	Text
+  -USER_BVARIANCE      	Create Quality Grid
+	Boolean
+  -USER_XMIN:<str>     	Left
+	Floating point
+  -USER_XMAX:<str>     	Right
+	Floating point
+  -USER_YMIN:<str>     	Bottom
+	Floating point
+  -USER_YMAX:<str>     	Top
+	Floating point
+  -USER_SIZE:<str>     	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>     	Grid
+	Data Object (optional output)
+  -USER_VARIANCE:<str> 	Quality Measure
+	Data Object (optional output)
+  -GRID_GRID:<str>     	Grid
+	Grid (output)
+  -GRID_VARIANCE:<str> 	Quality Measure
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_26.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_tools.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Create New Shapes Layer
+ 1	- Join a Table
+ 2	- Merge Shapes Layers
+ 3	- Select by Attributes... (Numerical Expression)
+ 4	- Select by Attributes... (String Expression)
+ 5	- Select by Location...
+ 6	- Copy Selection to New Shapes Layer
+ 7	- Delete Selection from Shapes Layer
+ 8	- Invert Selection of Shapes Layer
+ 9	- Split Shapes Layer Completely
+ 10	- Transform Shapes
+ 11	- Create Chart Layer (bars/sectors)
+ 12	- Create graticule
+ 13	- Cut Shapes Layer
+ 15	- Split Shapes Layer
+ 16	- Split Shapes Layer Randomly
+ 17	- Split Table/Shapes by Attribute
+ 18	- Shapes Buffer
+ 19	- Get Shapes Extents
+ 20	- QuadTree Structure to Shapes
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_shapes_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_351.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_351.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_351.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_channels
+module name :	Strahler Order
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 6 -DEM <str> -STRAHLER <str>
+  -DEM:<str>     	Elevation
+	Grid (input)
+  -STRAHLER:<str>	Strahler Order
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_channels_351.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_166.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_166.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_166.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_grid
+module name :	Import SRTM30 DEM
+author      :	(c) 2004 by O.Conrad
+_____________________________________________
+go...
+Usage: 9 [-GRID <str>] [-PATH <str>] [-XMIN <num>] [-XMAX <num>] [-YMIN <num>] [-YMAX <num>] [-TILE_PATH <str>]
+  -GRID:<str>     	Grid
+	Data Object (optional output)
+  -PATH:<str>     	Path
+	File path
+  -XMIN:<num>     	West []
+	Integer
+  -XMAX:<num>     	East []
+	Integer
+  -YMIN:<num>     	South []
+	Integer
+  -YMAX:<num>     	North []
+	Integer
+  -TILE_PATH:<str>	Select file
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_grid_166.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_292.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_292.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_292.txt	(revision 369)
@@ -0,0 +1,34 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygon Intersection
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -SHAPES_A <str> [-FIELD_A <str>] -SHAPES_B <str> [-FIELD_B <str>] -SHAPES_AB <str> [-METHOD <str>] [-SPLITPARTS]
+  -SHAPES_A:<str> 	Layer A
+	Shapes (input)
+  -FIELD_A:<str>  	Attribute A
+	Table field
+  -SHAPES_B:<str> 	Layer B
+	Shapes (input)
+  -FIELD_B:<str>  	Attribute B
+	Table field
+  -SHAPES_AB:<str>	Intersection
+	Shapes (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Complete Intersection
+	[1] Intersection
+	[2] Difference (A - B)
+	[3] Difference (B - A)
+  -SPLITPARTS     	Split Parts
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_292.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_148.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_148.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_148.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_tools
+module name :	Vegetation Index[slope based]
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 1 -NIR <str> -RED <str> -NDVI <str> [-RATIO <str>] [-TVI <str>] [-CTVI <str>] [-TTVI <str>] [-NRATIO <str>]
+  -NIR:<str>   	Near Infrared Band
+	Grid (input)
+  -RED:<str>   	Red Band
+	Grid (input)
+  -NDVI:<str>  	Normalized Difference Vegetation Index
+	Grid (output)
+  -RATIO:<str> 	Ratio Vegetation Index
+	Grid (optional output)
+  -TVI:<str>   	Transformed Vegetation Index
+	Grid (optional output)
+  -CTVI:<str>  	Corrected Transformed Vegetation Index
+	Grid (optional output)
+  -TTVI:<str>  	Thiam's Transformed Vegetation Index
+	Grid (optional output)
+  -NRATIO:<str>	Normalized Ratio Vegetation Index
+	Grid (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_tools_148.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_281.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_281.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_281.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Distance Matrix
+author      :	
+_____________________________________________
+go...
+Usage: 3 -POINTS <str> -TABLE <str>
+  -POINTS:<str>	Points
+	Shapes (input)
+  -TABLE:<str> 	Distance Matrix Table
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_281.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_morphometry.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_morphometry.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_morphometry.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Slope, Aspect, Curvature
+ 1	- Convergence Index
+ 2	- Convergence Index (Search Radius)
+ 3	- Surface Specific Points
+ 4	- Curvature Classification
+ 5	- Hypsometry
+ 6	- Real Area Calculation
+ 7	- Morphometric Protection Index
+ 8	- Multiresolution Index of Valley Bottom Flatness (MRVBF)
+ 9	- Downslope Distance Gradient
+ 10	- Mass Balance Index
+ 11	- Effective Air Flow Heights
+ 12	- Diurnal Anisotropic Heating
+ 13	- Land Surface Temperature
+ 14	- Relative Heights and Slope Positions
+ 15	- Wind Effect (Windward / Leeward Index)
+ 16	- Terrain Ruggedness Index (TRI)
+ 17	- Vector Ruggedness Measure (VRM)
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_morphometry.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_335.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_335.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_335.txt	(revision 369)
@@ -0,0 +1,23 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Table calculator
+author      :	Victor Olaya
+_____________________________________________
+go...
+Usage: 1 -TABLE <str> -RESULT <str> [-FORMULA <str>] [-NAME <str>]
+  -TABLE:<str>  	Table
+	Table (input)
+  -RESULT:<str> 	Result
+	Table (output)
+  -FORMULA:<str>	Formula
+	Text
+  -NAME:<str>   	Field Name
+	Text

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_335.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_296.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_296.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_296.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Point Statistics for Polygons
+author      :	V. Olaya, O. Conrad (c) 2005, 2010
+_____________________________________________
+go...
+Usage: 4 -POINTS <str> -POLYGONS <str> [-STATISTICS <str>]
+  -POINTS:<str>    	Points
+	Shapes (input)
+  -POLYGONS:<str>  	Polygons
+	Shapes (input)
+  -STATISTICS:<str>	Statistics
+	Shapes (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_296.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_285.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_285.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_285.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Remove Duplicate Points
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 7 -POINTS <str> [-FIELD <str>] [-RESULT <str>] [-METHOD <str>] [-NUMERIC <str>]
+  -POINTS:<str> 	Points
+	Shapes (input)
+  -FIELD:<str>  	Attribute
+	Table field
+  -RESULT:<str> 	Result
+	Shapes (optional output)
+  -METHOD:<str> 	Point to Keep
+	Choice
+	Available Choices:
+	[0] first point
+	[1] last point
+	[2] point with minimum attribute value
+	[3] point with maximum attribute value
+  -NUMERIC:<str>	Numeric Attribute Values
+	Choice
+	Available Choices:
+	[0] take value from the point to be kept
+	[1] minimum value of all duplicates
+	[2] maximum value of all duplicates
+	[3] mean value of all duplicates

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_285.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_339.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_339.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_339.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Running Average
+author      :	O. Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 5 -INPUT <str> [-FIELD <str>] [-OUTPUT <str>] [-COUNT <num>]
+  -INPUT:<str> 	Input
+	Table (input)
+  -FIELD:<str> 	Attribute
+	Table field
+  -OUTPUT:<str>	Output
+	Table (optional output)
+  -COUNT:<num> 	Number of Records
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_339.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_289.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_289.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_289.txt	(revision 369)
@@ -0,0 +1,47 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Points Filter
+author      :	O.Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 11 -POINTS <str> [-FIELD <str>] [-FILTER <str>] [-RADIUS <str>] [-MINNUM <num>] [-MAXNUM <num>] [-QUADRANTS] [-METHOD <str>] [-TOLERANCE <str>] [-PERCENT <str>]
+  -POINTS:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -FILTER:<str>   	Filtered Points
+	Shapes (optional output)
+  -RADIUS:<str>   	Radius
+	Floating point
+	Minimum: 0.000000
+  -MINNUM:<num>   	Minimum Number of Points
+	Integer
+	Minimum: 0.000000
+  -MAXNUM:<num>   	Maximum Number of Points
+	Integer
+	Minimum: 0.000000
+  -QUADRANTS      	Quadrants
+	Boolean
+  -METHOD:<str>   	Filter Criterion
+	Choice
+	Available Choices:
+	[0] keep maxima (with tolerance)
+	[1] keep minima (with tolerance)
+	[2] remove maxima (with tolerance)
+	[3] remove minima (with tolerance)
+	[4] remove below percentile
+	[5] remove above percentile
+  -TOLERANCE:<str>	Tolerance
+	Floating point
+	Minimum: 0.000000
+  -PERCENT:<str>  	Percentile
+	Floating point
+	Value Range: 0.000000 - 100.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_289.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_70.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_70.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_70.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Fuzzify
+author      :	Victor Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 11 -INPUT <str> -OUTPUT <str> [-A <str>] [-B <str>] [-C <str>] [-D <str>] [-TYPE <str>] [-AUTOFIT]
+  -INPUT:<str> 	Grid
+	Grid (input)
+  -OUTPUT:<str>	Fuzzified Grid
+	Grid (output)
+  -A:<str>     	A
+	Floating point
+  -B:<str>     	B
+	Floating point
+  -C:<str>     	C
+	Floating point
+  -D:<str>     	D
+	Floating point
+  -TYPE:<str>  	Membership Function Type
+	Choice
+	Available Choices:
+	[0] linear
+	[1] sigmoidal
+	[2] j-shaped
+  -AUTOFIT     	Adjust to Grid
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_70.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_120.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_120.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_120.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Crop to Data
+author      :	
+_____________________________________________
+go...
+Usage: 17 -INPUT <str>
+  -INPUT:<str>	Input Grids
+	Grid list (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_120.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_259.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_259.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_259.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Add Grid Values to Points
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -SHAPES <str> -GRIDS <str> [-RESULT <str>] [-INTERPOL <str>]
+  -SHAPES:<str>  	Points
+	Shapes (input)
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -RESULT:<str>  	Result
+	Shapes (optional output)
+  -INTERPOL:<str>	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_259.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_302.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_302.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_302.txt	(revision 369)
@@ -0,0 +1,51 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Create New Shapes Layer
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 0 [-SHAPES <str>] [-NAME <str>] [-TYPE <str>] [-NFIELDS <num>] [-FIELDS_NAME000 <str>] [-FIELDS_TYPE000 <str>] [-FIELDS_NAME001 <str>] [-FIELDS_TYPE001 <str>]
+  -SHAPES:<str>        	Shapes
+	Data Object (optional output)
+  -NAME:<str>          	Name
+	Text
+  -TYPE:<str>          	Shape Type
+	Choice
+	Available Choices:
+	[0] Point
+	[1] Multipoint
+	[2] Lines
+	[3] Polygon
+  -NFIELDS:<num>       	Number of Attributes
+	Integer
+	Minimum: 1.000000
+  -FIELDS_NAME000:<str>	Name
+	Text
+  -FIELDS_TYPE000:<str>	Type
+	Choice
+	Available Choices:
+	[0] text
+	[1] 1 byte integer
+	[2] 2 byte integer
+	[3] 4 byte integer
+	[4] 4 byte floating point
+	[5] 8 byte floating point
+  -FIELDS_NAME001:<str>	Name
+	Text
+  -FIELDS_TYPE001:<str>	Type
+	Choice
+	Available Choices:
+	[0] text
+	[1] 1 byte integer
+	[2] 2 byte integer
+	[3] 4 byte integer
+	[4] 4 byte floating point
+	[5] 8 byte floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_302.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_129.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_129.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_129.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	Fit Color Palette to Grid Values
+author      :	(c) 2005 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -GRID <str> [-COUNT <num>] [-SCALE <str>] [-RANGE_MIN <str>] [-RANGE_MAX <str>]
+  -GRID:<str>     	Grid
+	Grid (input)
+  -COUNT:<num>    	Number of Colors
+	Integer
+	Minimum: 2.000000
+  -SCALE:<str>    	Scale
+	Choice
+	Available Choices:
+	[0] Grid range
+	[1] User defined range
+  -RANGE_MIN:<str>	User defined range
+	Value range
+  -RANGE_MAX:<str>	User defined range
+	Value range

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_129.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_74.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_74.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_74.txt	(revision 369)
@@ -0,0 +1,42 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus
+module name :	Gradient Vector from Cartesian to Polar Coordinates
+author      :	Victor Olaya & Volker Wichmann (c) 2004-2010
+_____________________________________________
+go...
+Usage: 15 -DX <str> -DY <str> -DIR <str> -LEN <str> [-UNITS <str>] [-SYSTEM <str>] [-SYSTEM_ZERO <str>] [-SYSTEM_ORIENT <str>]
+  -DX:<str>           	X Component
+	Grid (input)
+  -DY:<str>           	Y Component
+	Grid (input)
+  -DIR:<str>          	Direction
+	Grid (output)
+  -LEN:<str>          	Length
+	Grid (output)
+  -UNITS:<str>        	Polar Angle Units
+	Choice
+	Available Choices:
+	[0] radians
+	[1] degree
+  -SYSTEM:<str>       	Polar Coordinate System
+	Choice
+	Available Choices:
+	[0] mathematical
+	[1] geographical
+	[2] user defined
+  -SYSTEM_ZERO:<str>  	User defined Zero Direction
+	Floating point
+	Value Range: 0.000000 - 360.000000
+  -SYSTEM_ORIENT:<str>	User defined Orientation
+	Choice
+	Available Choices:
+	[0] clockwise
+	[1] counterclockwise

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_74.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_124.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_124.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_124.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_tools
+module name :	Sort Grid
+author      :	
+_____________________________________________
+go...
+Usage: 21 -GRID <str> -OUTPUT <str> [-DOWN]
+  -GRID:<str>  	Input Grid
+	Grid (input)
+  -OUTPUT:<str>	Sorted Grid
+	Grid (output)
+  -DOWN        	Down sort
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_tools_124.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_306.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_306.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_306.txt	(revision 369)
@@ -0,0 +1,36 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Select by Attributes... (String Expression)
+author      :	V.Olaya (c) 2004, O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 4 -SHAPES <str> [-FIELD <str>] [-EXPRESSION <str>] [-CASE] [-COMPARE <str>] [-METHOD <str>]
+  -SHAPES:<str>    	Shapes
+	Shapes (input)
+  -FIELD:<str>     	Attribute
+	Table field
+  -EXPRESSION:<str>	Expression
+	Text
+  -CASE            	Case Sensitive
+	Boolean
+  -COMPARE:<str>   	Select if...
+	Choice
+	Available Choices:
+	[0] attribute is identical with search expression
+	[1] attribute contains search expression
+	[2] attribute is contained in search expression
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] new selection
+	[1] add to current selection
+	[2] select from current selection
+	[3] remove from current selection

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_306.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_360.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_360.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_360.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_hydrology
+module name :	Slope Length
+author      :	V.Olaya (c) 2004
+_____________________________________________
+go...
+Usage: 7 -DEM <str> -LENGTH <str>
+  -DEM:<str>   	Elevation
+	Grid (input)
+  -LENGTH:<str>	Slope Length
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_360.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_300.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_300.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_300.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_polygons
+module name :	Polygon-Line Intersection
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 8 -POLYGONS <str> -LINES <str> -INTERSECT <str>
+  -POLYGONS:<str> 	Polygons
+	Shapes (input)
+  -LINES:<str>    	Lines
+	Shapes (input)
+  -INTERSECT:<str>	Intersection
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_polygons_300.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_364.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_364.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_364.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Catchment Area (Parallel)
+ 1	- Catchment Area (Recursive)
+ 2	- Catchment Area (Flow Tracing)
+ 4	- Upslope Area
+ 6	- Flow Path Length
+ 7	- Slope Length
+ 10	- Cell Balance
+ 13	- Edge Contamination
+ 15	- SAGA Wetness Index
+ 16	- Lake Flood
+ 18	- Flow Accumulation, Mass-Flux Method
+ 19	- Flow Width and Specific Catchment Area
+ 20	- Topographic Wetness Index (TWI)
+ 21	- Stream Power Index
+ 22	- LS Factor
+
+type -h or --help for further information
+
+error: cannot execute interactive module [11]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_hydrology_364.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_47.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_47.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_47.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Accumulated Cost (Isotropic)
+ 1	- Accumulated Cost (Anisotropic)
+ 5	- Least Cost Paths
+ 6	- Change Vector Analysis
+ 7	- Covered Distance
+ 8	- Pattern Analysis
+ 9	- Layer of extreme value
+ 10	- Analytical Hierarchy Process
+ 11	- Ordered Weighted Averaging (OWA)
+ 12	- Aggregation Index
+ 13	- Cross-Classification and Tabulation
+ 14	- Soil Texture Classification
+ 15	- Fragmentation (Standard)
+ 16	- Fragmentation (Alternative)
+ 17	- Fragmentation Classes from Density and Connectivity
+
+type -h or --help for further information
+
+error: module not found [3]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_47.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_31.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_31.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_31.txt	(revision 369)
@@ -0,0 +1,101 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_kriging
+module name :	Universal Kriging (Global)
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 8 [-GRID <str>] [-VARIANCE <str>] -SHAPES <str> [-FIELD <str>] [-BVARIANCE] [-TARGET <str>] [-MODEL <str>] [-BLOCK] [-DBLOCK <str>] [-BLOG] [-NUGGET <str>] [-SILL <str>] [-RANGE <str>] [-LIN_B <str>] [-EXP_B <str>] [-POW_A <str>] [-POW_B <str>] -GRIDS <str> [-INTERPOL <str>] [-USER_CELL_SIZE <str>] [-USER_FIT_EXTENT] [-USER_X_EXTENT_MIN <str>] [-USER_X_EXTENT_MAX <str>] [-USER_Y_EXTENT_MIN <str>] [-USER_Y_EXTENT_MAX <str>] [-SYSTEM_SYSTEM_NX <num>] [-SYSTEM_SYSTEM_NY <num>] [-SYSTEM_SYSTEM_X <str>] [-SYSTEM_SYSTEM_Y <str>] [-SYSTEM_SYSTEM_D <str>] [-GRID_GRID <str>] [-GRID_VARIANCE <str>]
+  -GRID:<str>             	Grid
+	Data Object (optional output)
+  -VARIANCE:<str>         	Variance
+	Data Object (optional output)
+  -SHAPES:<str>           	Points
+	Shapes (input)
+  -FIELD:<str>            	Attribute
+	Table field
+  -BVARIANCE              	Create Variance Grid
+	Boolean
+  -TARGET:<str>           	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid system
+	[2] grid
+  -MODEL:<str>            	Variogram Model
+	Choice
+	Available Choices:
+	[0] Spherical Model
+	[1] Exponential Model
+	[2] Gaussian Model
+	[3] Linear Regression
+	[4] Exponential Regression
+	[5] Power Function Regression
+  -BLOCK                  	Block Kriging
+	Boolean
+  -DBLOCK:<str>           	Block Size
+	Floating point
+	Minimum: 0.000000
+  -BLOG                   	Logarithmic Transformation
+	Boolean
+  -NUGGET:<str>           	Nugget
+	Floating point
+	Minimum: 0.000000
+  -SILL:<str>             	Sill
+	Floating point
+	Minimum: 0.000000
+  -RANGE:<str>            	Range
+	Floating point
+	Minimum: 0.000000
+  -LIN_B:<str>            	Linear Regression
+	Floating point
+  -EXP_B:<str>            	Exponential Regression
+	Floating point
+  -POW_A:<str>            	Power Function - A
+	Floating point
+  -POW_B:<str>            	Power Function - B
+	Floating point
+  -GRIDS:<str>            	Grids
+	Grid list (input)
+  -INTERPOL:<str>         	Grid Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation
+  -USER_CELL_SIZE:<str>   	Grid Size
+	Floating point
+	Minimum: 0.000000
+  -USER_FIT_EXTENT        	Fit Extent
+	Boolean
+  -USER_X_EXTENT_MIN:<str>	X-Extent
+	Value range
+  -USER_X_EXTENT_MAX:<str>	X-Extent
+	Value range
+  -USER_Y_EXTENT_MIN:<str>	Y-Extent
+	Value range
+  -USER_Y_EXTENT_MAX:<str>	Y-Extent
+	Value range
+  -SYSTEM_SYSTEM_NX:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_NY:<num> 	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_X:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_Y:<str>  	Grid System
+	Grid system
+  -SYSTEM_SYSTEM_D:<str>  	Grid System
+	Grid system
+  -GRID_GRID:<str>        	Grid
+	Grid (input)
+  -GRID_VARIANCE:<str>    	Variance
+	Grid (optional input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_kriging_31.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_82.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_82.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_82.txt	(revision 369)
@@ -0,0 +1,35 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	Multi Direction Lee Filter
+author      :	Copyrights (c) 2003 by Andre Ringeler
+_____________________________________________
+go...
+Usage: 3 -INPUT <str> -RESULT <str> [-STDDEV <str>] [-DIR <str>] [-NOISE_ABS <str>] [-NOISE_REL <str>] [-WEIGHTED] [-METHOD <str>]
+  -INPUT:<str>    	Grid
+	Grid (input)
+  -RESULT:<str>   	Filtered Grid
+	Grid (output)
+  -STDDEV:<str>   	Minimum Standard Deviation
+	Grid (optional output)
+  -DIR:<str>      	Direction of Minimum Standard Deviation
+	Grid (optional output)
+  -NOISE_ABS:<str>	Estimated Noise (absolute)
+	Floating point
+  -NOISE_REL:<str>	Estimated Noise (relative)
+	Floating point
+  -WEIGHTED       	Weighted
+	Boolean
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] noise variance given as absolute value
+	[1] noise variance given relative to mean standard deviation
+	[2] original calculation (Ringeler)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_82.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_86.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_86.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_86.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_filter
+module name :	DTM Filter (slope-based)
+author      :	Volker Wichmann (c) 2010, LASERDATA GmbH
+_____________________________________________
+go...
+Usage: 7 -INPUT <str> [-RADIUS <num>] [-TERRAINSLOPE <str>] [-STDDEV] -GROUND <str> -NONGROUND <str>
+  -INPUT:<str>       	Grid to filter
+	Grid (input)
+  -RADIUS:<num>      	Search Radius
+	Integer
+	Minimum: 1.000000
+  -TERRAINSLOPE:<str>	Approx. Terrain Slope
+	Floating point
+	Minimum: 0.000000
+  -STDDEV            	Use Confidence Interval
+	Boolean
+  -GROUND:<str>      	Bare Earth
+	Grid (output)
+  -NONGROUND:<str>   	Removed Objects
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_filter_86.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_93.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_93.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_93.txt	(revision 369)
@@ -0,0 +1,45 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_gridding
+module name :	Modifed Quadratic Shepard
+author      :	Copyrights (c) 2003 by Andre Ringeler
+_____________________________________________
+go...
+Usage: 4 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-QUADRATIC_NEIGHBORS <num>] [-WEIGHTING_NEIGHBORS <num>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>             	Points
+	Shapes (input)
+  -FIELD:<str>              	Attribute
+	Table field
+  -TARGET:<str>             	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -QUADRATIC_NEIGHBORS:<num>	Quadratic Neighbors
+	Integer
+	Minimum: 5.000000
+  -WEIGHTING_NEIGHBORS:<num>	Weighting Neighbors
+	Integer
+	Minimum: 3.000000
+  -USER_XMIN:<str>          	Left
+	Floating point
+  -USER_XMAX:<str>          	Right
+	Floating point
+  -USER_YMIN:<str>          	Bottom
+	Floating point
+  -USER_YMAX:<str>          	Top
+	Floating point
+  -USER_SIZE:<str>          	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>          	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>          	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_gridding_93.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_340.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_340.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_340.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_calculus
+module name :	Cluster Analysis
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 6 -TABLE <str> -STATISTICS <str> [-METHOD <str>] [-NCLUSTER <num>] [-NORMALISE]
+  -TABLE:<str>     	Table
+	Table (input)
+  -STATISTICS:<str>	Statistics
+	Table (output)
+  -METHOD:<str>    	Method
+	Choice
+	Available Choices:
+	[0] Iterative Minimum Distance (Forgy 1965)
+	[1] Hill-Climbing (Rubin 1967)
+	[2] Combined Minimum Distance / Hillclimbing
+  -NCLUSTER:<num>  	Clusters
+	Integer
+	Minimum: 2.000000
+  -NORMALISE       	Normalise
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_calculus_340.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_290.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_290.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_290.txt	(revision 369)
@@ -0,0 +1,25 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_points
+module name :	Convex Hull
+author      :	O.Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 12 -SHAPES <str> -HULLS <str> [-POLYPOINTS <str>]
+  -SHAPES:<str>    	Points
+	Shapes (input)
+  -HULLS:<str>     	Convex Hull
+	Shapes (output)
+  -POLYPOINTS:<str>	Hull Construction
+	Choice
+	Available Choices:
+	[0] one hull for all shapes
+	[1] one hull per shape
+	[2] one hull per shape part

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_points_290.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_segmentation.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_segmentation.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_segmentation.txt	(revision 369)
@@ -0,0 +1,16 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Watershed Segmentation
+ 1	- Grid Skeletonization
+ 2	- Seed Generation
+ 3	- Simple Region Growing
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_segmentation.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_98.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_98.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_98.txt	(revision 369)
@@ -0,0 +1,49 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_spline
+module name :	Thin Plate Spline (TIN)
+author      :	(c) 2006 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-REGUL <str>] [-LEVEL <str>] [-FRAME] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
+  -SHAPES:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -TARGET:<str>   	Target Grid
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid
+  -REGUL:<str>    	Regularisation
+	Floating point
+  -LEVEL:<str>    	Neighbourhood
+	Choice
+	Available Choices:
+	[0] immediate
+	[1] level 1
+	[2] level 2
+  -FRAME          	Add Frame
+	Boolean
+  -USER_XMIN:<str>	Left
+	Floating point
+  -USER_XMAX:<str>	Right
+	Floating point
+  -USER_YMIN:<str>	Bottom
+	Floating point
+  -USER_YMAX:<str>	Top
+	Floating point
+  -USER_SIZE:<str>	Cellsize
+	Floating point
+	Minimum: 0.000000
+  -USER_GRID:<str>	Grid
+	Data Object (optional output)
+  -GRID_GRID:<str>	Grid
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_spline_98.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_260.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_260.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_260.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Add Grid Values to Shapes
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 1 -SHAPES <str> -GRIDS <str> [-RESULT <str>] [-INTERPOL <str>]
+  -SHAPES:<str>  	Shapes
+	Shapes (input)
+  -GRIDS:<str>   	Grids
+	Grid list (input)
+  -RESULT:<str>  	Result
+	Shapes (optional output)
+  -INTERPOL:<str>	Interpolation
+	Choice
+	Available Choices:
+	[0] Nearest Neighbor
+	[1] Bilinear Interpolation
+	[2] Inverse Distance Interpolation
+	[3] Bicubic Spline Interpolation
+	[4] B-Spline Interpolation

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_260.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_html.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_html.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_html.txt	(revision 369)
@@ -0,0 +1,13 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 1	- SVG Interactive Map
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_html.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_1.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_1.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_1.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Average With Thereshold 2
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 1 -INPUT <str> -RESULT <str> [-RX <num>] [-RY <num>] [-THRESH <str>]
+  -INPUT:<str> 	Input
+	Grid (input)
+  -RESULT:<str>	AWT Grid
+	Grid (output)
+  -RX:<num>    	Radius X
+	Integer
+	Minimum: 1.000000
+  -RY:<num>    	Radius Y
+	Integer
+	Minimum: 1.000000
+  -THRESH:<str>	Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_1.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_130.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_130.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_130.txt	(revision 369)
@@ -0,0 +1,101 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_visualisation
+module name :	RGB Composite
+author      :	(c) 2002 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -GRID_R <str> [-R_METHOD <str>] [-R_RANGE_MIN <str>] [-R_RANGE_MAX <str>] [-R_PERCTL_MIN <str>] [-R_PERCTL_MAX <str>] [-R_PERCENT <str>] -GRID_G <str> [-G_METHOD <str>] [-G_RANGE_MIN <str>] [-G_RANGE_MAX <str>] [-G_PERCTL_MIN <str>] [-G_PERCTL_MAX <str>] [-G_PERCENT <str>] -GRID_B <str> [-B_METHOD <str>] [-B_RANGE_MIN <str>] [-B_RANGE_MAX <str>] [-B_PERCTL_MIN <str>] [-B_PERCTL_MAX <str>] [-B_PERCENT <str>] [-GRID_A <str>] [-A_METHOD <str>] [-A_RANGE_MIN <str>] [-A_RANGE_MAX <str>] [-A_PERCTL_MIN <str>] [-A_PERCTL_MAX <str>] [-A_PERCENT <str>] -GRID_RGB <str>
+  -GRID_R:<str>      	Red
+	Grid (input)
+  -R_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 255
+	[1] Rescale to 0 - 255
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -R_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -R_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -R_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -R_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -R_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -GRID_G:<str>      	Green
+	Grid (input)
+  -G_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 255
+	[1] Rescale to 0 - 255
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -G_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -G_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -G_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -G_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -G_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -GRID_B:<str>      	Blue
+	Grid (input)
+  -B_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 255
+	[1] Rescale to 0 - 255
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -B_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -B_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -B_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -B_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -B_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -GRID_A:<str>      	Transparency
+	Grid (optional input)
+  -A_METHOD:<str>    	Value Preparation
+	Choice
+	Available Choices:
+	[0] 0 - 255
+	[1] Rescale to 0 - 255
+	[2] User defined rescale
+	[3] Percentiles
+	[4] Percentage of standard deviation
+  -A_RANGE_MIN:<str> 	Rescale Range
+	Value range
+  -A_RANGE_MAX:<str> 	Rescale Range
+	Value range
+  -A_PERCTL_MIN:<str>	Percentiles
+	Value range
+  -A_PERCTL_MAX:<str>	Percentiles
+	Value range
+  -A_PERCENT:<str>   	Percentage of standard deviation
+	Floating point
+	Minimum: 0.000000
+  -GRID_RGB:<str>    	Composite
+	Grid (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_visualisation_130.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_264.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_264.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_264.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Contour Lines from Grid
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 5 -INPUT <str> -CONTOUR <str> [-ZMIN <str>] [-ZMAX <str>] [-ZSTEP <str>]
+  -INPUT:<str>  	Grid
+	Grid (input)
+  -CONTOUR:<str>	Contour Lines
+	Shapes (output)
+  -ZMIN:<str>   	Minimum Contour Value
+	Floating point
+  -ZMAX:<str>   	Maximum Contour Value
+	Floating point
+  -ZSTEP:<str>  	Equidistance
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_264.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_371.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_371.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_371.txt	(revision 369)
@@ -0,0 +1,39 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_lighting
+module name :	Sky View Factor
+author      :	(c) 2008 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -DEM <str> -VISIBLE <str> -SVF <str> [-SIMPLE <str>] [-TERRAIN <str>] [-MAXRADIUS <str>] [-METHOD <str>] [-LEVEL_INC <str>] [-NDIRS <num>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -VISIBLE:<str>  	Visible Sky
+	Grid (output)
+  -SVF:<str>      	Sky View Factor
+	Grid (output)
+  -SIMPLE:<str>   	Sky View Factor (Simplified)
+	Grid (optional output)
+  -TERRAIN:<str>  	Terrain View Factor
+	Grid (optional output)
+  -MAXRADIUS:<str>	Maximum Search Radius
+	Floating point
+	Minimum: 0.000000
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] multi scale
+	[1] sectors
+  -LEVEL_INC:<str>	Multi Scale Factor
+	Floating point
+	Minimum: 1.250000
+  -NDIRS:<num>    	Number of Sectors
+	Integer
+	Minimum: 3.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_lighting_371.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_5.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_5.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_5.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	contrib_a_perego
+module name :	Destriping 1
+author      :	Alessandro Perego
+_____________________________________________
+go...
+Usage: 5 -INPUT <str> -RESULT3 <str> -RESULT1 <str> -RESULT2 <str> [-ANG <str>] [-R <str>] [-D <str>]
+  -INPUT:<str>  	Input
+	Grid (input)
+  -RESULT3:<str>	Destriped Grid
+	Grid (output)
+  -RESULT1:<str>	Low-pass 1
+	Grid (output)
+  -RESULT2:<str>	Low-pass 2
+	Grid (output)
+  -ANG:<str>    	Angle (in degrees)
+	Floating point
+  -R:<str>      	Radius
+	Floating point
+  -D:<str>      	Stripes distance
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_contrib_a_perego_5.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_268.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_268.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_268.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_grid
+module name :	Local Minima and Maxima
+author      :	(c) 2009 by O.Conrad
+_____________________________________________
+go...
+Usage: 9 -GRID <str> -MINIMA <str> -MAXIMA <str>
+  -GRID:<str>  	Grid
+	Grid (input)
+  -MINIMA:<str>	Minima
+	Shapes (output)
+  -MAXIMA:<str>	Maxima
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_grid_268.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_311.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_311.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_311.txt	(revision 369)
@@ -0,0 +1,26 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Split Shapes Layer Completely
+author      :	Victor Olaya (c) 2005
+_____________________________________________
+go...
+Usage: 9 -SHAPES <str> [-FIELD <str>] -LIST <str> [-NAMING <str>]
+  -SHAPES:<str>	Input
+	Shapes (input)
+  -FIELD:<str> 	Attribute
+	Table field
+  -LIST:<str>  	Output
+	Shapes list (output)
+  -NAMING:<str>	Name by...
+	Choice
+	Available Choices:
+	[0] number of order
+	[1] attribute

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_311.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_255.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_255.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_255.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	recreations_fractals
+module name :	Bifurcation
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 0 -TABLE <str> [-ITERATIONS <num>] [-NVALUES <num>] [-SEED <str>] [-RANGE_MIN <str>] [-RANGE_MAX <str>] [-STEP <num>]
+  -TABLE:<str>     	Output
+	Table (output)
+  -ITERATIONS:<num>	Value Count
+	Integer
+  -NVALUES:<num>   	Value Count
+	Integer
+  -SEED:<str>      	Seed Value
+	Floating point
+	Value Range: 0.000000 - 1.000000
+  -RANGE_MIN:<str> 	Range
+	Value range
+  -RANGE_MAX:<str> 	Range
+	Value range
+  -STEP:<num>      	Number of Steps
+	Integer
+	Minimum: 2.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_recreations_fractals_255.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_174.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_174.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_174.txt	(revision 369)
@@ -0,0 +1,24 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	ODBC Disconnect
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 1 [-SERVERS <str>] [-TRANSACT <str>]
+  -SERVERS:<str> 	Server
+	Choice
+	Available Choices:
+	[0] [not set]
+  -TRANSACT:<str>	Transactions
+	Choice
+	Available Choices:
+	[0] rollback
+	[1] commit

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_174.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_244.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_244.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_244.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Point Cloud Cutter
+ 2	- Point Cloud from Grid Points
+ 3	- Point Cloud from Shapes
+ 4	- Point Cloud to Grid
+ 5	- Point Cloud to Shapes
+ 6	- Point Cloud Reclassifier / Subset Extractor
+ 7	- Drop Point Cloud Attribute
+ 8	- Transform Point Cloud
+ 9	- Point Cloud Thinning (simple)
+ 10	- Point Cloud Attribute Calculator
+ 11	- Cluster Analysis for Point Clouds
+
+type -h or --help for further information
+
+error: cannot execute interactive module [1]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_244.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_315.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_315.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_315.txt	(revision 369)
@@ -0,0 +1,62 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Cut Shapes Layer
+author      :	O. Conrad (c) 2006
+_____________________________________________
+go...
+Usage: 13 -SHAPES <str> -CUT <str> [-EXTENT <str>] [-METHOD <str>] [-TARGET <str>] [-CUT_AX <str>] [-CUT_BX <str>] [-CUT_AY <str>] [-CUT_BY <str>] [-CUT_DX <str>] [-CUT_DY <str>] [-GRID_GRID_NX <num>] [-GRID_GRID_NY <num>] [-GRID_GRID_X <str>] [-GRID_GRID_Y <str>] [-GRID_GRID_D <str>] [-SHAPES_SHAPES <str>] [-POLYGONS_POLYGONS <str>]
+  -SHAPES:<str>           	Shapes
+	Shapes list (input)
+  -CUT:<str>              	Cut
+	Shapes list (output)
+  -EXTENT:<str>           	Extent
+	Shapes (optional output)
+  -METHOD:<str>           	Method
+	Choice
+	Available Choices:
+	[0] completely contained
+	[1] intersects
+	[2] center
+  -TARGET:<str>           	Extent
+	Choice
+	Available Choices:
+	[0] user defined
+	[1] grid project
+	[2] shapes layer extent
+	[3] polygons
+  -CUT_AX:<str>           	Left
+	Floating point
+  -CUT_BX:<str>           	Right
+	Floating point
+  -CUT_AY:<str>           	Bottom
+	Floating point
+  -CUT_BY:<str>           	Top
+	Floating point
+  -CUT_DX:<str>           	Horizontal Range
+	Floating point
+	Minimum: 0.000000
+  -CUT_DY:<str>           	Vertical Range
+	Floating point
+	Minimum: 0.000000
+  -GRID_GRID_NX:<num>     	Grid Project
+	Grid system
+  -GRID_GRID_NY:<num>     	Grid Project
+	Grid system
+  -GRID_GRID_X:<str>      	Grid Project
+	Grid system
+  -GRID_GRID_Y:<str>      	Grid Project
+	Grid system
+  -GRID_GRID_D:<str>      	Grid Project
+	Grid system
+  -SHAPES_SHAPES:<str>    	Shapes
+	Shapes (input)
+  -POLYGONS_POLYGONS:<str>	Polygons
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_315.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_178.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_178.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_178.txt	(revision 369)
@@ -0,0 +1,27 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_odbc
+module name :	Table Import
+author      :	O.Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 5 [-ODBC_DSN <str>] [-ODBC_USR <str>] [-ODBC_PWD <str>] -TABLE <str> [-TABLES <str>]
+  -ODBC_DSN:<str>	DSN
+	Text
+  -ODBC_USR:<str>	User
+	Text
+  -ODBC_PWD:<str>	Password
+	Text
+  -TABLE:<str>   	Table
+	Table (output)
+  -TABLES:<str>  	Tables
+	Choice
+	Available Choices:
+	[0] --- no table available ---

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_odbc_178.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_filter.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_filter.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_filter.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Simple Filter
+ 1	- Gaussian Filter
+ 2	- Laplacian Filter
+ 3	- Multi Direction Lee Filter
+ 4	- User Defined Filter
+ 5	- Filter Clumps
+ 6	- Majority Filter
+ 7	- DTM Filter (slope-based)
+ 8	- Morphological Filter
+ 9	- Rank Filter
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_filter.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_248.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_248.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_248.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pointcloud_tools
+module name :	Point Cloud to Shapes
+author      :	O.Conrad (c) 2009
+_____________________________________________
+go...
+Usage: 5 -POINTS <str> -SHAPES <str>
+  -POINTS:<str>	Points
+	Point Cloud (input)
+  -SHAPES:<str>	Shapes
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pointcloud_tools_248.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_52.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_52.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_52.txt	(revision 369)
@@ -0,0 +1,37 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Pattern Analysis
+author      :	Copyrights (c) 2004 by Victor Olaya
+_____________________________________________
+go...
+Usage: 8 -INPUT <str> -RELATIVE <str> -DIVERSITY <str> -DOMINANCE <str> -FRAGMENTATION <str> -NDC <str> -CVN <str> [-WINSIZE <str>] [-MAXNUMCLASS <num>]
+  -INPUT:<str>        	Input Grid
+	Grid (input)
+  -RELATIVE:<str>     	Relative Richness
+	Grid (output)
+  -DIVERSITY:<str>    	Diversity
+	Grid (output)
+  -DOMINANCE:<str>    	Dominance
+	Grid (output)
+  -FRAGMENTATION:<str>	Fragmentation
+	Grid (output)
+  -NDC:<str>          	Number of Different Classes
+	Grid (output)
+  -CVN:<str>          	Center Versus Neighbours
+	Grid (output)
+  -WINSIZE:<str>      	Size of Analysis Window
+	Choice
+	Available Choices:
+	[0] 3 X 3
+	[1] 5 X 5
+	[2] 7 X 7
+  -MAXNUMCLASS:<num>  	Max. Number of Classes
+	Integer

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_52.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_78.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_78.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_78.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_calculus_bsl
+module name :	BSL from File
+author      :	SAGA User Group Associaton (c) 2009
+_____________________________________________
+go...
+Usage: 1 [-OUTPUT <str>] [-BSL <str>] [-PROGRESS]
+  -OUTPUT:<str>	Output
+	Grid list (optional output)
+  -BSL:<str>   	BSL Script
+	File path
+  -PROGRESS    	Show Progress
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_calculus_bsl_78.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_319.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_319.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_319.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_tools
+module name :	Split Table/Shapes by Attribute
+author      :	O. Conrad (c) 2008
+_____________________________________________
+go...
+Usage: 17 -TABLE <str> [-FIELD <str>] [-CUTS <str>]
+  -TABLE:<str>	Table / Shapes
+	Table (input)
+  -FIELD:<str>	Attribute
+	Table field
+  -CUTS:<str> 	Cuts
+	Table list (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_tools_319.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_recreations_fractals.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_recreations_fractals.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_recreations_fractals.txt	(revision 369)
@@ -0,0 +1,16 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Bifurcation
+ 1	- Pythagoras' Tree
+ 3	- Fractal Dimension of Grid Surface
+ 5	- Gaussian Landscapes
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_recreations_fractals.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_344.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_344.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_344.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	table_tools
+module name :	Enumerate a Table
+author      :	
+_____________________________________________
+go...
+Usage: 2 -INPUT <str> [-FIELD <str>] [-OUTPUT <str>]
+  -INPUT:<str> 	Input
+	Table (input)
+  -FIELD:<str> 	Attribute
+	Table field
+  -OUTPUT:<str>	Output
+	Table (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_table_tools_344.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_143.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_143.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_143.txt	(revision 369)
@@ -0,0 +1,46 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	imagery_segmentation
+module name :	Watershed Segmentation
+author      :	O.Conrad (c) 2002
+_____________________________________________
+go...
+Usage: 0 -GRID <str> -SEGMENTS <str> -SEEDS <str> [-BORDERS <str>] [-OUTPUT <str>] [-DOWN <str>] [-JOIN <str>] [-THRESHOLD <str>] [-EDGE] [-BBORDERS]
+  -GRID:<str>     	Grid
+	Grid (input)
+  -SEGMENTS:<str> 	Segments
+	Grid (output)
+  -SEEDS:<str>    	Seed Points
+	Shapes (output)
+  -BORDERS:<str>  	Borders
+	Data Object (optional output)
+  -OUTPUT:<str>   	Output
+	Choice
+	Available Choices:
+	[0] Seed Value
+	[1] Segment ID
+  -DOWN:<str>     	Method
+	Choice
+	Available Choices:
+	[0] Minima
+	[1] Maxima
+  -JOIN:<str>     	Join Segments based on Threshold Value
+	Choice
+	Available Choices:
+	[0] do not join
+	[1] seed to saddle difference
+	[2] seeds difference
+  -THRESHOLD:<str>	Threshold
+	Floating point
+	Minimum: 0.000000
+  -EDGE           	Allow Edge Pixels to be Seeds
+	Boolean
+  -BBORDERS       	Borders
+	Boolean

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_imagery_segmentation_143.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_56.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_56.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_56.txt	(revision 369)
@@ -0,0 +1,21 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	grid_analysis
+module name :	Aggregation Index
+author      :	
+_____________________________________________
+go...
+Usage: 12 -INPUT <str> [-MAXNUMCLASS <num>] -RESULT <str>
+  -INPUT:<str>      	Input Grid
+	Grid (input)
+  -MAXNUMCLASS:<num>	Max. Number of Classes
+	Integer
+  -RESULT:<str>     	Result
+	Table (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_grid_analysis_56.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_327.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_327.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_327.txt	(revision 369)
@@ -0,0 +1,33 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	sim_ecosystems_hugget
+module name :	03: Spatially Distributed Simulation of Soil Nitrogen Dynamics
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -DEM <str> -NSTORE <str> [-TIME_SPAN <str>] [-TIME_STEP <str>] [-UPDATE] [-NINIT <str>] [-NRAIN <str>]
+  -DEM:<str>      	Elevation
+	Grid (input)
+  -NSTORE:<str>   	Soil Nitrogen
+	Grid (output)
+  -TIME_SPAN:<str>	Time Span [a]
+	Floating point
+	Minimum: 0.000000
+  -TIME_STEP:<str>	Time Interval [a]
+	Floating point
+	Minimum: 0.000000
+  -UPDATE         	Update View
+	Boolean
+  -NINIT:<str>    	Initial Nitrogen Content [kg/ha]
+	Floating point
+	Minimum: 0.000000
+  -NRAIN:<str>    	Nitrogen in Rainfall [kg/ha/a]
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_sim_ecosystems_hugget_327.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_135.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_135.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_135.txt	(revision 369)
@@ -0,0 +1,57 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ihacres
+module name :	IHACRES Version 1.0
+author      :	copyrights (c) 2008 Stefan Liersch
+_____________________________________________
+go...
+Usage: 1 -TABLE <str> [-DATE_Field <str>] [-DISCHARGE_Field <str>] [-PCP_Field <str>] [-TMP_Field <str>] [-USE_TMP] [-AREA <str>] [-CFAC <str>] [-TwFAC <str>] [-STORAGE <str>] [-IHACVERS <str>] [-SNOW_MODULE] [-WRITEALL_TS] [-TABLEout <str>] [-TABLEparms <str>] [-TABLEsettings <str>]
+  -TABLE:<str>          	Table
+	Table (input)
+  -DATE_Field:<str>     	Date Column
+	Table field
+  -DISCHARGE_Field:<str>	Streamflow Column
+	Table field
+  -PCP_Field:<str>      	Precipitation Column
+	Table field
+  -TMP_Field:<str>      	Temperature Column
+	Table field
+  -USE_TMP              	Using temperature data?
+	Boolean
+  -AREA:<str>           	Area of the Watershed in [km2]
+	Floating point
+	Minimum: 0.000010
+  -CFAC:<str>           	Parameter (c)
+	Floating point
+	Value Range: 0.000000 - 1.000000
+  -TwFAC:<str>          	(Tw) wetness decline time constant
+	Floating point
+	Value Range: 0.010000 - 150.000000
+  -STORAGE:<str>        	Storage
+	Choice
+	Available Choices:
+	[0] Single Storage
+	[1] Two Parallel Storages
+	[2] Two Storages in Series !!! not yet implemented !!!
+  -IHACVERS:<str>       	IHACRES Version
+	Choice
+	Available Choices:
+	[0] Jakeman & Hornberger (1993)
+	[1] Croke et al. (2005)
+  -SNOW_MODULE          	Using the snow-melt module?
+	Boolean
+  -WRITEALL_TS          	Write all calculated Time Series in a table?
+	Boolean
+  -TABLEout:<str>       	Table
+	Data Object (optional output)
+  -TABLEparms:<str>     	Table
+	Data Object (optional output)
+  -TABLEsettings:<str>  	Table
+	Data Object (optional output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ihacres_135.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_375.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_375.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_375.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Surface Specific Points
+author      :	(c) 2001 by O.Conrad
+_____________________________________________
+go...
+Usage: 3 -ELEVATION <str> -RESULT <str> [-METHOD <str>] [-THRESHOLD <str>]
+  -ELEVATION:<str>	Elevation
+	Grid (input)
+  -RESULT:<str>   	Result
+	Grid (output)
+  -METHOD:<str>   	Method
+	Choice
+	Available Choices:
+	[0] Mark Highest Neighbour
+	[1] Opposite Neighbours
+	[2] Flow Direction
+	[3] Flow Direction (up and down)
+	[4] Peucker & Douglas
+  -THRESHOLD:<str>	Threshold
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_375.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_272.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_272.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_272.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Convert Polygons to Lines
+author      :	O.Conrad (c) 2005
+_____________________________________________
+go...
+Usage: 0 -LINES <str> -POLYGONS <str>
+  -LINES:<str>   	Lines
+	Shapes (output)
+  -POLYGONS:<str>	Polygons
+	Shapes (input)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_272.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_garden_3d_viewer_12.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_garden_3d_viewer_12.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_garden_3d_viewer_12.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	garden_3d_viewer
+module name :	3D Shapes Viewer
+author      :	O. Conrad (c) 2011
+_____________________________________________
+go...
+Usage: 0 -SHAPES <str> [-COLOR <str>]
+  -SHAPES:<str>	Shapes
+	Shapes (input)
+  -COLOR:<str> 	Color
+	Table field

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_garden_3d_viewer_12.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_397.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_397.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_397.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 3	- Cross Profiles
+ 4	- Profiles from Lines
+ 5	- Profile from points
+
+type -h or --help for further information
+
+error: cannot execute interactive module [0]
+
+error: module

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_profiles_397.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_tools.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_tools.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_tools.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Create Empty Table
+ 1	- Rotate Table
+ 2	- Enumerate a Table
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_table_tools.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_188.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_188.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_188.txt	(revision 369)
@@ -0,0 +1,31 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_shapes
+module name :	Export Shapes to XYZ
+author      :	(c) 2003 by O.Conrad
+_____________________________________________
+go...
+Usage: 2 -SHAPES <str> [-FIELD <str>] [-ALL] [-HEADER] [-SEPARATE <str>] [-FILENAME <str>]
+  -SHAPES:<str>  	Shapes
+	Shapes (input)
+  -FIELD:<str>   	Attribute
+	Table field
+  -ALL           	Save All Attributes
+	Boolean
+  -HEADER        	Save Table Header
+	Boolean
+  -SEPARATE:<str>	Separate Line/Polygon Points
+	Choice
+	Available Choices:
+	[0] none
+	[1] *
+	[2] number of points
+  -FILENAME:<str>	File
+	File path

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_shapes_188.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_classification.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_classification.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_classification.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Supervised Classification
+ 1	- Cluster Analysis for Grids
+ 2	- Change Detection
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_imagery_classification.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_379.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_379.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_379.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	ta_morphometry
+module name :	Morphometric Protection Index
+author      :	(c) 2005 by Victor Olaya
+_____________________________________________
+go...
+Usage: 7 -DEM <str> -PROTECTION <str> [-RADIUS <str>]
+  -DEM:<str>       	Elevation
+	Grid (input)
+  -PROTECTION:<str>	Protection Index
+	Grid (output)
+  -RADIUS:<str>    	Radius
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_ta_morphometry_379.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_156.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_156.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_156.txt	(revision 369)
@@ -0,0 +1,71 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gps
+module name :	GPSBabel
+author      :	
+_____________________________________________
+go...
+Usage: 1 [-BASEPATH <str>] [-INPUT <str>] [-FORMATIN <str>] [-OUTPUT <str>] [-FORMATOUT <str>]
+  -BASEPATH:<str> 	GPSBabel path
+	File path
+  -INPUT:<str>    	Input file
+	File path
+  -FORMATIN:<str> 	Input format
+	Choice
+	Available Choices:
+	[0] Geocaching.com .loc
+	[1] GPSman
+	[2] GPX XML
+	[3] Magellan protocol
+	[4] Magellan Mapsend
+	[5] Garmin PCX5
+	[6] Garmin Mapsource
+	[7] gpsutil
+	[8] U.S. Census Bureau Tiger Mapping Service
+	[9] Comma separated values
+	[10] Delorme Topo USA4/XMap Conduit
+	[11] Navitrak DNA marker format
+	[12] MS PocketStreets 2002 Pushpin
+	[13] Cetus for Palm/OS
+	[14] GPSPilot Tracker for Palm/OS
+	[15] Magellan NAV Companion for PalmOS
+	[16] Garmin serial protocol
+	[17] MapTech Exchange Format
+	[18] Holux (gm-100) .wpo Format
+	[19] OziExplorer Waypoint
+	[20] National Geographic Topo .tpg
+	[21] TopoMapPro Places File
+  -OUTPUT:<str>   	Output file
+	File path
+  -FORMATOUT:<str>	Output format
+	Choice
+	Available Choices:
+	[0] Geocaching.com .loc
+	[1] GPSman
+	[2] GPX XML
+	[3] Magellan protocol
+	[4] Magellan Mapsend
+	[5] Garmin PCX5
+	[6] Garmin Mapsource
+	[7] gpsutil
+	[8] U.S. Census Bureau Tiger Mapping Service
+	[9] Comma separated values
+	[10] Delorme Topo USA4/XMap Conduit
+	[11] Navitrak DNA marker format
+	[12] MS PocketStreets 2002 Pushpin
+	[13] Cetus for Palm/OS
+	[14] GPSPilot Tracker for Palm/OS
+	[15] Magellan NAV Companion for PalmOS
+	[16] Garmin serial protocol
+	[17] MapTech Exchange Format
+	[18] Holux (gm-100) .wpo Format
+	[19] OziExplorer Waypoint
+	[20] National Geographic Topo .tpg
+	[21] TopoMapPro Places File

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gps_156.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_276.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_276.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_276.txt	(revision 369)
@@ -0,0 +1,22 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	shapes_lines
+module name :	Line Simplification
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 4 -LINES <str> [-OUTPUT <str>] [-TOLERANCE <str>]
+  -LINES:<str>    	Lines
+	Shapes (input)
+  -OUTPUT:<str>   	Simplified Lines
+	Shapes (optional output)
+  -TOLERANCE:<str>	Tolerance
+	Floating point
+	Minimum: 0.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_shapes_lines_276.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_213.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_213.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_213.txt	(revision 369)
@@ -0,0 +1,29 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	02: Pixel by pixel operations with two grids
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 1 -INPUT_A <str> -INPUT_B <str> -OUTPUT <str> [-METHOD <str>]
+  -INPUT_A:<str>	First input grid
+	Grid (input)
+  -INPUT_B:<str>	Second input grid
+	Grid (input)
+  -OUTPUT:<str> 	Output
+	Grid (output)
+  -METHOD:<str> 	Method
+	Choice
+	Available Choices:
+	[0] Addition
+	[1] 
+	[2] Subtraction
+	[3] Multiplication
+	[4] Division

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_213.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_232.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_232.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_232.txt	(revision 369)
@@ -0,0 +1,32 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Coordinate Transformation (Shapes)
+author      :	O. Conrad (c) 2010
+_____________________________________________
+go...
+Usage: 2 [-CRS_METHOD <str>] [-CRS_PROJ4 <str>] [-CRS_FILE <str>] [-CRS_EPSG <num>] -SOURCE <str> -TARGET <str>
+  -CRS_METHOD:<str>	Get CRS Definition from...
+	Choice
+	Available Choices:
+	[0] Proj4 Parameters
+	[1] EPSG Code
+	[2] Well Known Text File
+  -CRS_PROJ4:<str> 	Proj4 Parameters
+	Long text
+  -CRS_FILE:<str>  	Well Known Text File
+	File path
+  -CRS_EPSG:<num>  	EPSG Code
+	Integer
+	Value Range: 2000.000000 - 32766.000000
+  -SOURCE:<str>    	Source
+	Shapes (input)
+  -TARGET:<str>    	Target
+	Shapes (output)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_232.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_preprocessor.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_preprocessor.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_preprocessor.txt	(revision 369)
@@ -0,0 +1,19 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Flat Detection
+ 1	- Sink Drainage Route Detection
+ 2	- Sink Removal
+ 3	- Fill Sinks (Planchon/Darboux, 2001)
+ 4	- Fill Sinks (Wang & Liu)
+ 5	- Fill Sinks XXL (Wang & Liu)
+ 6	- Burn Stream Network into DEM
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_ta_preprocessor.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_217.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_217.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_217.txt	(revision 369)
@@ -0,0 +1,28 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	lectures_introduction
+module name :	06: Extended neighbourhoods
+author      :	Copyrights (c) 2003 by Olaf Conrad
+_____________________________________________
+go...
+Usage: 5 -INPUT <str> -OUTPUT <str> [-RADIUS <num>] [-METHOD <str>]
+  -INPUT:<str> 	Input grid
+	Grid (input)
+  -OUTPUT:<str>	Output grid
+	Grid (output)
+  -RADIUS:<num>	Radius
+	Integer
+	Minimum: 1.000000
+  -METHOD:<str>	Method
+	Choice
+	Available Choices:
+	[0] Quadratic
+	[1] Circle
+	[2] Distance Weighted (inverse distance)

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_lectures_introduction_217.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_236.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_236.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_236.txt	(revision 369)
@@ -0,0 +1,887 @@
+Usage: 6 [-SOURCE_PROJ_PROJ_TYPE <str>] [-SOURCE_PROJ_DATUM_DEF <str>] [-SOURCE_PROJ_DATUM <str>] [-SOURCE_PROJ_DATUM_GRID <str>] [-SOURCE_PROJ_ELLIPSOID <str>] [-SOURCE_PROJ_ELLPS_PREDEF <str>] [-SOURCE_PROJ_ELLPS_A <str>] [-SOURCE_PROJ_ELLPS_B <str>] [-SOURCE_PROJ_ELLPS_F <str>] [-SOURCE_PROJ_ELLPS_RF <str>] [-SOURCE_PROJ_ELLPS_E <str>] [-SOURCE_PROJ_ELLPS_ES <str>] [-SOURCE_PROJ_DATUM_SHIFT <str>] [-SOURCE_PROJ_DS_DX <str>] [-SOURCE_PROJ_DS_DY <str>] [-SOURCE_PROJ_DS_DZ <str>] [-SOURCE_PROJ_DS_RX <str>] [-SOURCE_PROJ_DS_RY <str>] [-SOURCE_PROJ_DS_RZ <str>] [-SOURCE_PROJ_DS_SC <str>] [-SOURCE_PROJ_LON_0 <str>] [-SOURCE_PROJ_LAT_0 <str>] [-SOURCE_PROJ_X_0 <str>] [-SOURCE_PROJ_Y_0 <str>] [-SOURCE_PROJ_K_0 <str>] [-SOURCE_PROJ_UNIT <str>] [-TARGET_PROJ_PROJ_TYPE <str>] [-TARGET_PROJ_DATUM_DEF <str>] [-TARGET_PROJ_DATUM <str>] [-TARGET_PROJ_DATUM_GRID <str>] [-TARGET_PROJ_ELLIPSOID <str>] [-TARGET_PROJ_ELLPS_PREDEF <str>] [-TARGET_PROJ_ELLPS_A <str>] [-TARGET_PROJ_ELLPS_B <str>] [-TARGET_PROJ_ELLPS_F <str>] [-TARGET_PROJ_ELLPS_RF <str>] [-TARGET_PROJ_ELLPS_E <str>] [-TARGET_PROJ_ELLPS_ES <str>] [-TARGET_PROJ_DATUM_SHIFT <str>] [-TARGET_PROJ_DS_DX <str>] [-TARGET_PROJ_DS_DY <str>] [-TARGET_PROJ_DS_DZ <str>] [-TARGET_PROJ_DS_RX <str>] [-TARGET_PROJ_DS_RY <str>] [-TARGET_PROJ_DS_RZ <str>] [-TARGET_PROJ_DS_SC <str>] [-TARGET_PROJ_LON_0 <str>] [-TARGET_PROJ_LAT_0 <str>] [-TARGET_PROJ_X_0 <str>] [-TARGET_PROJ_Y_0 <str>] [-TARGET_PROJ_K_0 <str>] [-TARGET_PROJ_UNIT <str>] -SOURCE <str> -TARGET <str> [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>] [-aea_lat_1 <str>] [-aea_lat_2 <str>] [-aeqd_guam] [-airy_lat_b <str>] [-airy_no_cut] [-bonne_lat_1 <str>] [-cea_lat_ts <str>] [-chamb_lat_1 <str>] [-chamb_lon_1 <str>] [-chamb_lat_2 <str>] [-chamb_lon_2 <str>] [-chamb_lat_3 <str>] [-chamb_lon_3 <str>] [-eqc_lat_ts <str>] [-eqdc_lat_1 <str>] [-eqdc_lat_2 <str>] [-euler_lat_1 <str>] [-euler_lat_2 <str>] [-gn_sinu_m <str>] [-gn_sinu_n <str>] [-hammer_W <str>] [-hammer_M <str>] [-imw_p_lat_1 <str>] [-imw_p_lat_2 <str>] [-labrd_azi <str>] [-lagrng_lat_1 <str>] [-lagrng_W <str>] [-lcc_lat_1 <str>] [-lcc_lat_2 <str>] [-leac_lat_1 <str>] [-leac_south] [-lsat_lsat <num>] [-lsat_path <num>] [-merc_lat_ts <str>] [-murd1_lat_1 <str>] [-murd1_lat_2 <str>] [-murd2_lat_1 <str>] [-murd2_lat_2 <str>] [-murd3_lat_1 <str>] [-murd3_lat_2 <str>] [-nsper_h <str>] [-ob_tran_o_lat_p <str>] [-ob_tran_o_lon_p <str>] [-ocea_lat_1 <str>] [-ocea_lon_1 <str>] [-ocea_lat_2 <str>] [-ocea_lon_2 <str>] [-oea_m <str>] [-oea_n <str>] [-oea_theta <str>] [-omerc_lat_1 <str>] [-omerc_lon_1 <str>] [-omerc_lat_2 <str>] [-omerc_lon_2 <str>] [-pconic_lat_1 <str>] [-pconic_lat_2 <str>] [-rpoly_lat_ts <str>] [-stere_lat_ts <str>] [-tissot_lat_1 <str>] [-tissot_lat_2 <str>] [-tpeqd_lat_1 <str>] [-tpeqd_lon_1 <str>] [-tpeqd_lat_2 <str>] [-tpeqd_lon_2 <str>] [-tpers_tilt <str>] [-tpers_azi <str>] [-tpers_h <str>] [-ups_south] [-urm5_n <str>] [-urm5_q <str>] [-urm5_alphi <str>] [-urmfps_n <str>] [-utm_zone <num>] [-utm_south] [-vitk1_lat_1 <str>] [-vitk1_lat_2 <str>] [-wag3_lat_ts <str>] [-wink1_lat_ts <str>] [-wink2_lat_1 <str>] [-wintri_lat_1 <str>]
+  -SOURCE_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -SOURCE_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -SOURCE_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -SOURCE_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -SOURCE_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -SOURCE_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -SOURCE_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -SOURCE_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -SOURCE_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -SOURCE_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -SOURCE_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -SOURCE_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -SOURCE_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -SOURCE_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -SOURCE_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -SOURCE_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -SOURCE_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -SOURCE_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -SOURCE_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -SOURCE_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -SOURCE_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -SOURCE_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -SOURCE_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -SOURCE_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -SOURCE_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -SOURCE_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -TARGET_PROJ_PROJ_TYPE:<str>   	Projection Type
+	Choice
+	Available Choices:
+	[0] Albers Equal Area
+	[1] Azimuthal Equidistant
+	[2] Airy
+	[3] Aitoff
+	[4] Mod. Stererographics of Alaska
+	[5] Apian Globular I
+	[6] August Epicycloidal
+	[7] Bacon Globular
+	[8] Bipolar conic of western hemisphere
+	[9] Boggs Eumorphic
+	[10] Bonne (Werner lat_1=90)
+	[11] Cassini
+	[12] Central Cylindrical
+	[13] Equal Area Cylindrical
+	[14] Chamberlin Trimetric
+	[15] Collignon
+	[16] Craster Parabolic (Putnins P4)
+	[17] Denoyer Semi-Elliptical
+	[18] Eckert I
+	[19] Eckert II
+	[20] Eckert III
+	[21] Eckert IV
+	[22] Eckert V
+	[23] Eckert VI
+	[24] Equidistant Cylindrical (Plate Caree)
+	[25] Equidistant Conic
+	[26] Euler
+	[27] Fahey
+	[28] Foucaut
+	[29] Foucaut Sinusoidal
+	[30] Gall (Gall Stereographic)
+	[31] Geocentric
+	[32] Geostationary Satellite View
+	[33] Ginsburg VIII (TsNIIGAiK)
+	[34] General Sinusoidal Series
+	[35] Gnomonic
+	[36] Goode Homolosine
+	[37] Mod. Stererographics of 48 U.S.
+	[38] Mod. Stererographics of 50 U.S.
+	[39] Hammer & Eckert-Greifendorff
+	[40] Hatano Asymmetrical Equal Area
+	[41] International Map of the World Polyconic
+	[42] Kavraisky V
+	[43] Kavraisky VII
+	[44] Krovak
+	[45] Laborde
+	[46] Lambert Azimuthal Equal Area
+	[47] Lagrange
+	[48] Larrivee
+	[49] Laskowski
+	[50] Lat/long (Geodetic)
+	[51] Lat/long (Geodetic alias)
+	[52] Lat/long (Geodetic alias)
+	[53] Lat/long (Geodetic alias)
+	[54] Lambert Conformal Conic
+	[55] Lambert Conformal Conic Alternative
+	[56] Lambert Equal Area Conic
+	[57] Lee Oblated Stereographic
+	[58] Loximuthal
+	[59] Space oblique for LANDSAT
+	[60] McBryde-Thomas Flat-Polar Sine (No. 1)
+	[61] McBryde-Thomas Flat-Pole Sine (No. 2)
+	[62] McBride-Thomas Flat-Polar Parabolic
+	[63] McBryde-Thomas Flat-Polar Quartic
+	[64] McBryde-Thomas Flat-Polar Sinusoidal
+	[65] Mercator
+	[66] Miller Oblated Stereographic
+	[67] Miller Cylindrical
+	[68] Mollweide
+	[69] Murdoch I
+	[70] Murdoch II
+	[71] Murdoch III
+	[72] Nell
+	[73] Nell-Hammer
+	[74] Nicolosi Globular
+	[75] Near-sided perspective
+	[76] New Zealand Map Grid
+	[77] General Oblique Transformation
+	[78] Oblique Cylindrical Equal Area
+	[79] Oblated Equal Area
+	[80] Oblique Mercator
+	[81] Ortelius Oval
+	[82] Orthographic
+	[83] Perspective Conic
+	[84] Polyconic (American)
+	[85] Putnins P1
+	[86] Putnins P2
+	[87] Putnins P3
+	[88] Putnins P3'
+	[89] Putnins P4'
+	[90] Putnins P5
+	[91] Putnins P5'
+	[92] Putnins P6
+	[93] Putnins P6'
+	[94] Quartic Authalic
+	[95] Robinson
+	[96] Roussilhe Stereographic
+	[97] Rectangular Polyconic
+	[98] Sinusoidal (Sanson-Flamsteed)
+	[99] Swiss. Obl. Mercator
+	[100] Stereographic
+	[101] Oblique Stereographic Alternative
+	[102] Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	[103] Transverse Central Cylindrical
+	[104] Transverse Cylindrical Equal Area
+	[105] Tissot
+	[106] Transverse Mercator
+	[107] Two Point Equidistant
+	[108] Tilted perspective
+	[109] Universal Polar Stereographic
+	[110] Urmaev V
+	[111] Urmaev Flat-Polar Sinusoidal
+	[112] Universal Transverse Mercator (UTM)
+	[113] van der Grinten (I)
+	[114] van der Grinten II
+	[115] van der Grinten III
+	[116] van der Grinten IV
+	[117] Vitkovsky I
+	[118] Wagner I (Kavraisky VI)
+	[119] Wagner II
+	[120] Wagner III
+	[121] Wagner IV
+	[122] Wagner V
+	[123] Wagner VI
+	[124] Wagner VII
+	[125] Werenskiold I
+	[126] Winkel I
+	[127] Winkel II
+	[128] Winkel Tripel
+  -TARGET_PROJ_DATUM_DEF:<str>   	Datum Definition
+	Choice
+	Available Choices:
+	[0] Predefined Datum
+	[1] User Defined Datum
+  -TARGET_PROJ_DATUM:<str>       	Predefined Datum
+	Choice
+	Available Choices:
+	[0] [WGS84]
+	[1] [GGRS87] Greek_Geodetic_Reference_System_1987
+	[2] [NAD83] North_American_Datum_1983
+	[3] [NAD27] North_American_Datum_1927
+	[4] [potsdam] Potsdam Rauenberg 1950 DHDN
+	[5] [carthage] Carthage 1934 Tunisia
+	[6] [hermannskogel] Hermannskogel
+	[7] [ire65] Ireland 1965
+	[8] [nzgd49] New Zealand Geodetic Datum 1949
+	[9] [OSGB36] Airy 1830
+  -TARGET_PROJ_DATUM_GRID:<str>  	Datum Shift Grid File
+	File path
+  -TARGET_PROJ_ELLIPSOID:<str>   	Ellipsoid Definition
+	Choice
+	Available Choices:
+	[0] Predefined Standard Ellipsoids
+	[1] Semimajor Axis and Semiminor Axis
+	[2] Semimajor Axis and Flattening
+	[3] Semimajor Axis and Reciprocal Flattening
+	[4] Semimajor Axis and Eccentricity
+	[5] Semimajor Axis and Eccentricity Squared
+  -TARGET_PROJ_ELLPS_PREDEF:<str>	Predefined Standard Ellipsoids
+	Choice
+	Available Choices:
+	[0] [MERIT] MERIT 1983 (a=6378137.0, rf=298.257)
+	[1] [SGS85] Soviet Geodetic System 85 (a=6378136.0, rf=298.257)
+	[2] [GRS80] GRS 1980(IUGG, 1980) (a=6378137.0, rf=298.257222101)
+	[3] [IAU76] IAU 1976 (a=6378140.0, rf=298.257)
+	[4] [airy] Airy 1830 (a=6377563.396, b=6356256.910)
+	[5] [APL4.9] Appl. Physics. 1965 (a=6378137.0., rf=298.25)
+	[6] [NWL9D] Naval Weapons Lab., 1965 (a=6378145.0., rf=298.25)
+	[7] [mod_airy] Modified Airy (a=6377340.189, b=6356034.446)
+	[8] [andrae] Andrae 1876 (Den., Iclnd.) (a=6377104.43, rf=300.0)
+	[9] [aust_SA] Australian Natl & S. Amer. 1969 (a=6378160.0, rf=298.25)
+	[10] [GRS67] GRS 67(IUGG 1967) (a=6378160.0, rf=298.2471674270)
+	[11] [bessel] Bessel 1841 (a=6377397.155, rf=299.1528128)
+	[12] [bess_nam] Bessel 1841 (Namibia) (a=6377483.865, rf=299.1528128)
+	[13] [clrk66] Clarke 1866 (a=6378206.4, b=6356583.8)
+	[14] [clrk80] Clarke 1880 mod. (a=6378249.145, rf=293.4663)
+	[15] [CPM] Comm. des Poids et Mesures 1799 (a=6375738.7, rf=334.29)
+	[16] [delmbr] Delambre 1810 (Belgium) (a=6376428., rf=311.5)
+	[17] [engelis] Engelis 1985 (a=6378136.05, rf=298.2566)
+	[18] [evrst30] Everest 1830 (a=6377276.345, rf=300.8017)
+	[19] [evrst48] Everest 1948 (a=6377304.063, rf=300.8017)
+	[20] [evrst56] Everest 1956 (a=6377301.243, rf=300.8017)
+	[21] [evrst69] Everest 1969 (a=6377295.664, rf=300.8017)
+	[22] [evrstSS] Everest (Sabah & Sarawak) (a=6377298.556, rf=300.8017)
+	[23] [fschr60] Fischer (Mercury Datum) 1960 (a=6378166., rf=298.3)
+	[24] [fschr60m] Modified Fischer 1960 (a=6378155., rf=298.3)
+	[25] [fschr68] Fischer 1968 (a=6378150., rf=298.3)
+	[26] [helmert] Helmert 1906 (a=6378200., rf=298.3)
+	[27] [hough] Hough (a=6378270.0, rf=297.)
+	[28] [intl] International 1909 (Hayford) (a=6378388.0, rf=297.)
+	[29] [krass] Krassovsky, 1942 (a=6378245.0, rf=298.3)
+	[30] [kaula] Kaula 1961 (a=6378163., rf=298.24)
+	[31] [lerch] Lerch 1979 (a=6378139., rf=298.257)
+	[32] [mprts] Maupertius 1738 (a=6397300., rf=191.)
+	[33] [new_intl] New International 1967 (a=6378157.5, b=6356772.2)
+	[34] [plessis] Plessis 1817 (France) (a=6376523., b=6355863.)
+	[35] [SEasia] Southeast Asia (a=6378155.0, b=6356773.3205)
+	[36] [walbeck] Walbeck (a=6376896.0, b=6355834.8467)
+	[37] [WGS60] WGS 60 (a=6378165.0, rf=298.3)
+	[38] [WGS66] WGS 66 (a=6378145.0, rf=298.25)
+	[39] [WGS72] WGS 72 (a=6378135.0, rf=298.26)
+	[40] [WGS84] WGS 84 (a=6378137.0, rf=298.257223563)
+	[41] [sphere] Normal Sphere (r=6370997) (a=6370997.0, b=6370997.0)
+  -TARGET_PROJ_ELLPS_A:<str>     	Semimajor Axis (a)
+	Floating point
+  -TARGET_PROJ_ELLPS_B:<str>     	Semiminor Axis (b)
+	Floating point
+  -TARGET_PROJ_ELLPS_F:<str>     	Flattening (f)
+	Floating point
+  -TARGET_PROJ_ELLPS_RF:<str>    	Reciprocal Flattening (rf)
+	Floating point
+  -TARGET_PROJ_ELLPS_E:<str>     	Eccentricity (e)
+	Floating point
+  -TARGET_PROJ_ELLPS_ES:<str>    	Squared Eccentricity (es)
+	Floating point
+  -TARGET_PROJ_DATUM_SHIFT:<str> 	Datum Shift
+	Choice
+	Available Choices:
+	[0] none
+	[1] 3 parameters (translation only)
+	[2] 7 parameters
+	[3] Datum Shift Grid
+  -TARGET_PROJ_DS_DX:<str>       	Translation X
+	Floating point
+  -TARGET_PROJ_DS_DY:<str>       	Translation Y
+	Floating point
+  -TARGET_PROJ_DS_DZ:<str>       	Translation Z
+	Floating point
+  -TARGET_PROJ_DS_RX:<str>       	Rotation X
+	Floating point
+  -TARGET_PROJ_DS_RY:<str>       	Rotation Y
+	Floating point
+  -TARGET_PROJ_DS_RZ:<str>       	Rotation Z
+	Floating point
+  -TARGET_PROJ_DS_SC:<str>       	Scaling
+	Floating point
+  -TARGET_PROJ_LON_0:<str>       	Central Meridian
+	Floating point
+  -TARGET_PROJ_LAT_0:<str>       	Central Parallel
+	Floating point
+  -TARGET_PROJ_X_0:<str>         	False Easting
+	Floating point
+  -TARGET_PROJ_Y_0:<str>         	False Northing
+	Floating point
+  -TARGET_PROJ_K_0:<str>         	Scale Factor
+	Floating point
+	Minimum: 0.000000
+  -TARGET_PROJ_UNIT:<str>        	Unit
+	Choice
+	Available Choices:
+	[0] Kilometer (1000.)
+	[1] Meter (1.)
+	[2] Decimeter (1/10)
+	[3] Centimeter (1/100)
+	[4] Millimeter (1/1000)
+	[5] International Nautical Mile (1852.0)
+	[6] International Inch (0.0254)
+	[7] International Foot (0.3048)
+	[8] International Yard (0.9144)
+	[9] International Statute Mile (1609.344)
+	[10] International Fathom (1.8288)
+	[11] International Chain (20.1168)
+	[12] International Link (0.201168)
+	[13] U.S. Surveyor's Inch (1./39.37)
+	[14] U.S. Surveyor's Foot (0.304800609601219)
+	[15] U.S. Surveyor's Yard (0.914401828803658)
+	[16] U.S. Surveyor's Chain (20.11684023368047)
+	[17] U.S. Surveyor's Statute Mile (1609.347218694437)
+	[18] Indian Yard (0.91439523)
+	[19] Indian Foot (0.30479841)
+	[20] Indian Chain (20.11669506)
+  -SOURCE:<str>                  	Source
+	Shapes (input)
+  -TARGET:<str>                  	Target
+	Shapes (output)
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>               	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point
+  -aea_lat_1:<str>               	Latitude 1
+	Floating point
+  -aea_lat_2:<str>               	Latitude 2
+	Floating point
+  -aeqd_guam                     	guam
+	Boolean
+  -airy_lat_b:<str>              	Latitude B
+	Floating point
+  -airy_no_cut                   	No Cut
+	Boolean
+  -bonne_lat_1:<str>             	Latitude 1
+	Floating point
+  -cea_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -chamb_lat_1:<str>             	Latitude 1
+	Floating point
+  -chamb_lon_1:<str>             	Longitude 1
+	Floating point
+  -chamb_lat_2:<str>             	Latitude 2
+	Floating point
+  -chamb_lon_2:<str>             	Longitude 2
+	Floating point
+  -chamb_lat_3:<str>             	Latitude 3
+	Floating point
+  -chamb_lon_3:<str>             	Longitude 3
+	Floating point
+  -eqc_lat_ts:<str>              	True Scale Latitude
+	Floating point
+  -eqdc_lat_1:<str>              	Latitude 1
+	Floating point
+  -eqdc_lat_2:<str>              	Latitude 2
+	Floating point
+  -euler_lat_1:<str>             	Latitude 1
+	Floating point
+  -euler_lat_2:<str>             	Latitude 2
+	Floating point
+  -gn_sinu_m:<str>   _____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	pj_proj4
+module name :	Proj.4 (Dialog, Shapes)
+author      :	O. Conrad (c) 2004-8
+_____________________________________________
+go...
+            	m
+	Floating point
+  -gn_sinu_n:<str>               	n
+	Floating point
+  -hammer_W:<str>                	W
+	Floating point
+  -hammer_M:<str>                	M
+	Floating point
+  -imw_p_lat_1:<str>             	Latitude 1
+	Floating point
+  -imw_p_lat_2:<str>             	Latitude 2
+	Floating point
+  -labrd_azi:<str>               	Azimuth
+	Floating point
+  -lagrng_lat_1:<str>            	Latitude 1
+	Floating point
+  -lagrng_W:<str>                	W
+	Floating point
+  -lcc_lat_1:<str>               	Latitude 1
+	Floating point
+  -lcc_lat_2:<str>               	Latitude 2
+	Floating point
+  -leac_lat_1:<str>              	Latitude 1
+	Floating point
+  -leac_south                    	South
+	Boolean
+  -lsat_lsat:<num>               	Landsat
+	Integer
+  -lsat_path:<num>               	Path
+	Integer
+  -merc_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -murd1_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd1_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd2_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd2_lat_2:<str>             	Latitude 2
+	Floating point
+  -murd3_lat_1:<str>             	Latitude 1
+	Floating point
+  -murd3_lat_2:<str>             	Latitude 2
+	Floating point
+  -nsper_h:<str>                 	Height of view point
+	Floating point
+  -ob_tran_o_lat_p:<str>         	Latitude Pole
+	Floating point
+  -ob_tran_o_lon_p:<str>         	Longitude Pole
+	Floating point
+  -ocea_lat_1:<str>              	Latitude 1
+	Floating point
+  -ocea_lon_1:<str>              	Longitude 1
+	Floating point
+  -ocea_lat_2:<str>              	Latitude 2
+	Floating point
+  -ocea_lon_2:<str>              	Longitude 2
+	Floating point
+  -oea_m:<str>                   	m
+	Floating point
+  -oea_n:<str>                   	n
+	Floating point
+  -oea_theta:<str>               	theta
+	Floating point
+  -omerc_lat_1:<str>             	Latitude 1
+	Floating point
+  -omerc_lon_1:<str>             	Longitude 1
+	Floating point
+  -omerc_lat_2:<str>             	Latitude 2
+	Floating point
+  -omerc_lon_2:<str>             	Longitude 2
+	Floating point
+  -pconic_lat_1:<str>            	Latitude 1
+	Floating point
+  -pconic_lat_2:<str>            	Latitude 2
+	Floating point
+  -rpoly_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -stere_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -tissot_lat_1:<str>            	Latitude 1
+	Floating point
+  -tissot_lat_2:<str>            	Latitude 2
+	Floating point
+  -tpeqd_lat_1:<str>             	Latitude 1
+	Floating point
+  -tpeqd_lon_1:<str>             	Longitude 1
+	Floating point
+  -tpeqd_lat_2:<str>             	Latitude 2
+	Floating point
+  -tpeqd_lon_2:<str>             	Longitude 2
+	Floating point
+  -tpers_tilt:<str>              	Tilt
+	Floating point
+  -tpers_azi:<str>               	Azimuth
+	Floating point
+  -tpers_h:<str>                 	h
+	Floating point
+  -ups_south                     	South
+	Boolean
+  -urm5_n:<str>                  	n
+	Floating point
+  -urm5_q:<str>                  	q
+	Floating point
+  -urm5_alphi:<str>              	alphi
+	Floating point
+  -urmfps_n:<str>                	n
+	Floating point
+  -utm_zone:<num>                	Zone
+	Integer
+  -utm_south                     	South
+	Boolean
+  -vitk1_lat_1:<str>             	Latitude 1
+	Floating point
+  -vitk1_lat_2:<str>             	Latitude 2
+	Floating point
+  -wag3_lat_ts:<str>             	True Scale Latitude
+	Floating point
+  -wink1_lat_ts:<str>            	True Scale Latitude
+	Floating point
+  -wink2_lat_1:<str>             	Latitude 1
+	Floating point
+  -wintri_lat_1:<str>            	Latitude 1
+	Floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_pj_proj4_236.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Grid Normalisation
+ 1	- Grid Calculator
+ 2	- Grid Volume
+ 3	- Grid Difference
+ 4	- Function
+ 5	- Geometric Figures
+ 6	- Random Terrain Generation
+ 7	- Random Field
+ 8	- Grids Sum
+ 9	- Grids Product
+ 10	- Grid Standardisation
+ 11	- Fuzzify
+ 12	- Fuzzy Intersection (AND)
+ 13	- Fuzzy Union (OR)
+ 14	- Metric Conversions
+ 15	- Gradient Vector from Cartesian to Polar Coordinates
+ 16	- Gradient Vector from Polar to Cartesian Coordinates
+ 17	- Polynomial Trend from Grids
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_grid_calculus.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_151.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_151.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_151.txt	(revision 369)
@@ -0,0 +1,62 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	io_gdal
+module name :	GDAL: Export Raster
+author      :	O.Conrad (c) 2007
+_____________________________________________
+go...
+Usage: 1 -GRIDS <str> [-FILE <str>] [-FORMAT <str>] [-TYPE <str>]
+  -GRIDS:<str> 	Grid(s)
+	Grid list (input)
+  -FILE:<str>  	File
+	File path
+  -FORMAT:<str>	Format
+	Choice
+	Available Choices:
+	[0] Virtual Raster
+	[1] GeoTIFF
+	[2] National Imagery Transmission Format
+	[3] Erdas Imagine Images (.img)
+	[4] ELAS
+	[5] In Memory Raster
+	[6] MS Windows Device Independent Bitmap
+	[7] PCIDSK Database File
+	[8] ILWIS Raster Map
+	[9] SGI Image File Format 1.0
+	[10] Leveller heightfield
+	[11] Terragen heightfield
+	[12] ERMapper .ers Labelled
+	[13] Raster Matrix Format
+	[14] Idrisi Raster A.1
+	[15] Intergraph Raster
+	[16] Golden Software Binary Grid (.grd)
+	[17] Portable Pixmap Format (netpbm)
+	[18] ENVI .hdr Labelled
+	[19] ESRI .hdr Labelled
+	[20] PCI .aux Labelled
+	[21] Vexcel MFF Raster
+	[22] Vexcel MFF2 (HKV) Raster
+	[23] VTP .bt (Binary Terrain) 1.3 Format
+	[24] Image Data and Analysis
+	[25] NOAA Vertical Datum .GTX
+	[26] NTv2 Datum Grid Shift
+	[27] ARC Digitized Raster Graphics
+	[28] SAGA GIS Binary Grid (.sdat)
+  -TYPE:<str>  	Data Type
+	Choice
+	Available Choices:
+	[0] match input data
+	[1] 8 bit unsigned integer
+	[2] 16 bit unsigned integer
+	[3] 16 bit signed integer
+	[4] 32 bit unsigned integer
+	[5] 32 bit signed integer
+	[6] 32 bit floating point
+	[7] 64 bit floating point

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_io_gdal_151.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_points.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_points.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_points.txt	(revision 369)
@@ -0,0 +1,17 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Variogram
+ 1	- Variogram Cloud
+ 2	- Variogram Surface
+ 3	- Minimum Distance Analysis
+ 4	- Spatial Point Pattern Analysis
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_geostatistics_points.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_pdf.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_pdf.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_pdf.txt	(revision 369)
@@ -0,0 +1,15 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+
+executable modules:
+ 0	- Shapes Report
+ 1	- Shapes Summary Report
+ 2	- Terrain Path Cross Sections
+
+type -h or --help for further information

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/lib_docs_pdf.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_32.txt
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_32.txt	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_32.txt	(revision 369)
@@ -0,0 +1,30 @@
+_____________________________________________
+  #####   ##   #####    ##
+ ###     ###  ##       ###
+  ###   # ## ##  #### # ##
+   ### ##### ##    # #####
+##### #   ##  ##### #   ##
+_____________________________________________
+
+library path:	D:\projects\sextante\workspaces\gvsig_1_11\_fwAndami\gvSIG\extensiones\es.unex.sextante\saga\modules
+library name:	geostatistics_points
+module name :	Variogram
+author      :	O.Conrad (c) 2003
+_____________________________________________
+go...
+Usage: 0 -POINTS <str> [-FIELD <str>] -RESULT <str> [-DISTCOUNT <num>] [-DISTMAX <str>] [-NSKIP <num>]
+  -POINTS:<str>   	Points
+	Shapes (input)
+  -FIELD:<str>    	Attribute
+	Table field
+  -RESULT:<str>   	Sample Variogram
+	Table (output)
+  -DISTCOUNT:<num>	Initial Number of Distance Classes
+	Integer
+	Minimum: 1.000000
+  -DISTMAX:<str>  	Maximum Distance
+	Floating point
+	Minimum: 0.000000
+  -NSKIP:<num>    	Skip Number
+	Integer
+	Minimum: 1.000000

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/saga/description/alg_geostatistics_points_32.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gdal.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gdal.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gdal.xml	(revision 369)
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.gdal">
+	<description>
+		Exports GRASS raster maps into GDAL supported formats.
+	</description>
+	<keywords>
+		r�ster, exportar
+	</keywords>
+	<parameter name="input" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster (o grupo) a exportar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Formato GIS a escribir (sensible a may�sculas, ver tambi�n la opci�n -l)
+		</description>
+		<default>
+			GTiff
+		</default>
+		<values>
+			<value>
+				<name>VRT</name>
+			</value>
+			<value>
+				<name>GTiff</name>
+			</value>
+			<value>
+				<name>NITF</name>
+			</value>
+			<value>
+				<name>HFA</name>
+			</value>
+			<value>
+				<name>ELAS</name>
+			</value>
+			<value>
+				<name>AAIGrid</name>
+			</value>
+			<value>
+				<name>DTED</name>
+			</value>
+			<value>
+				<name>PNG</name>
+			</value>
+			<value>
+				<name>JPEG</name>
+			</value>
+			<value>
+				<name>MEM</name>
+			</value>
+			<value>
+				<name>GIF</name>
+			</value>
+			<value>
+				<name>XPM</name>
+			</value>
+			<value>
+				<name>BMP</name>
+			</value>
+			<value>
+				<name>PCIDSK</name>
+			</value>
+			<value>
+				<name>PCRaster</name>
+			</value>
+			<value>
+				<name>ILWIS</name>
+			</value>
+			<value>
+				<name>SGI</name>
+			</value>
+			<value>
+				<name>SRTMHGT</name>
+			</value>
+			<value>
+				<name>Leveller</name>
+			</value>
+			<value>
+				<name>Terragen</name>
+			</value>
+			<value>
+				<name>ERS</name>
+			</value>
+			<value>
+				<name>FIT</name>
+			</value>
+			<value>
+				<name>RMF</name>
+			</value>
+			<value>
+				<name>RST</name>
+			</value>
+			<value>
+				<name>INGR</name>
+			</value>
+			<value>
+				<name>GSAG</name>
+			</value>
+			<value>
+				<name>GSBG</name>
+			</value>
+			<value>
+				<name>PNM</name>
+			</value>
+			<value>
+				<name>ENVI</name>
+			</value>
+			<value>
+				<name>EHdr</name>
+			</value>
+			<value>
+				<name>PAux</name>
+			</value>
+			<value>
+				<name>MFF</name>
+			</value>
+			<value>
+				<name>MFF2</name>
+			</value>
+			<value>
+				<name>BT</name>
+			</value>
+			<value>
+				<name>IDA</name>
+			</value>
+			<value>
+				<name>USGSDEM</name>
+			</value>
+			<value>
+				<name>ADRG</name>
+			</value>
+			<value>
+				<name>BLX</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			Tipo de archivo
+		</description>
+		<values>
+			<value>
+				<name>Byte</name>
+			</value>
+			<value>
+				<name>Int16</name>
+			</value>
+			<value>
+				<name>UInt16</name>
+			</value>
+			<value>
+				<name>Int32</name>
+			</value>
+			<value>
+				<name>UInt32</name>
+			</value>
+			<value>
+				<name>Float32</name>
+			</value>
+			<value>
+				<name>Float64</name>
+			</value>
+			<value>
+				<name>CInt16</name>
+			</value>
+			<value>
+				<name>CInt32</name>
+			</value>
+			<value>
+				<name>CFloat32</name>
+			</value>
+			<value>
+				<name>CFloat64</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo r�ster de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="createopt" type="string" required="no" multiple="yes">
+		<label>
+			Creation option(s) to pass to the output format driver
+		</label>
+		<description>
+			In the form of "NAME=VALUE", separate multiple entries with a comma.
+		</description>
+	</parameter>
+	<parameter name="metaopt" type="string" required="no" multiple="yes">
+		<label>
+			Metadata key(s) and value(s) to include
+		</label>
+		<description>
+			In the form of "META-TAG=VALUE", separate multiple entries with a comma. Not supported by all output format drivers.
+		</description>
+	</parameter>
+	<parameter name="nodata" type="float" required="no" multiple="no">
+		<description>
+			Asignar un valor especificado a las celdas sin datos para las bandas de salida
+		</description>
+	</parameter>
+	<flag name="l">
+		<description>
+			Listar formatos de salida soportados
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="c">
+		<label>
+			Do not export long colortable
+		</label>
+		<description>
+			Only applicable to Byte or UInt16 data types.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gdal.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extract.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extract.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extract.xml	(revision 369)
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.extract">
+	<description>
+		Selecciona objetos vectoriales de un vectorial existente y crea un nuevo mapa que contiene s�lo los objetos seleccionados.
+	</description>
+	<keywords>
+		vector, extract
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<label>
+			Types to be extracted
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid,area,face
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (if -1, all features in all layers of given type are extracted)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer_all" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="list" type="string" required="no" multiple="no">
+		<label>
+			Valores de la categor�as.
+		</label>
+		<description>
+			Ejemplo: 1,3,7-9,13.
+		</description>
+		<keydesc>
+			<item order="1">range</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="file" type="string" required="no" multiple="no">
+		<label>
+			Archivo de texto de entrada con n�meros de categor�a/intervalo de n�meros a extraer
+		</label>
+		<description>
+			Si se da '-' lee de la entrada est�ndar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="random" type="integer" required="no" multiple="no">
+		<label>
+			Number of random categories matching vector objects to extract
+		</label>
+		<description>
+			Number must be smaller than unique cat count in layer
+		</description>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="new" type="integer" required="no" multiple="no">
+		<label>
+			Introduzca -1 para mantener las categor�as originales o el NUEVO valor de categor�a deseado
+		</label>
+		<description>
+			Si nuevo &gt;=0, la tabla no se copia
+		</description>
+		<default>
+			-1
+		</default>
+	</parameter>
+	<flag name="d">
+		<description>
+			Disolver contornos comunes (por omisi�n no)
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No copiar tabla (ver tambi�n el par�metro 'nuevo')
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Invertir selecci�n
+		</description>
+ 		<guisection>
+			Selection
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extract.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spread.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spread.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spread.xml	(revision 369)
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.spread">
+	<label>
+		Simula propagaci�n anisotr�pica el�pticamente en una ventana de gr�ficos y general un mapa r�ster del tiempo acumulado de propagaci�n, dados mapas r�ster que contengan las tasas de propagaci�n (ROS), las direcciones de ROS y los or�genes de propagaci�n.
+	</label>
+	<description>
+		It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="max" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la tasa M�XIMA de propagaci�n (ROS) (cm(min)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="dir" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa r�ster que contenga Direcciones de m�xima Tasa de Propagaci�n ROS (grados)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="base" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa r�ster que contenga Tasa de Propagaci�n BASE /cm/min)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="start" type="string" required="yes" multiple="no">
+		<description>
+			Name of raster map containing STARTing sources
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="spot_dist" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map containing max SPOTting DISTance (m) (required w/ -s)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="w_speed" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map containing midflame Wind SPEED (ft/min) (required w/ -s)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="f_mois" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map containing fine Fuel MOISture of the cell receiving a spotting firebrand (%) (required w/ -s)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Mapa de entrada
+		</guisection>
+	</parameter>
+	<parameter name="least_size" type="string" required="no" multiple="no">
+		<description>
+			TAMA�O de ventana de muestreo b�sico necesario para conseguir cierta precisi�n (3)
+		</description>
+		<keydesc>
+			<item order="1">odd int</item>
+		</keydesc>
+		<values>
+			<value>
+				<name>3</name>
+			</value>
+			<value>
+				<name>5</name>
+			</value>
+			<value>
+				<name>7</name>
+			</value>
+			<value>
+				<name>9</name>
+			</value>
+			<value>
+				<name>11</name>
+			</value>
+			<value>
+				<name>13</name>
+			</value>
+			<value>
+				<name>15</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="comp_dens" type="string" required="no" multiple="no">
+		<description>
+			DENSIDAD de muestreo para c�lculos adicionales (rango: 0.0 - 1.0 (0.5))
+		</description>
+		<keydesc>
+			<item order="1">decimal</item>
+		</keydesc>
+	</parameter>
+	<parameter name="init_time" type="string" required="no" multiple="no">
+		<description>
+			HORA INICIAL para la simulaci�n actual (0) (m�nimo)
+		</description>
+		<keydesc>
+			<item order="1">int (&gt;= 0)</item>
+		</keydesc>
+	</parameter>
+	<parameter name="lag" type="string" required="no" multiple="no">
+		<description>
+			Simulating time duration LAG (fill the region) (min)
+		</description>
+		<keydesc>
+			<item order="1">int (&gt;= 0)</item>
+		</keydesc>
+	</parameter>
+	<parameter name="backdrop" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map as a display backdrop
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster para contener el tiempo de propagaci�n de SALIDA (min)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Mapas de salida
+		</guisection>
+	</parameter>
+	<parameter name="x_output" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map to contain X_BACK coordinates
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Mapas de salida
+		</guisection>
+	</parameter>
+	<parameter name="y_output" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map to contain Y_BACK coordinates
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Mapas de salida
+		</guisection>
+	</parameter>
+	<flag name="v">
+		<description>
+			Ejecutar de forma VERBOSA
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			MOSTRAR proceso de propagaci�n 'en directo' en pantalla
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			For wildfires: consider SPOTTING effect
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spread.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.transform.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.transform.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.transform.xml	(revision 369)
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.transform">
+	<description>
+		Performs an affine transformation (shift, scale and rotate, or GPCs) on vector map.
+	</description>
+	<keywords>
+		vectorial, transformaci�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="pointsfile" type="string" required="no" multiple="no">
+		<label>
+			Archivo ASCII que mantiene coordenadas de transformaci�n
+		</label>
+		<description>
+			Si no se indican, los par�metros de transformaci�n (xshift, yshift, zshift, xscale, yscale, zscale, zrot) se usan en su lugar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="points" />
+	</parameter>
+	<parameter name="xshift" type="float" required="no" multiple="no">
+		<description>
+			Cambiando valor para coordenadas X
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="yshift" type="float" required="no" multiple="no">
+		<description>
+			Cambiando valor para coordenadas Y
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="zshift" type="float" required="no" multiple="no">
+		<description>
+			Cambiando valor para coordenadas Z
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="xscale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para coordenadas X
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="yscale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para coordenadas Y
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="zscale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para coordenadas Z
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="zrot" type="float" required="no" multiple="no">
+		<description>
+			Rotaci�n alrededor del eje Z en grados en sentido horario
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="table" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la tabla que contiene los par�metros de transformaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbtable" element="dbtable" prompt="dbtable" />
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="columns" type="string" required="no" multiple="yes">
+		<label>
+			Nombre de la columna(s) de atributos usada como par�metros de transformaci�n
+		</label>
+		<description>
+			Formato: par�metro:columna, ej. xshift:xs,yshift:ys,zrot:zr
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Personalizado
+		</guisection>
+	</parameter>
+	<flag name="q">
+		<description>
+			Suprime la visualizaci�n de residuales y otra informaci�n
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			Cambiar todos los valores Z a altura=0
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Imprimir la matriz de transformaci�n a stdout
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			En vez de puntos usar par�metros de transformaci�n (xshift, yshift, zshift, xscale, yscale, zscale, zrot)
+		</description>
+ 		<guisection>
+			Personalizado
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.transform.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gridatb.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gridatb.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gridatb.xml	(revision 369)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.gridatb">
+	<description>
+		Importa archivo de mapa GRIDTB.FOR (TOPMODEL) a mapa r�ster de GRASS
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo de mapa GRIDATB de E/S
+		</description>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gridatb.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.mat.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.mat.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.mat.xml	(revision 369)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.mat">
+	<description>
+		Importa un archivo binario MAT(v4) a un r�ster de GRASS.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de un archivo MAT(v4) existente
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida (no tener en cuenta)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="v">
+		<description>
+			Modo verboso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.mat.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.horizon.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.horizon.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.horizon.xml	(revision 369)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.horizon">
+	<label>
+		Horizon angle computation from a digital elevation model.
+	</label>
+	<description>
+		Computes horizon angle height from a digital elevation model. The module has two different modes of operation:  1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction.  The input for this is the angle (in degrees), which is measured  counterclockwise with east=0, north=90 etc. The output is the horizon height in radians.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevin" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de elevaci�n de entrada [metros]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="direction" type="float" required="no" multiple="no">
+		<description>
+			Direction in which you want to know the horizon height
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="horizonstep" type="float" required="no" multiple="no">
+		<description>
+			Angle step size for multidirectional horizon [degrees]
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="bufferzone" type="float" required="no" multiple="no">
+		<description>
+			For horizon rasters, read from the DEM an extra buffer around the present region
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="e_buff" type="float" required="no" multiple="no">
+		<description>
+			For horizon rasters, read from the DEM an extra buffer eastward the present region
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="w_buff" type="float" required="no" multiple="no">
+		<description>
+			For horizon rasters, read from the DEM an extra buffer westward the present region
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="n_buff" type="float" required="no" multiple="no">
+		<description>
+			For horizon rasters, read from the DEM an extra buffer northward the present region
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="s_buff" type="float" required="no" multiple="no">
+		<description>
+			For horizon rasters, read from the DEM an extra buffer southward the present region
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="maxdistance" type="float" required="no" multiple="no">
+		<description>
+			The maximum distance to consider when finding the horizon height
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="horizon" type="string" required="no" multiple="no">
+		<description>
+			Prefix of the horizon raster output maps
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="coord" type="float" required="no" multiple="no">
+		<description>
+			Coordinate for which you want to calculate the horizon
+		</description>
+		<keydesc>
+			<item order="1">east</item>
+			<item order="2">north</item>
+		</keydesc>
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="dist" type="float" required="no" multiple="no">
+		<description>
+			Sampling distance step coefficient (0.5-1.5)
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<flag name="d">
+		<description>
+			Write output in degrees (default is radians)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.horizon.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.stddev.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.stddev.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.stddev.xml	(revision 369)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.colors.stddev">
+	<description>
+		Set color rules based on stddev from a map's mean value.
+	</description>
+	<keywords>
+		raster, color table
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="b">
+		<description>
+			Color using standard deviation bands
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Force center at zero
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.stddev.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.kappa.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.kappa.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.kappa.xml	(revision 369)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.kappa">
+	<description>
+		Calcular matriz de error y el par�metro kappa para ensayo de precisi�n del resultado de clasificaci�n.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="classification" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene el resultado de la reclasificaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="reference" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene clases de referencia
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo de salida que contenga la matriz de errores y kappa
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para la matriz de errores y kappa
+		</description>
+		<default>
+			ACCURACY ASSESSMENT
+		</default>
+	</parameter>
+	<flag name="w">
+		<label>
+			Informe amplio
+		</label>
+		<description>
+			132 columnas (por omisi�n: 80)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="h">
+		<description>
+			Ning�n encabezamiento en el informe
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.kappa.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.xml	(revision 369)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.reclass">
+	<description>
+		Crea una nueva capa de mapa cuyos valores de categor�as est�n basados en una reclasificaci�n de las categor�as de una capa de mapa r�ster existente.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa por reclasificar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="rules" type="string" required="no" multiple="no">
+		<description>
+			Archivo que contiene las reglas de reclasificaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.los.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.los.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.los.xml	(revision 369)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.los">
+	<description>
+		Programa de an�lisis r�ster de l�nea visual.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de elevaci�n.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="coordinate" type="string" required="yes" multiple="no">
+		<description>
+			Coordenada que identifica el lugar de observaci�n
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="patt_map" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster binario (1/0) a usar como m�scara
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="obs_elev" type="float" required="no" multiple="no">
+		<description>
+			Altura del punto de observaci�n sobre el terreno
+		</description>
+		<default>
+			1.75
+		</default>
+	</parameter>
+	<parameter name="max_dist" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�xima desde el punto de observaci�n (metros)
+		</description>
+		<default>
+			10000
+		</default>
+		<values>
+			<value>
+				<name>0-5000000</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="c">
+		<description>
+			Consider earth curvature (current ellipsoid)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.los.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.shaded.relief.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.shaded.relief.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.shaded.relief.xml	(revision 369)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.shaded.relief">
+	<description>
+		Crea un mapa compartido de relieve a partir de un mapa de elevaciones (DEM).
+	</description>
+	<keywords>
+		r�ster, elevaci�n
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de elevaci�n de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="shadedmap" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa compartido de relieve de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="altitude" type="float" required="no" multiple="no">
+		<description>
+			Altura del sol sobre el horizonte en grados
+		</description>
+		<default>
+			30
+		</default>
+		<values>
+			<value>
+				<name>0-90</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="azimuth" type="float" required="no" multiple="no">
+		<description>
+			Azimut del sol al Este del Norte en grados
+		</description>
+		<default>
+			270
+		</default>
+		<values>
+			<value>
+				<name>0-360</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="zmult" type="float" required="no" multiple="no">
+		<description>
+			Factor para exagerar el relive
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="scale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para convertir unidades horizontales a unidades de elevaci�n
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="units" type="string" required="no" multiple="no">
+		<description>
+			Set scaling factor (applies to lat./long. locations only, none: scale=1)
+		</description>
+		<default>
+			none
+		</default>
+		<values>
+			<value>
+				<name>none</name>
+			</value>
+			<value>
+				<name>meters</name>
+			</value>
+			<value>
+				<name>feet</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.shaded.relief.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.stats.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.stats.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.stats.xml	(revision 369)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.stats">
+	<description>
+		Genera estad�sticas de superficie para capas de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) del (los) mapa(s) raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo de salida (si se omite o "-" salida a stdout)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos de salida
+		</description>
+		<keydesc>
+			<item order="1">character|space|tab</item>
+		</keydesc>
+		<default>
+			space
+		</default>
+	</parameter>
+	<parameter name="nv" type="string" required="no" multiple="no">
+		<description>
+			Cadena que representa el valor de celda sin datos
+		</description>
+		<default>
+			*
+		</default>
+	</parameter>
+	<parameter name="nsteps" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de subrangos fp de los que recopilar las estad�sticas
+		</description>
+		<default>
+			255
+		</default>
+	</parameter>
+	<flag name="1">
+		<description>
+			Una celda (rango) por l�nea
+		</description>
+	</flag>
+	<flag name="A">
+		<description>
+			Imprimir valores medios en vez de intervalos
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="a">
+		<description>
+			Imprimir totales de �reas
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Imprimir cuenta de celdas
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="p">
+		<description>
+			Imprimir porcentajes APROXIMADOS (el porcentaje total puede no ser 100%)
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="l">
+		<description>
+			Imprimir etiquetas de categor�as
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="g">
+		<description>
+			Imprimir coordenadas de cuadr�cula (Este y Norte)
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="x">
+		<description>
+			Imprimir X e Y (columna y fila)
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="r">
+		<description>
+			Imprimir �ndices raw de rangos fp (s�lo mapas fp)
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="n">
+		<description>
+			Suprimir informar de cualquier NULO
+		</description>
+	</flag>
+	<flag name="N">
+		<description>
+			Suprimir informar de cualquier NULO cuando todos los valores son NULO
+		</description>
+	</flag>
+	<flag name="C">
+		<description>
+			Informar para rangos fp de categor�as (s�lo mapas fp)
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Leer mapa fp como entero (usar reglas quant del mapa)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.stats.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.info.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.info.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.info.xml	(revision 369)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.info">
+	<description>
+		Outputs basic information about a user-specified vector map.
+	</description>
+	<keywords>
+		vector, metadata, history
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="h">
+		<description>
+			Imprimir hist�rico del vectorial en vez de informaci�n
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Imprimir tipos/nombre de columnas de tabla para la capa especificada, en vez de informaci�n
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="g">
+		<description>
+			Imprimir s�lo la regi�n del mapa
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="m">
+		<description>
+			Imprimir s�lo el t�tulo del mapa
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="t">
+		<description>
+			Imprimir s�lo informaci�n de topolog�a
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.info.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.texture.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.texture.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.texture.xml	(revision 369)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.texture">
+	<description>
+		Genera im�genes con elementos texturales a partir de un mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="prefix" type="string" required="yes" multiple="no">
+		<description>
+			Prefix for output raster map(s)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="size" type="integer" required="no" multiple="no">
+		<description>
+			El tama�o de la ventana deslizante (impar y &gt;= 3)
+		</description>
+		<keydesc>
+			<item order="1">value</item>
+		</keydesc>
+		<default>
+			3
+		</default>
+	</parameter>
+	<parameter name="distance" type="integer" required="no" multiple="no">
+		<description>
+			La distancia entre dos muestras (&gt;= 1)
+		</description>
+		<keydesc>
+			<item order="1">value</item>
+		</keydesc>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="a">
+		<description>
+			Momento segundo angular
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Contraste
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="k">
+		<description>
+			Correlaci�n
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="v">
+		<description>
+			Varianza
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="i">
+		<description>
+			Momento diferencial inverso
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="s">
+		<description>
+			Media de la suma
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="w">
+		<description>
+			Varianza de la suma
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="x">
+		<description>
+			Entrop�a de la suma
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="e">
+		<description>
+			Entrop�a
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="d">
+		<description>
+			Varianza de la diferencia
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="p">
+		<description>
+			Entrop�a de la diferencia
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="m">
+		<description>
+			Medida de la correlaci�n-1
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="n">
+		<description>
+			Medida de la correlaci�n-2
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="o">
+		<description>
+			Coeficiente de correlaci�n m�ximo
+		</description>
+ 		<guisection>
+			Elementos
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.texture.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.reclass.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.reclass.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.reclass.xml	(revision 369)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.reclass">
+	<description>
+		Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.
+	</description>
+	<keywords>
+		vector, reclass, attributes
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<label>
+			The name of the column whose values are to be used as new categories
+		</label>
+		<description>
+			The source for the new key column must be type integer or string
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<parameter name="rules" type="string" required="no" multiple="no">
+		<description>
+			Full path to the reclass rule file
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.reclass.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.thin.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.thin.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.thin.xml	(revision 369)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.thin">
+	<description>
+		Adelgaza celdas no cero que indican elementos lineales en una capa de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="iterations" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�ximo de iteraciones
+		</description>
+		<default>
+			200
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.thin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.short.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.short.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.short.xml	(revision 369)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.terraflow.short">
+	<description>
+		Flow computation for massive grids (Integer version).
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de elevaci�n.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="filled" type="string" required="yes" multiple="no">
+		<description>
+			Output filled (flooded) elevation raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="direction" type="string" required="yes" multiple="no">
+		<description>
+			Output flow direction raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="swatershed" type="string" required="yes" multiple="no">
+		<description>
+			Output sink-watershed raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="accumulation" type="string" required="yes" multiple="no">
+		<description>
+			Output flow accumulation raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="tci" type="string" required="yes" multiple="no">
+		<description>
+			Output topographic convergence index (tci) raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="d8cut" type="float" required="no" multiple="no">
+		<description>
+			If flow accumulation is larger than this value it is routed using SFD (D8) direction 
+ 		 (meaningfull only  for MFD flow)
+		</description>
+		<default>
+			infinity
+		</default>
+	</parameter>
+	<parameter name="memory" type="integer" required="no" multiple="no">
+		<description>
+			Maximum runtime memory size (in MB)
+		</description>
+		<default>
+			300
+		</default>
+	</parameter>
+	<parameter name="STREAM_DIR" type="string" required="no" multiple="no">
+		<description>
+			Directory to hold temporary files (they can be large)
+		</description>
+		<default>
+			C:/Users/volaya/AppData/Local/Temp
+		</default>
+	</parameter>
+	<parameter name="stats" type="string" required="no" multiple="no">
+		<description>
+			Name of file containing runtime statistics
+		</description>
+		<default>
+			stats.out
+		</default>
+	</parameter>
+	<flag name="s">
+		<description>
+			SFD (D8) flow (default is MFD)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.short.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sum.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sum.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sum.xml	(revision 369)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.sum">
+	<description>
+		Totaliza los valores de las celdas r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="rast" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo de incidencia o de densidad.
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sum.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.idw.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.idw.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.idw.xml	(revision 369)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.surf.idw">
+	<description>
+		Surface interpolation from vector point data by Inverse Distance Squared Weighting.
+	</description>
+	<keywords>
+		vectorial, interpolaci�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="npoints" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de puntos de interpolaci�n
+		</description>
+		<keydesc>
+			<item order="1">count</item>
+		</keydesc>
+		<default>
+			12
+		</default>
+	</parameter>
+	<parameter name="power" type="float" required="no" multiple="no">
+		<description>
+			Power parameter; greater values assign greater influence to closer points
+		</description>
+		<default>
+			2.0
+		</default>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Si se establece a 0, se usar�n las coordenadas Z (s�lo vectoriales 3D)
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer_zero" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<label>
+			Columna de la tabla de atributos con valores a interpolar
+		</label>
+		<description>
+			Requerido si capa &gt; 0
+		</description>
+	</parameter>
+	<flag name="n">
+		<label>
+			No indexar puntos por celda r�ster
+		</label>
+		<description>
+			M�s lento pero usa menos memoria e incluye puntos de la regi�n exterior en la interpolaci�n
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.idw.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.correction.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.correction.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.correction.xml	(revision 369)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.lidar.correction">
+	<description>
+		Correcci�n de la salida de v.lidar.growing. Es el �ltimo de los tres algoritmos para el filtrado de LIDAR.
+	</description>
+	<keywords>
+		vectorial, LIDAR
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de observaci�n de entrada (salida v.lidar.growing)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa vectorial clasificado de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="terrain" type="string" required="yes" multiple="no">
+		<description>
+			Only 'terrain' points output vector map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="sce" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Este
+		</description>
+		<default>
+			25
+		</default>
+	</parameter>
+	<parameter name="scn" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Norte
+		</description>
+		<default>
+			25
+		</default>
+	</parameter>
+	<parameter name="lambda_c" type="float" required="no" multiple="no">
+		<description>
+			Regularization weight in reclassification evaluation
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="tch" type="float" required="no" multiple="no">
+		<description>
+			High threshold for object to terrain reclassification
+		</description>
+		<default>
+			2
+		</default>
+	</parameter>
+	<parameter name="tcl" type="float" required="no" multiple="no">
+		<description>
+			Low threshold for terrain to object reclassification
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="e">
+		<label>
+			Estimate point density and distance
+		</label>
+		<description>
+			Estimate point density and distance for the input vector points within the current region extends and quit
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.correction.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.flow.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.flow.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.flow.xml	(revision 369)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.flow">
+	<description>
+		Construcci�n de curvas de pendiente (l�neas de flujo), longitudes de ruta de flujo y densidades de l�neas de flujo (�reas pendiente arriba) a partir de un modelo de elevaci�n digital (MDT) r�ster
+	</description>
+	<keywords>
+		raster
+	</keywords>
+	<parameter name="elevin" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster de elevaci�n de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="aspin" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de orientaci�n de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="barin" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de barrera de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="skip" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de celdas entre l�neas de flujo
+		</description>
+		<default>
+			1
+		</default>
+		<values>
+			<value>
+				<name>1-1</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="bound" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�ximo de segmentos por l�nea de flujo
+		</description>
+		<default>
+			5
+		</default>
+		<values>
+			<value>
+				<name>0-5</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="flout" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa vectorial de l�neas de flujo
+		</description>
+		<gisprompt age="any" element="dig" prompt="vector" />
+	</parameter>
+	<parameter name="lgout" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de longitud de ruta de corriente de salida
+		</description>
+		<gisprompt age="any" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="dsout" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de densidad de l�nea de corriente de salida
+		</description>
+		<gisprompt age="any" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="u">
+		<description>
+			Procesar l�neas de corriente pendiente arriba en vez de las l�neas predeterminadas pendiente abajo
+		</description>
+	</flag>
+	<flag name="3">
+		<description>
+			Longitudes 3D en vez de 2D
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Usar menos memoria a costa de las prestaciones
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.flow.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.distance.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.distance.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.distance.xml	(revision 369)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.grow.distance">
+	<description>
+		Generates a raster map layer of distance to features in input layer.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="distance" type="string" required="no" multiple="no">
+		<description>
+			Name for distance output map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="value" type="string" required="no" multiple="no">
+		<description>
+			Name for value output map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="metric" type="string" required="no" multiple="no">
+		<description>
+			M�trica
+		</description>
+		<default>
+			euclidean
+		</default>
+		<values>
+			<value>
+				<name>euclidean</name>
+			</value>
+			<value>
+				<name>squared</name>
+			</value>
+			<value>
+				<name>maximum</name>
+			</value>
+			<value>
+				<name>manhattan</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.distance.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.arc.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.arc.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.arc.xml	(revision 369)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.arc">
+	<description>
+		Convierte un archivo r�ster ASCII ARC/INFO de ESRI (GRID) en una capa de mapa r�ster (binario).
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo r�ster ASCII ARC/INFO (GRID) a importar
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			Tipo de almacenamiento para el mapa r�ster resultante
+		</description>
+		<default>
+			FCELL
+		</default>
+		<values>
+			<value>
+				<name>CELL</name>
+			</value>
+			<value>
+				<name>FCELL</name>
+			</value>
+			<value>
+				<name>DCELL</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<parameter name="mult" type="float" required="no" multiple="no">
+		<description>
+			Multiplicador para datos ASCII
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.arc.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.buffer.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.buffer.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.buffer.xml	(revision 369)
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.buffer">
+	<description>
+		Crear un buffer alrededor de los elementos de tipo dado (las �reas deben contener centroide).
+	</description>
+	<keywords>
+		vector, buffer
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="distance" type="float" required="no" multiple="no">
+		<description>
+			Buffer distance along major axis in map units
+		</description>
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="minordistance" type="float" required="no" multiple="no">
+		<description>
+			Buffer distance along minor axis in map units
+		</description>
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="angle" type="float" required="no" multiple="no">
+		<description>
+			Angle of major axis in degrees
+		</description>
+		<default>
+			0
+		</default>
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="bufcolumn" type="string" required="no" multiple="no">
+		<description>
+			Name of column to use for buffer distances
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="scale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para valores de columna de atributos
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="tolerance" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�xima entre arcos te�ricos y segmentos de pol�gonos como m�ltiplo de buffer
+		</description>
+		<default>
+			0.01
+		</default>
+		<guisection>
+			Distance
+		</guisection>
+	</parameter>
+	<parameter name="debug" type="string" required="no" multiple="no">
+		<description>
+			This does nothing. It is retained for backwards compatibility
+		</description>
+		<guisection>
+			Unused
+		</guisection>
+	</parameter>
+	<parameter name="buffer" type="float" required="no" multiple="no">
+		<label>
+			This is an alias to the distance option. It is retained for backwards compatibility
+		</label>
+		<description>
+			Distancia de buffer en unidades de mapa
+		</description>
+		<guisection>
+			Unused
+		</guisection>
+	</parameter>
+	<flag name="s">
+		<description>
+			Make outside corners straight
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Don't make caps at the ends of polylines
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.buffer.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.clump.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.clump.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.clump.xml	(revision 369)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.clump">
+	<description>
+		Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.
+	</description>
+	<keywords>
+		raster, statistics, reclass
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo, entre comillas
+		</description>
+		<keydesc>
+			<item order="1">"string"</item>
+		</keydesc>
+	</parameter>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.clump.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quantile.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quantile.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quantile.xml	(revision 369)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.quantile">
+	<description>
+		Compute quantiles using two passes.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="quantiles" type="integer" required="no" multiple="no">
+		<description>
+			Number of quantiles
+		</description>
+		<default>
+			4
+		</default>
+	</parameter>
+	<parameter name="percentiles" type="float" required="no" multiple="yes">
+		<description>
+			List of percentiles
+		</description>
+	</parameter>
+	<parameter name="bins" type="integer" required="no" multiple="no">
+		<description>
+			Number of bins to use
+		</description>
+		<default>
+			1000000
+		</default>
+	</parameter>
+	<flag name="r">
+		<description>
+			Generate recode rules based on quantile-defined intervals.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quantile.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extrude.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extrude.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extrude.xml	(revision 369)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.extrude">
+	<description>
+		Eleva objetos vectoriales planos a 3D con alturas definidas.
+	</description>
+	<keywords>
+		vectorial, geometr�a, 3D
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial 2D de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial 3D resultante
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="zshift" type="float" required="no" multiple="no">
+		<description>
+			Cambiando valor para coordenadas Z
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="elevation" type="string" required="no" multiple="no">
+		<description>
+			R�ster de elevaci�n para extracci�n de alturas
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="height" type="float" required="no" multiple="no">
+		<description>
+			Altura fija para objetos vectoriales 3D
+		</description>
+	</parameter>
+	<parameter name="hcolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de columna de atributos con alturas de los objetos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="t">
+		<description>
+			Trazar elevaci�n
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.extrude.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.crossbones.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.crossbones.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.crossbones.xml	(revision 369)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.crossbones">
+	<description>
+		A GRASS version of Crossbones: Create simple 3D representations of skeletal assemblages.
+	</description>
+	<keywords>
+		vector, surveying, crossbones
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Input ASCII file with point measurements
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Name of output vector map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="mode" type="string" required="no" multiple="no">
+		<description>
+			3D Representation mode
+		</description>
+		<default>
+			pyramids
+		</default>
+		<values>
+			<value>
+				<name>darts</name>
+			</value>
+			<value>
+				<name>lines</name>
+			</value>
+			<value>
+				<name>planes_h</name>
+			</value>
+			<value>
+				<name>planes_v</name>
+			</value>
+			<value>
+				<name>points</name>
+			</value>
+			<value>
+				<name>pyramids</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="delimiter" type="string" required="no" multiple="no">
+		<description>
+			Field delimiter for ASCII input file (default: comma)
+		</description>
+		<default>
+			,
+		</default>
+	</parameter>
+	<parameter name="idcolumn" type="integer" required="no" multiple="no">
+		<description>
+			Position of ID column in ASCII input file (leftmost = 1)
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="xcolumn" type="float" required="no" multiple="no">
+		<description>
+			Position of X (Easting) column in ASCII input file (leftmost = 1)
+		</description>
+		<default>
+			2
+		</default>
+	</parameter>
+	<parameter name="ycolumn" type="float" required="no" multiple="no">
+		<description>
+			Position of Y (Northing) column in ASCII input file (leftmost = 1)
+		</description>
+		<default>
+			3
+		</default>
+	</parameter>
+	<parameter name="zcolumn" type="float" required="no" multiple="no">
+		<description>
+			Position of Z (Elevation) column in ASCII input file (leftmost = 1)
+		</description>
+		<default>
+			4
+		</default>
+	</parameter>
+	<parameter name="ratios" type="string" required="no" multiple="no">
+		<description>
+			List of length:1 ratios for specific bone IDs (boneID1=ratio, boneID2=ratio, ...).
+		</description>
+		<default>
+			1=3.0,2=8.0,5=6.0,8=6.0,11=6.0,14=6.0
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.crossbones.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bilinear.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bilinear.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bilinear.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.bilinear">
+	<description>
+		Utilidad de interpolaci�n bilineal para capas de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="north" type="float" required="no" multiple="no">
+		<description>
+			Valores de entrada espec�ficos a asignar a los polos Norte y/o Sur para cuadr�culas longitud-latitud
+		</description>
+	</parameter>
+	<parameter name="east" type="float" required="no" multiple="no">
+		<description>
+			Valores de entrada espec�ficos a asignar a los polos Norte y/o Sur para cuadr�culas longitud-latitud
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bilinear.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.watershed.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.watershed.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.watershed.xml	(revision 369)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.watershed">
+	<description>
+		Programa de an�lisis de cuenca hidrogr�fica.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de entrada: elevaci�n en la que se basa todo el an�lisis
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="depression" type="string" required="no" multiple="no">
+		<description>
+			Mapa de entrada: localizaciones de depresiones reales
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="flow" type="string" required="no" multiple="no">
+		<description>
+			Mapa de entrada: cantidad de flujo superficial por celda
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="disturbed.land" type="string" required="no" multiple="no">
+		<description>
+			Mapa o valor de entrada: porcentaje de terreno perturbado, para USLE
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="blocking" type="string" required="no" multiple="no">
+		<description>
+			Input map: terrain blocking overland surface flow, for USLE
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="threshold" type="integer" required="no" multiple="no">
+		<description>
+			Valor de entrada: tama�o m�nimo de la cuenca hidrogr�fica exterior
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="max.slope.length" type="float" required="no" multiple="no">
+		<description>
+			Valor de entrada: longitud m�xima de flujo de superficie, para USLE
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="accumulation" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: n�mero de celdas que drenan a trav�s de cada celda
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="drainage" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: direcci�n de drenaje
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="basin" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: etiqueta �nica para cada cuenca hidrogr�fica
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="stream" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: segmentos de corriente
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="half.basin" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: se da un valor �nico a cada semicuenca
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="visual" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: �til para  visualizar los resultados
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="length.slope" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: factor de longitud e inclinaci�n de la pendiente (LS) para USLE
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="slope.steepness" type="string" required="no" multiple="no">
+		<description>
+			Mapa de salida: factor de inclinaci�n de la pendiente (S) para USLE
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="memory" type="integer" required="no" multiple="no">
+		<description>
+			Maximum memory to be used with -m flag (in MB)
+		</description>
+		<default>
+			300
+		</default>
+	</parameter>
+	<flag name="4">
+		<description>
+			Permitir s�lo flujo de agua horizontal y vertical
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Activar opci�n de swapping de memoria a disco: funcionamiento lento
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.watershed.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mat.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mat.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mat.xml	(revision 369)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.mat">
+	<description>
+		Exporta un r�ster de GRASS a un archivo MAT binario.
+	</description>
+	<keywords>
+		r�ster, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el archivo MAT binario de salida
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<flag name="v">
+		<description>
+			Modo verboso
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mat.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.outlier.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.outlier.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.outlier.xml	(revision 369)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.outlier">
+	<description>
+		Removes outliers from vector point data.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="outlier" type="string" required="yes" multiple="no">
+		<description>
+			Name of output outlier vector map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="qgis" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa vectorial para visualizaci�n en QGIS
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="soe" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Este
+		</description>
+		<default>
+			10
+		</default>
+	</parameter>
+	<parameter name="son" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Norte
+		</description>
+		<default>
+			10
+		</default>
+	</parameter>
+	<parameter name="lambda_i" type="float" required="no" multiple="no">
+		<description>
+			Tykhonov regularization weight
+		</description>
+		<default>
+			0.1
+		</default>
+	</parameter>
+	<parameter name="thres_o" type="float" required="no" multiple="no">
+		<description>
+			Threshold for the outliers
+		</description>
+		<default>
+			50
+		</default>
+	</parameter>
+	<flag name="e">
+		<label>
+			Estimate point density and distance
+		</label>
+		<description>
+			Estimate point density and distance for the input vector points within the current region extends and quit
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.outlier.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cross.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cross.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cross.xml	(revision 369)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.cross">
+	<description>
+		Crea un producto cruzado de los valores de categor�a a partir de m�ltiples capas de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Nombres de 2-30 mapas r�ster de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="z">
+		<description>
+			Solamente datos distintos de cero
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cross.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.dxf.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.dxf.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.dxf.xml	(revision 369)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.dxf">
+	<description>
+		Convierte archivos en formato DXF a formato de mapa vectorial de GRASS.
+	</description>
+	<keywords>
+		vectorial, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Name of input DXF file
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layers" type="string" required="no" multiple="yes">
+		<description>
+			Lista de capas a importar
+		</description>
+		<guisection>
+			DXF layers
+		</guisection>
+	</parameter>
+	<flag name="e">
+		<description>
+			Ignorar la extensi�n del mapa del archivo DXF
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No crear tablas de atributos
+		</description>
+	</flag>
+	<flag name="b">
+		<description>
+			No construir topolog�a
+		</description>
+	</flag>
+	<flag name="f">
+		<description>
+			Import polyface meshes as 3D wire frame
+		</description>
+	</flag>
+	<flag name="l">
+		<description>
+			Listar las capas disponibles y salir
+		</description>
+ 		<guisection>
+			DXF layers
+		</guisection>
+	</flag>
+	<flag name="i">
+		<description>
+			Invertir la selecci�n por capas (no importar las capas en la lista)
+		</description>
+ 		<guisection>
+			DXF layers
+		</guisection>
+	</flag>
+	<flag name="1">
+		<description>
+			Importar todos los objetos en una capa
+		</description>
+ 		<guisection>
+			DXF layers
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.dxf.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.dissolve.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.dissolve.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.dissolve.xml	(revision 369)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.dissolve">
+	<description>
+		Disuelve contornos entre �reas adyacentes que comparten un n�mero de categor�a o atributo com�n.
+	</description>
+	<keywords>
+		vectorial, �rea, disolver
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number. If -1, all layers are extracted.
+		</label>
+		<description>
+			A single vector map can be connected to multiple database tables. This number determines which table to use.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer_all" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<description>
+			Nombre de columna usada para disolver contornos comunes
+		</description>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.dissolve.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.plane.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.plane.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.plane.xml	(revision 369)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.plane">
+	<description>
+		Crea un mapa r�ster plano dando pendiente (inclinaci�n), orientaci�n (azimut) y un punto.
+	</description>
+	<keywords>
+		r�ster, elevaci�n
+	</keywords>
+	<parameter name="name" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del plano r�ster a crear
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="dip" type="float" required="yes" multiple="no">
+		<description>
+			Pendiente del plano. El valor debe estar entre -90 y 90 grados
+		</description>
+		<gisprompt age="-90-90" />
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="azimuth" type="float" required="yes" multiple="no">
+		<description>
+			Azimut del plano. El valor debe estar entre 0 y 360 grados
+		</description>
+		<gisprompt age="0-360" />
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="easting" type="float" required="yes" multiple="no">
+		<description>
+			Coordenada Este de un punto en el plano
+		</description>
+	</parameter>
+	<parameter name="northing" type="float" required="yes" multiple="no">
+		<description>
+			Coordenada Norte de un punto en el plano
+		</description>
+	</parameter>
+	<parameter name="elevation" type="float" required="yes" multiple="no">
+		<description>
+			Coordenada de elevaci�n de un punto en el plano
+		</description>
+	</parameter>
+	<parameter name="type" type="string" required="yes" multiple="no">
+		<description>
+			Tipo de mapa r�ster a crear
+		</description>
+		<values>
+			<value>
+				<name>int</name>
+			</value>
+			<value>
+				<name>float</name>
+			</value>
+			<value>
+				<name>double</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.plane.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.slope.aspect.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.slope.aspect.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.slope.aspect.xml	(revision 369)
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.slope.aspect">
+	<description>
+		Genera capas de mapa r�ster de pendiente, orientaci�n, curvaturas y derivadas parciales a partir de una capa de mapa r�ster de valores reales de elevaci�n. La orientaci�n se calcula en sentido horario desde el Este.
+	</description>
+	<keywords>
+		raster, terrain analysis
+	</keywords>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de elevaci�n.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="slope" type="string" required="no" multiple="no">
+		<description>
+			Name for output slope raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="aspect" type="string" required="no" multiple="no">
+		<description>
+			Name for output aspect raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Formato para informar la pendiente
+		</description>
+		<default>
+			degrees
+		</default>
+		<values>
+			<value>
+				<name>degrees</name>
+			</value>
+			<value>
+				<name>percent</name>
+			</value>
+		</values>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="prec" type="string" required="no" multiple="no">
+		<description>
+			Tipo de mapas de orientaci�n y pendiente
+		</description>
+		<default>
+			float
+		</default>
+		<values>
+			<value>
+				<name>default</name>
+			</value>
+			<value>
+				<name>double</name>
+			</value>
+			<value>
+				<name>float</name>
+			</value>
+			<value>
+				<name>int</name>
+			</value>
+		</values>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="pcurv" type="string" required="no" multiple="no">
+		<description>
+			Name for output profile curvature raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="tcurv" type="string" required="no" multiple="no">
+		<description>
+			Name for output tangential curvature raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="dx" type="string" required="no" multiple="no">
+		<description>
+			Name for output first order partial derivative dx (E-W slope) raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="dy" type="string" required="no" multiple="no">
+		<description>
+			Name for output first order partial derivative dy (N-S slope) raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="dxx" type="string" required="no" multiple="no">
+		<description>
+			Name for output second order partial derivative dxx raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="dyy" type="string" required="no" multiple="no">
+		<description>
+			Name for output second order partial derivative dyy raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="dxy" type="string" required="no" multiple="no">
+		<description>
+			Name for output second order partial derivative dxy raster map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Avanzado
+		</guisection>
+	</parameter>
+	<parameter name="zfactor" type="float" required="no" multiple="no">
+		<description>
+			Factor de multiplicaci�n para convertir unidades de elevaci�n a metros
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="min_slp_allowed" type="float" required="no" multiple="no">
+		<description>
+			Valor de pendiente m�nimo (en porcentaje) para el que se procesa la orientaci�n
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="a">
+		<description>
+			No alinear la regi�n actual con la capa de elevaci�n
+		</description>
+ 		<guisection>
+			Configuraciones
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.slope.aspect.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.xml	(revision 369)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.univar">
+	<description>
+		Calcula estad�sticas univariantes a partir de celdas no nulas de un mapa r�ster.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) del (los) mapa(s) raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="percentile" type="float" required="no" multiple="yes">
+		<description>
+			Percentil a calcular (requiere la opci�n de estad�sticas ampliadas)
+		</description>
+		<default>
+			90
+		</default>
+		<values>
+			<value>
+				<name>0-100</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="g">
+		<description>
+			Imprimir las estad�sticas en estilo de script de consola
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Calcular estad�sticas ampliadas
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fillnulls.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fillnulls.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fillnulls.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.fillnulls">
+	<description>
+		Rellenar �reas sin datos de los mapas r�ster usando la interpolaci�n splines de v.sufr.rst
+	</description>
+	<keywords>
+		r�ster, elevaci�n, interpolaci�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster en el que rellenar los nulos
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Producir mapa r�ster con nulos rellenos por interpolaci�n de los valores circundantes
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="tension" type="float" required="no" multiple="no">
+		<description>
+			Par�metro de tensi�n spline
+		</description>
+		<default>
+			40.
+		</default>
+	</parameter>
+	<parameter name="smooth" type="float" required="no" multiple="no">
+		<description>
+			Par�metro de suavizado spline
+		</description>
+		<default>
+			0.1
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fillnulls.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.volume.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.volume.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.volume.xml	(revision 369)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.volume">
+	<description>
+		Calculates the volume of data "clumps", and (optionally) produces a GRASS vector points map containing the calculated centroids of these clumps.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="data" type="string" required="yes" multiple="no">
+		<description>
+			Existing raster map representing data that will be summed within clumps
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="clump" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster existente, preferiblemente la salida de r.clump
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="centroids" type="string" required="no" multiple="no">
+		<description>
+			Vector points map to contain clump centroids
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="f">
+		<description>
+			Generar informe sin formato
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.volume.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.pov.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.pov.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.pov.xml	(revision 369)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.pov">
+	<description>
+		Convierte una capa de mapa r�ster en un archivo de campo altura para POVRAY.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de un mapa r�ster existente
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="tga" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo POVRAY de salida (archivo de campo altura TGA)
+		</description>
+	</parameter>
+	<parameter name="hftype" type="integer" required="no" multiple="no">
+		<description>
+			Tipo de campo altura (0=alturas actuales 1=normalizado)
+		</description>
+	</parameter>
+	<parameter name="bias" type="float" required="no" multiple="no">
+		<description>
+			Elevation bias
+		</description>
+	</parameter>
+	<parameter name="scale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escalado vertical
+		</description>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.pov.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.vol.rst.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.vol.rst.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.vol.rst.xml	(revision 369)
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.vol.rst">
+	<description>
+		Interpolates point data to a G3D grid volume using regularized spline with tension (RST) algorithm.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial con X, Y, Z y W de entrada
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="cellinp" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de superficie para secci�n cruzada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="wcolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna que contiene los datos a interpolar
+		</description>
+		<default>
+			flt1
+		</default>
+	</parameter>
+	<parameter name="tension" type="float" required="no" multiple="no">
+		<description>
+			Par�metro tensi�n
+		</description>
+		<default>
+			40.
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="smooth" type="float" required="no" multiple="no">
+		<description>
+			Par�metro suavizado
+		</description>
+		<default>
+			0.1
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="scolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna con par�metros de suavizado
+		</description>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<parameter name="devi" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo de puntos vectorial de desviaciones
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			An�lisis
+		</guisection>
+	</parameter>
+	<parameter name="cvdev" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa vectorial de validaci�n cruzada
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			An�lisis
+		</guisection>
+	</parameter>
+	<parameter name="maskmap" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster usado como m�scara
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="segmax" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�ximo de puntos en un segmento
+		</description>
+		<default>
+			50
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="npmin" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�nimo de puntos para aproximaci�n en un segmento (&gt;segmax)
+		</description>
+		<default>
+			200
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="dmin" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�nima entre puntos (para eliminar puntos casi ind�nticos)
+		</description>
+		<default>
+			0.500000
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="wmult" type="float" required="no" multiple="no">
+		<description>
+			Factor de conversi�n para valores W usados para interpolaci�n
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="zmult" type="float" required="no" multiple="no">
+		<description>
+			Factor de conversi�n para valores Z
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="cellout" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de secci�n cruzada
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="elev" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de elevaci�n
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+	</parameter>
+	<parameter name="gradient" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de magnitud de gradiente
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="aspect1" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de �ngulo horizontal de gradiente
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="aspect2" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de �ngulo vertical de gradiente
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="ncurv" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de cambio de gradiente
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="gcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de curvatura gausiana
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="mcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo G3D de curvatura media
+		</description>
+		<gisprompt age="new" element="grid3" prompt="3d raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<flag name="c">
+		<description>
+			Realizar un procedimiento de validaci�n cruzada sin interpolaci�n de volumen
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.vol.rst.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.arc.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.arc.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.arc.xml	(revision 369)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.arc">
+	<description>
+		Convierte una capa de mapa r�ster en un archivo ARCGRID de ESRI.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de una capa de mapa r�ster existente
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de un mapa ARC-GID de salida (usar out=- para stdout)
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="dp" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de posiciones decimales
+		</description>
+		<default>
+			8
+		</default>
+	</parameter>
+	<flag name="h">
+		<description>
+			Suprimir la impresi�n de informaci�n de cabecera
+		</description>
+	</flag>
+	<flag name="1">
+		<description>
+			Listar un vac�o por l�nea en vez de fila completa
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.arc.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.pov.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.pov.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.pov.xml	(revision 369)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.pov">
+	<description>
+		Converts to POV-Ray format, GRASS x,y,z -&gt; POV-Ray x,z,y
+	</description>
+	<keywords>
+		vectorial, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,area,face
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Output file
+		</description>
+	</parameter>
+	<parameter name="size" type="string" required="no" multiple="no">
+		<description>
+			Radius of sphere for points and tube for lines. May be also variable, e.g. grass_r.
+		</description>
+		<default>
+			10
+		</default>
+	</parameter>
+	<parameter name="zmod" type="string" required="no" multiple="no">
+		<description>
+			Modifier for z coordinates, this string is appended to each z coordinate.
+		Examples: '*10', '+1000', '*10+100', '*exaggeration'
+		</description>
+		<default>
+			
+		</default>
+	</parameter>
+	<parameter name="objmod" type="string" required="no" multiple="no">
+		<description>
+			Object modifier (OBJECT_MODIFIER in POV-Ray documentation).
+		Example: "pigment { color red 0 green 1 blue 0 }"
+		</description>
+		<default>
+			
+		</default>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.pov.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sunmask.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sunmask.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sunmask.xml	(revision 369)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.sunmask">
+	<description>
+		Calculates cast shadow areas from sun position and DEM. Either A: exact sun position is specified, or B: date/time to calculate the sun position by r.sunmask itself.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elev" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de elevaciones
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Producir mapa r�ster que contiene sombras
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="altitude" type="float" required="no" multiple="no">
+		<description>
+			A: altura del sol sobre el horizonte, grados
+		</description>
+		<values>
+			<value>
+				<name>0-89.999</name>
+			</value>
+		</values>
+		<guisection>
+			Por posici�n
+		</guisection>
+	</parameter>
+	<parameter name="azimuth" type="float" required="no" multiple="no">
+		<description>
+			A: azimut del sol desde el Norte, grados
+		</description>
+		<values>
+			<value>
+				<name>0-360</name>
+			</value>
+		</values>
+		<guisection>
+			Por posici�n
+		</guisection>
+	</parameter>
+	<parameter name="year" type="integer" required="no" multiple="no">
+		<description>
+			B: a�o (1950..2050)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="month" type="integer" required="no" multiple="no">
+		<description>
+			B: mes (0..12)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="day" type="integer" required="no" multiple="no">
+		<description>
+			B: d�a (0..31)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="hour" type="integer" required="no" multiple="no">
+		<description>
+			B: hora (0..24)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="minute" type="integer" required="no" multiple="no">
+		<description>
+			B: minutos (0..60)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="second" type="integer" required="no" multiple="no">
+		<description>
+			B: segundos (0..60)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="timezone" type="integer" required="no" multiple="no">
+		<description>
+			B: zona horaria (Este positivo, compensar desde GMT, tambi�n uso para ajustar ahorros de luz solar)
+		</description>
+		<guisection>
+			Por tiempo
+		</guisection>
+	</parameter>
+	<parameter name="east" type="string" required="no" multiple="no">
+		<description>
+			Coordenada Este (punto de inter�s, por omisi�n: centro del mapa)
+		</description>
+		<keydesc>
+			<item order="1">value</item>
+		</keydesc>
+	</parameter>
+	<parameter name="north" type="string" required="no" multiple="no">
+		<description>
+			Coordenada Norte (punto de inter�s, por omisi�n: centro del mapa)
+		</description>
+		<keydesc>
+			<item order="1">value</item>
+		</keydesc>
+	</parameter>
+	<flag name="z">
+		<description>
+			Cero es una elevaci�n real
+		</description>
+	</flag>
+	<flag name="v">
+		<description>
+			Salida verbosa (tambi�n imprime la posici�n solar, etc.)
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Calcular s�lo la posici�n solar y salir
+		</description>
+	</flag>
+	<flag name="g">
+		<description>
+			Imprimir la salida de la posici�n solar en estilo script de consola
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sunmask.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.cells.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.cells.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.cells.xml	(revision 369)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.random.cells">
+	<description>
+		Genera valores de celda aleatorios con dependencia espacial.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Name of independent cells map
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="distance" type="float" required="yes" multiple="no">
+		<description>
+			Input value: max. distance of spatial correlation (value(s) &gt;= 0.0)
+		</description>
+	</parameter>
+	<parameter name="seed" type="integer" required="no" multiple="no">
+		<description>
+			Input value: random seed (SEED_MIN &gt;= value &gt;= SEED_MAX), default [random]
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.cells.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.aster.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.aster.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.aster.xml	(revision 369)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.aster">
+	<description>
+		Georreferenciar, rectificar e importar imaginer�a Terra ASTER y MDT relativos usando gdalwarp.
+	</description>
+	<keywords>
+		r�ster, imaginer�a, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Imagen ASTER de entrada a georreferenciar y rectificar
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="proctype" type="string" required="yes" multiple="no">
+		<description>
+			Tipo de procesado de Imaginer�a ASTER (Nivel 1A, Nivel 1B o MDT relacionado)
+		</description>
+		<values>
+			<value>
+				<name>L1A</name>
+			</value>
+			<value>
+				<name>L1B</name>
+			</value>
+			<value>
+				<name>DEM</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="band" type="string" required="yes" multiple="no">
+		<description>
+			Banda L1A o L1B a traducir (1, 2, 3n, 3b, 4-14). S�lo se puede traducir una banda
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.aster.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.his.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.his.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.his.xml	(revision 369)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.his">
+	<description>
+		Genera capas de mapa r�ster roja, verde y azul combinando valores de matiz, intensidad y saturaci�n (HIS) a partir de capas de mapa r�ster de entrada especificadas por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="h_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de la capa a usar para TONALIDAD
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="i_map" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la capa a usar para INTENSIDAD
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="s_map" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la capa a usar para SATURACI�N
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="r_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de la capa de salida a usar para el ROJO
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="g_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de la capa de salida a usar para el VERDE
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="b_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de la capa de salida a usar para el AZUL
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="n">
+		<description>
+			Respetar valores NULOS mientras se dibuja
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.his.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.type.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.type.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.type.xml	(revision 369)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.type">
+	<description>
+		Cambiar el tipo de elementos geom�tricos.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<label>
+			Pares de tipos de entrada y salida separados por coma.
+		</label>
+		<description>
+			&lt;input_type1&gt;,&lt;output_type1&gt;,&lt;input_type2&gt;,&lt;output_type2&gt;,...
+		Ejemplo1: l�nea,contorno
+		Ejemplo2: l�nea,contorno,punto,centroide
+		</description>
+		<default>
+			line,boundary,point,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.type.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.area.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.area.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.area.xml	(revision 369)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.area">
+	<description>
+		Estimaci�n del �rea para r�sters.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo r�ster para superficie
+		</description>
+		<gisprompt age="old" element="cell" prompt="Raster" />
+	</parameter>
+	<parameter name="vscale" type="float" required="no" multiple="no">
+		<description>
+			Escala vertical
+		</description>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.area.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vrml.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vrml.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vrml.xml	(revision 369)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.vrml">
+	<description>
+		Exportar un mapa r�ster al Lenguaje de Modelado de Realidad Virtual (VRML)
+	</description>
+	<keywords>
+		r�ster, exportar, VRML
+	</keywords>
+	<parameter name="elev" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa de elevaci�n
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="color" type="string" required="no" multiple="no">
+		<description>
+			Nombre de archivo de color
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="exag" type="float" required="no" multiple="no">
+		<description>
+			Exageraci�n vertical
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el nuevo archivo VRML
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vrml.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.kcv.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.kcv.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.kcv.xml	(revision 369)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.kcv">
+	<description>
+		Randomly partition points into test/train sets.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="k" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de particiones
+		</description>
+		<values>
+			<value>
+				<name>1-32767</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para la nueva columna en la que se escribe el n�mero de partici�n
+		</description>
+		<default>
+			part
+		</default>
+	</parameter>
+	<flag name="d">
+		<description>
+			Usar drand48()
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.kcv.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.srtm.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.srtm.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.srtm.xml	(revision 369)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.srtm">
+	<description>
+		Importar archivos SRTM HGT a GRASS
+	</description>
+	<keywords>
+		r�ster, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo de entrada SRTM (archivo sin extensi�n .hgt.zip)
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de salida (por omisi�n: tesela de entrada)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="1">
+		<description>
+			Input is a 1-arcsec tile (default: 3-arcsec)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.srtm.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mpeg.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mpeg.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mpeg.xml	(revision 369)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.mpeg">
+	<description>
+		Programa de conversi�n de series de archivos r�ster a MPEG.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="view1" type="string" required="yes" multiple="yes">
+		<description>
+			Archivo(s) r�ster para la vista1
+		</description>
+		<gisprompt age="old" element="cell" prompt="Raster" />
+	</parameter>
+	<parameter name="view2" type="string" required="no" multiple="yes">
+		<description>
+			Archivo(s) r�ster para la vista2
+		</description>
+		<gisprompt age="old" element="cell" prompt="Raster" />
+	</parameter>
+	<parameter name="view3" type="string" required="no" multiple="yes">
+		<description>
+			Archivo(s) r�ster para la vista3
+		</description>
+		<gisprompt age="old" element="cell" prompt="Raster" />
+	</parameter>
+	<parameter name="view4" type="string" required="no" multiple="yes">
+		<description>
+			Archivo(s) r�ster para la vista4
+		</description>
+		<gisprompt age="old" element="cell" prompt="Raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo de salida
+		</description>
+		<default>
+			gmovie.mpg
+		</default>
+	</parameter>
+	<parameter name="qual" type="integer" required="no" multiple="no">
+		<description>
+			Factor de calidad (1 = calidad m�s alta, baja compresi�n)
+		</description>
+		<default>
+			3
+		</default>
+		<values>
+			<value>
+				<name>1-5</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso - suprime el informe de progreso
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Convertir al vuelo, usar menos espacio de disco
+	(requiere r.out.ppm con la opci�n stdout)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.mpeg.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.voronoi.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.voronoi.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.voronoi.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.voronoi">
+	<description>
+		Crea un diagrama de Voronoi  a partir de un mapa vectorial de entrada que contiene puntos o centroides.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="l">
+		<description>
+			Producir telesaci�n como grafo (l�neas), no �reas
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No crear la tabla de atributos
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.voronoi.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.sediment.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.sediment.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.sediment.xml	(revision 369)
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.sim.sediment">
+	<description>
+		Sediment transport and erosion/deposition simulation using path sampling method (SIMWE)
+	</description>
+	<keywords>
+		raster, sediment flow, erosion, deposition
+	</keywords>
+	<parameter name="elevin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the elevation raster map [m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="wdepth" type="string" required="yes" multiple="no">
+		<description>
+			Name of the water depth raster map [m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="dxin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the x-derivatives raster map [m/m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="dyin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the y-derivatives raster map [m/m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="detin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the detachment capacity coefficient raster map [s/m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="tranin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the transport capacity coefficient raster map [s]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="tauin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the critical shear stress raster map [Pa]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="manin" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster n de Mannings
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="maninval" type="float" required="no" multiple="no">
+		<description>
+			Name of the Mannings n value
+		</description>
+		<default>
+			0.1
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="tc" type="string" required="no" multiple="no">
+		<description>
+			Output transport capacity raster map [kg/ms]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="et" type="string" required="no" multiple="no">
+		<description>
+			Output transp.limited erosion-deposition raster map [kg/m2s]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="conc" type="string" required="no" multiple="no">
+		<description>
+			Output sediment concentration raster map [particle/m3]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="flux" type="string" required="no" multiple="no">
+		<description>
+			Output sediment flux raster map [kg/ms]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="erdep" type="string" required="no" multiple="no">
+		<description>
+			Output erosion-deposition raster map [kg/m2s]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="nwalk" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de walkers
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="niter" type="integer" required="no" multiple="no">
+		<description>
+			Time used for iterations [minutes]
+		</description>
+		<default>
+			10
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="outiter" type="integer" required="no" multiple="no">
+		<description>
+			Time interval for creating output maps [minutes]
+		</description>
+		<default>
+			2
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="diffc" type="float" required="no" multiple="no">
+		<description>
+			Constante de difusi�n del agua
+		</description>
+		<default>
+			0.8
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.sediment.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.carve.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.carve.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.carve.xml	(revision 369)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.carve">
+	<description>
+		Toma datos de corriente vectorial, los transforma a r�ster y resta la profundidad del MDT de salida.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="rast" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa r�ster de entrada de elevaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="vect" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del vectorial de entrada que contiene corriente(s)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="points" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa vectorial de salida para puntos de corriente ajustados
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="width" type="float" required="no" multiple="no">
+		<description>
+			Anchura de corriente (en metros). Por defecto es la anchura de celda r�ster.
+		</description>
+	</parameter>
+	<parameter name="depth" type="float" required="no" multiple="no">
+		<description>
+			Profundidad de corriente adicional (en metros)
+		</description>
+	</parameter>
+	<flag name="n">
+		<description>
+			No se admiten �reas llanas en la direcci�n de flujo
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.carve.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.points.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.points.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.points.xml	(revision 369)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.to.points">
+	<description>
+		Creaa puntos a lo largo de l�neas de entrada en un nuevo vectorial con 2 capas.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial de entrada que contiene l�neas
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial de salida en el que se escribir�n los puntos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="llayer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Line layer
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="dmax" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�xima entre puntos en unidades de mapa
+		</description>
+		<default>
+			100
+		</default>
+	</parameter>
+	<flag name="n">
+		<description>
+			Escribir nodos de l�neas
+		</description>
+	</flag>
+	<flag name="v">
+		<description>
+			Escribir v�rtices de l�neas
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Interpolar puntos entre v�rtices de l�neas
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No crear la tabla de atributos
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.points.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm.xml	(revision 369)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.ppm">
+	<description>
+		Convierte un mapa r�ster de GRASS en un archivo de imagen PPM a la resoluci�n de p�xel de la regi�n definida actualmente.
+	</description>
+	<keywords>
+		r�ster, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el nuevo archivo PPM. (usar '-' para stdout)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+		<default>
+			&lt;rasterfilename&gt;.ppm
+		</default>
+	</parameter>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="G">
+		<description>
+			Salida en escala de grises en vez de color
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topidx.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topidx.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topidx.xml	(revision 369)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.topidx">
+	<description>
+		Crea mapa de �ndices topogr�ficos [ln(a/tan(beta))] a partir de mapa de elevaci�n.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de elevaci�n de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Producir mapa de �ndice topogr�fico
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topidx.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.db.select.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.db.select.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.db.select.xml	(revision 369)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.db.select">
+	<description>
+		Imprime atributos de mapa vectorial.
+	</description>
+	<keywords>
+		vectorial, base de datos, tabla de atributos
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="columns" type="string" required="no" multiple="yes">
+		<description>
+			Nombre de la(s) columna(s) de atributos.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos de salida
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<default>
+			|
+		</default>
+		<guisection>
+			Format
+		</guisection>
+	</parameter>
+	<parameter name="vs" type="string" required="no" multiple="no">
+		<description>
+			Separador de registros vertical de salida
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<guisection>
+			Format
+		</guisection>
+	</parameter>
+	<parameter name="nv" type="string" required="no" multiple="no">
+		<description>
+			Indicador de valores nulos
+		</description>
+		<guisection>
+			Format
+		</guisection>
+	</parameter>
+	<flag name="r">
+		<description>
+			Print minimal region extent of selected vector features instead of attributes
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			No incluir nombres de columna en la salida
+		</description>
+ 		<guisection>
+			Format
+		</guisection>
+	</flag>
+	<flag name="v">
+		<description>
+			Salida vertical (en vez de horizontal)
+		</description>
+ 		<guisection>
+			Format
+		</guisection>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.db.select.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.svg.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.svg.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.svg.xml	(revision 369)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.svg">
+	<description>
+		Exporta un mapa vectorial de GRASS a SVG.
+	</description>
+	<keywords>
+		vectorial, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el archivo SVG de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="type" type="string" required="yes" multiple="no">
+		<label>
+			Tipo de salida
+		</label>
+		<description>
+			Define qu� tipo de elemento se extraer�
+		</description>
+		<default>
+			poly
+		</default>
+		<values>
+			<value>
+				<name>poly</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>point</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="precision" type="integer" required="no" multiple="no">
+		<description>
+			Precisi�n de coordenadas
+		</description>
+		<default>
+			6
+		</default>
+	</parameter>
+	<parameter name="attribute" type="string" required="no" multiple="yes">
+		<description>
+			Atributo(s) a incluir en la salida SVG
+		</description>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.svg.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.class.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.class.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.class.xml	(revision 369)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.class">
+	<description>
+		Classifies attribute data, e.g. for thematic mapping
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Column name or expression
+		</description>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<parameter name="algorithm" type="string" required="yes" multiple="no">
+		<description>
+			Algorithm to use for classification
+		</description>
+		<values>
+			<value>
+				<name>int</name>
+				<description>simple intervals</description>
+			</value>
+			<value>
+				<name>std</name>
+				<description>standard deviations</description>
+			</value>
+			<value>
+				<name>qua</name>
+				<description>quantiles</description>
+			</value>
+			<value>
+				<name>equ</name>
+				<description>equiprobable (normal distribution)</description>
+			</value>
+			<value>
+				<name>dis</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="nbclasses" type="integer" required="yes" multiple="no">
+		<description>
+			Number of classes to define
+		</description>
+	</parameter>
+	<flag name="g">
+		<description>
+			Print only class breaks (without min and max)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.class.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vtk.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vtk.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vtk.xml	(revision 369)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.vtk">
+	<description>
+		Convierte mapas r�ster al formato VTK-ASCII
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) del (los) mapa(s) raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo VTK-ASCII de salida
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="elevation" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de elevaci�n
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="null" type="float" required="no" multiple="no">
+		<description>
+			Valor para representar celdas sin datos
+		</description>
+		<default>
+			-10.0
+		</default>
+	</parameter>
+	<parameter name="elevation2d" type="float" required="no" multiple="no">
+		<description>
+			Elevaci�n (si no se indica ning�n mapa de elevaci�n)
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="rgbmaps" type="string" required="no" multiple="yes">
+		<description>
+			Tres mapas r�ster (R,G,B) usados para crear valores RGB [maparojo,mapaverde,mapaazul]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Advanced options
+		</guisection>
+	</parameter>
+	<parameter name="vectormaps" type="string" required="no" multiple="yes">
+		<description>
+			Tres mapas r�ster (X,Y,Z) usados para crear valores vectoriales [mapaX,mapaY,mapaZ]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Advanced options
+		</guisection>
+	</parameter>
+	<parameter name="elevscale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para la elevaci�n
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Advanced options
+		</guisection>
+	</parameter>
+	<parameter name="dp" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de d�gitos significativos (coma flotante solamente)
+		</description>
+		<default>
+			12
+		</default>
+		<values>
+			<value>
+				<name>0-20</name>
+			</value>
+		</values>
+		<guisection>
+			Advanced options
+		</guisection>
+	</parameter>
+	<flag name="p">
+		<description>
+			Crear datos de puntos VTK en vez de datos de celdas VTK (si no se indica mapa de elevaci�n)
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Usar cuadr�cula estructurada para la elevaci�n (no recomendado)
+		</description>
+ 		<guisection>
+			Advanced options
+		</guisection>
+	</flag>
+	<flag name="t">
+		<description>
+			Use polydata-trianglestrips for elevation grid creation
+		</description>
+ 		<guisection>
+			Advanced options
+		</guisection>
+	</flag>
+	<flag name="v">
+		<description>
+			Usar v�rtices polidatos para la creaci�n de cuadr�culas de elevaci�n (para usar con vtkDelauny2D)
+		</description>
+ 		<guisection>
+			Advanced options
+		</guisection>
+	</flag>
+	<flag name="o">
+		<description>
+			Scale factor effects the origin (if no elevation map is given)
+		</description>
+ 		<guisection>
+			Advanced options
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Corregir las coordenadas para ajustar a la precisi�n VTK-OpenGL
+		</description>
+ 		<guisection>
+			Advanced options
+		</guisection>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.vtk.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.report.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.report.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.report.xml	(revision 369)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.report">
+	<description>
+		Informa estad�sticas para capas de mapas r�ster.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="yes">
+		<description>
+			Mapa(s) r�ster sobre el que informar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="units" type="string" required="no" multiple="yes">
+		<description>
+			Unidades
+		</description>
+		<values>
+			<value>
+				<name>mi</name>
+				<description>miles</description>
+			</value>
+			<value>
+				<name>me</name>
+				<description>meters</description>
+			</value>
+			<value>
+				<name>k</name>
+				<description>kilometers</description>
+			</value>
+			<value>
+				<name>a</name>
+				<description>acres</description>
+			</value>
+			<value>
+				<name>h</name>
+				<description>hectares</description>
+			</value>
+			<value>
+				<name>c</name>
+				<description>cell counts</description>
+			</value>
+			<value>
+				<name>p</name>
+				<description>percent cover</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="null" type="string" required="no" multiple="no">
+		<description>
+			Car�cter que representa valores de celdas sin datos
+		</description>
+		<default>
+			*
+		</default>
+		<guisection>
+			Formateando
+		</guisection>
+	</parameter>
+	<parameter name="pl" type="integer" required="no" multiple="no">
+		<description>
+			Longitud de p�gina (por omisi�n: 0 l�neas)
+		</description>
+		<guisection>
+			Formateando
+		</guisection>
+	</parameter>
+	<parameter name="pw" type="integer" required="no" multiple="no">
+		<description>
+			Anchura de p�gina (por omisi�n: 79 caracteres)
+		</description>
+		<guisection>
+			Formateando
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre de un archivo de salida para albergar el informe
+		</description>
+	</parameter>
+	<parameter name="nsteps" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de subrangos fp de los que recopilar las estad�sticas
+		</description>
+		<default>
+			255
+		</default>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="h">
+		<description>
+			Suprimir encabezados de p�gina
+		</description>
+ 		<guisection>
+			Formateando
+		</guisection>
+	</flag>
+	<flag name="f">
+		<description>
+			Use formfeeds between pages
+		</description>
+ 		<guisection>
+			Formateando
+		</guisection>
+	</flag>
+	<flag name="e">
+		<description>
+			Formato cient�fico
+		</description>
+ 		<guisection>
+			Formateando
+		</guisection>
+	</flag>
+	<flag name="n">
+		<description>
+			Filtrar todas las celdas sin datos
+		</description>
+	</flag>
+	<flag name="N">
+		<description>
+			Filtrar celdas en las que todos los mapas no tienen datos
+		</description>
+	</flag>
+	<flag name="C">
+		<description>
+			Informar para rangos fp de categor�as (s�lo mapas fp)
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Leer mapa fp como entero (usar reglas quant del mapa)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.report.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.vtk.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.vtk.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.vtk.xml	(revision 369)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.vtk">
+	<description>
+		Convierte un mapa vectorial binario de GRASS a salida ASCII VTK.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Ruta al archivo VTK resultante
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,kernel,centroid,line,boundary,area,face
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="dp" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de d�gitos significativos (coma flotante solamente)
+		</description>
+	</parameter>
+	<parameter name="scale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala para la elevaci�n
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de capa
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="c">
+		<description>
+			Corregir las coordenadas para ajustar a la precisi�n VTK-OpenGL
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Export numeric attribute table fields as VTK scalar variables
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.vtk.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.describe.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.describe.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.describe.xml	(revision 369)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.describe">
+	<description>
+		Imprime una lista concisa de valores de categor�a en una capa de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="nv" type="string" required="no" multiple="no">
+		<description>
+			Cadena que representa el valor de celda sin datos
+		</description>
+		<default>
+			*
+		</default>
+	</parameter>
+	<parameter name="nsteps" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de pasos de cuantizaci�n
+		</description>
+		<default>
+			255
+		</default>
+	</parameter>
+	<flag name="1">
+		<description>
+			Imprimir la salida un valor por l�nea
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Imprimir s�lo el rango de los datos
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Suprimir informar de cualquier NULO
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Usar la regi�n actual
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Leer mapa fp como entero
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.describe.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw2.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw2.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw2.xml	(revision 369)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.idw2">
+	<description>
+		Programa de generaci�n de superficies.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="npoints" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de puntos de interpolaci�n
+		</description>
+		<keydesc>
+			<item order="1">count</item>
+		</keydesc>
+		<default>
+			12
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw2.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.random.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.random.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.random.xml	(revision 369)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.random">
+	<description>
+		Genera un mapa de puntos vectorial 2D/3D de GRASS de forma aleatoria.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="n" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de puntos a crear
+		</description>
+	</parameter>
+	<parameter name="zmin" type="float" required="no" multiple="no">
+		<description>
+			Minimum z height (needs -z flag or column name)
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="zmax" type="float" required="no" multiple="no">
+		<description>
+			Maximum z height (needs -z flag or column name)
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<label>
+			Column name and type (i.e. INTEGER, DOUBLE PRECISION) for z values
+		</label>
+		<description>
+			Writes Z data to column instead of 3D vector
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<flag name="z">
+		<description>
+			Crear salida 3D
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Usar la funci�n drand48() en vez de rand()
+		</description>
+	</flag>
+	<flag name="b">
+		<description>
+			No construir topolog�a
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.random.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mapcalculator.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mapcalculator.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mapcalculator.xml	(revision 369)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.mapcalculator">
+	<description>
+		Calcular un nuevo mapa r�ster a partir de una expresi�n r.mapcalc.
+	</description>
+	<parameter name="amap" type="string" required="no" multiple="no">
+		<description>
+			A
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="bmap" type="string" required="no" multiple="no">
+		<description>
+			B
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cmap" type="string" required="no" multiple="no">
+		<description>
+			C
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="dmap" type="string" required="no" multiple="no">
+		<description>
+			D
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="emap" type="string" required="no" multiple="no">
+		<description>
+			E
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="fmap" type="string" required="no" multiple="no">
+		<description>
+			F
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="formula" type="string" required="yes" multiple="no">
+		<description>
+			Formula (ej. A-B o A*C+B)
+		</description>
+	</parameter>
+	<parameter name="outfile" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="help" type="string" required="no" multiple="no">
+		<description>
+			Mostrar ayuda
+		</description>
+		<default>
+			-
+		</default>
+		<values>
+			<value>
+				<name>-</name>
+			</value>
+			<value>
+				<name>help</name>
+			</value>
+			<value>
+				<name>man</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="e">
+		<description>
+			Modo avanzado (introducir un conjunto de expresiones de r.mapcalc)
+		</description>
+	</flag>
+	<flag name="o">
+		<description>
+			No sobrescribir mapas existentes
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mapcalculator.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.poly.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.poly.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.poly.xml	(revision 369)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.poly">
+	<description>
+		Crea mapas r�ster a partir de archivos de datos de pol�gonos/l�neas/puntos ASCII.
+	</description>
+	<keywords>
+		r�ster, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Name of input file; or "-" to read from stdin
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<parameter name="rows" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de filas a mantener en memoria
+		</description>
+		<default>
+			4096
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.poly.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.coin.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.coin.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.coin.xml	(revision 369)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.coin">
+	<description>
+		Tabula la ocurrencia mutua (coincidencia) de categor�as de dos capas de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map1" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del primer mapa r�ster
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="map2" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del segundo mapa r�ster
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="units" type="string" required="yes" multiple="no">
+		<label>
+			Unidad de medida
+		</label>
+		<description>
+			c(eldas), p(orcentaje), x(porcentaje de categor�a [columna]), y(porcentaje de categor�a [fila]), a(cres), h(ect�reas), k(il�metros cuadrados), m(illas cuadradas)
+		</description>
+		<values>
+			<value>
+				<name>c</name>
+			</value>
+			<value>
+				<name>p</name>
+			</value>
+			<value>
+				<name>x</name>
+			</value>
+			<value>
+				<name>y</name>
+			</value>
+			<value>
+				<name>a</name>
+			</value>
+			<value>
+				<name>h</name>
+			</value>
+			<value>
+				<name>k</name>
+			</value>
+			<value>
+				<name>m</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="w">
+		<description>
+			Informe amplio, 132 columnas (por omisi�n: 80)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.coin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.edit.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.edit.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.edit.xml	(revision 369)
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.edit">
+	<description>
+		Edita un mapa vectorial, permite a�adir, borrar y modificar los elementos del vectorial seleccionado.
+	</description>
+	<keywords>
+		vectorial, edici�n, geometr�a
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa vectorial a editar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="new_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="tool" type="string" required="yes" multiple="no">
+		<description>
+			Herramienta
+		</description>
+		<values>
+			<value>
+				<name>create</name>
+				<description>Create new (empty) vector map</description>
+			</value>
+			<value>
+				<name>add</name>
+				<description>Add new features to existing vector map</description>
+			</value>
+			<value>
+				<name>delete</name>
+				<description>Delete selected features from vector map</description>
+			</value>
+			<value>
+				<name>copy</name>
+				<description>Copy selected features</description>
+			</value>
+			<value>
+				<name>move</name>
+				<description>Move selected features in vector map</description>
+			</value>
+			<value>
+				<name>flip</name>
+				<description>Flip direction of selected vector lines</description>
+			</value>
+			<value>
+				<name>catadd</name>
+				<description>Set new categories to selected vector features for defined layer</description>
+			</value>
+			<value>
+				<name>catdel</name>
+				<description>Delete categories from selected vector features for defined layer</description>
+			</value>
+			<value>
+				<name>merge</name>
+				<description>Merge selected vector lines</description>
+			</value>
+			<value>
+				<name>break</name>
+				<description>Break/split vector lines</description>
+			</value>
+			<value>
+				<name>snap</name>
+				<description>Snap vector features in given threshold</description>
+			</value>
+			<value>
+				<name>connect</name>
+				<description>Connect two lines</description>
+			</value>
+			<value>
+				<name>chtype</name>
+				<description>Change feature type (point&lt;-&gt;centroid, line&lt;-&gt;boundary)</description>
+			</value>
+			<value>
+				<name>vertexadd</name>
+				<description>Add new vertex to selected vector lines</description>
+			</value>
+			<value>
+				<name>vertexdel</name>
+				<description>Remove vertex from selected vector lines</description>
+			</value>
+			<value>
+				<name>vertexmove</name>
+				<description>Move vertex of selected vector lines</description>
+			</value>
+			<value>
+				<name>zbulk</name>
+				<description>Z bulk-labeling (automated assignment of z coordinate to vector lines)</description>
+			</value>
+			<value>
+				<name>select</name>
+				<description>Select lines and print their ID's</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="input" type="string" required="no" multiple="no">
+		<label>
+			Archivo ASCII a convertir en mapa vectorial binario
+		</label>
+		<description>
+			Si no se indica (o "-") lee de la entrada est�ndar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="move" type="float" required="no" multiple="no">
+		<description>
+			Diferencia en direcci�n X, Y para mover elemento o v�rtice
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="thresh" type="float" required="no" multiple="yes">
+		<label>
+			Threshold distance (coords,snap,query)
+		</label>
+		<description>
+			'-1' para umbral basado en la configuraci�n de la regi�n actual
+		</description>
+		<default>
+			-1,0,0
+		</default>
+	</parameter>
+	<parameter name="ids" type="string" required="no" multiple="no">
+		<label>
+			Identificadores de objetos espaciales: 
+		</label>
+		<description>
+			Ejemplo: 1,3,7-9,13.
+		</description>
+		<keydesc>
+			<item order="1">range</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="cats" type="string" required="no" multiple="no">
+		<label>
+			Valores de la categor�as.
+		</label>
+		<description>
+			Ejemplo: 1,3,7-9,13.
+		</description>
+		<keydesc>
+			<item order="1">range</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="coords" type="float" required="no" multiple="yes">
+		<description>
+			Lista de coordenadas de puntos
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="bbox" type="float" required="no" multiple="no">
+		<description>
+			Recuadro de l�mites para seleccionar elementos
+		</description>
+		<keydesc>
+			<item order="1">x1</item>
+			<item order="2">y1</item>
+			<item order="3">x2</item>
+			<item order="4">y2</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="polygon" type="float" required="no" multiple="yes">
+		<description>
+			Pol�gono para seleccionar elementos
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="query" type="string" required="no" multiple="no">
+		<label>
+			Herramienta consulta
+		</label>
+		<description>
+			Para 'm�s corto' usar valor de umbral negativo, para 'm�s largo' positivo
+		</description>
+		<values>
+			<value>
+				<name>length</name>
+				<description>Select only lines or boundaries shorter/longer than threshold distance</description>
+			</value>
+			<value>
+				<name>dangle</name>
+				<description>Select dangles shorter/longer than threshold distance</description>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="bgmap" type="string" required="no" multiple="yes">
+		<description>
+			Name of background vector map(s)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="snap" type="string" required="no" multiple="no">
+		<description>
+			Autoensamblar objetos espaciales a�adidos o modificados en el umbral dado al objeto espacial existente m�s pr�ximo
+		</description>
+		<default>
+			no
+		</default>
+		<values>
+			<value>
+				<name>no</name>
+				<description>No aplicar autoensamblado</description>
+			</value>
+			<value>
+				<name>node</name>
+				<description>Autoensamblar s�lo a nodo</description>
+			</value>
+			<value>
+				<name>vertex</name>
+				<description>Permitir autoensamblado tambi�n a v�rtice</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="zbulk" type="float" required="no" multiple="no">
+		<label>
+			Valor inicial y paso para el etiquetado Z en masa
+		</label>
+		<description>
+			Par: valor, paso (ej.: 1100,10)
+		</description>
+		<keydesc>
+			<item order="1">value</item>
+			<item order="2">step</item>
+		</keydesc>
+	</parameter>
+	<flag name="r">
+		<description>
+			Invertir selecci�n
+		</description>
+ 		<guisection>
+			Selection
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Cerrar los contornos a�adidos (usando la distancia umbral)
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			No esperar cabecera de los datos de entrada
+		</description>
+ 		<guisection>
+			Input
+		</guisection>
+	</flag>
+	<flag name="t">
+		<description>
+			No construir topolog�a
+		</description>
+	</flag>
+	<flag name="1">
+		<description>
+			Modificar s�lo el primer elemento encontrado en el recuadro de l�mites
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.edit.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.region.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.region.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.region.xml	(revision 369)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.region">
+	<description>
+		Crear un nuevo vectorial a partir de la regi�n actual.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			Seleccione tipo: l�nea o �rea
+		</description>
+		<default>
+			area
+		</default>
+		<values>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="cat" type="integer" required="no" multiple="no">
+		<description>
+			Valor de la categor�a.
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.region.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.ascii.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.ascii.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.ascii.xml	(revision 369)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.ascii">
+	<description>
+		Convierte un archivo r�ster ASCII en una capa de mapa r�ster binaria.
+	</description>
+	<keywords>
+		r�ster, importar, conversi�n
+	</keywords>
+	<parameter name="input" type="string" required="no" multiple="no">
+		<description>
+			Archivo r�ster ASCII a importar. Si no se indica se leer� la entrada est�ndar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<parameter name="mult" type="float" required="no" multiple="no">
+		<description>
+			Multiplicador para datos ASCII
+		</description>
+		<default>
+			1.0 or read from header
+		</default>
+	</parameter>
+	<parameter name="nv" type="string" required="no" multiple="no">
+		<description>
+			Cadena que representa celdas de datos con valor NULO
+		</description>
+		<default>
+			* or read from header
+		</default>
+	</parameter>
+	<flag name="i">
+		<description>
+			Se importan los valores enteros
+		</description>
+	</flag>
+	<flag name="f">
+		<description>
+			Se importan lo valores de coma flotante
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Se importan los valores de coma flotante doble
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Se importar� archivo ASCII SURFER (Golden Software)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.ascii.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.rast.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.rast.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.rast.xml	(revision 369)
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.to.rast">
+	<description>
+		Converts a binary GRASS vector map into a GRASS raster map .
+	</description>
+	<keywords>
+		vectorial, r�ster, conversi�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="use" type="string" required="no" multiple="no">
+		<description>
+			Source of raster values
+		</description>
+		<default>
+			attr
+		</default>
+		<values>
+			<value>
+				<name>attr</name>
+				<description>read values from attribute table</description>
+			</value>
+			<value>
+				<name>cat</name>
+				<description>use category values</description>
+			</value>
+			<value>
+				<name>val</name>
+				<description>use value specified by value option</description>
+			</value>
+			<value>
+				<name>z</name>
+				<description>use z coordinate (points or contours only)</description>
+			</value>
+			<value>
+				<name>dir</name>
+				<description>output as flow direction (lines only)</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<description>
+			Nombre de columna para el par�metro atributos (el tipo de datos debe ser num�rico)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Attributes
+		</guisection>
+	</parameter>
+	<parameter name="value" type="float" required="no" multiple="no">
+		<description>
+			Valor r�ster
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="rows" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de filas a mantener en memoria
+		</description>
+		<default>
+			4096
+		</default>
+	</parameter>
+	<parameter name="rgbcolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna de definici�n de color (con entradas RRR:GGG:BBB)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Attributes
+		</guisection>
+	</parameter>
+	<parameter name="labelcolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna usada como etiquetas de categor�a r�ster
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Attributes
+		</guisection>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.rast.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.distance.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.distance.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.distance.xml	(revision 369)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.distance">
+	<description>
+		Finds the nearest element in vector map 'to' for elements in vector map 'from'.
+	</description>
+	<keywords>
+		vectorial, base de datos, tabla de atributos
+	</keywords>
+	<parameter name="from" type="string" required="yes" multiple="no">
+		<description>
+			Name of existing vector map (from)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+		<guisection>
+			From
+		</guisection>
+	</parameter>
+	<parameter name="to" type="string" required="yes" multiple="no">
+		<description>
+			Name of existing vector map (to)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+		<guisection>
+			To
+		</guisection>
+	</parameter>
+	<parameter name="from_type" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (from)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+		</values>
+		<guisection>
+			From
+		</guisection>
+	</parameter>
+	<parameter name="to_type" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (to)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+		<guisection>
+			To
+		</guisection>
+	</parameter>
+	<parameter name="from_layer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (from)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			From
+		</guisection>
+	</parameter>
+	<parameter name="to_layer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (to)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			To
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida que contiene l�neas que conectan los elementos m�s cercanos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="dmax" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�xima o -1 para sin l�mite
+		</description>
+		<default>
+			-1
+		</default>
+	</parameter>
+	<parameter name="dmin" type="float" required="no" multiple="no">
+		<description>
+			Minimum distance or -1 for no limit
+		</description>
+		<default>
+			-1
+		</default>
+	</parameter>
+	<parameter name="upload" type="string" required="yes" multiple="yes">
+		<description>
+			Valores que describen la relaci�n entre los dos elementos m�s pr�ximos
+		</description>
+		<values>
+			<value>
+				<name>cat</name>
+				<description>category of the nearest feature</description>
+			</value>
+			<value>
+				<name>dist</name>
+				<description>minimum distance to nearest feature</description>
+			</value>
+			<value>
+				<name>to_x</name>
+				<description>x coordinate of the nearest point on 'to' feature</description>
+			</value>
+			<value>
+				<name>to_y</name>
+				<description>y coordinate of the nearest point on 'to' feature</description>
+			</value>
+			<value>
+				<name>to_along</name>
+				<description>distance between points/centroids in 'from' map and the linear feature's start point in 'to' map, along this linear feature</description>
+			</value>
+			<value>
+				<name>to_angle</name>
+				<description>angle between the linear feature in 'to' map and the positive x axis, at the location of point/centroid in 'from' map, counterclockwise, in radians, which is between -PI and PI inclusive</description>
+			</value>
+			<value>
+				<name>to_attr</name>
+				<description>attribute of nearest feature given by to_column option</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) de columna donde se cargar�n los valores especificados por la opci�n 'upload'
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Desde_mapa
+		</guisection>
+	</parameter>
+	<parameter name="to_column" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna del elemento m�s cercano (usada con upload=to_attr)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			To
+		</guisection>
+	</parameter>
+	<parameter name="table" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la tabla creada para la salida cuando se usa la opci�n distancia a todos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_dbtable" element="dbtable" prompt="dbtable" />
+	</parameter>
+	<flag name="p">
+		<label>
+			Imprimir la salida a stdout, no actualizar tabla de atributos
+		</label>
+		<description>
+			La primera columna es siempre la categor�a del elemento 'desde' llamada from_cat
+		</description>
+	</flag>
+	<flag name="a">
+		<label>
+			Calcular distancias a todos los elementos dentro del umbral
+		</label>
+		<description>
+			La salida se escribe a stdout pero puede se puede cargar a una nueva tabla creada por este m�dulo. Las categor�as 'desde' pueden ser m�ltiples.
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.distance.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.xyz.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.xyz.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.xyz.xml	(revision 369)
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.xyz">
+	<description>
+		Crear un mapa r�ster a partir de un ensamblaje de muchas coordenadas usando estad�sticas univariantes.
+	</description>
+	<keywords>
+		r�ster, importar, LIDAR
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo ASCII que contiene los datos de entrada (o "-" para leer de stdin)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			Estad�stica a utilizar para los valores r�ster
+		</description>
+		<default>
+			mean
+		</default>
+		<values>
+			<value>
+				<name>n</name>
+			</value>
+			<value>
+				<name>min</name>
+			</value>
+			<value>
+				<name>max</name>
+			</value>
+			<value>
+				<name>range</name>
+			</value>
+			<value>
+				<name>sum</name>
+			</value>
+			<value>
+				<name>mean</name>
+			</value>
+			<value>
+				<name>stddev</name>
+			</value>
+			<value>
+				<name>variance</name>
+			</value>
+			<value>
+				<name>coeff_var</name>
+			</value>
+			<value>
+				<name>median</name>
+			</value>
+			<value>
+				<name>percentile</name>
+			</value>
+			<value>
+				<name>skewness</name>
+			</value>
+			<value>
+				<name>trimmean</name>
+			</value>
+		</values>
+		<guisection>
+			Statistic
+		</guisection>
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			Tipo de almacenamiento para el mapa r�ster resultante
+		</description>
+		<default>
+			FCELL
+		</default>
+		<values>
+			<value>
+				<name>CELL</name>
+			</value>
+			<value>
+				<name>FCELL</name>
+			</value>
+			<value>
+				<name>DCELL</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos.
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<default>
+			|
+		</default>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="x" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de columna de las coordenadas X en el archivo de entrada (la primera columna es 1)
+		</description>
+		<default>
+			1
+		</default>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="y" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de columna de las coordenadas Y en el archivo de entrada
+		</description>
+		<default>
+			2
+		</default>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="z" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de columna de los valores de datos en el archivo de entrada
+		</description>
+		<default>
+			3
+		</default>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="zrange" type="float" required="no" multiple="no">
+		<description>
+			Rango de filtrado para los datos Z (m�nimo, m�ximo)
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+	</parameter>
+	<parameter name="zscale" type="float" required="no" multiple="no">
+		<description>
+			Scale to apply to z data
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="percent" type="integer" required="no" multiple="no">
+		<description>
+			Porcentaje de mapa a mantener en memoria
+		</description>
+		<default>
+			100
+		</default>
+		<values>
+			<value>
+				<name>1-100</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="pth" type="integer" required="no" multiple="no">
+		<description>
+			pth percentile of the values
+		</description>
+		<values>
+			<value>
+				<name>1-100</name>
+			</value>
+		</values>
+		<guisection>
+			Statistic
+		</guisection>
+	</parameter>
+	<parameter name="trim" type="float" required="no" multiple="no">
+		<description>
+			Descartar &lt;trim&gt; porcentaje de las menores y &lt;trim&gt; porcentaje de las mayores observaciones
+		</description>
+		<values>
+			<value>
+				<name>0-50</name>
+			</value>
+		</values>
+		<guisection>
+			Statistic
+		</guisection>
+	</parameter>
+	<flag name="s">
+		<description>
+			Escanear archivo de datos para la extensi�n y luego salir
+		</description>
+	</flag>
+	<flag name="g">
+		<description>
+			En modo de escaneo, imprimir usando estilo de script de consola
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Ignore broken lines
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.xyz.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.patch.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.patch.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.patch.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.patch">
+	<description>
+		Crea una capa de mapa r�ster compuesta usando valores de categor�a conocidos de una (o m�s) capa(s) de mapa para rellenar �reas "sin datos" en otra capa de mapa.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre de los mapas r�ster a parchear juntos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Usar cero (0) para transparencia en vez de NULO
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.patch.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.split.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.split.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.split.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.split">
+	<description>
+		Split lines to shorter segments.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="length" type="float" required="no" multiple="no">
+		<description>
+			Maximum segment length.
+		</description>
+	</parameter>
+	<parameter name="vertices" type="integer" required="no" multiple="no">
+		<description>
+			Maximum number of vertices in segment.
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.split.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ogr.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ogr.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ogr.xml	(revision 369)
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.ogr">
+	<description>
+		Convierte a uno de los formatos vectoriales OGR soportados.
+	</description>
+	<keywords>
+		vectorial, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de elemento. La combinaci�n de tipos no est� soportada por todos los formatos.
+		</description>
+		<default>
+			line,boundary
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+		</values>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="dsn" type="string" required="yes" multiple="no">
+		<label>
+			Nombre del origen de datos de la salida OGR
+		</label>
+		<description>
+			Por ejemplo: Shapefile de ESRI: nombre o directorio para almacenamiento
+		</description>
+	</parameter>
+	<parameter name="olayer" type="string" required="no" multiple="no">
+		<label>
+			Nombre de capa OGR. Si no se especifica, se usar� en nombre de entrado.
+		</label>
+		<description>
+			Por ejemplo: Shapefile de ESRI: nombre del shapefile
+		</description>
+		<guisection>
+			Creation
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Input
+		</guisection>
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Formato OGR
+		</description>
+		<default>
+			ESRI_Shapefile
+		</default>
+		<values>
+			<value>
+				<name>ESRI_Shapefile</name>
+			</value>
+			<value>
+				<name>MapInfo_File</name>
+			</value>
+			<value>
+				<name>TIGER</name>
+			</value>
+			<value>
+				<name>S57</name>
+			</value>
+			<value>
+				<name>DGN</name>
+			</value>
+			<value>
+				<name>Memory</name>
+			</value>
+			<value>
+				<name>BNA</name>
+			</value>
+			<value>
+				<name>CSV</name>
+			</value>
+			<value>
+				<name>GML</name>
+			</value>
+			<value>
+				<name>GPX</name>
+			</value>
+			<value>
+				<name>KML</name>
+			</value>
+			<value>
+				<name>GeoJSON</name>
+			</value>
+			<value>
+				<name>GMT</name>
+			</value>
+			<value>
+				<name>Geoconcept</name>
+			</value>
+		</values>
+		<guisection>
+			Creation
+		</guisection>
+	</parameter>
+	<parameter name="dsco" type="string" required="no" multiple="yes">
+		<description>
+			Opci�n de creaci�n de conjunto de datos OGR (espec�fica de formato, NOMBRE=VALOR)
+		</description>
+		<default>
+			
+		</default>
+		<guisection>
+			Creation
+		</guisection>
+	</parameter>
+	<parameter name="lco" type="string" required="no" multiple="yes">
+		<description>
+			Opci�n de creaci�n de capa OGR (espec�fica de formato, NOMBRE=VALOR)
+		</description>
+		<default>
+			
+		</default>
+		<guisection>
+			Creation
+		</guisection>
+	</parameter>
+	<flag name="c">
+		<description>
+			Exportar s�lo elementos con categor�a (etiquetados). En caso contrario se exportar�n todos.
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Usar formato de archivo .prj tipo ESRI (s�lo se aplica al Shapefile de salida)
+		</description>
+	</flag>
+	<flag name="p">
+		<description>
+			Exportar l�neas como pol�gonos
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ogr.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.xml	(revision 369)
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.colors">
+	<description>
+		Crea/modifica la tabla de colores asociada a una capa de mapa r�ster.
+	</description>
+	<keywords>
+		raster, color table
+	</keywords>
+	<parameter name="map" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="color" type="string" required="no" multiple="no">
+		<description>
+			Tipo de tabla de colores
+		</description>
+		<keydesc>
+			<item order="1">style</item>
+		</keydesc>
+		<values>
+			<value>
+				<name>aspect</name>
+				<description>aspect oriented grey colors</description>
+			</value>
+			<value>
+				<name>aspectcolr</name>
+				<description>aspect oriented rainbow colors</description>
+			</value>
+			<value>
+				<name>bcyr</name>
+				<description>blue through cyan through yellow to red</description>
+			</value>
+			<value>
+				<name>bgyr</name>
+				<description>blue through green through yellow to red</description>
+			</value>
+			<value>
+				<name>byg</name>
+				<description>blue through yellow to green</description>
+			</value>
+			<value>
+				<name>byr</name>
+				<description>blue through yellow to red</description>
+			</value>
+			<value>
+				<name>celsius</name>
+				<description>blue to red for degree Celsius temperature</description>
+			</value>
+			<value>
+				<name>corine</name>
+				<description>EU Corine land cover colors</description>
+			</value>
+			<value>
+				<name>curvature</name>
+				<description>for terrain curvatures (from v.surf.rst and r.slope.aspect)</description>
+			</value>
+			<value>
+				<name>differences</name>
+				<description>differences oriented colors</description>
+			</value>
+			<value>
+				<name>elevation</name>
+				<description>maps relative ranges of raster values to elevation color ramp</description>
+			</value>
+			<value>
+				<name>etopo2</name>
+				<description>colors for ETOPO2 worldwide bathymetry/topography</description>
+			</value>
+			<value>
+				<name>evi</name>
+				<description>enhanced vegetative index colors</description>
+			</value>
+			<value>
+				<name>gdd</name>
+				<description>accumulated growing degree days</description>
+			</value>
+			<value>
+				<name>grey</name>
+				<description>grey scale</description>
+			</value>
+			<value>
+				<name>grey1.0</name>
+				<description>grey scale for raster values between 0.0-1.0</description>
+			</value>
+			<value>
+				<name>grey255</name>
+				<description>grey scale for raster values between 0-255</description>
+			</value>
+			<value>
+				<name>gyr</name>
+				<description>green through yellow to red</description>
+			</value>
+			<value>
+				<name>haxby</name>
+				<description>relative colors for bathymetry or topography</description>
+			</value>
+			<value>
+				<name>ndvi</name>
+				<description>Normalized Difference Vegetation Index colors</description>
+			</value>
+			<value>
+				<name>population</name>
+				<description>color table covering human population classification breaks</description>
+			</value>
+			<value>
+				<name>precipitation</name>
+				<description>precipitation color table (0..2000mm)</description>
+			</value>
+			<value>
+				<name>rainbow</name>
+				<description>rainbow color table</description>
+			</value>
+			<value>
+				<name>ramp</name>
+				<description>color ramp</description>
+			</value>
+			<value>
+				<name>rstcurv</name>
+				<description>terrain curvature (from r.resamp.rst)</description>
+			</value>
+			<value>
+				<name>ryb</name>
+				<description>red through yellow to blue</description>
+			</value>
+			<value>
+				<name>ryg</name>
+				<description>red through yellow to green</description>
+			</value>
+			<value>
+				<name>sepia</name>
+				<description>yellowish-brown through to white</description>
+			</value>
+			<value>
+				<name>slope</name>
+				<description>r.slope.aspect-type slope colors for raster values 0-90</description>
+			</value>
+			<value>
+				<name>srtm</name>
+				<description>color palette for Shuttle Radar Topography Mission elevation</description>
+			</value>
+			<value>
+				<name>terrain</name>
+				<description>global elevation color table covering -11000 to +8850m</description>
+			</value>
+			<value>
+				<name>wave</name>
+				<description>color wave</description>
+			</value>
+			<value>
+				<name>random</name>
+				<description>random color table</description>
+			</value>
+			<value>
+				<name>grey.eq</name>
+				<description>histogram-equalized grey scale</description>
+			</value>
+			<value>
+				<name>grey.log</name>
+				<description>histogram logarithmic transformed grey scale</description>
+			</value>
+			<value>
+				<name>rules</name>
+				<description>create new color table based on user-specified rules read from stdin</description>
+			</value>
+		</values>
+		<guisection>
+			Colores
+		</guisection>
+	</parameter>
+	<parameter name="raster" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster del que copiar la tabla de colores
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="rules" type="string" required="no" multiple="no">
+		<description>
+			Path to rules file ("-" to read rules from stdin)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+		<guisection>
+			Colores
+		</guisection>
+	</parameter>
+	<flag name="r">
+		<description>
+			Eliminar la tabla de colores existente
+		</description>
+	</flag>
+	<flag name="w">
+		<description>
+			S�lo escribir nueva tabla de colores si no existe ya una
+		</description>
+	</flag>
+	<flag name="l">
+		<description>
+			Listar reglas disponibles y salir
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Invertir colores
+		</description>
+ 		<guisection>
+			Colores
+		</guisection>
+	</flag>
+	<flag name="g">
+		<description>
+			Escalado logar�tmico
+		</description>
+ 		<guisection>
+			Colores
+		</guisection>
+	</flag>
+	<flag name="a">
+		<description>
+			Logarithmic-absolute scaling
+		</description>
+ 		<guisection>
+			Colores
+		</guisection>
+	</flag>
+	<flag name="e">
+		<description>
+			Ecualizaci�n de histograma
+		</description>
+ 		<guisection>
+			Colores
+		</guisection>
+	</flag>
+	<flag name="i">
+		<description>
+			Introducir reglas de forma interactiva
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.colors.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.patch.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.patch.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.patch.xml	(revision 369)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.patch">
+	<description>
+		Crear una capa de mapa vectorial nueva combinando otras capas de mapas vectoriales.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) del (los) mapa(s) vectorial(es) de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="bbox" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida en el que se escriben los recuadros de l�mites de los mapas vectoriales de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="a">
+		<description>
+			A�adir archivos al existente (debe estar activada la sobrescritura de archivos existentes)
+		</description>
+	</flag>
+	<flag name="e">
+		<label>
+			Copiar tambi�n la tabla de atributos
+		</label>
+		<description>
+			Actualmente s�lo est� soportada la tabla de la capa 1
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.patch.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.fp.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.fp.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.fp.xml	(revision 369)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.mfilter.fp">
+	<description>
+		Filtro de matrices de mapas r�ster.
+	</description>
+	<keywords>
+		r�ster, �lgebra de mapas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="filter" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo de filtro
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="repeat" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de veces a repetir el filtro
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo de mapa r�ster de salida
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Aplicar filtro s�lo a valores de datos nulos
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.fp.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.null.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.null.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.null.xml	(revision 369)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.null">
+	<description>
+		Manages NULL-values of given raster map.
+	</description>
+	<keywords>
+		raster, null data
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster para el que editar archivo nulo
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="setnull" type="string" required="no" multiple="yes">
+		<description>
+			Lista de valores de celda para establecer a NULO
+		</description>
+		<keydesc>
+			<item order="1">val[-val]</item>
+		</keydesc>
+	</parameter>
+	<parameter name="null" type="float" required="no" multiple="no">
+		<description>
+			El valor por el que sustituir los valores nulos
+		</description>
+	</parameter>
+	<flag name="f">
+		<description>
+			Hacer el trabajo s�lo si el mapa es de coma flotante
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Hacer el trabajo s�lo si el mapa es de enteros
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Hacer el trabajo s�lo si el mapa es no tiene un archivo de mapa de bits de valor NULO
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Crear archivo de mapa de bits de valor NULO validando todas las celdas de datos
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Eliminar archivo de mapa de bits de valor NULO
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.null.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.lake.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.lake.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.lake.xml	(revision 369)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.lake">
+	<description>
+		Fills lake from seed at given level.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="dem" type="string" required="yes" multiple="no">
+		<description>
+			Name of terrain raster map (DEM)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="wl" type="float" required="yes" multiple="no">
+		<description>
+			Nivel del agua
+		</description>
+	</parameter>
+	<parameter name="lake" type="string" required="no" multiple="no">
+		<description>
+			Name for output raster map with lake
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="xy" type="float" required="no" multiple="no">
+		<description>
+			Seed point coordinates
+		</description>
+		<keydesc>
+			<item order="1">east</item>
+			<item order="2">north</item>
+		</keydesc>
+	</parameter>
+	<parameter name="seed" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map with seed (at least 1 cell &gt; 0)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="n">
+		<description>
+			Usar valores de profundidad negativos para mapa r�ster con lago
+		</description>
+	</flag>
+	<flag name="o">
+		<description>
+			Overwrite seed map with result (lake) map
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.lake.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.xml	(revision 369)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.grow">
+	<description>
+		Genera una capa de mapa r�ster con �reas contiguas incrementadas en una celda.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="radius" type="float" required="no" multiple="no">
+		<description>
+			Radio de buffer en celdas r�ster
+		</description>
+		<default>
+			1.01
+		</default>
+	</parameter>
+	<parameter name="metric" type="string" required="no" multiple="no">
+		<description>
+			M�trica
+		</description>
+		<default>
+			euclidean
+		</default>
+		<values>
+			<value>
+				<name>euclidean</name>
+			</value>
+			<value>
+				<name>maximum</name>
+			</value>
+			<value>
+				<name>manhattan</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="old" type="integer" required="no" multiple="no">
+		<description>
+			Valor a escribir para celdas de entrada que no son NULAS (-1 =&gt; NULO)
+		</description>
+	</parameter>
+	<parameter name="new" type="integer" required="no" multiple="no">
+		<description>
+			Valor a escribir para celdas "incrementadas"
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.grow.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.transect.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.transect.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.transect.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.transect">
+	<description>
+		Produce valores de capa de mapa r�ster que caen a lo largo de l�nea(s) de transecto definidas por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster a consultar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="line" type="string" required="yes" multiple="yes">
+		<description>
+			Definici�n del transecto
+		</description>
+		<keydesc>
+			<item order="1">east</item>
+			<item order="2">north</item>
+			<item order="3">azimuth</item>
+			<item order="4">distance</item>
+		</keydesc>
+	</parameter>
+	<parameter name="null" type="string" required="no" multiple="no">
+		<description>
+			Cadena char para representar celdas sin datos
+		</description>
+		<default>
+			*
+		</default>
+	</parameter>
+	<flag name="g">
+		<description>
+			Sacar Este y Norte en las primeras dos columnas de una salida de 4 columnas
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.transect.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.select.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.select.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.select.xml	(revision 369)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.select">
+	<description>
+		Selects features from vector map (A) by features from other vector map (B).
+	</description>
+	<keywords>
+		vector, query
+	</keywords>
+	<parameter name="ainput" type="string" required="yes" multiple="no">
+		<description>
+			Name of input vector map (A)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="atype" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (vector map A)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="alayer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (vector map A)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="binput" type="string" required="yes" multiple="no">
+		<description>
+			Name of input vector map (B)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="btype" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (vector map B)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="blayer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (vector map B)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="operator" type="string" required="no" multiple="no">
+		<label>
+			Operator defines required relation between features
+		</label>
+		<description>
+			A feature is written to output if the result of operation 'ainput operator binput' is true. An input feature is considered to be true, if category of given layer is defined.
+		</description>
+		<default>
+			overlap
+		</default>
+		<values>
+			<value>
+				<name>overlap</name>
+				<description>features partially or completely overlap</description>
+			</value>
+		</values>
+	</parameter>
+	<flag name="t">
+		<description>
+			No crear la tabla de atributos
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Invertir selecci�n
+		</description>
+ 		<guisection>
+			Selection
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.select.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mode.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mode.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mode.xml	(revision 369)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.mode">
+	<description>
+		Encuentra el modo de los valores en un para de cobertura dentro de �reas con los mismos valores de categor�a asignados en un mapa base especificado por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="base" type="string" required="yes" multiple="no">
+		<description>
+			Mapa base por clasificar
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cover" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de cobertura
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mode.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.param.scale.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.param.scale.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.param.scale.xml	(revision 369)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.param.scale">
+	<label>
+		Extrae par�metros del terreno a partir de un DEM.
+	</label>
+	<description>
+		Utiliza una aproximaci�n multiescala tomando par�metros cuadr�ticos que se ajusten a cualquier tama�o de ventana (v�a las menores esquinas).
+	</description>
+	<keywords>
+		r�ster, goemorfolog�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Capa r�ster de salida que contenga par�metros morfom�tricos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="s_tol" type="float" required="no" multiple="no">
+		<description>
+			Tolerancia de pendiente que define una superficie 'llana' (grados)
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="c_tol" type="float" required="no" multiple="no">
+		<description>
+			Tolerancia de curvatura que define una superficie 'planar'
+		</description>
+		<default>
+			0.0001
+		</default>
+	</parameter>
+	<parameter name="size" type="integer" required="no" multiple="no">
+		<description>
+			Tama�o de la ventana de procesamiento (s�lo n�meros impares, m�ximo 69)
+		</description>
+		<default>
+			3
+		</default>
+	</parameter>
+	<parameter name="param" type="string" required="no" multiple="no">
+		<description>
+			Par�metros morfom�tricos en la ventana 'size' a calcular
+		</description>
+		<default>
+			elev
+		</default>
+		<values>
+			<value>
+				<name>elev</name>
+			</value>
+			<value>
+				<name>slope</name>
+			</value>
+			<value>
+				<name>aspect</name>
+			</value>
+			<value>
+				<name>profc</name>
+			</value>
+			<value>
+				<name>planc</name>
+			</value>
+			<value>
+				<name>longc</name>
+			</value>
+			<value>
+				<name>crosc</name>
+			</value>
+			<value>
+				<name>minic</name>
+			</value>
+			<value>
+				<name>maxic</name>
+			</value>
+			<value>
+				<name>feature</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="exp" type="float" required="no" multiple="no">
+		<description>
+			Exponent for distance weighting (0.0-4.0)
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="zscale" type="float" required="no" multiple="no">
+		<description>
+			Factor de escalado vertical
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<flag name="c">
+		<description>
+			Obligar al modelo a trav�s de la celda central de la ventana
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.param.scale.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.clean.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.clean.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.clean.xml	(revision 369)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.clean">
+	<description>
+		Herramientas para limpiar la topolog�a de mapas vectoriales.
+	</description>
+	<keywords>
+		vectorial, topolog�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="error" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa de salida donde se escriben los errores
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="tool" type="string" required="yes" multiple="yes">
+		<description>
+			Herramienta de limpieza
+		</description>
+		<values>
+			<value>
+				<name>break</name>
+				<description>break lines at each intersection</description>
+			</value>
+			<value>
+				<name>snap</name>
+				<description>snap lines to vertex in threshold</description>
+			</value>
+			<value>
+				<name>rmdangle</name>
+				<description>remove dangles, threshold ignored if &lt; 0</description>
+			</value>
+			<value>
+				<name>chdangle</name>
+				<description>change the type of boundary dangle to line, threshold ignored if &lt; 0, input line type is ignored</description>
+			</value>
+			<value>
+				<name>rmbridge</name>
+				<description>remove bridges connecting area and island or 2 islands</description>
+			</value>
+			<value>
+				<name>chbridge</name>
+				<description>change the type of bridges connecting area and island or 2 islands from boundary to line</description>
+			</value>
+			<value>
+				<name>rmdupl</name>
+				<description>remove duplicate geometry features (pay attention to categories!)</description>
+			</value>
+			<value>
+				<name>rmdac</name>
+				<description>remove duplicate area centroids ('type' option ignored)</description>
+			</value>
+			<value>
+				<name>bpol</name>
+				<description>break (topologically clean) polygons (imported from non topological format, like ShapeFile). Boundaries are broken on each point shared between 2 and more polygons where angles of segments are different</description>
+			</value>
+			<value>
+				<name>prune</name>
+				<description>remove vertices in threshold from lines and boundaries, boundary is pruned only if topology is not damaged (new intersection, changed attachement of centroid), first and last segment of the boundary is never changed</description>
+			</value>
+			<value>
+				<name>rmarea</name>
+				<description>remove small areas, the longest boundary with adjacent area is removed</description>
+			</value>
+			<value>
+				<name>rmline</name>
+				<description>remove all lines or boundaries of zero length, threshold is ignored</description>
+			</value>
+			<value>
+				<name>rmsa</name>
+				<description>remove small angles between lines at nodes</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="thresh" type="float" required="no" multiple="yes">
+		<label>
+			Threshold
+		</label>
+		<description>
+			Umbral en unidades de mapa, un valor para cada herramienta (por omisi�n: 0.0[,0.0,...])
+		</description>
+	</parameter>
+	<flag name="b">
+		<description>
+			No construir la topolog�a para el vectorial de salida
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.clean.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.perturb.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.perturb.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.perturb.xml	(revision 369)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.perturb">
+	<description>
+		Perturbaciones de localizaciones aleatorias de puntos vectoriales de GRASS
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Puntos vectoriales a perturbar espacialmente
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="distribution" type="string" required="no" multiple="no">
+		<description>
+			Distribuci�n de la perturbaci�n
+		</description>
+		<default>
+			uniform
+		</default>
+		<values>
+			<value>
+				<name>uniform</name>
+			</value>
+			<value>
+				<name>normal</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="parameters" type="float" required="yes" multiple="yes">
+		<description>
+			Par�metro(s) de distribuci�n. Se la distribuci�n es uniforme, s�lo se necesita un par�metro, el m�ximo. Para una distribuci�n normal se requieren dos par�metros, la media y la desviaci�n est�ndar.
+		</description>
+	</parameter>
+	<parameter name="minimum" type="float" required="no" multiple="no">
+		<description>
+			Desviaci�n m�nima en unidades de mapa
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="seed" type="integer" required="no" multiple="no">
+		<description>
+			Seed for random number generation
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.perturb.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.info.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.info.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.info.xml	(revision 369)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.info">
+	<description>
+		Muestra informaci�n b�sica sobre una capa de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="r">
+		<description>
+			Imprimir rango solamente
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Imprimir s�lo resoluci�n de mapa r�ster (resoluci�n-NS, resoluci�n-EW)
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			Imprimir s�lo el tipo de mapa r�ster
+		</description>
+	</flag>
+	<flag name="g">
+		<description>
+			Imprimir s�lo la regi�n del mapa
+		</description>
+	</flag>
+	<flag name="h">
+		<description>
+			Imprimir hist�rico del r�ster en vez de informaci�n
+		</description>
+	</flag>
+	<flag name="u">
+		<description>
+			Imprimir s�lo unidades de datos del mapa r�ster
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Imprimir s�lo datum vertical del mapa r�ster
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Imprimir s�lo el t�tulo del mapa
+		</description>
+	</flag>
+	<flag name="p">
+		<description>
+			Imprimir s�lo la marca de tiempo del mapa r�ster (d�a.mes.a�o hora:minutos:segundos)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.info.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.profile.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.profile.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.profile.xml	(revision 369)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.profile">
+	<description>
+		Saca los valores de la capa de mapa r�ster que caen en la l�nea(s) definida por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre de archivo para la salida (usar salida=- para stdout)
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+		<default>
+			-
+		</default>
+	</parameter>
+	<parameter name="profile" type="string" required="no" multiple="yes">
+		<description>
+			Pares de coordenadas del perfil
+		</description>
+		<keydesc>
+			<item order="1">east</item>
+			<item order="2">north</item>
+		</keydesc>
+	</parameter>
+	<parameter name="res" type="float" required="no" multiple="no">
+		<description>
+			Resoluci�n a lo largo del perfil (por omisi�n = resoluci�n de la regi�n actual)
+		</description>
+	</parameter>
+	<parameter name="null" type="string" required="no" multiple="no">
+		<description>
+			Car�cter para representar celdas sin datos
+		</description>
+		<default>
+			*
+		</default>
+	</parameter>
+	<flag name="i">
+		<description>
+			Seleccionar puntos finales de forma interactiva
+		</description>
+	</flag>
+	<flag name="g">
+		<description>
+			Sacar Este y Norte en las primeras dos columnas de una salida de 4 columnas
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Dar los valores de color RRR GGG BBB para cada punto del perfil
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.profile.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.xyz.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.xyz.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.xyz.xml	(revision 369)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.xyz">
+	<description>
+		Exportar un mapa r�ster a un archivo de texto como valores X, Y, Z basados en los centros de las celdas.
+	</description>
+	<keywords>
+		r�ster, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el archivo de salida (si se omite o "-" salida a stdout)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<default>
+			|
+		</default>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.xyz.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw.xml	(revision 369)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.idw">
+	<description>
+		Surface interpolation utility for raster map.
+	</description>
+	<keywords>
+		raster, interpolation
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="npoints" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de puntos de interpolaci�n
+		</description>
+		<default>
+			12
+		</default>
+	</parameter>
+	<flag name="e">
+		<description>
+			La salida es el error de interpolaci�n
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.idw.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.recode.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.recode.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.recode.xml	(revision 369)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.recode">
+	<description>
+		Recodifica mapas r�ster de categor�as.
+	</description>
+	<keywords>
+		raster, recode category
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster a recodificar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="rules" type="string" required="no" multiple="no">
+		<label>
+			Archivo que contiene reglas de recodificaci�n
+		</label>
+		<description>
+			Nombre del archivo de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+	</parameter>
+	<flag name="a">
+		<description>
+			Alinear la regi�n actual al mapa de entrada
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Forzar la salida a tipo de mapa doble (DCELL)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.recode.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.ros.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.ros.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.ros.xml	(revision 369)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.ros">
+	<description>
+		Genera tres o cuatro capas de mapa r�ster mostrando 1) la tasa de propagaci�n (ROS) b�sica (perpendicular), 2) la ROS m�xima (hacia delante), 3) la direcci�n de la m�xima ROS y (opcional) 4) la distancia spotting potencial m�xima.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="model" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene MODELOS de combustible
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="moisture_1h" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la HUMEDAD de combustible a 1-HORA (%)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="moisture_10h" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la HUMEDAD de combustible a 10-HORAS (%)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="moisture_100h" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la HUMEDAD de combustible a 100-HORAS (%)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="moisture_live" type="string" required="yes" multiple="no">
+		<description>
+			Name of raster map containing LIVE fuel MOISTURE (%)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="velocity" type="string" required="no" multiple="no">
+		<description>
+			Name of raster map containing midflame wind VELOCITYs (ft/min)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="direction" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene las DIRECCIONES de viento (grados)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="slope" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la PENDIENTE (grados)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="aspect" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la ORIENTACI�N (grados, en sentido antihorario desde el Este)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="elevation" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene la ELEVACI�N (m) (requerido w/ -s)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene los resultados (varias capas nuevas)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="v">
+		<description>
+			Ejecutar con comentarios
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Also produce maximum SPOTTING distance
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.ros.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.basins.fill.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.basins.fill.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.basins.fill.xml	(revision 369)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.basins.fill">
+	<description>
+		Genera una capa de mapa r�ster mostrando subcuencas hidrogr�ficas.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="number" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de pases por el conjunto de datos
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="c_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo de red de corrientes codificado
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="t_map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de archivo de red de divisorias adelgazadas
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="result" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el archivo de partici�n de cuenca resultante
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.basins.fill.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sun.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sun.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sun.xml	(revision 369)
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.sun">
+	<label>
+		Modelo de irradiancia e irradiaci�n solar.
+	</label>
+	<description>
+		Procesa mapas r�ster de irradiaci�n solar directa (rayo), difusa y reflejada para un d�a, latitud, superficie y condiciones atmosf�ricas dados. Los par�metros solares (ej. horas de salida y puesta del sol, declinaci�n, irradiancia extraterrestre, duraci�n del d�a) se guardan en el archivo hist�rico del mapa. De forma alternativa, se puede especificar una hora local para procesar el �ngulo de incidencia solar y/o mapas r�ster de irradiancia. El efecto de sombreo de la topograf�a se puede incorporar opcionalmente.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevin" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de elevaci�n de entrada [metros]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="aspin" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de orientaci�n (orientaci�n del terreno o azimut del panel solar) [grados decimales]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="aspect" type="float" required="no" multiple="no">
+		<description>
+			A single value of the orientation (aspect), 270 is south
+		</description>
+		<default>
+			270
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="slopein" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de pendiente de entrada (pendiente del terreno o inclinaci�n del panel solar) [grados decimales]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="slope" type="float" required="no" multiple="no">
+		<description>
+			A single value of inclination (slope)
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="linkein" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de coeficiente de turbidez atmosf�rica Linke de entrada [-]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="lin" type="float" required="no" multiple="no">
+		<description>
+			Un valor �nico del coeficiente de turbidez atmosf�rica Linke [-]
+		</description>
+		<default>
+			3.0
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="albedo" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada de coeficiente albedo del terreno [-]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="alb" type="float" required="no" multiple="no">
+		<description>
+			Un solo valor del coeficiente albedo del terreno [-]
+		</description>
+		<default>
+			0.2
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="latin" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de latitudes de entrada [grados decimales]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="lat" type="float" required="no" multiple="no">
+		<description>
+			Un valor �nico de latitud [grados decimales]
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="longin" type="string" required="no" multiple="no">
+		<description>
+			Name of the longitude input raster map [decimal degrees]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="coefbh" type="string" required="no" multiple="no">
+		<description>
+			Name of real-sky beam radiation coefficient input raster map [-]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="coefdh" type="string" required="no" multiple="no">
+		<description>
+			Name of real-sky diffuse radiation coefficient input raster map [-]
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="horizon" type="string" required="no" multiple="no">
+		<description>
+			The horizon information input map prefix
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="horizonstep" type="float" required="no" multiple="no">
+		<description>
+			Angle step size for multidirectional horizon [degrees]
+		</description>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="incidout" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster de �ngulo de incidencia de salida (modo 1 solamente)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="beam_rad" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de irradiancia [W.m-2] (modo 1) o irradiaci�n [Wh.m-2.d�a-1] (modo 2) de los rayos
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="insol_time" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de tiempo de insolaci�n [h] (modo 2 solamente)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="diff_rad" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de irradiancia [W.m-2] (modo 1) o irradiaci�n [Wh.m-2.d�a-1] (modo 2) difusas
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="refl_rad" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de irradiancia [W.m-2] (modo 1) o irradiaci�n [Wh.m-2.d�a-1] (modo 2) reflejadas del terreno
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="glob_rad" type="string" required="no" multiple="no">
+		<description>
+			Output global (total) irradiance/irradiation [W.m-2] (mode 1) or irradiance/irradiation raster map [Wh.m-2.day-1] (mode 2)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="day" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de d�a del a�o (1-365)
+		</description>
+		<values>
+			<value>
+				<name>1-365</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="step" type="float" required="no" multiple="no">
+		<description>
+			Intervalo de tiempo cuando se procesan sumas de radiaci�n de todo el d�a [horas decimales]
+		</description>
+		<default>
+			0.5
+		</default>
+	</parameter>
+	<parameter name="declin" type="float" required="no" multiple="no">
+		<description>
+			Valor de declinaci�n (ignorando el valor procesado internamente) [radianes]
+		</description>
+	</parameter>
+	<parameter name="time" type="float" required="no" multiple="no">
+		<description>
+			Hora local (solar) (a establecer s�lo para modo 1) [horas decimales]
+		</description>
+		<values>
+			<value>
+				<name>0-24</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="dist" type="float" required="no" multiple="no">
+		<description>
+			Sampling distance step coefficient (0.5-1.5)
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="numpartitions" type="integer" required="no" multiple="no">
+		<description>
+			Read the input files in this number of chunks
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="civiltime" type="float" required="no" multiple="no">
+		<description>
+			Civil time zone value, if none, the time will be local solar time
+		</description>
+	</parameter>
+	<flag name="s">
+		<description>
+			Incorporar el efecto de sombreo del terreno
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Use the low-memory version of the program
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sun.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.gwflow.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.gwflow.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.gwflow.xml	(revision 369)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.gwflow">
+	<description>
+		Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="phead" type="string" required="yes" multiple="no">
+		<description>
+			The initial piezometric head in [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="status" type="string" required="yes" multiple="no">
+		<description>
+			Boundary condition status, 0-inactive, 1-active, 2-dirichlet
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="hc_x" type="string" required="yes" multiple="no">
+		<description>
+			Parte X del tensor de conductividad hidr�ulica en [m/s]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="hc_y" type="string" required="yes" multiple="no">
+		<description>
+			Parte Y del tensor de conductividad hidr�ulica en [m/s]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="q" type="string" required="no" multiple="no">
+		<description>
+			Fuentes de agua y sumideros en [m�/s]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="s" type="string" required="yes" multiple="no">
+		<description>
+			Rendimiento espec�fico en [1/m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="r" type="string" required="no" multiple="no">
+		<description>
+			Recargar mapa; ejemplo: 6*10^-9 por celda en [m�/s*m�]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="top" type="string" required="yes" multiple="no">
+		<description>
+			Superficie superior del acu�fero en [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="bottom" type="string" required="yes" multiple="no">
+		<description>
+			Superficie inferior del acu�fero en [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Mapa que guarda el resultado num�rico [m]
+		</description>
+		<gisprompt age="new" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="velocity" type="string" required="no" multiple="no">
+		<description>
+			Calculate the groundwater filter velocity vector field [m/s]
+and write the x, and y components to maps named name_[xy]
+		</description>
+		<gisprompt age="new" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			The type of groundwater flow
+		</description>
+		<default>
+			confined
+		</default>
+		<values>
+			<value>
+				<name>confined</name>
+			</value>
+			<value>
+				<name>unconfined</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="river_bed" type="string" required="no" multiple="no">
+		<description>
+			The height of the river bed in [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="river_head" type="string" required="no" multiple="no">
+		<description>
+			Water level (head) of the river with leakage connection in [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="river_leak" type="string" required="no" multiple="no">
+		<description>
+			The leakage coefficient of the river bed in [1/s].
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="drain_bed" type="string" required="no" multiple="no">
+		<description>
+			The height of the drainage bed in [m]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="drain_leak" type="string" required="no" multiple="no">
+		<description>
+			The leakage coefficient of the drainage bed in [1/s]
+		</description>
+		<gisprompt age="old" element="raster" prompt="raster" />
+	</parameter>
+	<parameter name="dt" type="float" required="yes" multiple="no">
+		<description>
+			Tiempo de c�lculo en segundos.
+		</description>
+		<default>
+			86400
+		</default>
+	</parameter>
+	<parameter name="maxit" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�ximo de iteraciones usado para resolver el sistema de ecuaciones lineales.
+		</description>
+		<default>
+			100000
+		</default>
+	</parameter>
+	<parameter name="error" type="float" required="no" multiple="no">
+		<description>
+			Criterios de ruptura err�neos para programas de soluci�n iterativos (Jacobi, sor, cg o bicgstab).
+		</description>
+		<default>
+			0.0000000001
+		</default>
+	</parameter>
+	<parameter name="solver" type="string" required="no" multiple="no">
+		<description>
+			El tipo de programa de soluci�n que deber�a resolver el sistema de ecuaciones lineales sim�tricas.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<default>
+			cg
+		</default>
+		<values>
+			<value>
+				<name>gauss</name>
+			</value>
+			<value>
+				<name>lu</name>
+			</value>
+			<value>
+				<name>cholesky</name>
+			</value>
+			<value>
+				<name>jacobi</name>
+			</value>
+			<value>
+				<name>sor</name>
+			</value>
+			<value>
+				<name>cg</name>
+			</value>
+			<value>
+				<name>bicgstab</name>
+			</value>
+			<value>
+				<name>pcg</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="relax" type="float" required="no" multiple="no">
+		<description>
+			El par�metro de relajaci�n utilizado por los programas solucionadores de Jacobi y Sor para la estabilizaci�n o aumento de velocidad.
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="s">
+		<description>
+			Use a sparse matrix, only available with iterative solvers
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.gwflow.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.segment.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.segment.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.segment.xml	(revision 369)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.segment">
+	<description>
+		Crea puntos/segmentos a partir de l�neas y posiciones de entrada.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada que contiene l�neas
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de salida en el que se escribir�n los segmentos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="llayer" type="integer" required="no" multiple="no">
+		<label>
+			Capa de l�neas
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="file" type="string" required="no" multiple="no">
+		<description>
+			Nombre del archivo que contiene reglas de segmentos. Si no se indica, se lee de stdin.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.segment.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.contour.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.contour.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.contour.xml	(revision 369)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.contour">
+	<description>
+		Programa de generaci�n de superficies a partir de contornos rasterizados.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster existente que contiene los contornos
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Producir mapa r�ster de elevaci�n
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="f">
+		<description>
+			No usado; retenido por motivos de compatibilidad, se eliminar� en el futuro
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Invoca operaci�n lenta, pero ligera de memoria (generalmente no es necesario, se eliminar� en el futuro)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.contour.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.water.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.water.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.water.xml	(revision 369)
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.sim.water">
+	<description>
+		Overland flow hydrologic simulation using path sampling method (SIMWE)
+	</description>
+	<keywords>
+		raster, flow, hydrology
+	</keywords>
+	<parameter name="elevin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the elevation raster map [m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="dxin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the x-derivatives raster map [m/m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="dyin" type="string" required="yes" multiple="no">
+		<description>
+			Name of the y-derivatives raster map [m/m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="rain" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster [mm/hr] de tasa de exceso de precipitaci�n (lluvia-infiltraci�n)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="rain_val" type="float" required="no" multiple="no">
+		<description>
+			Rainfall excess rate unique value [mm/hr]
+		</description>
+		<default>
+			50
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="infil" type="string" required="no" multiple="no">
+		<description>
+			Name of the runoff infiltration rate raster map [mm/hr]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="infil_val" type="float" required="no" multiple="no">
+		<description>
+			Runoff infiltration rate unique value [mm/hr]
+		</description>
+		<default>
+			0.0
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="manin" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster n de Mannings
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="manin_val" type="float" required="no" multiple="no">
+		<description>
+			Mannings n unique value
+		</description>
+		<default>
+			0.1
+		</default>
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="traps" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de controles de flujo (relaci�n de permeabilidad 0-1)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de entrada
+		</guisection>
+	</parameter>
+	<parameter name="depth" type="string" required="no" multiple="no">
+		<description>
+			Output water depth raster map [m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="disch" type="string" required="no" multiple="no">
+		<description>
+			Output water discharge raster map [m3/s]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="err" type="string" required="no" multiple="no">
+		<description>
+			Output simulation error raster map [m]
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="nwalk" type="integer" required="no" multiple="no">
+		<description>
+			Number of walkers, default is twice the no. of cells
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="niter" type="integer" required="no" multiple="no">
+		<description>
+			Time used for iterations [minutes]
+		</description>
+		<default>
+			10
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="outiter" type="integer" required="no" multiple="no">
+		<description>
+			Time interval for creating output maps [minutes]
+		</description>
+		<default>
+			2
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="diffc" type="float" required="no" multiple="no">
+		<description>
+			Constante de difusi�n del agua
+		</description>
+		<default>
+			0.8
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="hmax" type="float" required="no" multiple="no">
+		<description>
+			Threshold water depth [m] (diffusion increases after this water depth is reached)
+		</description>
+		<default>
+			0.3
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="halpha" type="float" required="no" multiple="no">
+		<description>
+			Constante de incremento de difusi�n
+		</description>
+		<default>
+			4.0
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="hbeta" type="float" required="no" multiple="no">
+		<description>
+			Factor de peso para vectorial de velocidad de flujo de agua
+		</description>
+		<default>
+			0.5
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<flag name="t">
+		<description>
+			Time-series output
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.sim.water.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cva.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cva.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cva.xml	(revision 369)
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.cva">
+	<description>
+		Multiple/cumulative viewshed analysis
+	</description>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Elevation raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="target_mask" type="string" required="no" multiple="no">
+		<description>
+			Binary raster map for target cells
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="viewpt_mask" type="string" required="no" multiple="no">
+		<description>
+			Binary raster map for viewpoints
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="sites" type="string" required="no" multiple="no">
+		<description>
+			Vector map with sites points
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Raster map name for storing results
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="obs_elev" type="float" required="no" multiple="no">
+		<description>
+			Height of the viewing location
+		</description>
+		<default>
+			1.75
+		</default>
+	</parameter>
+	<parameter name="target_elev" type="float" required="no" multiple="no">
+		<description>
+			Height of the target location
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="max_dist" type="float" required="no" multiple="no">
+		<description>
+			Max viewing distance in meters
+		</description>
+		<default>
+			2000
+		</default>
+		<values>
+			<value>
+				<name>0.0-9999999.9</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="seed" type="integer" required="no" multiple="no">
+		<description>
+			Seed for the random number generator
+		</description>
+		<default>
+			1
+		</default>
+		<values>
+			<value>
+				<name>0-32767</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="sample" type="float" required="no" multiple="no">
+		<description>
+			Sampling frequency as a percentage of cells
+		</description>
+		<default>
+			10.0
+		</default>
+	</parameter>
+	<parameter name="type" type="string" required="yes" multiple="no">
+		<description>
+			Type of viewshed analysis
+		</description>
+		<default>
+			sites
+		</default>
+		<values>
+			<value>
+				<name>sites</name>
+			</value>
+			<value>
+				<name>systematic</name>
+			</value>
+			<value>
+				<name>random</name>
+			</value>
+			<value>
+				<name>all</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="spot" type="float" required="no" multiple="no">
+		<description>
+			Absolute observer height
+		</description>
+	</parameter>
+	<parameter name="offseta" type="float" required="no" multiple="no">
+		<description>
+			Observer offset (OFFSETA=obs_elev)
+		</description>
+	</parameter>
+	<parameter name="offsetb" type="float" required="no" multiple="no">
+		<description>
+			target offset (OFFSETB=target_elev)
+		</description>
+	</parameter>
+	<parameter name="azimuth1" type="float" required="no" multiple="no">
+		<description>
+			Minimum azimuth (AZIMUTH1)
+		</description>
+		<values>
+			<value>
+				<name>0.0-360.0</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="azimuth2" type="float" required="no" multiple="no">
+		<description>
+			Maximum azimuth (AZIMUTH2)
+		</description>
+		<values>
+			<value>
+				<name>0.0-360.0</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="vert1" type="float" required="no" multiple="no">
+		<description>
+			Minimum vertical angle (VERT1)
+		</description>
+		<values>
+			<value>
+				<name>0.0-90.0</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="vert2" type="float" required="no" multiple="no">
+		<description>
+			Maximum vertical angle (VERT2)
+		</description>
+		<values>
+			<value>
+				<name>-90.0-0.0</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="radius1" type="float" required="no" multiple="no">
+		<description>
+			Minimum distance from observer (RADIUS1)
+		</description>
+	</parameter>
+	<parameter name="radius2" type="float" required="no" multiple="no">
+		<description>
+			Maximum distance to observer (RADIUS2)
+		</description>
+	</parameter>
+	<parameter name="curvc" type="float" required="no" multiple="no">
+		<description>
+			Earth curvature correction threshold (0.0 = off)
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<flag name="f">
+		<description>
+			Calculate the `visibility from' rather than `viewsheds of' 
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Differentiate masked cells from data value zero 
+		</description>
+	</flag>
+	<flag name="a">
+		<description>
+			Treat sample size as no. of cells 
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Run quietly (i.e. do not report % complete) 
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Allow replacement during random sampling 
+		</description>
+	</flag>
+	<flag name="h">
+		<description>
+			Adjust spot heights below surface
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Ignore site attributes
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Convert -1 to NULL in output map 
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Run silently 
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cva.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.buffer.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.buffer.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.buffer.xml	(revision 369)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.buffer">
+	<description>
+		Crea una capa de mapa r�ster que muestra zonas de buffer que rodean celdas que contienen valores de categor�a no NULOS.
+	</description>
+	<keywords>
+		r�ster, buffer
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="distances" type="float" required="yes" multiple="yes">
+		<description>
+			Zona(s) de distancia
+		</description>
+	</parameter>
+	<parameter name="units" type="string" required="no" multiple="no">
+		<description>
+			Unidades de distancia
+		</description>
+		<default>
+			meters
+		</default>
+		<values>
+			<value>
+				<name>meters</name>
+			</value>
+			<value>
+				<name>kilometers</name>
+			</value>
+			<value>
+				<name>feet</name>
+			</value>
+			<value>
+				<name>miles</name>
+			</value>
+			<value>
+				<name>nautmiles</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="z">
+		<description>
+			Ignorar celdas de datos cero (0) en vez de celdas NULAS
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.buffer.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.db.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.db.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.db.xml	(revision 369)
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.to.db">
+	<description>
+		Populates database values from vector features.
+	</description>
+	<keywords>
+		vectorial, base de datos, tabla de atributos
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<label>
+			Tipo de elemento
+		</label>
+		<description>
+			For coor valid point/centroid, for length valid line/boundary
+		</description>
+		<default>
+			point,line,boundary,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (write to)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="qlayer" type="integer" required="no" multiple="no">
+		<label>
+			Query layer number (read from)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Consulta
+		</guisection>
+	</parameter>
+	<parameter name="option" type="string" required="yes" multiple="no">
+		<description>
+			Valor a cargar
+		</description>
+		<values>
+			<value>
+				<name>cat</name>
+				<description>insert new row for each category if doesn't exist yet</description>
+			</value>
+			<value>
+				<name>area</name>
+				<description>area size</description>
+			</value>
+			<value>
+				<name>compact</name>
+				<description>compactness of an area, calculated as 
+              compactness = perimeter / (2 * sqrt(PI * area))</description>
+			</value>
+			<value>
+				<name>fd</name>
+				<description>fractal dimension of boundary defining a polygon, calculated as 
+              fd = 2 * (log(perimeter) / log(area))</description>
+			</value>
+			<value>
+				<name>perimeter</name>
+				<description>perimeter length of an area</description>
+			</value>
+			<value>
+				<name>length</name>
+				<description>line length</description>
+			</value>
+			<value>
+				<name>count</name>
+				<description>number of features for each category</description>
+			</value>
+			<value>
+				<name>coor</name>
+				<description>point coordinates, X,Y or X,Y,Z</description>
+			</value>
+			<value>
+				<name>start</name>
+				<description>line/boundary starting point coordinates, X,Y or X,Y,Z</description>
+			</value>
+			<value>
+				<name>end</name>
+				<description>line/boundary end point coordinates, X,Y or X,Y,Z</description>
+			</value>
+			<value>
+				<name>sides</name>
+				<description>categories of areas on the left and right side of the boundary, 'qlayer' is used for area category</description>
+			</value>
+			<value>
+				<name>query</name>
+				<description>result of a database query for all records of the geometry(or geometries) from table specified by 'qlayer' option</description>
+			</value>
+			<value>
+				<name>slope</name>
+				<description>slope steepness of vector line or boundary</description>
+			</value>
+			<value>
+				<name>sinuous</name>
+				<description>line sinuousity, calculated as line length / distance between end points</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="units" type="string" required="no" multiple="no">
+		<label>
+			Unidades
+		</label>
+		<description>
+			mi(llas),f(pies),me(tros),k(il�metros),a(cres),h(ect�reas)
+		</description>
+		<values>
+			<value>
+				<name>mi</name>
+			</value>
+			<value>
+				<name>miles</name>
+			</value>
+			<value>
+				<name>f</name>
+			</value>
+			<value>
+				<name>feet</name>
+			</value>
+			<value>
+				<name>me</name>
+			</value>
+			<value>
+				<name>meters</name>
+			</value>
+			<value>
+				<name>k</name>
+			</value>
+			<value>
+				<name>kilometers</name>
+			</value>
+			<value>
+				<name>a</name>
+			</value>
+			<value>
+				<name>acres</name>
+			</value>
+			<value>
+				<name>h</name>
+			</value>
+			<value>
+				<name>hectares</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="columns" type="string" required="no" multiple="yes">
+		<description>
+			Nombre de la(s) columna(s) de atributos.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+	</parameter>
+	<parameter name="qcolumn" type="string" required="no" multiple="no">
+		<label>
+			Name of attribute column used for 'query' option
+		</label>
+		<description>
+			Ej.: 'categor�a', 'cuenta(*)', 'suma(valores)'
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<guisection>
+			Consulta
+		</guisection>
+	</parameter>
+	<flag name="p">
+		<description>
+			S�lo imprimir
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="s">
+		<description>
+			Only print SQL statements
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			En modo impresi�n imprime totales para las opciones: longitud,�rea,cuenta
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.db.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.average.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.average.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.average.xml	(revision 369)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.average">
+	<description>
+		Encuentra la media de los valores en un mapa de cobertura dentro de �reas  con el mismo valor de categor�a asignado en un mapa de base especificado por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="base" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster base.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cover" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de cobertura.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="c">
+		<description>
+			Valores de cobertura extra�dos de las etiquetas de categor�a del mapa de cobertura
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.average.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.wms.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.wms.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.wms.xml	(revision 369)
@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.wms">
+	<description>
+		Descarga e importa datos de servidores WMS.
+	</description>
+	<keywords>
+		wms
+	</keywords>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Importar
+		</guisection>
+	</parameter>
+	<parameter name="mapserver" type="string" required="yes" multiple="no">
+		<description>
+			Servidor de mapas del que solicitar los datos
+		</description>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="layers" type="string" required="no" multiple="yes">
+		<description>
+			Capas a solicitar del servidor de mapas
+		</description>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="styles" type="string" required="no" multiple="yes">
+		<description>
+			Estilos a solicitar del servidor de mapas
+		</description>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="srs" type="string" required="no" multiple="no">
+		<description>
+			Proyecci�n de origen a solicitar del servidor
+		</description>
+		<default>
+			EPSG:4326
+		</default>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="format" type="string" required="yes" multiple="no">
+		<description>
+			Formato de imagen solicitado del servidor
+		</description>
+		<default>
+			geotiff
+		</default>
+		<values>
+			<value>
+				<name>geotiff</name>
+			</value>
+			<value>
+				<name>tiff</name>
+			</value>
+			<value>
+				<name>jpeg</name>
+			</value>
+			<value>
+				<name>gif</name>
+			</value>
+			<value>
+				<name>png</name>
+			</value>
+		</values>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="wmsquery" type="string" required="no" multiple="no">
+		<description>
+			Opciones de consulta adicionales para el servidor
+		</description>
+		<default>
+			version=1.1.1
+		</default>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="maxcols" type="integer" required="yes" multiple="no">
+		<description>
+			M�ximo de columnas a solicitar a la vez
+		</description>
+		<default>
+			1024
+		</default>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="maxrows" type="integer" required="yes" multiple="no">
+		<description>
+			M�ximo de filas a solicitar a la vez
+		</description>
+		<default>
+			1024
+		</default>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="tileoptions" type="string" required="no" multiple="no">
+		<description>
+			Opciones adicionales para r.tileset
+		</description>
+	</parameter>
+	<parameter name="region" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la regi�n para la que solicitar datos. Regi�n actual si se omite
+		</description>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="folder" type="string" required="no" multiple="no">
+		<description>
+			Carpeta en la que guardar los datos descargados
+		</description>
+		<guisection>
+			Descargar
+		</guisection>
+	</parameter>
+	<parameter name="wgetoptions" type="string" required="no" multiple="no">
+		<description>
+			Opciones adicionales para wget
+		</description>
+		<default>
+			-c -t 5 -nv
+		</default>
+		<guisection>
+			Descargar
+		</guisection>
+	</parameter>
+	<parameter name="curloptions" type="string" required="no" multiple="no">
+		<description>
+			Opciones adicionales para curl
+		</description>
+		<default>
+			-C - --retry 5 -s -S
+		</default>
+		<guisection>
+			Descargar
+		</guisection>
+	</parameter>
+	<parameter name="method" type="string" required="yes" multiple="no">
+		<description>
+			M�todo de reproyecci�n a usar
+		</description>
+		<default>
+			nearest
+		</default>
+		<values>
+			<value>
+				<name>nearest</name>
+			</value>
+			<value>
+				<name>bilinear</name>
+			</value>
+			<value>
+				<name>cubic</name>
+			</value>
+			<value>
+				<name>cubicspline</name>
+			</value>
+		</values>
+		<guisection>
+			Importar
+		</guisection>
+	</parameter>
+	<parameter name="cap_file" type="string" required="no" multiple="no">
+		<label>
+			Filename to save capabilities XML file to
+		</label>
+		<description>
+			Requires list available layers flag
+		</description>
+		<guisection>
+			Solicitud
+		</guisection>
+	</parameter>
+	<parameter name="v" type="integer" required="no" multiple="no">
+		<description>
+			Nivel de verbosidad
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<flag name="l">
+		<description>
+			Listar las capas disponibles y salir
+		</description>
+ 		<guisection>
+			Solicitud
+		</guisection>
+	</flag>
+	<flag name="d">
+		<description>
+			Saltar la descarga (para continuar descargas m�s r�pido)
+		</description>
+ 		<guisection>
+			Descargar
+		</guisection>
+	</flag>
+	<flag name="o">
+		<description>
+			Don't request transparent data
+		</description>
+ 		<guisection>
+			Solicitud
+		</guisection>
+	</flag>
+	<flag name="c">
+		<description>
+			Clean existing data out of download directory
+		</description>
+ 		<guisection>
+			Descargar
+		</guisection>
+	</flag>
+	<flag name="k">
+		<description>
+			Mantener n�meros de banda en vez de usar nombre de color de banda
+		</description>
+ 		<guisection>
+			Importar
+		</guisection>
+	</flag>
+	<flag name="p">
+		<description>
+			Don't reproject the data, just patch it
+		</description>
+ 		<guisection>
+			Importar
+		</guisection>
+	</flag>
+	<flag name="g">
+		<label>
+			Use GET method instead of POST data method
+		</label>
+		<description>
+			This may be needed to connect to servers which lack POST capability
+		</description>
+ 		<guisection>
+			Solicitud
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.wms.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bitpattern.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bitpattern.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bitpattern.xml	(revision 369)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.bitpattern">
+	<description>
+		Compara patrones de bit con un mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="pattern" type="integer" required="yes" multiple="no">
+		<description>
+			Posici�n(es) de patr�n de bit
+		</description>
+	</parameter>
+	<parameter name="patval" type="integer" required="yes" multiple="no">
+		<description>
+			Valor de patr�n de bit
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.bitpattern.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.sh.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.sh.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.sh.xml	(revision 369)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.univar.sh">
+	<description>
+		Calcula estad�sticas univariantes a partir de un mapa r�ster de GRASS.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="percentile" type="integer" required="no" multiple="no">
+		<description>
+			Percentil a calcular (requiere la opci�n -e)
+		</description>
+		<default>
+			90
+		</default>
+		<values>
+			<value>
+				<name>0-100</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="e">
+		<description>
+			estad�sticas ampliadas (cuartiles y percentiles)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.univar.sh.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.neighbors.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.neighbors.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.neighbors.xml	(revision 369)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.neighbors">
+	<description>
+		Hace cada valor de categor�a de celda una funci�n de los valores de categor�a asignados a las celdas a su alrededor y guarda los nuevos valores de celda en una capa de mapa r�ster de salida.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			Operaci�n de vecindad
+		</description>
+		<default>
+			average
+		</default>
+		<values>
+			<value>
+				<name>average</name>
+			</value>
+			<value>
+				<name>median</name>
+			</value>
+			<value>
+				<name>mode</name>
+			</value>
+			<value>
+				<name>minimum</name>
+			</value>
+			<value>
+				<name>maximum</name>
+			</value>
+			<value>
+				<name>stddev</name>
+			</value>
+			<value>
+				<name>sum</name>
+			</value>
+			<value>
+				<name>variance</name>
+			</value>
+			<value>
+				<name>diversity</name>
+			</value>
+			<value>
+				<name>interspersion</name>
+			</value>
+		</values>
+		<guisection>
+			Neighborhood
+		</guisection>
+	</parameter>
+	<parameter name="size" type="integer" required="no" multiple="no">
+		<description>
+			Tama�o de vecindad
+		</description>
+		<default>
+			3
+		</default>
+		<guisection>
+			Neighborhood
+		</guisection>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo del mapa r�ster de salida
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<parameter name="weight" type="string" required="no" multiple="no">
+		<description>
+			Archivo que contiene pesos
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<flag name="a">
+		<description>
+			No alinear la salida con la entrada
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Usar vecindario circular
+		</description>
+ 		<guisection>
+			Neighborhood
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.neighbors.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geoplot.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geoplot.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geoplot.xml	(revision 369)
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.geoplot">
+	<description>
+		Creates vector points map from a Geoplot export file
+	</description>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Geoplot ASCII file to import
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Vector map to store data points
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Format of geoplot data file
+		</description>
+		<default>
+			xyz
+		</default>
+		<values>
+			<value>
+				<name>xyz</name>
+			</value>
+			<value>
+				<name>z</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="delimiter" type="string" required="no" multiple="no">
+		<description>
+			Data delimiter
+		</description>
+		<default>
+			tab
+		</default>
+		<values>
+			<value>
+				<name>tab</name>
+			</value>
+			<value>
+				<name>space</name>
+			</value>
+			<value>
+				<name>comma</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="creference" type="string" required="no" multiple="no">
+		<description>
+			Reference corner (top-left or bottom-left)
+		</description>
+		<default>
+			bl
+		</default>
+		<values>
+			<value>
+				<name>tl</name>
+			</value>
+			<value>
+				<name>bl</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="xreference" type="float" required="no" multiple="no">
+		<description>
+			Easting of first data point
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="yreference" type="float" required="no" multiple="no">
+		<description>
+			Northing of first data point
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="xincrement" type="float" required="no" multiple="no">
+		<description>
+			Spacing between measurements
+		</description>
+	</parameter>
+	<parameter name="yincrement" type="float" required="no" multiple="no">
+		<description>
+			Spacing between lines
+		</description>
+	</parameter>
+	<parameter name="length" type="float" required="no" multiple="no">
+		<description>
+			number of measurements on one line
+		</description>
+	</parameter>
+	<parameter name="null" type="float" required="no" multiple="no">
+		<description>
+			NULL data value to filter out
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Quiet operation: no progress display
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geoplot.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.eq.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.eq.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.eq.xml	(revision 369)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.rescale.eq">
+	<description>
+		Rescales histogram equalized the range of category values in a raster map layer.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a rescalar
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="from" type="integer" required="no" multiple="no">
+		<description>
+			Rango de datos de entrada a rescalar (por omisi�n: todo el rango del mapa de entrada)
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster resultante
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="to" type="integer" required="yes" multiple="no">
+		<description>
+			Rango de datos de salida
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el nuevo mapa r�ster
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.eq.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gridatb.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gridatb.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gridatb.xml	(revision 369)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.gridatb">
+	<description>
+		Exporta mapa r�ster de GRASS a archivo de mapa GRIDATB.FOR (TOPMODEL)
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Archivo de mapa GRIDATB de E/S
+		</description>
+	</parameter>
+	<flag name="o">
+		<description>
+			Sobrescribir archivo de mapa de salida
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.gridatb.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topmodel.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topmodel.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topmodel.xml	(revision 369)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.topmodel">
+	<description>
+		Simula TOPMODEL que es un modelo hidrol�gico basado f�sicamente.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="basin" type="string" required="no" multiple="no">
+		<description>
+			(i)   Mapa de cuenca creado por r.water.outlet (M�SCARA)
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="elevation" type="string" required="no" multiple="no">
+		<description>
+			(E)   Mapa de elevaci�n
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="depressionless" type="string" required="no" multiple="no">
+		<description>
+			(S)   Mapa de elevaci�n sin depresiones
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="direction" type="string" required="no" multiple="no">
+		<description>
+			(S)   Mapa de direcci�n para mapa de elevaci�n sin depresiones
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="belevation" type="string" required="no" multiple="no">
+		<description>
+			(S/E) Mapa de elevaci�n de cuenca (M�SCARA aplicada)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="topidx" type="string" required="no" multiple="no">
+		<description>
+			(S)   Mapa ln(a/tanB) de �ndice topogr�fico (M�SCARA aplicada)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="nidxclass" type="integer" required="no" multiple="no">
+		<description>
+			(E)   N�mero de clases de �ndice topogr�fico
+		</description>
+		<default>
+			30
+		</default>
+	</parameter>
+	<parameter name="idxstats" type="string" required="yes" multiple="no">
+		<description>
+			(S/E) Archivo de estad�sticas de �ndice topogr�fico
+		</description>
+	</parameter>
+	<parameter name="parameters" type="string" required="yes" multiple="no">
+		<description>
+			(E)   Archivo de par�metros TOPMODEL
+		</description>
+	</parameter>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			(E)   Archivo de datos de precipitaciones y evotranspiraci�n potencial
+		</description>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			(S)   Archivo de salida
+		</description>
+	</parameter>
+	<parameter name="Qobs" type="string" required="no" multiple="no">
+		<description>
+			(E)   Archivo de flujo observado OPCIONAL
+		</description>
+	</parameter>
+	<parameter name="timestep" type="integer" required="no" multiple="no">
+		<description>
+			(E)   Salida OPCIONAL para paso de tiempo dado
+		</description>
+	</parameter>
+	<parameter name="idxclass" type="integer" required="no" multiple="no">
+		<description>
+			(E)   Salida OPCIONAL para clase de �ndice topogr�fico dada
+		</description>
+	</parameter>
+	<flag name="i">
+		<description>
+			Datos de entrada dados para (S/E)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.topmodel.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.neighbors.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.neighbors.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.neighbors.xml	(revision 369)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.neighbors">
+	<description>
+		Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map layer.
+	</description>
+	<keywords>
+		vectorial r�ster, agregacion
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="yes" multiple="no">
+		<description>
+			Neighborhood operation
+		</description>
+		<default>
+			count
+		</default>
+		<values>
+			<value>
+				<name>count</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="size" type="float" required="yes" multiple="no">
+		<description>
+			Neighborhood diameter in map units
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.neighbors.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quant.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quant.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quant.xml	(revision 369)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.quant">
+	<description>
+		Produce el archivo de cuantizaci�n para un mapa de coma flotante.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="basemap" type="string" required="no" multiple="no">
+		<description>
+			Mapa base del que tomar las reglas de cuantizaci�n
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<default>
+			NONE
+		</default>
+	</parameter>
+	<parameter name="input" type="string" required="yes" multiple="yes">
+		<description>
+			Mapa(s) r�ster a cuantizar
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="fprange" type="string" required="yes" multiple="no">
+		<description>
+			Rango de coma flotante: dmin, dmax
+		</description>
+		<keydesc>
+			<item order="1">dmin</item>
+			<item order="2">dmax</item>
+		</keydesc>
+		<default>
+			
+		</default>
+	</parameter>
+	<parameter name="range" type="string" required="yes" multiple="no">
+		<description>
+			Rango de enteros: m�nimo, m�ximo
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+		<default>
+			1,255
+		</default>
+	</parameter>
+	<flag name="t">
+		<description>
+			Truncar datos de coma flotante
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Redondear datos de coma flotante
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.quant.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.drape.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.drape.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.drape.xml	(revision 369)
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.drape">
+	<description>
+		Converts vector map to 3D by sampling of elevation raster map.
+	</description>
+	<keywords>
+		vector, geometry, sampling
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,centroid,line,boundary,face,kernel
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>face</name>
+			</value>
+			<value>
+				<name>kernel</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="rast" type="string" required="no" multiple="no">
+		<description>
+			Elevation raster map for height extraction
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			M�todo de muestreo
+		</description>
+		<default>
+			nearest
+		</default>
+		<values>
+			<value>
+				<name>nearest</name>
+				<description>nearest neighbor</description>
+			</value>
+			<value>
+				<name>bilinear</name>
+				<description>bilinear interpolation</description>
+			</value>
+			<value>
+				<name>cubic</name>
+				<description>cubic convolution interpolation</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="scale" type="float" required="no" multiple="no">
+		<description>
+			Scale sampled raster values
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Layer is only used for WHERE SQL statement
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="null_value" type="float" required="no" multiple="no">
+		<label>
+			Vector Z value for unknown height
+		</label>
+		<description>
+			Will set Z to this value, if value from raster map can not be read
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.drape.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.parallel.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.parallel.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.parallel.xml	(revision 369)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.parallel">
+	<description>
+		Creates parallel line to input vector lines.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="distance" type="float" required="yes" multiple="no">
+		<description>
+			Offset along major axis in map units
+		</description>
+	</parameter>
+	<parameter name="minordistance" type="float" required="no" multiple="no">
+		<description>
+			Offset along minor axis in map units
+		</description>
+		<values>
+			<value>
+				<name>0-100000000</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="angle" type="float" required="no" multiple="no">
+		<description>
+			Angle of major axis in degrees
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="side" type="string" required="yes" multiple="no">
+		<description>
+			Side
+		</description>
+		<default>
+			right
+		</default>
+		<values>
+			<value>
+				<name>left</name>
+				<description>Parallel line is on the left</description>
+			</value>
+			<value>
+				<name>right</name>
+				<description>Parallel line is on the right</description>
+			</value>
+			<value>
+				<name>both</name>
+				<description>Parallel lines on both sides</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="tolerance" type="float" required="no" multiple="no">
+		<description>
+			Tolerance of arc polylines in map units
+		</description>
+		<values>
+			<value>
+				<name>0-100000000</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="r">
+		<description>
+			Make outside corners round
+		</description>
+	</flag>
+	<flag name="b">
+		<description>
+			Create buffer-like parallel lines
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.parallel.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.gns.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.gns.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.gns.xml	(revision 369)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.gns">
+	<description>
+		Importa archivos de pa�s del Servidor de Nombres Geonet (GNS) US-NGA a un mapa vectorial de puntos de GRASS.
+	</description>
+	<keywords>
+		vector, import, gazetteer
+	</keywords>
+	<parameter name="file" type="string" required="yes" multiple="no">
+		<description>
+			Archivo GNS sin comprimir de NGA (con extensi�n .txt)
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="vect" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.gns.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.edgedetection.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.edgedetection.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.edgedetection.xml	(revision 369)
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.lidar.edgedetection">
+	<description>
+		Detecta los bordes de un objeto a partir de un conjunto de datos LIDAR.
+	</description>
+	<keywords>
+		vectorial, LIDAR, bordes
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="see" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Este
+		</description>
+		<default>
+			4
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="sen" type="float" required="no" multiple="no">
+		<description>
+			Valor de paso spline de interpolaci�n en direcci�n Norte
+		</description>
+		<default>
+			4
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="lambda_g" type="float" required="no" multiple="no">
+		<description>
+			Regularization weight in gradient evaluation
+		</description>
+		<default>
+			0.01
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="tgh" type="float" required="no" multiple="no">
+		<description>
+			High gradient threshold for edge classification
+		</description>
+		<default>
+			6
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="tgl" type="float" required="no" multiple="no">
+		<description>
+			Low gradient threshold for edge classification
+		</description>
+		<default>
+			3
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="theta_g" type="float" required="no" multiple="no">
+		<description>
+			Intervalo de �ngulos para detecci�n de misma direcci�n
+		</description>
+		<default>
+			0.26
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="lambda_r" type="float" required="no" multiple="no">
+		<description>
+			Regularization weight in residual evaluation
+		</description>
+		<default>
+			2
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<flag name="e">
+		<label>
+			Estimate point density and distance
+		</label>
+		<description>
+			Estimate point density and distance for the input vector points within the current region extends and quit
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.edgedetection.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.composite.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.composite.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.composite.xml	(revision 369)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.composite">
+	<description>
+		Combines red, green and blue raster maps into a single composite raster map.
+	</description>
+	<keywords>
+		raster, composite
+	</keywords>
+	<parameter name="red" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;red&gt;
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="green" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;green&gt;
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="blue" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;blue&gt;
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="levels" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de niveles a usar para cada componente
+		</description>
+		<default>
+			32
+		</default>
+		<values>
+			<value>
+				<name>1-256</name>
+			</value>
+		</values>
+		<guisection>
+			Levels
+		</guisection>
+	</parameter>
+	<parameter name="lev_red" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de niveles a usar para &lt;red&gt;
+		</description>
+		<values>
+			<value>
+				<name>1-256</name>
+			</value>
+		</values>
+		<guisection>
+			Levels
+		</guisection>
+	</parameter>
+	<parameter name="lev_green" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de niveles a usar para &lt;green&gt;
+		</description>
+		<values>
+			<value>
+				<name>1-256</name>
+			</value>
+		</values>
+		<guisection>
+			Levels
+		</guisection>
+	</parameter>
+	<parameter name="lev_blue" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de niveles a usar para &lt;blue&gt;
+		</description>
+		<values>
+			<value>
+				<name>1-256</name>
+			</value>
+		</values>
+		<guisection>
+			Levels
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="d">
+		<description>
+			Vacilar
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Usar el color m�s pr�ximo
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.composite.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fill.dir.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fill.dir.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fill.dir.xml	(revision 369)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.fill.dir">
+	<description>
+		Filtra y genera un mapa de elevaci�n sin depresiones y un mapa de direcci�n de flujo a partir de una capa de elevaci�n dada.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa r�ster existente que contiene superficie de elevaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Producir un mapa r�ster de elevaci�n despu�s de rellenar
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="direction" type="string" required="yes" multiple="no">
+		<description>
+			Producir mapa r�ster de direcci�n
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="areas" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de �reas problem�ticas
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="no">
+		<description>
+			Output aspect direction format (agnps, answers, or grass)
+		</description>
+		<default>
+			grass
+		</default>
+	</parameter>
+	<flag name="f">
+		<description>
+			Encontrar �reas no resueltas solamente
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.fill.dir.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.xml	(revision 369)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.terraflow">
+	<description>
+		Flow computation for massive grids (Float version).
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de elevaci�n.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="filled" type="string" required="yes" multiple="no">
+		<description>
+			Output filled (flooded) elevation raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="direction" type="string" required="yes" multiple="no">
+		<description>
+			Output flow direction raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="swatershed" type="string" required="yes" multiple="no">
+		<description>
+			Output sink-watershed raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="accumulation" type="string" required="yes" multiple="no">
+		<description>
+			Output flow accumulation raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="tci" type="string" required="yes" multiple="no">
+		<description>
+			Output topographic convergence index (tci) raster map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="d8cut" type="float" required="no" multiple="no">
+		<description>
+			If flow accumulation is larger than this value it is routed using SFD (D8) direction 
+ 		 (meaningfull only  for MFD flow)
+		</description>
+		<default>
+			infinity
+		</default>
+	</parameter>
+	<parameter name="memory" type="integer" required="no" multiple="no">
+		<description>
+			Maximum runtime memory size (in MB)
+		</description>
+		<default>
+			300
+		</default>
+	</parameter>
+	<parameter name="STREAM_DIR" type="string" required="no" multiple="no">
+		<description>
+			Directory to hold temporary files (they can be large)
+		</description>
+		<default>
+			C:/Users/volaya/AppData/Local/Temp
+		</default>
+	</parameter>
+	<parameter name="stats" type="string" required="no" multiple="no">
+		<description>
+			Name of file containing runtime statistics
+		</description>
+		<default>
+			stats.out
+		</default>
+	</parameter>
+	<flag name="s">
+		<description>
+			SFD (D8) flow (default is MFD)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.terraflow.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geonames.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geonames.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geonames.xml	(revision 369)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.geonames">
+	<description>
+		Imports geonames.org country files into a GRASS vector points map.
+	</description>
+	<keywords>
+		vector, import, gazetteer
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Uncompressed geonames file from (with .txt extension)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.geonames.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.wfs.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.wfs.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.wfs.xml	(revision 369)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.wfs">
+	<description>
+		Import GetFeature from WFS
+	</description>
+	<parameter name="wfs" type="string" required="no" multiple="no">
+		<description>
+			URL de GetFeature comenzando con http
+		</description>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial de salida
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.wfs.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.univar.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.univar.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.univar.xml	(revision 369)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.univar">
+	<description>
+		Calcula estad�sticas univariante para atributos. La varianza y la desviaci�n est�ndar s�lo se calculan para puntos si se especifica.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid,area
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de columna
+		</description>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="percentile" type="integer" required="no" multiple="no">
+		<description>
+			Percentil a calcular (requiere la opci�n de estad�sticas ampliadas)
+		</description>
+		<default>
+			90
+		</default>
+		<values>
+			<value>
+				<name>0-100</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="g">
+		<description>
+			Imprimir las estad�sticas en estilo de script de consola
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Calcular estad�sticas ampliadas
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.univar.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cost.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cost.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cost.xml	(revision 369)
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.cost">
+	<description>
+		Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.
+	</description>
+	<keywords>
+		r�ster, superficie de coste, coste acumulado
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene informaci�n de coste de celdas de cuadr�cula
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="start_points" type="string" required="no" multiple="no">
+		<description>
+			Name of starting vector points map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+		<guisection>
+			Start
+		</guisection>
+	</parameter>
+	<parameter name="stop_points" type="string" required="no" multiple="no">
+		<description>
+			Name of stop vector points map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+		<guisection>
+			Stop
+		</guisection>
+	</parameter>
+	<parameter name="start_rast" type="string" required="no" multiple="no">
+		<description>
+			Name of starting raster points map
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Start
+		</guisection>
+	</parameter>
+	<parameter name="coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Map grid coordinates of a starting point (E,N)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+		<guisection>
+			Start
+		</guisection>
+	</parameter>
+	<parameter name="stop_coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Map grid coordinates of a stopping point (E,N)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+		<guisection>
+			Stop
+		</guisection>
+	</parameter>
+	<parameter name="max_cost" type="integer" required="no" multiple="no">
+		<description>
+			Optional maximum cumulative cost
+		</description>
+		<keydesc>
+			<item order="1">cost</item>
+		</keydesc>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="null_cost" type="float" required="no" multiple="no">
+		<description>
+			Coste asignado a celdas nulas. Por defecto, las celdas nulas son excluidas
+		</description>
+		<keydesc>
+			<item order="1">null cost</item>
+		</keydesc>
+	</parameter>
+	<parameter name="percent_memory" type="integer" required="no" multiple="no">
+		<description>
+			Porcentaje de mapa a mantener en memoria
+		</description>
+		<keydesc>
+			<item order="1">percent memory</item>
+		</keydesc>
+		<default>
+			100
+		</default>
+	</parameter>
+	<flag name="k">
+		<description>
+			Usar el 'Movimiento de caballero'; m�s lento, pero m�s preciso.
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Keep null values in output raster map
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Comenzar con valores en mapa r�ster
+		</description>
+ 		<guisection>
+			Start
+		</guisection>
+	</flag>
+	<flag name="v">
+		<description>
+			Ejecutar con comentarios
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.cost.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.hull.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.hull.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.hull.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.hull">
+	<description>
+		Uses a GRASS vector points map to produce a convex hull vector map.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de puntos de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa de �rea vectorial de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="a">
+		<description>
+			Usar todos los puntos vectoriales (no limitar a la regi�n actual)
+		</description>
+	</flag>
+	<flag name="f">
+		<description>
+			Create a 'flat' 2D hull even if the input is 3D points
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.hull.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.growing.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.growing.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.growing.xml	(revision 369)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.lidar.growing">
+	<description>
+		Building contour determination and Region Growing algorithm for determining the building inside
+	</description>
+	<keywords>
+		vectorial, LIDAR
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Input vector (v.lidar.edgedetection output
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="first" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del primer mapa vectorial de pulsos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="tj" type="float" required="no" multiple="no">
+		<description>
+			Threshold for cell object frequency in region growing
+		</description>
+		<default>
+			0.2
+		</default>
+	</parameter>
+	<parameter name="td" type="float" required="no" multiple="no">
+		<description>
+			Threshold for double pulse in region growing
+		</description>
+		<default>
+			0.6
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.lidar.growing.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gdal.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gdal.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gdal.xml	(revision 369)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.gdal">
+	<description>
+		Importar archivo r�ster soportado por GDAL a una capa de mapa r�ster binario.
+	</description>
+	<keywords>
+		r�ster, importar
+	</keywords>
+	<parameter name="input" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster a importar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="band" type="integer" required="no" multiple="no">
+		<description>
+			Banda a seleccionar (por omisi�n todas las bandas)
+		</description>
+	</parameter>
+	<parameter name="target" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la localizaci�n de la que leer la proyecci�n para la transformaci�n GCPs
+		</description>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+		<guisection>
+			Metadatos
+		</guisection>
+	</parameter>
+	<parameter name="location" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la nueva localizaci�n a crear
+		</description>
+	</parameter>
+	<flag name="o">
+		<description>
+			Ignorar proyecci�n (usar proyecci�n de la localizaci�n)
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Ampliar la extensi�n de la localizaci�n en base a nuevo conjunto de datos
+		</description>
+	</flag>
+	<flag name="f">
+		<description>
+			Listar los formatos soportados y salir
+		</description>
+ 		<guisection>
+			Imprimir
+		</guisection>
+	</flag>
+	<flag name="k">
+		<description>
+			Mantener n�meros de banda en vez de usar nombre de color de banda
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.gdal.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.bin.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.bin.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.bin.xml	(revision 369)
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.in.bin">
+	<description>
+		Importar un archivo r�ster binario a una capa de mapa r�ster de GRASS.
+	</description>
+	<keywords>
+		r�ster, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Archivo r�ster binario a importar
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el mapa r�ster resultante
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<parameter name="bytes" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de bytes por celda (1, 2, 4)
+		</description>
+		<default>
+			1
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="north" type="float" required="no" multiple="no">
+		<description>
+			L�mite Norte de la regi�n geogr�fica (borde exterior)
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="south" type="float" required="no" multiple="no">
+		<description>
+			L�mite Sur de la regi�n geogr�fica (borde exterior)
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="east" type="float" required="no" multiple="no">
+		<description>
+			L�mite Este de la regi�n geogr�fica (borde exterior)
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="west" type="float" required="no" multiple="no">
+		<description>
+			L�mite Oeste de la regi�n geogr�fica (borde exterior)
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="rows" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de l�neas
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="cols" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de columnas
+		</description>
+		<guisection>
+			L�mites
+		</guisection>
+	</parameter>
+	<parameter name="anull" type="float" required="no" multiple="no">
+		<description>
+			Establecer valor a NULO
+		</description>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<flag name="f">
+		<description>
+			Importar como datos de coma flotante (por omisi�n: entero)
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Importar como datos de precisi�n doble (por omisi�n; entero)
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Datos firmados (alto bit significa valor negativo)
+		</description>
+ 		<guisection>
+			Configuraciones
+		</guisection>
+	</flag>
+	<flag name="b">
+		<description>
+			Byte Swap the Data During Import
+		</description>
+ 		<guisection>
+			Configuraciones
+		</guisection>
+	</flag>
+	<flag name="h">
+		<description>
+			Obtener informaci�n de la regi�n de cabecera tipo GMT
+		</description>
+ 		<guisection>
+			L�mites
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.in.bin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.xml	(revision 369)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.rescale">
+	<description>
+		Rescala el rango de valores de categor�a en una capa de mapa r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a rescalar
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="from" type="integer" required="no" multiple="no">
+		<description>
+			Rango de datos de entrada a rescalar (por omisi�n: todo el rango del mapa de entrada)
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster resultante
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="to" type="integer" required="yes" multiple="no">
+		<description>
+			Rango de datos de salida
+		</description>
+		<keydesc>
+			<item order="1">min</item>
+			<item order="2">max</item>
+		</keydesc>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo para el nuevo mapa r�ster
+		</description>
+		<keydesc>
+			<item order="1">"phrase"</item>
+		</keydesc>
+	</parameter>
+	<flag name="q">
+		<description>
+			De forma silenciosa
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.rescale.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.sample.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.sample.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.sample.xml	(revision 369)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.sample">
+	<description>
+		Muestrear un mapa r�ster en localizaciones de puntos vectoriales.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial que define los puntos de muestreo
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Columna de atributos del mapa vectorial a usar para comparaci�n
+		</description>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial para guardar las diferencias
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="raster" type="string" required="yes" multiple="no">
+		<description>
+			Mapa r�ster a muestrear
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="z" type="float" required="no" multiple="no">
+		<description>
+			Opci�n factor de escala para valores le�dos de un mapa r�ster. Los valores muestrados se multiplicar�n por este factor
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<flag name="b">
+		<description>
+			Interpolaci�n bilineal (lo predeterminado es el vecino m�s pr�ximo)
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			Cubic convolution interpolation (default is nearest neighbor)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.sample.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm3.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm3.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm3.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.ppm3">
+	<description>
+		Convierte 3 capas r�ster de GRASS (R,G,B) a un archivo de imagen PPM a la resoluci�n de p�xel de la REGI�N ACTUALMENTE DEFINIDA.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="red" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;red&gt;
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="green" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;green&gt;
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="blue" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster a usar para &lt;blue&gt;
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el nuevo archivo PPM. (usar out=- para stdout)
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			A�adir comentarios para describir la regi�n
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ppm3.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.overlay.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.overlay.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.overlay.xml	(revision 369)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.overlay">
+	<description>
+		Superpone dos mapas vectoriales.
+	</description>
+	<keywords>
+		vectorial, geometr�a
+	</keywords>
+	<parameter name="ainput" type="string" required="yes" multiple="no">
+		<description>
+			Name of input vector map (A)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="atype" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (vector map A)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			area
+		</default>
+		<values>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="alayer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (vector map A)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="binput" type="string" required="yes" multiple="no">
+		<description>
+			Name of input vector map (B)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="btype" type="string" required="no" multiple="yes">
+		<label>
+			Feature type (vector map B)
+		</label>
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			area
+		</default>
+		<values>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="blayer" type="integer" required="no" multiple="no">
+		<label>
+			Layer number (vector map B)
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="operator" type="string" required="no" multiple="no">
+		<label>
+			El operador define los elementos escritos en el mapa vectorial de salida
+		</label>
+		<description>
+			El elemento se escribe en la salida si el resultado de la operaci�n 'entrada A operador entrada B' es verdadero. Un elemento de entrada se considera verdadero si se define la categor�a de la capa dada.
+		</description>
+		<default>
+			or
+		</default>
+		<values>
+			<value>
+				<name>and</name>
+			</value>
+			<value>
+				<name>or</name>
+			</value>
+			<value>
+				<name>not</name>
+			</value>
+			<value>
+				<name>xor</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="olayer" type="integer" required="no" multiple="yes">
+		<label>
+			Capa de salida para nueva categor�a, entrada A y entrada B
+		</label>
+		<description>
+			Si es 0 o no se indica, la categor�a no se escribe
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1,0,0
+		</default>
+	</parameter>
+	<flag name="t">
+		<description>
+			No crear la tabla de atributos
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.overlay.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.interp.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.interp.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.interp.xml	(revision 369)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.resamp.interp">
+	<description>
+		Resamples raster map layers to a finer grid using interpolation.
+	</description>
+	<keywords>
+		r�ster, remuestrear
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			M�todo de interpolaci�n
+		</description>
+		<default>
+			bilinear
+		</default>
+		<values>
+			<value>
+				<name>nearest</name>
+			</value>
+			<value>
+				<name>bilinear</name>
+			</value>
+			<value>
+				<name>bicubic</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.interp.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.generalize.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.generalize.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.generalize.xml	(revision 369)
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.generalize">
+	<description>
+		Generalizaci�n basada en vectoriales.
+	</description>
+	<keywords>
+		vectorial, generalizaci�n, simplificaci�n, suavizado, desplazamiento, generalizaci�n de redes generalization
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			line,boundary,area
+		</default>
+		<values>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="method" type="string" required="yes" multiple="no">
+		<description>
+			Algoritmo de generalizaci�n
+		</description>
+		<default>
+			douglas
+		</default>
+		<values>
+			<value>
+				<name>douglas</name>
+				<description>Douglas-Peucker Algorithm</description>
+			</value>
+			<value>
+				<name>douglas_reduction</name>
+				<description>Douglas-Peucker Algorithm with reduction parameter</description>
+			</value>
+			<value>
+				<name>lang</name>
+				<description>Lang Simplification Algorithm</description>
+			</value>
+			<value>
+				<name>reduction</name>
+				<description>Vertex Reduction Algorithm eliminates points close to each other</description>
+			</value>
+			<value>
+				<name>reumann</name>
+				<description>Reumann-Witkam Algorithm</description>
+			</value>
+			<value>
+				<name>remove_small</name>
+				<description>Removes lines shorter than threshold and areas of area less than threshold</description>
+			</value>
+			<value>
+				<name>boyle</name>
+				<description>Boyle's Forward-Looking Algorithm</description>
+			</value>
+			<value>
+				<name>sliding_averaging</name>
+				<description>McMaster's Sliding Averaging Algorithm</description>
+			</value>
+			<value>
+				<name>distance_weighting</name>
+				<description>McMaster's Distance-Weighting Algorithm</description>
+			</value>
+			<value>
+				<name>chaiken</name>
+				<description>Chaiken's Algorithm</description>
+			</value>
+			<value>
+				<name>hermite</name>
+				<description>Interpolation by Cubic Hermite Splines</description>
+			</value>
+			<value>
+				<name>snakes</name>
+				<description>Snakes method for line smoothing</description>
+			</value>
+			<value>
+				<name>network</name>
+				<description>Network generalization</description>
+			</value>
+			<value>
+				<name>displacement</name>
+				<description>Displacement of lines close to each other</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="threshold" type="float" required="yes" multiple="no">
+		<description>
+			Valor de toleracia m�ximo
+		</description>
+		<default>
+			1.0
+		</default>
+		<values>
+			<value>
+				<name>0-1000000000</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="look_ahead" type="integer" required="yes" multiple="no">
+		<description>
+			Look-ahead parameter
+		</description>
+		<default>
+			7
+		</default>
+	</parameter>
+	<parameter name="reduction" type="float" required="yes" multiple="no">
+		<description>
+			Porcentaje de los puntos en la salida del algoritmo 'douglas_reduction'
+		</description>
+		<default>
+			50
+		</default>
+		<values>
+			<value>
+				<name>0-100</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="slide" type="float" required="yes" multiple="no">
+		<description>
+			Deslizamiento del punto procesado hacia el punto original
+		</description>
+		<default>
+			0.5
+		</default>
+		<values>
+			<value>
+				<name>0-1</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="angle_thresh" type="float" required="yes" multiple="no">
+		<description>
+			�ngulo m�nimo entre dos segmentos consecutivos en el m�todo Hermite
+		</description>
+		<default>
+			3
+		</default>
+		<values>
+			<value>
+				<name>0-180</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="degree_thresh" type="integer" required="yes" multiple="no">
+		<description>
+			Degree threshold in network generalization
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="closeness_thresh" type="float" required="yes" multiple="no">
+		<description>
+			Closeness threshold in network generalization
+		</description>
+		<default>
+			0
+		</default>
+		<values>
+			<value>
+				<name>0-1</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="betweeness_thresh" type="float" required="yes" multiple="no">
+		<description>
+			Betweeness threshold in network generalization
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="alpha" type="float" required="yes" multiple="no">
+		<description>
+			Snakes alpha parameter
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="beta" type="float" required="yes" multiple="no">
+		<description>
+			Snakes beta parameter
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="iterations" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de iteraciones
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="cats" type="string" required="no" multiple="no">
+		<label>
+			Valores de la categor�as.
+		</label>
+		<description>
+			Ejemplo: 1,3,7-9,13.
+		</description>
+		<keydesc>
+			<item order="1">range</item>
+		</keydesc>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+	</parameter>
+	<flag name="c">
+		<description>
+			Copiar atributos
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Eliminar l�neas y �reas menores que el umbral
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.generalize.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.statistics.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.statistics.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.statistics.xml	(revision 369)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.statistics">
+	<description>
+		Calcula estad�sticas orientadas a categor�as u objetos.
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="base" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster base.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cover" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de cobertura.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="yes" multiple="no">
+		<description>
+			M�todo de estad�sticas basado en objetos.
+		</description>
+		<values>
+			<value>
+				<name>diversity</name>
+			</value>
+			<value>
+				<name>distribution</name>
+			</value>
+			<value>
+				<name>average</name>
+			</value>
+			<value>
+				<name>mode</name>
+			</value>
+			<value>
+				<name>median</name>
+			</value>
+			<value>
+				<name>avedev</name>
+			</value>
+			<value>
+				<name>stddev</name>
+			</value>
+			<value>
+				<name>variance</name>
+			</value>
+			<value>
+				<name>skewness</name>
+			</value>
+			<value>
+				<name>kurtosis</name>
+			</value>
+			<value>
+				<name>min</name>
+			</value>
+			<value>
+				<name>max</name>
+			</value>
+			<value>
+				<name>sum</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Mapa r�ster resultante (no usado con 'distribuci�n')
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="c">
+		<description>
+			Valores de cobertura extra�dos de las etiquetas de categor�a del mapa de cobertura
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.statistics.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.rst.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.rst.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.rst.xml	(revision 369)
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.surf.rst">
+	<description>
+		Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Valor de campo. Si se establece a 0, se usar�n las coordenadas Z (s�lo vectoriales 3D)
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer_zero" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="elev" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de superficie (elevaci�n)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="slope" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de pendiente
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="aspect" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de orientaci�n
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="pcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de curvatura de perfil
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="tcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de curvatura tangencial
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="mcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa r�ster de curvatura media
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="devi" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo de puntos vectorial de desviaciones
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="cvdev" type="string" required="no" multiple="no">
+		<description>
+			Producir archivo de puntos vectorial de errores de validaci�n cruzada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="treefile" type="string" required="no" multiple="no">
+		<description>
+			Output vector map showing quadtree segmentation
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="overfile" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa vectorial que muestre ventanas solapadas
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			Outputs
+		</guisection>
+	</parameter>
+	<parameter name="maskmap" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster usado como m�scara
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="zcolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna de atributos con valores a usar para la aproximaci�n (si capa&gt;0)
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="tension" type="float" required="no" multiple="no">
+		<description>
+			Par�metro tensi�n
+		</description>
+		<default>
+			40.
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="smooth" type="float" required="no" multiple="no">
+		<description>
+			Par�metro suavizado
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="scolumn" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la columna de atributos con los par�metros de suavizado
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="segmax" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�ximo de puntos en un segmento
+		</description>
+		<default>
+			40
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="npmin" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�nimo de puntos para aproximaci�n en un segmento (&gt;segmax)
+		</description>
+		<default>
+			300
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="dmin" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�nima entre puntos (para eliminar puntos casi ind�nticos)
+		</description>
+		<default>
+			0.500000
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="dmax" type="float" required="no" multiple="no">
+		<description>
+			Distancia m�nima entre puntos en isol�neas (para insertar puntos adicionales)
+		</description>
+		<default>
+			2.500000
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="zmult" type="float" required="no" multiple="no">
+		<description>
+			Factor de conversi�n para valores usados para aproximaci�n
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="theta" type="float" required="no" multiple="no">
+		<description>
+			�ngulo de anisotrop�a (en grados en sentido horario desde el Este)
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<parameter name="scalex" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala de anisotrop�a
+		</description>
+		<guisection>
+			Par�metros
+		</guisection>
+	</parameter>
+	<flag name="c">
+		<description>
+			Realiza un procedimiento de validaci�n cruzada sin aproximaci�n r�ster
+		</description>
+ 		<guisection>
+			Par�metros
+		</guisection>
+	</flag>
+	<flag name="t">
+		<description>
+			Usar tensi�n dependiente de la escala
+		</description>
+ 		<guisection>
+			Par�metros
+		</guisection>
+	</flag>
+	<flag name="d">
+		<description>
+			Producir derivadas parciales en vez de par�metros topogr�ficos
+		</description>
+ 		<guisection>
+			Outputs
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.rst.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.3d.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.3d.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.3d.xml	(revision 369)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.to.3d">
+	<description>
+		Performs transformation of 2D vector features to 3D.
+	</description>
+	<keywords>
+		vector, transformation, 3D
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Tipo de objeto espacial.
+		</description>
+		<default>
+			point,line,boundary,centroid
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>boundary</name>
+			</value>
+			<value>
+				<name>centroid</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="height" type="float" required="no" multiple="no">
+		<description>
+			Fixed height for 3D vector features
+		</description>
+		<guisection>
+			Height
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Height
+		</guisection>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<label>
+			Name of attribute column used for height
+		</label>
+		<description>
+			Can be used for reverse transformation, to store height of points
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Height
+		</guisection>
+	</parameter>
+	<flag name="r">
+		<description>
+			Reverse transformation; 3D vector features to 2D
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			Do not copy table
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.to.3d.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.dxf.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.dxf.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.dxf.xml	(revision 369)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.dxf">
+	<description>
+		Exporta capas vectoriales de GRASS a formato de archivo DXF.
+	</description>
+	<keywords>
+		vectorial, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Archivo DXF de salida
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.dxf.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.water.outlet.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.water.outlet.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.water.outlet.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.water.outlet">
+	<description>
+		Programa de creaci�n de cuenca hidrogr�fica.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="drainage" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="basin" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contendr� los resultados
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="easting" type="string" required="yes" multiple="no">
+		<description>
+			Coordenadas de cuadr�cula E del mapa
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+		</keydesc>
+	</parameter>
+	<parameter name="northing" type="string" required="yes" multiple="no">
+		<description>
+			Coordenadas de cuadr�cula N del mapa
+		</description>
+		<keydesc>
+			<item order="1">y</item>
+		</keydesc>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.water.outlet.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.drain.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.drain.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.drain.xml	(revision 369)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.drain">
+	<description>
+		Traces a flow through an elevation model on a raster map.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de elevaci�n.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Map coordinates of starting point(s) (E,N)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+		<guisection>
+			Start
+		</guisection>
+	</parameter>
+	<parameter name="vector_points" type="string" required="no" multiple="yes">
+		<description>
+			Name of vector map(s) containing starting point(s)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+		<guisection>
+			Start
+		</guisection>
+	</parameter>
+	<flag name="c">
+		<description>
+			Copiar valores de celdas de entrada en la salida
+		</description>
+	</flag>
+	<flag name="a">
+		<description>
+			Acumular valores de entrada a lo largo de la ruta
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Contar n�meros de celdas a lo largo de la ruta
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.drain.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.random.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.random.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.random.xml	(revision 369)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.random">
+	<description>
+		Produce una capa de mapa r�ster de desviaciones aleatorias uniformes cuyo intervalo puede ser expresado por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="min" type="integer" required="no" multiple="no">
+		<description>
+			Valor aleatorio m�nimo
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="max" type="integer" required="no" multiple="no">
+		<description>
+			Valor aleatorio m�ximo
+		</description>
+		<default>
+			100
+		</default>
+	</parameter>
+	<flag name="i">
+		<description>
+			Crear un mapa entero
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.random.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.walk.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.walk.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.walk.xml	(revision 369)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.walk">
+	<description>
+		Produce una capa de mapa r�ster que muestra el coste anisotr�pico acumulado de moverse entre diferentes localizaciones geogr�ficas en una capa de mapa r�ster de elevaci�n de entrada cuyos valores de categor�a de celda representan elevaci�n combinada con una capa de mapa r�ster de entrada cuyos valores de celda representan coste de fricci�n.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="elevation" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de elevaci�n de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="friction" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada que contiene costes de fricci�n
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contendr� los resultados
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="start_points" type="string" required="no" multiple="no">
+		<description>
+			Mapa vectorial de puntos inicial
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="stop_points" type="string" required="no" multiple="no">
+		<description>
+			Mapa vectorial de puntos final
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Coordenadas de cuadr�cula E y N del mapa de un punto de inicio (E,N)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="stop_coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Coordenadas de cuadr�cula E y N del mapa de un punto de final (E,N)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="max_cost" type="integer" required="no" multiple="no">
+		<description>
+			Un valor de coste acumulativo m�ximo opcional
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="null_cost" type="float" required="no" multiple="no">
+		<description>
+			Coste asignado a celdas nulas. Por defecto, las celdas nulas son excluidas
+		</description>
+	</parameter>
+	<parameter name="percent_memory" type="integer" required="no" multiple="no">
+		<description>
+			Porcentaje de mapa a mantener en memoria
+		</description>
+		<default>
+			100
+		</default>
+	</parameter>
+	<parameter name="nseg" type="integer" required="no" multiple="no">
+		<description>
+			N�mero del segmento a crear (biblioteca de segmento)
+		</description>
+		<default>
+			4
+		</default>
+	</parameter>
+	<parameter name="walk_coeff" type="float" required="no" multiple="no">
+		<description>
+			Coeficientes para los par�metros a,b,c,d de la f�rmula de energ�a de desplazamiento
+		</description>
+		<keydesc>
+			<item order="1">a</item>
+			<item order="2">b</item>
+			<item order="3">c</item>
+			<item order="4">d</item>
+		</keydesc>
+		<default>
+			0.72,6.0,1.9998,-1.9998
+		</default>
+	</parameter>
+	<parameter name="lambda" type="float" required="no" multiple="no">
+		<description>
+			Coeficientes lambda para combinar energ�a de desplazamiento y coste de fricci�n
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<parameter name="slope_factor" type="float" required="no" multiple="no">
+		<description>
+			El factor de pendiente determina el coste energ�tico del viaje por paso de altura
+		</description>
+		<default>
+			-0.2125
+		</default>
+	</parameter>
+	<flag name="k">
+		<description>
+			Usar el 'Movimiento de caballero'; m�s lento, pero m�s preciso.
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Conservar valores nulos en el mapa de entrada
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Comenzar con valores en mapa r�ster
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.walk.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ascii.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ascii.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ascii.xml	(revision 369)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.ascii">
+	<description>
+		Convierte una capa de mapa r�ster a un archivo de texto ASCII.
+	</description>
+	<keywords>
+		r�ster, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de un mapa r�ster existente
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa de cuadr�cula ASCII de salida (usar salida=- para stdout)
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="dp" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de d�gitos significativos (coma flotante solamente)
+		</description>
+	</parameter>
+	<parameter name="width" type="integer" required="no" multiple="no">
+		<description>
+			Number of values printed before wrapping a line (only SURFER or MODFLOW format)
+		</description>
+	</parameter>
+	<parameter name="null" type="string" required="no" multiple="no">
+		<description>
+			Cadena para representar celdas nulas (s�lo cuadr�cula GRASS)
+		</description>
+		<default>
+			*
+		</default>
+	</parameter>
+	<flag name="h">
+		<description>
+			Suprimir la impresi�n de informaci�n de cabecera
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Escribir cuadr�cula ASCII SURFER (Golden Software)
+		</description>
+	</flag>
+	<flag name="m">
+		<description>
+			Escribir secuencia ASCII MODFLOW (USGS)
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Forzar salida de valores enteros
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.ascii.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ogr.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ogr.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ogr.xml	(revision 369)
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.ogr">
+	<description>
+		Convertir capas vectoriales OGR a mapas vectoriales de GRASS.
+	</description>
+	<keywords>
+		vectorial, importar
+	</keywords>
+	<parameter name="dsn" type="string" required="no" multiple="no">
+		<label>
+			Nombre del origen de datos OGR
+		</label>
+		<description>
+			Ejemplos:
+	Shapefile de ESRI: directorio que contiene shapefiles
+	Archivo MapInfo: directorio que contiene archivos MapInfo
+		</description>
+		<gisprompt age="old_file" element="file" prompt="dsn" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="string" required="no" multiple="yes">
+		<label>
+			Nombre de capa OGR. Si no se indica, se importan todas las capas disponibles.
+		</label>
+		<description>
+			Ejemplos:
+		Shapefile ESRI: nombre del shapefile
+		Archivo MapInfo: nombre del archivo MapInfo
+		</description>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="spatial" type="float" required="no" multiple="yes">
+		<label>
+			Importar s�lo la subregi�n
+		</label>
+		<description>
+			Formato: xmin,ymin,xmax,ymax - normalmente W,S,E,N
+		</description>
+		<keydesc>
+			<item order="1">xmin</item>
+			<item order="2">ymin</item>
+			<item order="3">xmax</item>
+			<item order="4">ymax</item>
+		</keydesc>
+		<guisection>
+			Subregi�n
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="min_area" type="float" required="no" multiple="no">
+		<label>
+			Tama�o m�nimo del �rea a importar (unidades cuadradas)
+		</label>
+		<description>
+			Las �reas m�s peque�as y las islas se ignorar�n. Deber�a ser mayor que snap�
+		</description>
+		<default>
+			0.0001
+		</default>
+		<guisection>
+			Min-area &amp; snap
+		</guisection>
+	</parameter>
+	<parameter name="type" type="string" required="no" multiple="yes">
+		<description>
+			Optionally change default input type
+		</description>
+		<default>
+			
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+				<description>importar centroides de �rea como puntos</description>
+			</value>
+			<value>
+				<name>line</name>
+				<description>importar contornos de �rea como l�neas</description>
+			</value>
+			<value>
+				<name>boundary</name>
+				<description>importar l�neas como contornos de �rea</description>
+			</value>
+			<value>
+				<name>centroid</name>
+				<description>importar puntos como centroides</description>
+			</value>
+		</values>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="snap" type="float" required="no" multiple="no">
+		<label>
+			Umbral de salto para contornos
+		</label>
+		<description>
+			'-1' para sin autoensamblaje
+		</description>
+		<default>
+			-1
+		</default>
+		<guisection>
+			Min-area &amp; snap
+		</guisection>
+	</parameter>
+	<parameter name="location" type="string" required="no" multiple="no">
+		<description>
+			Nombre de la nueva localizaci�n a crear
+		</description>
+	</parameter>
+	<parameter name="cnames" type="string" required="no" multiple="yes">
+		<description>
+			Lista de nombres de columna a usar en vez de los originales. El primero se usa para la columna de categor�a
+		</description>
+		<guisection>
+			Attributes
+		</guisection>
+	</parameter>
+	<flag name="l">
+		<description>
+			Listar las capas disponibles en la fuente de datos y salir
+		</description>
+	</flag>
+	<flag name="f">
+		<description>
+			Listar los formatos soportados y salir
+		</description>
+	</flag>
+	<flag name="c">
+		<description>
+			No limpiar pol�gonos (no recomendado)
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Crear salida 3D
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No crear la tabla de atributos
+		</description>
+ 		<guisection>
+			Attributes
+		</guisection>
+	</flag>
+	<flag name="o">
+		<description>
+			Ignorar proyecci�n del conjunto de datos (usar proyecci�n de la localizaci�n)
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Limitar importaci�n a la regi�n actual
+		</description>
+ 		<guisection>
+			Subregi�n
+		</guisection>
+	</flag>
+	<flag name="e">
+		<description>
+			Ampliar la extensi�n de la localizaci�n en base a nuevo conjunto de datos
+		</description>
+	</flag>
+	<flag name="w">
+		<description>
+			Cambiar nombres de columna a min�sculas
+		</description>
+ 		<guisection>
+			Attributes
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ogr.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.circle.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.circle.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.circle.xml	(revision 369)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.circle">
+	<description>
+		Crea un mapa r�ster que contiene anillos conc�ntricos alrededor de un punto dado.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="coordinate" type="string" required="yes" multiple="no">
+		<description>
+			La coordenada del centro (Este, Norte)
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="min" type="float" required="no" multiple="no">
+		<description>
+			Radio m�nimo para mapa de anillo/c�rculo (en metros)
+		</description>
+	</parameter>
+	<parameter name="max" type="float" required="no" multiple="no">
+		<description>
+			Radio m�ximo para mapa de anillo/c�rculo (en metros)
+		</description>
+	</parameter>
+	<parameter name="mult" type="float" required="no" multiple="no">
+		<description>
+			Data value multiplier
+		</description>
+	</parameter>
+	<flag name="b">
+		<description>
+			Generar mapa r�ster binario
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.circle.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ascii.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ascii.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ascii.xml	(revision 369)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.out.ascii">
+	<description>
+		Convierte un mapa vectorial binario de GRASS a un mapa vectorial ASCII de GRASS
+	</description>
+	<keywords>
+		vectorial, exportar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Ruta al archivo ASCII resultante o nombre del vectorial ASCII si se define '-o'
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Formato de salida
+		</description>
+		<default>
+			point
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>standard</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos (modo de puntos)
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<default>
+			|
+		</default>
+		<guisection>
+			Puntos
+		</guisection>
+	</parameter>
+	<parameter name="dp" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de d�gitos significativos (coma flotante solamente)
+		</description>
+		<default>
+			8
+		</default>
+		<values>
+			<value>
+				<name>0-32</name>
+			</value>
+		</values>
+		<guisection>
+			Puntos
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Es posible conectar un solo mapa vectorial con m�ltiples tablas de una base de datos. Este n�mero determina qu� tabla se ha de usar.
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer" />
+		<default>
+			1
+		</default>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<parameter name="columns" type="string" required="no" multiple="yes">
+		<description>
+			Name of attribute column(s) to be exported (point mode)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Puntos
+		</guisection>
+	</parameter>
+	<parameter name="where" type="string" required="no" multiple="no">
+		<label>
+			Condiciones "WHERE", de la instrucci�n SQL sin la palabra clave "where".
+		</label>
+		<description>
+			Ejemplo: salario &lt; 1000 y habitantes &gt;=10000.
+		</description>
+		<keydesc>
+			<item order="1">sql_query</item>
+		</keydesc>
+		<guisection>
+			Selection
+		</guisection>
+	</parameter>
+	<flag name="o">
+		<description>
+			Crear archivo ASCII antiguo (versi�n 4)
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			S�lo exportar los puntos que caen dentro de la regi�n 3D actual (modo de puntos)
+		</description>
+ 		<guisection>
+			Puntos
+		</guisection>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.out.ascii.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.area.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.area.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.area.xml	(revision 369)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.reclass.area">
+	<description>
+		Reclasses a raster map greater or less than user specified area size (in hectares).
+	</description>
+	<keywords>
+		r�ster, estad�sticas, agregaci�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa r�ster de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="lesser" type="float" required="no" multiple="no">
+		<description>
+			Lesser value option that sets the &lt;= area size limit [hectares]
+		</description>
+	</parameter>
+	<parameter name="greater" type="float" required="no" multiple="no">
+		<description>
+			Greater value option that sets the &gt;= area size limit [hectares]
+		</description>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.reclass.area.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.regression.line.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.regression.line.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.regression.line.xml	(revision 369)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.regression.line">
+	<description>
+		Calcula la regresi�n lineal de dos mapas r�ster: y = a + b*x
+	</description>
+	<keywords>
+		r�ster, estad�sticas
+	</keywords>
+	<parameter name="map1" type="string" required="yes" multiple="no">
+		<description>
+			Mapa para el coeficiente X
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="map2" type="string" required="yes" multiple="no">
+		<description>
+			Mapa para el coeficiente Y
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Archivo ASCII para guardar los coeficientes de regresi�n (salida a pantalla si no se especifica ning�n archivo).
+		</description>
+		<gisprompt age="new_file" element="file" prompt="output" />
+	</parameter>
+	<flag name="g">
+		<description>
+			Imprimir en estilo de script de consola
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Slower but accurate (applies to FP maps only)
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.regression.line.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.delaunay.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.delaunay.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.delaunay.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.delaunay">
+	<description>
+		Crea una triangulaci�n de Delaunay a partir de un mapa vectorial de entrada que contiene puntos o centroides.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="r">
+		<description>
+			Usar s�lo puntos en la regi�n actual
+		</description>
+	</flag>
+	<flag name="l">
+		<description>
+			Producir triangulaci�n como un gr�fo (l�neas), no �reas
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.delaunay.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.what.vect.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.what.vect.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.what.vect.xml	(revision 369)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.what.vect">
+	<description>
+		Carga valores vectoriales en las posiciones de puntos vectoriales a la tabla.
+	</description>
+	<keywords>
+		vectorial, base de datos, tabla de atributos
+	</keywords>
+	<parameter name="vector" type="string" required="yes" multiple="no">
+		<description>
+			Vector map to modify
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<description>
+			Capa del vectorial a modificar
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Columna a actualizar con el resultado de la consulta
+		</description>
+	</parameter>
+	<parameter name="qvector" type="string" required="yes" multiple="no">
+		<description>
+			Mapa vectorial a consultar
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="qlayer" type="integer" required="no" multiple="no">
+		<description>
+			Layer of the query vector containing data
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="qcolumn" type="string" required="yes" multiple="no">
+		<description>
+			Columna a consultar
+		</description>
+	</parameter>
+	<parameter name="dmax" type="float" required="no" multiple="no">
+		<description>
+			Maximum query distance in map units
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.what.vect.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resample.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resample.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resample.xml	(revision 369)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.resample">
+	<description>
+		Capacidad de remuestreo de datos de capa de mapa r�ster de GRASS.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de una capa de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de una capa de salida
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resample.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.qcount.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.qcount.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.qcount.xml	(revision 369)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.qcount">
+	<description>
+		Indices for quadrat counts of sites lists.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Vectoria de puntos que define los puntos de muestra
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Output quadrant centres, number of points is written as category
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="n" type="integer" required="yes" multiple="no">
+		<description>
+			Number of quadrats
+		</description>
+	</parameter>
+	<parameter name="r" type="float" required="yes" multiple="no">
+		<description>
+			Quadrat radius
+		</description>
+	</parameter>
+	<flag name="g">
+		<description>
+			Imprimir resultados en estilo de script de consola
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Quiet
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.qcount.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.bspline.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.bspline.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.bspline.xml	(revision 369)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.surf.bspline">
+	<description>
+		Bicubic or bilinear spline interpolation with Tykhonov regularization.
+	</description>
+	<keywords>
+		vectorial, interpolaci�n
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="sparse" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada de puntos esparcidos
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="raster" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="sie" type="float" required="no" multiple="no">
+		<description>
+			Length of each spline step in the east-west direction
+		</description>
+		<default>
+			4
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="sin" type="float" required="no" multiple="no">
+		<description>
+			Length of each spline step in the north-south direction
+		</description>
+		<default>
+			4
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			Spline interpolation algorithm
+		</description>
+		<default>
+			bilinear
+		</default>
+		<values>
+			<value>
+				<name>bilinear</name>
+			</value>
+			<value>
+				<name>bicubic</name>
+			</value>
+		</values>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="lambda_i" type="float" required="no" multiple="no">
+		<description>
+			Tykhonov regularization parameter (affects smoothing)
+		</description>
+		<default>
+			1
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<label>
+			N�mero de capa.
+		</label>
+		<description>
+			Valor de campo. Si se establece a 0, se usar�n las coordenadas Z (s�lo vectoriales 3D)
+		</description>
+		<gisprompt age="old_layer" element="layer" prompt="layer_zero" />
+		<default>
+			0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="column" type="string" required="no" multiple="no">
+		<description>
+			Columna de la tabla de atributos con valores a interpolar (si capa&gt;0)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_dbcolumn" element="dbcolumn" prompt="dbcolumn" />
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<flag name="c">
+		<description>
+			Find the best Tykhonov regularizing parameter using a "leave-one-out" cross validation method
+		</description>
+	</flag>
+	<flag name="e">
+		<label>
+			Estimate point density and distance
+		</label>
+		<description>
+			Estimate point density and distance for the input vector points within the current region extends and quit
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.surf.bspline.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.bin.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.bin.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.bin.xml	(revision 369)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.out.bin">
+	<description>
+		Exporta un r�ster de GRASS a una secuencia binaria.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa binario de salida (usar salida=- para stdout)
+		</description>
+	</parameter>
+	<parameter name="null" type="integer" required="no" multiple="no">
+		<description>
+			Valor a escribir para nulos
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<flag name="i">
+		<description>
+			Producir valores de categor�a enteros, no valores de celda
+		</description>
+	</flag>
+	<flag name="h">
+		<description>
+			Exportar secuencia con cabecera compatible con GMT
+		</description>
+	</flag>
+	<flag name="b">
+		<description>
+			Generate BIL world and header files
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Byte swap output
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.out.bin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.report.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.report.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.report.xml	(revision 369)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.report">
+	<description>
+		Informa estad�sticas de geometr�a para vectoriales.
+	</description>
+	<keywords>
+		vectorial, informe, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa vectorial de entrada
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de capa
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="option" type="string" required="yes" multiple="no">
+		<description>
+			Valor a calcular
+		</description>
+		<values>
+			<value>
+				<name>area</name>
+			</value>
+			<value>
+				<name>length</name>
+			</value>
+			<value>
+				<name>coor</name>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="units" type="string" required="no" multiple="no">
+		<description>
+			mi(llas),f(pies),me(tros),k(il�metros),a(cres),h(ect�reas),p(orcentaje)
+		</description>
+		<values>
+			<value>
+				<name>mi</name>
+			</value>
+			<value>
+				<name>miles</name>
+			</value>
+			<value>
+				<name>f</name>
+			</value>
+			<value>
+				<name>feet</name>
+			</value>
+			<value>
+				<name>me</name>
+			</value>
+			<value>
+				<name>meters</name>
+			</value>
+			<value>
+				<name>k</name>
+			</value>
+			<value>
+				<name>kilometers</name>
+			</value>
+			<value>
+				<name>a</name>
+			</value>
+			<value>
+				<name>acres</name>
+			</value>
+			<value>
+				<name>h</name>
+			</value>
+			<value>
+				<name>hectares</name>
+			</value>
+			<value>
+				<name>p</name>
+			</value>
+			<value>
+				<name>percent</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="r">
+		<description>
+			Resultado en orden inverso
+		</description>
+	</flag>
+	<flag name="s">
+		<description>
+			Ordenar el resultado
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.report.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.xml	(revision 369)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.random">
+	<description>
+		Creates a raster map layer and vector point map containing randomly located points.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de entrada
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cover" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster de cobertura
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="n" type="string" required="yes" multiple="no">
+		<description>
+			El n�mero de puntos a situar
+		</description>
+		<keydesc>
+			<item order="1">number[%]</item>
+		</keydesc>
+	</parameter>
+	<parameter name="raster_output" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="vector_output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="z">
+		<description>
+			Generate points also for NULL category
+		</description>
+	</flag>
+	<flag name="i">
+		<description>
+			Mostrar informaci�n sobre r�ster de entrada y salir
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Generar puntos vectoriales como puntos 3D
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.random.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.mapgen.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.mapgen.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.mapgen.xml	(revision 369)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.mapgen">
+	<description>
+		Importar mapas vectoriales Mapgen o Matlab a GRASS.
+	</description>
+	<keywords>
+		vectorial, importar
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo de entrada en formato Mapgen/Matlab
+		</description>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="output" type="string" required="no" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida (omitir para visualizaci�n a stdout)
+		</description>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<flag name="f">
+		<description>
+			El archivo de entrada est� en formato Matlab
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Crear un mapa vectorial 3D de puntos a partir de datos Matlab de 3 columnas
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.mapgen.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.mkgrid.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.mkgrid.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.mkgrid.xml	(revision 369)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.mkgrid">
+	<description>
+		Crea un mapa vectorial de GRASS de una cuadr�cula definida por el usuario.
+	</description>
+	<keywords>
+		vectorial
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="grid" type="integer" required="yes" multiple="no">
+		<description>
+			N�mero de filas y columnas en la cuadr�cula
+		</description>
+		<keydesc>
+			<item order="1">rows</item>
+			<item order="2">columns</item>
+		</keydesc>
+	</parameter>
+	<parameter name="position" type="string" required="no" multiple="no">
+		<description>
+			D�nde colocar la cuadr�cula
+		</description>
+		<default>
+			region
+		</default>
+		<values>
+			<value>
+				<name>region</name>
+				<description>regi�n actual</description>
+			</value>
+			<value>
+				<name>coor</name>
+				<description>usar las opciones 'coor' y 'box'</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="coor" type="float" required="no" multiple="no">
+		<description>
+			Coordenadas inferior izquierda Este y Norte del mapa
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="box" type="float" required="no" multiple="no">
+		<description>
+			Anchura y altura de cuadros en la cuadr�cula
+		</description>
+		<keydesc>
+			<item order="1">width</item>
+			<item order="2">height</item>
+		</keydesc>
+	</parameter>
+	<parameter name="angle" type="float" required="no" multiple="no">
+		<description>
+			�ngulo de rotaci�n (en grados en el sentido de las agujas del reloj)
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<flag name="p">
+		<description>
+			Create grid of points instead of areas and centroids
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			En silencio; Sin comentarios
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.mkgrid.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.to.vect.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.to.vect.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.to.vect.xml	(revision 369)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.to.vect">
+	<description>
+		Convierte un mapa r�ster en una capa de mapa vectorial.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="feature" type="string" required="yes" multiple="no">
+		<description>
+			Tipo de elemento
+		</description>
+		<default>
+			line
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+			</value>
+			<value>
+				<name>line</name>
+			</value>
+			<value>
+				<name>area</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="s">
+		<description>
+			Suavizar esquinas de objetos espaciales de �reas
+		</description>
+	</flag>
+	<flag name="v">
+		<description>
+			Usar valores r�ster como categor�as en vez de secuencia �nica (s�lo CELL)
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Escribir valores r�ster como coordenada Z. No se crea la tabla. Actualmente s�lo soportado para puntos.
+		</description>
+	</flag>
+	<flag name="b">
+		<description>
+			No construir topolog�a vectorial (usar con cuidado para exportaci�n masiva de puntos)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Silencioso - no muestra el progreso
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.to.vect.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.stats.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.stats.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.stats.xml	(revision 369)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.resamp.stats">
+	<description>
+		Resamples raster map layers to a coarser grid using aggregation.
+	</description>
+	<keywords>
+		r�ster, remuestrear
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="method" type="string" required="no" multiple="no">
+		<description>
+			M�todo de agregaci�n
+		</description>
+		<default>
+			average
+		</default>
+		<values>
+			<value>
+				<name>average</name>
+			</value>
+			<value>
+				<name>median</name>
+			</value>
+			<value>
+				<name>mode</name>
+			</value>
+			<value>
+				<name>minimum</name>
+			</value>
+			<value>
+				<name>maximum</name>
+			</value>
+			<value>
+				<name>quart1</name>
+			</value>
+			<value>
+				<name>quart3</name>
+			</value>
+			<value>
+				<name>perc90</name>
+			</value>
+			<value>
+				<name>sum</name>
+			</value>
+			<value>
+				<name>variance</name>
+			</value>
+			<value>
+				<name>stddev</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="n">
+		<description>
+			Propagar NULOS
+		</description>
+	</flag>
+	<flag name="w">
+		<description>
+			Weight according to area (slower)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.stats.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.contour.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.contour.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.contour.xml	(revision 369)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.contour">
+	<description>
+		Produces a vector map of specified contours from a raster map.
+	</description>
+	<keywords>
+		raster, DEM, contours, vector
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="levels" type="float" required="no" multiple="yes">
+		<description>
+			Lista de niveles de contorno
+		</description>
+	</parameter>
+	<parameter name="minlevel" type="float" required="no" multiple="no">
+		<description>
+			Nivel m�nimo de contorno
+		</description>
+	</parameter>
+	<parameter name="maxlevel" type="float" required="no" multiple="no">
+		<description>
+			Nivel m�ximo de contorno
+		</description>
+	</parameter>
+	<parameter name="step" type="float" required="no" multiple="no">
+		<description>
+			Incremento entre niveles de contorno
+		</description>
+	</parameter>
+	<parameter name="cut" type="integer" required="no" multiple="no">
+		<description>
+			N�mero m�nimo de puntos para una l�nea de contorno (0 -&gt; sin l�mite)
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			Suprime mensaje de error de cruzamiento simple
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.contour.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.distance.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.distance.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.distance.xml	(revision 369)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.distance">
+	<description>
+		Localiza los puntos m�s pr�ximos entre objetos en dos mapas r�ster.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="maps" type="string" required="yes" multiple="no">
+		<description>
+			Mapas para procesar distancias entre clases
+		</description>
+		<keydesc>
+			<item order="1">map1</item>
+			<item order="2">map2</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos de salida
+		</description>
+		<default>
+			:
+		</default>
+	</parameter>
+	<flag name="l">
+		<description>
+			Incluir etiquetas de categor�a en la salida
+		</description>
+	</flag>
+	<flag name="o">
+		<description>
+			Informar distancia cero si los r�ster solapan
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.distance.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spreadpath.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spreadpath.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spreadpath.xml	(revision 369)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.spreadpath">
+	<description>
+		Traza de forma recursiva la ruta de menor coste de vuelta hacia las celdas desde las que se determin� el coste acumulado.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="x_input" type="string" required="yes" multiple="no">
+		<description>
+			Name of raster map containing back-path easting information
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="y_input" type="string" required="yes" multiple="no">
+		<description>
+			Name of raster map containing back-path northing information
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="coordinate" type="string" required="no" multiple="yes">
+		<description>
+			Coordenadas de cuadr�cula E y N de mapa de los puntos iniciales
+		</description>
+		<keydesc>
+			<item order="1">x</item>
+			<item order="2">y</item>
+		</keydesc>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de ruta de propagaci�n
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="v">
+		<description>
+			Ejecutar con comentarios
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.spreadpath.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.normal.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.normal.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.normal.xml	(revision 369)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.normal">
+	<description>
+		Test de normalidad para puntos.
+	</description>
+	<keywords>
+		vectorial, estad�sticas
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="no">
+		<description>
+			point vector defining sample points
+		</description>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="tests" type="string" required="yes" multiple="yes">
+		<description>
+			Lists of tests (1-15): e.g. 1,3-8,13
+		</description>
+		<keydesc>
+			<item order="1">range</item>
+		</keydesc>
+	</parameter>
+	<parameter name="column" type="string" required="yes" multiple="no">
+		<description>
+			Attribute column
+		</description>
+	</parameter>
+	<flag name="r">
+		<description>
+			Use only points in current region
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Quiet
+		</description>
+	</flag>
+	<flag name="l">
+		<description>
+			lognormal
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.normal.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.median.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.median.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.median.xml	(revision 369)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.median">
+	<description>
+		Encuentra los valores medios en un mapa de cobertura dentro de �reas con el mismo valor de categor�a asignado en un mapa base especificado por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="base" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de mapa r�ster de base
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="cover" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster de cobertura
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.median.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.rst.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.rst.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.rst.xml	(revision 369)
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.resamp.rst">
+	<description>
+		Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="ew_res" type="float" required="yes" multiple="no">
+		<description>
+			Resoluci�n Este-Oeste deseada
+		</description>
+	</parameter>
+	<parameter name="ns_res" type="float" required="yes" multiple="no">
+		<description>
+			Resoluci�n Norte-Sur deseada
+		</description>
+	</parameter>
+	<parameter name="elev" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de archivo Z (altura)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="slope" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de pendientes (o fx)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="aspect" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de orientaci�n (o fy)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="pcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de curvatura de perfil (o fxx)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="tcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de curvatura tangencial (o fyy)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="mcurv" type="string" required="no" multiple="no">
+		<description>
+			Producir mapa de curvatura media (o fxy)
+		</description>
+		<gisprompt age="new" element="cell" prompt="raster" />
+		<guisection>
+			Opciones de salida
+		</guisection>
+	</parameter>
+	<parameter name="smooth" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster que contiene suavizado
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="maskmap" type="string" required="no" multiple="no">
+		<description>
+			Nombre del mapa r�ster a utilizar como m�scara
+		</description>
+		<gisprompt age="old" element="cell" prompt="raster" />
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="overlap" type="integer" required="no" multiple="no">
+		<description>
+			Solapamiento de filas/columnas para segmentaci�n
+		</description>
+		<default>
+			3
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="zmult" type="float" required="no" multiple="no">
+		<description>
+			Multiplicador para valores Z
+		</description>
+		<default>
+			1.0
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="tension" type="float" required="no" multiple="no">
+		<description>
+			Spline tension value
+		</description>
+		<default>
+			40.
+		</default>
+		<guisection>
+			Configuraciones
+		</guisection>
+	</parameter>
+	<parameter name="theta" type="float" required="no" multiple="no">
+		<description>
+			�ngulo de anisotrop�a (en grados)
+		</description>
+		<guisection>
+			Anisotrop�a
+		</guisection>
+	</parameter>
+	<parameter name="scalex" type="float" required="no" multiple="no">
+		<description>
+			Factor de escala de anisotrop�a
+		</description>
+		<guisection>
+			Anisotrop�a
+		</guisection>
+	</parameter>
+	<flag name="t">
+		<description>
+			Usar tensi�n independiente de dnorm
+		</description>
+	</flag>
+	<flag name="d">
+		<description>
+			Producir derivadas parciales en vez de par�metros topogr�ficos
+		</description>
+ 		<guisection>
+			Opciones de salida
+		</guisection>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.resamp.rst.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.prominence.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.prominence.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.prominence.xml	(revision 369)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.prominence">
+	<description>
+		Calculates prominence statistic
+	</description>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Raster map for which to calculate index
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Raster to store output
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="radius" type="integer" required="yes" multiple="no">
+		<description>
+			Radius of neighborhood in map cells
+		</description>
+	</parameter>
+	<flag name="a">
+		<description>
+			Calculate absolute differences
+		</description>
+	</flag>
+	<flag name="l">
+		<description>
+			Local data normalization
+		</description>
+	</flag>
+	<flag name="g">
+		<description>
+			Global data normalization
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			Square neighborhood shape (instead of circular)
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Disable on-screen progress display
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.prominence.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.gauss.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.gauss.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.gauss.xml	(revision 369)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.surf.gauss">
+	<description>
+		M�dulo de GRASS para producir una capa de mapa r�ster de desviaciones gausianas cuyas medias y desviaciones est�ndar pueden ser expresadas por el usuario. Utiliza un generador de n�meros aleatorios gausiano.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre de la superficie aleatoria de salida
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="mean" type="float" required="no" multiple="no">
+		<description>
+			Media de distribuci�n
+		</description>
+		<default>
+			0.0
+		</default>
+	</parameter>
+	<parameter name="sigma" type="float" required="no" multiple="no">
+		<description>
+			Desviaci�n est�ndar
+		</description>
+		<default>
+			1.0
+		</default>
+	</parameter>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.surf.gauss.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ascii.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ascii.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ascii.xml	(revision 369)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.in.ascii">
+	<description>
+		Crea un mapa vectorial a partir de archivo de puntos ASCII o archivo ASCII vectorial.
+	</description>
+	<keywords>
+		vectorial, importar
+	</keywords>
+	<parameter name="input" type="string" required="no" multiple="no">
+		<description>
+			Archivo ASCII a importar (si no se indica se leer� de la entrada est�ndar)
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+		<guisection>
+			Requerido
+		</guisection>
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre para el mapa vectorial de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="format" type="string" required="no" multiple="no">
+		<description>
+			Formato del archivo de entrada
+		</description>
+		<default>
+			point
+		</default>
+		<values>
+			<value>
+				<name>point</name>
+				<description>simple x,y[,z] list</description>
+			</value>
+			<value>
+				<name>standard</name>
+				<description>GRASS's vector ASCII format</description>
+			</value>
+		</values>
+	</parameter>
+	<parameter name="fs" type="string" required="no" multiple="no">
+		<description>
+			Separador de campos.
+		</description>
+		<keydesc>
+			<item order="1">character</item>
+		</keydesc>
+		<default>
+			|
+		</default>
+	</parameter>
+	<parameter name="skip" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de l�neas de la cabecera a saltar al comienzo del archivo de entrada (modo de puntos)
+		</description>
+		<default>
+			0
+		</default>
+	</parameter>
+	<parameter name="columns" type="string" required="no" multiple="no">
+		<label>
+			Definici�n de columna en estilo SQL (modo de puntos)
+		</label>
+		<description>
+			Por ejemplo: 'X doble precisi�n, Y doble precisi�n, cat int, nombre varchar(10)'
+		</description>
+		<guisection>
+			Columnas
+		</guisection>
+	</parameter>
+	<parameter name="x" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de columna usada como coordenada X (la primera columna es 1) para modo de puntos
+		</description>
+		<default>
+			1
+		</default>
+		<guisection>
+			Columnas
+		</guisection>
+	</parameter>
+	<parameter name="y" type="integer" required="no" multiple="no">
+		<description>
+			Number of column used as y coordinate (first column is 1) for points mode
+		</description>
+		<default>
+			2
+		</default>
+		<guisection>
+			Columnas
+		</guisection>
+	</parameter>
+	<parameter name="z" type="integer" required="no" multiple="no">
+		<label>
+			Number of column used as z coordinate (first column is 1) for points mode
+		</label>
+		<description>
+			If 0, z coordinate is not used
+		</description>
+		<default>
+			0
+		</default>
+		<guisection>
+			Columnas
+		</guisection>
+	</parameter>
+	<parameter name="cat" type="integer" required="no" multiple="no">
+		<label>
+			Number of column used as category (first column is 1) for points mode
+		</label>
+		<description>
+			If 0, unique category is assigned to each row and written to new column 'cat'
+		</description>
+		<default>
+			0
+		</default>
+		<guisection>
+			Columnas
+		</guisection>
+	</parameter>
+	<flag name="z">
+		<description>
+			Create 3D vector map
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Create a new empty vector map and exit. Nothing is read from input
+		</description>
+	</flag>
+	<flag name="n">
+		<description>
+			No esperar una cabecera cuando se lee en formato est�ndar
+		</description>
+	</flag>
+	<flag name="t">
+		<description>
+			No crear tabla en modo de puntos
+		</description>
+ 		<guisection>
+			Columnas
+		</guisection>
+	</flag>
+	<flag name="b">
+		<description>
+			No contruir topolog�a en modo de puntos
+		</description>
+	</flag>
+	<flag name="r">
+		<description>
+			S�lo importar los puntos que caen dentro de la regi�n actual (modo de puntos)
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.in.ascii.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.xml	(revision 369)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.mfilter">
+	<description>
+		Filtro de matrices de mapas r�ster.
+	</description>
+	<keywords>
+		r�ster, �lgebra de mapas
+	</keywords>
+	<parameter name="input" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="output" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa raster de salida.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="new" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="filter" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del archivo de filtro
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old_file" element="file" prompt="input" />
+	</parameter>
+	<parameter name="repeat" type="integer" required="no" multiple="no">
+		<description>
+			N�mero de veces a repetir el filtro
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="title" type="string" required="no" multiple="no">
+		<description>
+			T�tulo de mapa r�ster de salida
+		</description>
+	</parameter>
+	<flag name="q">
+		<description>
+			Silencioso
+		</description>
+	</flag>
+	<flag name="z">
+		<description>
+			Aplicar filtro s�lo a valores cero de datos
+		</description>
+	</flag>
+	<flag name="overwrite">
+		<description>
+			Permite a los archivos de salida sobrescribir los archivos existentes.
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.mfilter.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.covar.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.covar.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.covar.xml	(revision 369)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="r.covar">
+	<description>
+		Produce una matriz de covarianza/correlaci�n para la capa(s) de mapa r�ster especificada por el usuario.
+	</description>
+	<keywords>
+		r�ster
+	</keywords>
+	<parameter name="map" type="string" required="yes" multiple="yes">
+		<description>
+			Nombre(s) del (los) mapa(s) raster de entrada.
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<flag name="r">
+		<description>
+			Imprimir matriz de correlaci�n
+		</description>
+	</flag>
+	<flag name="q">
+		<description>
+			Ejecutar en modo silencioso
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/r.covar.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.rast.stats.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.rast.stats.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.rast.stats.xml	(revision 369)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="CP1252"?>
+<!DOCTYPE task SYSTEM "grass-interface.dtd">
+<task name="v.rast.stats">
+	<description>
+		Calcular estad�sticas univariantes a partir de un mapa r�ster de GRASS basadas en pol�gonos vectoriales y carga las estad�sticas en nuevas columnas de atributos.
+	</description>
+	<keywords>
+		vectorial, r�ster, estad�sticas
+	</keywords>
+	<parameter name="vector" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa de pol�gono vectorial
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="vector" prompt="vector" />
+	</parameter>
+	<parameter name="layer" type="integer" required="no" multiple="no">
+		<description>
+			Capa al que est� conectada la tabla a cambiar
+		</description>
+		<default>
+			1
+		</default>
+	</parameter>
+	<parameter name="raster" type="string" required="yes" multiple="no">
+		<description>
+			Nombre del mapa r�ster del que calcular estad�sticas
+		</description>
+		<keydesc>
+			<item order="1">name</item>
+		</keydesc>
+		<gisprompt age="old" element="cell" prompt="raster" />
+	</parameter>
+	<parameter name="colprefix" type="string" required="yes" multiple="no">
+		<description>
+			Prefijo de columna para las nuevas columnas de atributos
+		</description>
+	</parameter>
+	<parameter name="percentile" type="integer" required="no" multiple="no">
+		<description>
+			Percentil a calcular (requiere la opci�n de estad�sticas ampliadas)
+		</description>
+		<default>
+			90
+		</default>
+		<values>
+			<value>
+				<name>0-100</name>
+			</value>
+		</values>
+	</parameter>
+	<flag name="c">
+		<description>
+			Continuar si la columna(s) en la que cargar ya existe
+		</description>
+	</flag>
+	<flag name="e">
+		<description>
+			Calcular estad�sticas ampliadas
+		</description>
+	</flag>
+	<flag name="verbose">
+		<description>
+			Salida detallada del m�dulo.
+		</description>
+	</flag>
+	<flag name="quiet">
+		<description>
+			Salida del m�dulo "silenciosa".
+		</description>
+	</flag>
+</task>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/alg_descriptions/grass/description/v.rast.stats.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/pom.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/pom.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/pom.xml	(revision 369)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.gvsig</groupId>
+    <artifactId>org.gvsig.toolbox.gui</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+	
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.toolbox</artifactId>
+        <version>1.0.65</version>
+    </parent>
+	
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>         
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency> 
+        <dependency>    
+        <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.expressionevaluator.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>           
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.expressionevaluator.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.temporarystorage.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.toolbox.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>es.unex</groupId>
+            <artifactId>sextante_wps</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>es.unex</groupId>
+            <artifactId>libDocEngines</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.sf</groupId>
+            <artifactId>jgraph</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>info.clearthought</groupId>
+            <artifactId>TableLayout-bin-jdk1.5</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.beanshell</groupId>
+            <artifactId>bsh</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.kxml</groupId>
+            <artifactId>kxml2</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.japura</groupId>
+            <artifactId>org.japura</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/build.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/build.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/build.xml	(revision 369)
@@ -0,0 +1,45 @@
+<project name="SEXTANTE_LIB" default="generate-without-source" basedir=".">
+    <description>
+        SEXTANTE_GUI
+    </description>
+	<property name="version.number" value="0.7"/>
+
+  <target name="generate-without-source"
+  	description="generate the distribution without the source file">
+
+  	       <tstamp>
+  	         <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
+  	       </tstamp>
+
+  	    <manifest file="MANIFEST.MF">
+  	        <attribute name="Implementation-Version"
+  	            value="${version.number}"/>
+  	        <attribute name="Built-Date" value="${TODAY}"/>
+  	   </manifest>
+
+    <jar jarfile="../dist/sextante_gui.jar" manifest="MANIFEST.MF">
+  		<fileset dir="bin">
+  			<include name="**"/>
+ 		</fileset>
+ 	</jar>
+
+    <jar jarfile="../dist/sextante_gui.jar" update ="true">
+        <fileset dir=".">
+            <include name="i18n/**"/>
+        </fileset>
+    </jar>
+
+    <jar jarfile="../dist/sextante_gui.jar" update ="true">
+        <fileset dir=".">
+            <include name="images/**"/>
+        	<include name="grass/**"/>
+        </fileset>
+    </jar>
+
+    <copy todir="../dist">
+    	<fileset dir="lib" includes="**"/>
+    </copy>
+
+  </target>
+
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/build.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/sextante_grass.bat
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/sextante_grass.bat	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/sextante_grass.bat	(revision 369)
@@ -0,0 +1,38 @@
+set HOME=%USERPROFILE%
+set PATH=%GRASSDIR%\msys\bin;%PATH%
+set PATH=%GRASSDIR%\extrabin;%GRASSDIR%\extralib;%PATH%
+set PATH=%GRASSDIR%\tcl-tk\bin;%GRASSDIR%\sqlite\bin;%GRASSDIR%\gpsbabel;%PATH%
+set GRASS_HTML_BROWSER=%PROGRAMFILES%/Internet Explorer/iexplore.exe
+set GRASS_PROJSHARE=%GRASSDIR%\proj
+set PYTHONHOME=%GRASSDIR%\Python25
+set WINGISBASE=%GRASSDIR%
+set GISBASE=%GRASSDIR%
+set SAVEPATH=%PATH%
+set PATH=%WINGISBASE%\bin;%WINGISBASE%\lib;%PATH%
+set GISRC=%HOME%\.grassrc6
+
+g.gisenv set="MAPSET=%MAPSET%"
+g.gisenv set="LOCATION=%LOCATION_NAME%"
+g.gisenv set="LOCATION_NAME=%LOCATION_NAME%"
+g.gisenv set="GISDBASE=%GISDBASE%"
+
+set GRASS_VERSION=6.4.0RC5
+
+set GRASS_PAGER=more
+if "%GRASS_WISH%"=="" set GRASS_WISH=wish.exe
+if "%GRASS_SH%"=="" set GRASS_SH=c:\msys\1.0\bin\sh.exe
+if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
+if "%GRASS_PROJSHARE%"=="" set GRASS_PROJSHARE=/c/Programs/GIS/OSGeo4W/share/proj
+
+set PATHEXT=%PATHEXT%;.PY
+
+g.gisenv "set=GRASS_GUI=text"
+
+call "%GRASS_BATCH_JOB%"
+
+"%WINGISBASE%\etc\clean_temp" > NUL:
+
+set PATH=%SAVEPATH%
+set SAVEPATH=
+
+rem exit
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/jgraph.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/jgraph.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/TableLayout-bin-jdk1.5-2007-04-21.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/TableLayout-bin-jdk1.5-2007-04-21.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/bsh-2.0b4.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/bsh-2.0b4.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/japura-1.14.0.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/lib/japura-1.14.0.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/MANIFEST.MF
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/MANIFEST.MF	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/MANIFEST.MF	(revision 369)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.7.1
+Created-By: 20.1-b02 (Sun Microsystems Inc.)
+Implementation-Version: 0.7
+Built-Date: 2013-03-04 16:06:37
+

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/table_icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/table_icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/grass.smlogo.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/grass.smlogo.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/model.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/model.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/r.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/r.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/module_wrong.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/module_wrong.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/list-add.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/list-add.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/Rlogo.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/Rlogo.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante_toolbox2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante_toolbox2.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/config.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/config.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/documenter.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/documenter.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/font_smaller.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/font_smaller.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/module2.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/module2.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/README
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/README	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/README	(revision 369)
@@ -0,0 +1,9 @@
+All images are Public Domain.
+
+Some of them was created by Victor Olaya and other for Nacho Varela 
+for SEXTANTE Project.
+
+'config.png' is from Tango Galery [1]
+
+
+[1]: http://tango.freedesktop.org
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/terminal.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/terminal.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/saga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/saga.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/info.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/info.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/raster_layer.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/raster_layer.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipoint-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipoint-sel.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-line.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-line.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-polygon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-polygon.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-point.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-point.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-wrong.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-wrong.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-mix.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-mix.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-raster.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-raster.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multiline.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multiline.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipolygon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipolygon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipoint.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipoint.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/.directory
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/.directory	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/.directory	(revision 369)
@@ -0,0 +1,4 @@
+[Dolphin]
+Timestamp=2018,12,17,21,48,22
+Version=4
+ViewMode=1
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-polygon-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-polygon-sel.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-line-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-line-sel.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-point-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-point-sel.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-mix-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-mix-sel.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multiline-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multiline-sel.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipolygon-sel.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layertypes/layer-type-multipolygon-sel.png
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/grass.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/grass.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/vector_layer.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/vector_layer.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/layers.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/history.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/history.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/chart.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/chart.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante_toolbox.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/sextante_toolbox.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/font_larger.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/font_larger.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/target.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/target.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/logo_saga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/images/logo_saga.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text.properties	(revision 369)
@@ -0,0 +1,627 @@
+[Save_to_temporary_file]=[Guardar en archivo temporal]
+
+Wrong_or_missing_parameters_definition=Par\u00E1metros invalidos o insuficientes
+
+Warning=Aviso
+
+Save=Guardar
+
+Open=Abrir
+
+Cancel=Cancelar
+
+OK=Aceptar
+
+Raster_output=Regi\u00F3n de an\u00E1lisis
+
+Parameters=Par\u00E1metros
+
+Help=Ayuda
+
+Batch_processing=Proceso por lotes
+
+Autofill_with_field_values=Autorellenar con campo
+
+Autofill_with_numbers=Autorellenar con n\u00FAmeros
+
+Do_not_autofill=No autorrellenar
+
+Error_or_process_canceled_by_user=Error o proceso cancelado por el usuario
+
+Process=Proceso
+
+Yes=Si
+
+No=No
+
+Band=Banda
+
+elements_selected=elementos seleccionados
+
+element_selected=elemento seleccionado
+
+Tables=Tablas
+
+Vector_layer=Capa vectorial
+
+Vector_Layer=Capa vectorial
+
+Raster_Layers=Capas raster
+
+Raster_layers=Capas raster
+
+Vector_layers=Capas vectoriales
+
+Add_row=A\u00F1adir fila
+
+Delete_row=Eliminar fila
+
+point=punto
+
+batch_html=batch.html
+
+Could_not_open_selected_file=No pudo abrirse el archivo seleccionado
+
+Layer=Capa
+
+Selection=Selecci\u00F3n
+
+Capas_raster=Capas raster
+
+Number_of_rows-cols=N\u00FAmero de filas/columnas
+
+Number_of_cols_z=N\u00FAmero de columnas (Z)
+
+Cell_sizeZ=Tama\u00F1o de celda (Z)
+
+Cell_size=Tama\u00F1o de celda
+
+Range_Y=Rango Y
+
+Range_X=Rango X
+
+Range_Z=Rango Z
+
+Extent__values=Extensi\u00F3n (valores)
+
+Extent_from=Extensi\u00F3n a partir de
+
+Fit_to_input_layers=Ajustar a datos de entrada
+
+User_defined=Definida por el usuario
+
+Are_you_sure_you_want_to_use_it?=\u00BFEsta seguro de que la extensi\u00F3n es correcta?
+
+The_selected_grid_extent_seems_too_large=La capa que quiere crear parece demasiado grande
+
+Wrong_or_missing_raster_extent_definition=Regi\u00F3n de an\u00E1lisis incorrecta
+
+Command_line=L\u00EDnea de comandos
+
+toolbox_html=toolbox.html
+
+Search=Buscar
+
+Algorithms=Herramientas y algoritmos
+
+Show_help=Ver ayuda
+
+Show_active_only=Ver s\u00F3lo algoritmos activos
+
+Collapse_all=Contraer todo
+
+Expand_all=Expandir todo
+
+Show_WPS_XML=Ver WPS XML
+
+Edit_model=Editar modelo
+
+Execute_as_batch_process__using_layers_from_GIS_app=Ejecutar proceso por lotes (sobre capas cargadas)
+
+Execute_as_batch_process=Ejecutar como proceso por lotes
+
+Run=Ejecutar
+
+The_following_URLs_are_wrong_or_not_available=Las siguientes URL no son correctas o no est\u00E1n disponibles -
+
+Settings=Configuraci\u00F3n
+
+Folders=Carpetas
+
+Output_folder=Carpeta de resultados
+
+Models_folder=Carpeta de modelos
+
+Use_internal_names_for_outputs=Usar nombres internos para resultados
+
+Modify_output_names=Modificar nombre de resultados
+
+Activate_WPS=Activar WPS
+
+Remove=Quitar
+
+Add=A\u00F1adir
+
+grass_sextante_html=grass_sextante.html
+
+GRASS_mapset=GRASS mapset
+
+GRASS_folder=Directorio de instalaci\u00F3n de GRASS
+
+GRASS_null=Valor de celdas sin datos
+
+grass_input_3d=Procesar entradas vectoriales como 3D
+
+GRASS_lat_lon_mode=Los datos de entrada est\u00E1n en coordenadas geogr\u00E1ficas
+
+GRASS_use_temp_mapset=Crear mapset temporal
+
+GRASS_error_create_temp_mapset=Error creando mapset temporal
+
+Invalid_parameters=Par\u00E1metros invalidos
+
+from=de
+
+[Not_selected]=[No seleccionado]
+
+unchecked=sin comprobar
+
+Options=Opciones
+
+[optional]=[opcional]
+
+Output_objects=Objetos de salida
+
+Deselect_all=Deseleccionar todo
+
+Select_all=Seleccionar todo
+
+Multiple_selection=Selecci\u00F3n m\u00FAltiple
+
+Models=Modelos
+
+Procedures=Procesos
+
+Inputs=Entradas
+
+0_elements_selected=0 elementos seleccionados
+
+Remove_them_before_removing_this_one=Debe eliminar esos elementos antes de eliminar \u00E9ste.
+
+Other_elements_depend_on_the_selected_one=Otros elementos dependen del seleccionado.
+
+[New_model]=[Nuevo modelo]
+
+Do_you_want_to_start_a_new_model_without_saving_changes?=\u00BFDesea empezar un nuevo modelo sin guardar los cambios?
+
+Model_has_been_modified=El modelo ha sido modificado.
+
+Do_you_want_to_open_a_new_model_without_saving_changes?=\u00BFDesea abrir un nuevo modelo sin guardar los cambios?
+
+modeler_html=modeler.html
+
+Group=Grupo
+
+Name=Nombre
+
+New=Nuevo
+
+Modeler=Modelizador
+
+Keep_as_final_result=Conservar como resultado final
+
+Edit=Editar
+
+Invalid_description=Descripci\u00F3n inv\u00E1lida
+
+Raster_layer=Capa raster
+
+Raster_Layer=Capa raster
+
+Mandatory=Capa obligatoria
+
+Multiple_input=Entrada m\u00FAltiple
+
+Mandatory_input=Entrada obligatoria
+
+Table=Tabla
+
+Vectorial__points=Vectorial (puntos)
+
+Vectorial__lines=Vectorial (l\u00EDneas)
+
+Vectorial__polygons=Vectorial (pol\u00EDgonos)
+
+Vector_any_type=Vectorial cualquier tipo
+
+Input_type=Tipo de entrada
+
+Any=Cualquier tipo
+
+Polygons=Pol\u00EDgonos
+
+Lines=L\u00EDneas
+
+Points=Puntos
+
+Boolean_value=Valor booleano
+
+Default_value=Valor por defecto\:
+
+String=Cadena de texto
+
+Number_of_columns=N\u00FAmero de columnas\:
+
+Number_of_rows=N\u00FAmero de filas\:
+
+Fixed_number_of_rows=N\u00FAmero fijo de filas
+
+Fixed_table=Tabla fija
+
+Fixed_Table=Tabla fija
+
+Tools=Herramientas
+
+Field=Campo
+
+Table_Field=Campo
+
+[table]=[tabla]
+
+[layer]=[capa]
+
+Parent_layer_or_table=Capa o tabla de la que depende
+
+Parent_layer=Capa de la que depende
+
+Numerical_value=Valor num\u00E9rico
+
+Float=Decimal
+
+Integer=Entero
+
+Value_type=Tipo de valor\:
+
+Max_value=Valor m\u00E1ximo\:
+
+Min_value=Valor m\u00EDnimo\:
+
+Coordinate=Coordenada
+
+Filepath=Fichero o carpeta
+
+Remove_image=Quitar imagen
+
+Add_image=A\u00F1adir imagen
+
+Images=Im\u00E1genes
+
+File=Archivo
+
+Elements=Elementos
+
+Information=Informaci\u00F3n
+
+Outputs=Salidas
+
+User_notes=Notas de usuario
+
+Help_file_created_by=Ayuda creada por
+
+Algorithm_created_by=Algoritmo creado por
+
+Additional_information=Informaci\u00F3n adicional
+
+history_html=history.html
+
+History=Historial
+
+commandline_html=commandline.html
+
+SEXTANTE_toolbox=Gestor de extensiones
+
+Basic_concepts=Conceptos generales
+
+Edit_help=Editar ayuda
+
+Point=Punto
+
+Polygon=Pol\u00EDgono
+
+Line=L\u00EDnea
+
+Text=Texto
+
+graph-chart=gr\u00E1fico
+
+Any_type=Cualquier tipo
+
+Image=Imagen
+
+Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers=Capas no validas para su uso con GRASS.\nDeben usarse capas basadas en archivos.
+
+Error_executing_GRASS_process=Error ejecutando proceso de GRASS
+
+More_than_one_month_ago=Hace m\u00E1s de un mes
+
+XXX_days_ago=Hace XXX d\u00EDas
+
+Yesterday=Ayer
+
+Today=Hoy
+
+This_session=Esta sesi\u00F3n
+
+Show_algorithm_dialog=Mostrar di\u00E1logo de ejecuci\u00F3n
+
+Warnings=Avisos
+
+Errors=Errores
+
+Commands=Comandos
+
+Clear_log=Borrar log
+
+Clear_history=Borrar historial
+
+Data=Datos
+
+fields=Campos
+
+Number_of_features=N\u00FAmero de entidades
+
+Capas_vectoriales=Capas vectoriales
+
+Use_extent_from_layer=Utilizar extensi\u00F3n de otra capa
+
+Use_extent_from_view=Utilizar extensi\u00F3n de la vista
+
+Coordinates=Coordenadas
+
+Select_coordinates=Seleccione coordenadas
+
+Result=Resultados
+
+Rename=Renombrar
+
+Delete_model=Borrar modelo
+
+installing_grass=Configuraci\u00F3n de GRASS
+
+grass_html=grass_sextante.html
+
+Introduction=Introducci\u00F3n
+
+Number_of_records=N\u00FAmero de registros
+
+Tables=Tablas
+
+Show_table=Mostrar tabla
+
+Region=Regi\u00F3n
+
+Invalid_no_data_value=Valor para celdas sin datos inv\u00E1lido
+
+Default_no_data_value=Valor por defecto para celdas sin datos
+
+grass_error_binaries_folder=La carpeta seleccionada no contiene una instalaci\u00F3n v\u00E1lida de GRASS.
+
+grass_error_mapset_folder=La carpeta seleccionada no es un mapset v\u00E1lido.
+
+grass_error_win_shell_binary=El programa seleccionado no es un interprete de comandos v\u00E1lido.\nPuede encontrar uno aqu\u00ED:
+
+grass_error_mapset_missing=No se ha encontrado un mapset de GRASS mapset.\nAjuste los par\u00E1metros de configuraci\u00F3n
+
+grass_error_shell_missing=No se ha especificado un interprete de comandos(sh.exe).\nAjuste los par\u00E1metros de configuraci\u00F3n.\nPuede encontrar uno aqu\u00ED:
+
+grass_shell_url=www.mingw.org/wiki/MSYS
+
+grass_error_grassrc_missing=No se encuentra el fichero de configuraci\u00F3n '.grassrc6'.\nReinstale GRASS o use un mapset temporal.
+
+grass_error_grassrc_missing2=El fichero no encontrado es el siguiente:
+
+grass_error_mapset_locked=El mapset de GRASS est\u00E1 bloqueado.\n\u00BFHay otro usuario accediendo a \u00E9l?
+
+grass_error_import_failed=Error al importar datos al mapset.
+
+grass_error_color_table=Error al importar la tabla de colores.
+
+grass_error_setup=No se ha conseguido instalar GRASS.\nCompruebe los par\u00E1metros e intente de nuevo.
+
+grass_error_title=Error ejecutando GRASS
+
+grass_warning_title=Aviso ejecutando GRASS
+
+grass_setup_help=<html><i>Ajuste los par\u00E1metros de esta ventana y presione el bot\u00F3n para instalar GRASS.</i></html>
+
+grass_setup=Instalar GRASS
+
+grass_warning_siblings=Failed to create descriptors for optional output(s).\Possibly limited functionality for one or more GRASS modules.
+
+grass_warning_geometries_none_found=Output does not contain any valid geometry types.\nCheck input data for topological errors.
+
+grass_warning_version=Versi\u00F3n de GRASS no soportada.
+
+grass_windows_shell=Int\u00E9rprete de comandos (sh.exe)
+
+Wrong_or_missing_region=Regi\u00F3n de an\u00E1lisis incorrecta
+
+grass_import_polylines=Importar como polilineas
+
+Run_iterative=Ejecutar iterativamente
+
+Copy =Copiar
+
+Paste=Pegar
+
+3D_Raster_layer=Capa raster 3D
+
+Cell_sizeZ=Tama\u00F1o de celda (z)
+
+Range_Z=Rango Z
+
+Number_of_cols_z=N\u00FAmero de columnas (z)
+
+3D_Raster_layers=Capas raster 3D
+
+3D_Raster_layer=Capa raster 3D
+
+Numerical_Value=Valor num\u00E9rico
+
+3d_not_supported=Esta plataforma no soporta datos raster 3D.\nNose han podido cargar los resultados 3D generados por SEXTANTE.
+
+[Overwrite]=[Sobreescribir]
+
+Overwrite=Sobreescribir
+
+Save_to_temp_file=Guardar en archivo temporal
+
+Layer_cannot_be_overwritten=La capa de entrada seleccionada no puede sobreescribirse
+
+WrongSettingValues=Par\u00E1metros err\u00F3neos
+
+load_models=Cargar modelos
+
+ModelsLoaded=Modelos cargados\:
+
+SagaAlgorithmsLoaded=Algoritmos cargados\:
+
+error_non_file_based_input=Error:Deben emplearse capas grabadas en fichero
+
+unsupported_file_format=Formato de fichero de entrada no soportado
+
+set_up_saga=Configurar SAGA
+
+Saga_folder=Carpeta de SAGA
+
+ErrorInstallingSaga=Error instalando SAGA
+
+RAlgorithmsLoaded=Algoritmos cargados:
+
+set_up_R=Configurar R
+
+R_folder=Carpeta de R
+
+ErrorInstallingR=Error instalando R
+
+ActivateProvider=Activar
+
+ConfigureAlgGroups=Configurar grupos de algoritmos
+
+RestoreDefault=Restaurar valores por defecto
+
+RecentAlgorithms=Usados recientemente
+
+ConfiguringProviders=Configuraci\u00F3n de provedores de algoritmos
+
+ShowMostRecent=Mostrar algoritmos recientemente utilizados
+
+Wrong_values_in_table=Valores err\u00F3neos en la tabla
+
+[Do_not_create_output]=[No crear resultado]
+
+Do_not_create_output=No crear resultado
+
+Scripts_folder=Carpeta de scripts
+
+load_scripts=Cargar scritps
+
+ScriptsLoaded=Scripts cargados
+
+Select_output_view=Seleccionar vista de salida
+
+Output_view=Vista de salida
+
+Create_new_view=Crear nueva
+
+Restrict_geometry_output=Restringir geometr\u00EDa de salida
+
+no_elements_selected=Ning\u00FAn elemento seleccionado
+
+multiple_elements_selected=Varios elementos seleccionados
+
+CreateNewModel=Crear nuevo modelo
+
+Edit=Editar
+
+Delete=Borrar
+
+CreateNewScript=Crear nuevo script
+
+OpenCommandLineInterface=Abrir l\u00EDnea de comandos
+
+Log_messages=Mensajes (log)
+
+set_output_rendering=Definir representaci\u00F3n de capas de salida
+
+Save_as=Guardar como...
+
+file_operations=Fichero... 
+
+modeler_grid_activate=Usar grid\: 
+
+modeler_add_par_boolean=A\u00F1adir valor booleano
+
+modeler_add_par_numerical=A\u00F1adir valor num\u00E9rico
+
+modeler_add_par_string=A\u00F1adir cadena de texto
+
+modeler_add_par_filepath=A\u00F1adir fichero o carpeta
+
+modeler_add_par_table=A\u00F1adir tabla
+
+modeler_add_par_point=A\u00F1adir punto de coordenadas
+
+modeler_add_par_fixed_table=A\u00F1adir tabla fija
+
+modeler_add_par_selection=A\u00F1adir opci\u00F3n
+
+modeler_add_par_multiple=A\u00F1adir entrada m\u00FAltiple
+
+modeler_add_par_vector=A\u00F1adir capa vectorial
+
+modeler_add_par_raster=A\u00F1adir capa raster
+
+modeler_add_par_raster_3D=A\u00F1adir capa raster 3D
+
+modeler_add_par_band=A\u00F1adir banda raster
+
+modeler_add_par_field=A\u00F1adir campo
+
+modeler_edit_parameter=Editar entrada
+
+modeler_add_algorithm=A\u00F1adir algoritmo
+
+modeler_edit_algorithm=Editar configuraci\u00F3n del algoritmo
+
+node_Inputs=Entradas
+
+node_Layers=Capas
+
+node_Values=Valores
+
+node_Fields_and_Tables=Campos y tablas
+
+node_Others=Otros
+
+Raster_band=Banda raster
+
+Default_value_true=Verdadero por defecto
+
+nothing_to_set=<html><i>Nada que configurar.</i></html>
+
+vector_type=Tipo de geometr\u00EDa\:
+
+filepath_type=Tipo de entrada\:
+
+filepath_file_open=Fichero (abrir)
+
+filepath_file_save=Fichero (salvar)
+
+filepath_folder=Carpeta
+
+filepath_is_voxel_data=La entrada son datos voxel
+
+file_extension=Extensi\u00F3n (ej. \"asc\")\:
+
+Description=Descripci\u00F3n\:
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_en.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_en.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_en.properties	(revision 369)
@@ -0,0 +1,714 @@
+[Save_to_temporary_file]=[Save to temporary file]
+
+Wrong_or_missing_parameters_definition=Wrong or missing parameters definition
+
+Warning=Warning
+
+Save=Save
+
+Open=Open
+
+Cancel=Cancel
+
+OK=Ok
+
+Raster_output=Output region
+
+Parameters=Parameters
+
+Help=Help
+
+Batch_processing=Batch processing
+
+Autofill_with_field_values=Autofill with field values
+
+Autofill_with_numbers=Autofill with numbers
+
+Do_not_autofill=Do not autofill
+
+Error_or_process_canceled_by_user=Error or process canceled by user
+
+Process=Process
+
+Yes=Yes
+
+No=No
+
+Band=Band
+
+elements_selected=elements selected
+
+element_selected=element selected
+
+Tables=Tables
+
+Vector_layer=Vector layer
+
+Vector_Layer=Vector layer
+
+Raster_layers=Raster layers
+
+Vector_layers=Vector layers
+
+Add_row=Add row
+
+Delete_row=Delete row
+
+point=point
+
+batch_html=batch.html
+
+Could_not_open_selected_file=Could not open selected file
+
+Layer=Layer
+
+Selection=selection
+
+Capas_raster=Raster layers
+
+Number_of_rows-cols=Number of rows/cols
+
+Number_of_cols_z=Number of cols  (Z)
+
+Cell_sizeZ=Cell size (Z)
+
+Range_Z=Rango Z
+
+Cell_size=Cell size
+
+Range_Y=Range Y
+
+Range_X=Range X
+
+Extent__values=Extent (values)
+
+Extent_from=Extent from
+
+Fit_to_input_layers=Fit to input layers
+
+User_defined=User defined
+
+Are_you_sure_you_want_to_use_it?=Are you sure you want to use it?
+
+The_selected_grid_extent_seems_too_large=The selected grid extent seems very large
+
+Wrong_or_missing_raster_extent_definition=Wrong or missing analysis region
+
+Command_line=Command line
+
+toolbox_html=toolbox.html
+
+Search=Search
+
+Algorithm=Algorithm
+
+Algorithms=Tools and Algorithms
+
+Show_help=Show help
+
+Show_active_only=Show active only
+
+Collapse_all=Collapse all
+
+Expand_all=Expand all
+
+Show_WPS_XML=Show WPS XML
+
+Edit_model=Edit model
+
+Execute_as_batch_process__using_layers_from_GIS_app=Batch process (project layers)
+
+Execute_as_batch_process=Batch process (files)
+
+Run=Run
+
+The_following_URLs_are_wrong_or_not_available=The following URLs are wrong or not available -
+
+Settings=Settings
+
+Folders=Folders
+
+Output_folder=Default output folder\:
+
+Models_folder=User models folder\:
+
+Use_internal_names_for_outputs=Use internal names for outputs
+
+Modify_output_names=Modify output names
+
+Activate_WPS=Activate WPS
+
+Remove=Remove
+
+Add=Add
+
+grass_sextante_html=grass_sextante.html
+
+GRASS_folder=GRASS GIS binaries folder\:
+
+GRASS_null=Null cell value (number)
+
+grass_input_3d=Process all input vector data as 3D
+
+grass_clean_polygons=Clean polygons on import
+
+grass_no_vect_bbox=Do not restrict vector input to region
+
+GRASS_lat_lon_mode=Input data is geographic lat/lon
+
+GRASS_error_create_temp_mapset=Error creating temporary mapset\:
+
+Invalid_parameters=Invalid or incomplete settings.
+
+from=from
+
+[Not_selected]=[Not selected]
+
+unchecked=unchecked
+
+Options=Options
+
+[optional]=[optional]
+
+Output_objects=Output objects
+
+Deselect_all=Deselect all
+
+Select_all=Select all
+
+Multiple_selection=Multiple selection
+
+Models=Models
+
+Procedures=Algorithms
+
+Inputs=Inputs
+
+0_elements_selected=0 elements selected
+
+Remove_them_before_removing_this_one=Remove them before removing this one.
+
+Other_elements_depend_on_the_selected_one=Other elements depend on the selected one
+[New_model]=[New model]
+
+Do_you_want_to_start_a_new_model_without_saving_changes?=Do you want to start a new model without saving changes?
+
+Model_has_been_modified=Model has been modified.
+
+Do_you_want_to_open_a_new_model_without_saving_changes=Do you want to open a new model without saving changes?
+
+Do_you_want_to_save_your_changes=Do you want to save your changes before closing?
+
+modeler_html=modeler.html
+
+Group=Group
+
+Name=Name
+
+New=New
+
+Modeler=Modeler
+
+Keep_as_final_result=Save as\:
+
+Edit=Edit
+
+Invalid_description=Invalid description
+
+Raster_Layer=Raster layer
+
+Mandatory=Mandatory
+
+Multiple_input=Multiple input
+
+Table=Table
+
+Vectorial__points=Vector (points)
+
+Vectorial__lines=Vector (lines)
+
+Vectorial__polygons=Vector (polygons)
+
+Vector_any_type=Vector (any type)
+
+Input_type=Input type\:
+
+Any=Any
+
+Polygons=Polygons
+
+Lines=Lines
+
+Points=Points
+
+Boolean_value=Boolean value
+
+Default_value=Default value\:
+
+String=String
+
+Number_of_columns=Number of columns\:
+
+Number_of_rows=Number of rows\:
+
+Fixed_number_of_rows=Fixed number of rows
+
+Fixed_table=Fixed table
+
+Fixed_Table=Fixed table
+
+Tools=Tools
+
+Field=Field
+
+Table_Field=Table field
+
+[table]=[table]
+
+[layer]=[layer]
+
+Parent_layer_or_table=From layer or table\:
+
+Parent_layer=From layer\:
+
+Numerical_value=Numerical value
+
+Float=Floating point
+
+Integer=Integer
+
+Value_type=Value type\:
+
+Max_value=Max. value\:
+
+Min_value=Min. value\:
+
+Coordinate=Point coordinates
+
+Filepath=File or folder
+
+Remove_image=Remove image
+
+Add_image=Add image
+
+Images=Images
+
+File=File
+
+Elements=Elements
+
+Information=Information
+
+Outputs=Outputs
+
+User_notes=User notes
+
+Help_file_created_by=Help file created by
+
+Algorithm_created_by=Algorithm created by
+
+Additional_information=Additional information
+
+history_html=history.html
+
+History=History
+
+commandline_html=commandline.html
+
+SEXTANTE_toolbox=SEXTANTE Toolbox
+
+version=Version
+
+Basic_concepts=Basic concepts
+
+Edit_help=Edit help
+
+Point=Point
+
+Polygon=Polygon
+
+Line=Line
+
+Text=Text
+
+graph-chart=graph/chart
+
+Any_type=Any type
+
+Image=Image
+
+Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers=Input layers are not compatible with GRASS usage.\nMust be file-based layers.
+
+Error_executing_GRASS_process=Error executing GRASS process.
+
+More_than_one_month_ago=More than one month ago
+
+XXX_days_ago=XXX days ago
+
+Yesterday=Yesterday
+
+Today=Today
+
+This_session=This session
+
+Show_algorithm_dialog=Show algorithm dialog
+
+Warnings=Warnings
+
+Errors=Errors
+
+Commands=Commands
+
+Clear_log=Clear log
+
+Clear_history=Clear history
+
+Data=Data
+
+fields=fields
+
+Number_of_features=Number of features
+
+Capas_vectoriales=Vector layers
+
+Use_extent_from_layer=Use extent from layer
+
+Use_extent_from_view=Use extent from view
+
+Coordinates=Coordinates
+
+Select_coordinates=Select coordinates
+
+Result=Result
+
+Rename=Rename
+
+Delete_model=Delete model
+
+installing_grass=Installing grass...
+
+grass_html=grass_sextante.html
+
+grass_error_binaries_folder=The selected folder does not contain a valid GRASS installation.
+
+grass_error_mapset_folder=The selected folder is not a valid GRASS mapset.
+
+grass_error_win_shell_binary=The selected program is not a valid shell interpreter.\nA shell interpreter for Windows can be found here\:
+
+grass_error_mapset_missing=GRASS mapset not found.\nPlease adjust GRASS interface settings.
+
+grass_error_shell_missing=Missing a valid shell interpreter (sh.exe).\nPlease adjust GRASS interface settings.\nA shell interpreter for Windows can be found here\:
+
+grass_shell_url=www.mingw.org/wiki/MSYS
+
+grass_error_mapset_locked=GRASS mapset is locked. Perhaps another user is\ncurrently logged into the mapset?
+
+grass_error_import_failed=Failed to import data into GRASS mapset.
+
+grass_error_color_table=Failed to import new GRASS raster color table.
+
+grass_error_setup=Failed to setup GRASS.\nPlease revise settings and retry.
+
+grass_error_title=GRASS Interface Error
+
+grass_error_geometries_none_found=Output does not contain any valid geometry types.\nCheck input data for topological errors.
+
+grass_info_title=GRASS Interface Info
+
+grass_info_setup_success=Refreshed GRASS GIS modules registry.\n Number of registered modules\:
+
+grass_warning_postprocess=Postprocessing failed. Output may be incomplete or invalid.
+
+grass_warning_preprocess=Preprocessing failed. Output may be incomplete or invalid.
+
+grass_warning_title=GRASS Interface Warning
+
+grass_warning_missing_cmd=One or more external shell commands were not found in\nthe default locations. Some scripted GRASS modules may\nnot run properly. Please check log for details.
+
+grass_setup_help=<html><i>Make settings above, then press button to setup GRASS</i></html>
+
+grass_setup=Setup GRASS
+
+grass_warning_siblings=Failed to create descriptors for optional output(s).\Possibly limited functionality for one or more GRASS modules.
+
+grass_warning_version=Unsupported GRASS version. Proceed at your own risk.
+
+grass_windows_shell=Shell binary (sh.exe)\:
+
+grass_import_polylines=Import polygons as polylines
+
+grass_log_output=GRASS output
+
+Wrong_or_missing_region=Wrong or missing analysis region
+
+Introduction=Introduction
+
+Number_of_records=Number of records
+
+Tables=Tables
+
+Show_table=Show table
+
+Region=Region
+
+Invalid_no_data_value=Invalid \"no data\" value.
+
+Default_no_data_value=Default \"no data\" value\:
+
+Files=Files
+
+Copy=Copy
+
+Paste=Paste
+
+Run_iterative=Run iteratively
+
+3D_Raster_layer=3D raster layer
+
+Cell_sizeZ=Cell size (z)
+
+Range_Z=Range Z
+
+Number_of_cols_z=Number of cols (z)
+
+3D_Raster_layers=3D Raster layers
+
+3D_Raster_layer=3D Raster layer
+
+Numerical_Value=Numerical value
+
+3d_not_supported=This platform does not support 3D raster data.\n Resulting 3D data generated by SEXTANTE could not be loaded.
+
+[Overwrite]=[Overwrite]
+
+Overwrite=Overwrite
+
+Save_to_temp_file=Save to temporary file
+
+Layer_cannot_be_overwritten=The selected input layer cannot be overwritten
+
+WrongSettingValues=Wrong settings
+
+load_models=Reload models
+
+ModelsLoaded=Refreshed user models registry.\nNumber of models registered\:
+
+SagaAlgorithmsLoaded=Refreshed SAGA GIS modules registry.\nNumber of modules registered\:
+
+set_up_saga=Set up SAGA
+
+Saga_folder=SAGA GIS binaries folder\:
+
+ErrorInstallingSaga=Error installing SAGA GIS support.
+
+RAlgorithmsLoaded=R algorithms loaded\:
+
+set_up_R=Set up R
+
+R_folder=R binaries folder\:
+
+R_Scripts_folder=R scripts folder\:
+
+Portable=Portable
+
+portable_dir_error=Cannot use directory
+
+portable_dir_error_ro=in read-only mode.
+
+portable_dir_error_rw=in read/write mode.
+
+portable_dir_is_file=A file with the same name exists in the same parent directory. 
+
+portable_dir_no_access=Access denied.
+
+portable_dir_no_create=Directory does not exist and could not be created.
+
+portable_file_error=Cannot use file
+
+portable_file_error_ro=in read-only mode.
+
+portable_file_error_rw=in read/write mode.
+
+portable_file_is_dir=A folder with the same name exists in the same parent directory. 
+
+portable_file_no_access=Access denied.
+
+portable_file_no_create=Directory does not exist and could not be created.
+
+portable_provider_not_usable=There will be no support for
+
+update_library=Update library\:
+
+load_R_scripts=Reload R scripts
+
+ErrorInstallingR=Error installing R
+
+error_non_file_based_input=Error\: only file-based input layers are supported.
+
+unsupported_file_format=Unsupported input file format
+
+ActivateProvider=Activate support for
+
+ConfigureAlgGroups=Edit groups
+
+RestoreDefault=Restore default
+
+RecentAlgorithms=Recently used
+
+ConfiguringProviders=Configuring algorithm providers
+
+ShowMostRecent=Show recently used algorithms
+
+Wrong_values_in_table=Wrong values in table
+
+[Do_not_create_output]=[Do not create this output]
+
+Do_not_create_output=Do not create this output
+
+Scripts_folder=User scripts folder\:
+
+load_scripts=Reload scripts
+
+ScriptsLoaded=Scripts registry refreshed.\nNumber of registered scripts\:
+
+RScriptsLoaded=R user scripts registry refreshed.\nNumber of registered scripts\:
+
+Select_output_view=Select output view
+
+Output_view=Output view
+
+Create_new_view=Create new view
+
+Restrict_geometry_output=Restrict output geometries to
+
+no_elements_selected=No elements selected
+
+multiple_elements_selected=Multiple elements selected
+
+CreateNewModel=Create new model
+
+CreateNewScript=Create new script
+
+OpenCommandLineInterface=Open command-line interface
+
+Log_messages=Log messages
+
+set_output_rendering=Set rendering style of output layers
+
+output_channel_null=Invalid input data (null)
+
+Config_path_label=Settings folder\:
+
+selector_choose_folder=Choose folder
+
+selector_choose_file=Choose file
+
+load_GRASS_modules=Reload GRASS modules
+
+load_SAGA_modules=Reload SAGA modules
+
+grass_use_sextante_null=Respect SEXTANTE \"no data\" value
+
+AlgCmdName=Name
+
+AlgName=Description
+
+AlgGroup=Group
+
+AlgSubgroup=Subgroup
+
+ShowAlgorithm=Show
+
+RestoreDefault=Restore defaults
+
+file_operations=File...
+
+Save_as=Save as...
+
+Close=Close
+
+delete_modeler_node_question=Do you want to remove this node permanently?
+
+modeler_grid_activate=Use grid\:
+
+modeler_add_par_boolean=Add boolean value
+
+modeler_add_par_numerical=Add numerical value
+
+modeler_add_par_string=Add string value
+
+modeler_add_par_filepath=Add file or folder
+
+modeler_add_par_table=Add table
+
+modeler_add_par_point=Add point coordinates
+
+modeler_add_par_fixed_table=Add fixed table
+
+modeler_add_par_selection=Add option
+
+modeler_add_par_multiple=Add multiple input
+
+modeler_add_par_vector=Add vector layer
+
+modeler_add_par_raster=Add raster layer
+
+modeler_add_par_raster_3D=Add 3D raster layer
+
+modeler_add_par_band=Add raster band
+
+modeler_add_par_field=Add field
+
+modeler_edit_parameter=Edit input
+
+modeler_add_algorithm=Add algorithm
+
+modeler_edit_algorithm=Edit algorithm settings
+
+node_Inputs=Inputs
+
+node_Layers=Layers
+
+node_Values=Values
+
+node_Fields_and_Tables=Fields \& tables
+
+node_Others=Others
+
+Raster_band=Raster band
+
+Default_value_true=True by default
+
+nothing_to_set=<html><i>Nothing to set.</i></html>
+
+vector_type=Geometry type\:
+
+option_setting=Op
+
+grass_restrict_geometry_ouput=Restrict output geometries to\:
+
+grass_compatibility_mode=High compatibility mode
+
+file_extension=Extension (e.g. \"asc\")\:
+
+filepath_type=Type of input\:
+
+filepath_file_open=File (open)
+
+filepath_file_save=File (save)
+
+filepath_folder=Folder
+
+filepath_is_voxel_data=Input is voxel data
+
+color=Color\:
+
+Model_file_exists=A file with this name already exists.
+
+Do_you_want_to_overwrite=Do you want to overwrite it?
+
+Description=Description\:
+
+are_you_sure_to_delete_the_selected_model=Are you sure to delete the selected model?
+
+are_you_sure_to_delete_the_selected_script=Are you sure to delete the selected script?

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_fr.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_fr.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_fr.properties	(revision 369)
@@ -0,0 +1,241 @@
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Run_iterative=Ex\u00E9cuter it\u00E9rativement
+Invalid_parameters=Param\u00E8tres incorrects
+Command_line=Ligne de commandes
+Fit_to_input_layers=Ajuster aux donn\u00E9es en entr\u00E9e
+Number_of_columns=Nombre de colonnes
+grass_setup=Installer GRASS
+grass_import_polylines=Importer des polygones comme polylignes
+Tables=Tables
+Image=Image
+Help_file_created_by=Aide cr\u00E9\u00E9e par
+grass_error_title=Erreur d'\u00E9xecution de GRASS
+Other_elements_depend_on_the_selected_one=D'autres \u00E9l\u00E9ments d\u00E9pendent de la s\u00E9lection
+This_session=Cette session
+History=Historique
+grass_sextante_html=grass_sextante.html
+Warning=Avertissement
+Keep_as_final_result=Conserver comme r\u00E9sultat final
+grass_error_binaries_folder=Le dossier s\u00E9lectionn\u00E9 ne contient pas une installation correcte de GRASS
+Range_Z=Etendue Z
+Modeler=Diagramme synoptique des traitements
+Range_Y=Etendue Y
+Range_X=Etendue X
+Default_no_data_value=Valeur par d\u00E9faut pour les cellules sans valeur
+Remove_image=Retirer image
+Max_value=Valeur maximale
+grass_input_3d=Traiter toutes les donn\u00E9es vectorielles en entr\u00E9e comme 3D
+Collapse_all=R\u00E9duire tout
+Raster_Layer=Couche matricielle (raster)
+Execute_as_batch_process__using_layers_from_GIS_app=Traiter par lots (toutes les couches du projet)
+grass_warning_version=Version de GRASS non compl\u00E8tement compatible. Continuer \u00E0 vos risques et p\u00E9rils.
+Additional_information=Information suppl\u00E9mentaire
+Help=Aide
+The_selected_grid_extent_seems_too_large=L'emprise de la couche en sortie semble trop grande
+grass_error_grassrc_missing2=Le fichier manquant est \:
+history_html=history.html
+Images=Images
+3d_not_supported=Cette plateforme ne permet pas d'exploiter des donn\u00E9es raster 3D. Les r\u00E9sultats 3D obtenus avec SEXTANTE ne peuvent \u00EAtre charg\u00E9s
+Cell_size=Taille de la cellule
+grass_html=grass_sextante.html
+fields=Colonnes
+grass_error_win_shell_binary=Le programme s\u00E9lectionn\u00E9 n'est pas un interpr\u00E8te de commandes valable. Un interpr\u00E8te de commandes pour Windows peut \u00EAtre trouv\u00E9 ici \:
+Vectorial__lines=Vectoriel (lignes)
+[Not_selected]=[Non-s\u00E9lectionn\u00E9]
+Wrong_or_missing_raster_extent_definition=Emprise d'analyse incorrecte
+3D_Raster_layers=Couches raster 3D
+Yes=Oui
+Fixed_number_of_rows=Nombre de lignes fixe 
+Could_not_open_selected_file=Impossible d'ouvrir le fichier s\u00E9lectionn\u00E9
+Are_you_sure_you_want_to_use_it?=\u00CAtes-vous s\u00FBr de vouloir l'utiliser?
+Capas_vectoriales=Couches vectorielles
+Remove_them_before_removing_this_one=Retirer-les avant celle-ci 
+Region=Emprise
+Clear_log=Supprimer journal des op\u00E9rations
+Edit=\u00C9diter
+Paste=Coller
+Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers=Couches en entr\u00E9e non compatibles avec l'utilisation de GRASS. Les couches doivent correspondre \u00E0 des fichiers.
+grass_warning_missing_cmd=Un ou plusieurs interpr\u00E8tes de commandes externes n'ont pas \u00E9t\u00E9 trouv\u00E9s dans la r\u00E9pertoire par d\u00E9faut. Certains modules GRASS pourraient ne pas fonctionner correctement. V\u00E9rifier le log pour plus de d\u00E9tails.
+toolbox_html=toolbox.html
+Invalid_no_data_value=Valeur incorrecte pour les cellules sans valeur
+Wrong_or_missing_parameters_definition=Param\u00E8tres incorrects ou manquants
+Today=Aujourd'hui
+Folders=R\u00E9pertoire
+SEXTANTE_toolbox=Bo\u00EEte \u00E0 outils SEXTANTE
+[table]=[table]
+grass_error_color_table=Erreur d'import d'une nouvelle table de couleurs GRASS
+Table_Field=Colonne
+Select_all=S\u00E9lectionner tout
+Mandatory=Couche obligatoire
+GRASS_use_temp_mapset=Cr\u00E9er un mapset temporaire
+GRASS_null=Valeur de cellule sans donn\u00E9es
+Use_internal_names_for_outputs=Utiliser noms internes pour les r\u00E9sultats
+grass_error_mapset_missing=Le mapset GRASS est introuvable. Ajuster les param\u00E8tres de l'interface GRASS
+Add_row=Ajouter ligne
+Edit_help=\u00C9diter l'aide
+Deselect_all=Tout d\u00E9s\u00E9lectionner
+Points=Point
+Errors=Erreurs
+[New_model]=[Nouveau mod\u00E8le]
+Vector_layer=Couche vectorielle
+Autofill_with_numbers=Remplir automatiquement avec des nombres
+Basic_concepts=Concepts g\u00E9n\u00E9raux
+Vectorial__polygons=Vectoriel (polygones)
+3D_Raster_layer=Couche raster 3D
+Vector_Layer=Couche vectorielle
+Options=Options
+grass_windows_shell=Interpr\u00E8te de commandes (sh.exe)
+grass_warning_postprocess=Les post-traitements n'ont pas fonctionn\u00E9. Le fichier en sortie peut \u00EAtre incomplet ou non valable.
+Error_or_process_canceled_by_user=Erreur ou processus annul\u00E9 par l'utilisateur
+Show_active_only=Afficher seulement algorithmes actifs
+grass_warning_preprocess=Les pr\u00E9-traitements n'ont pas fonctionn\u00E9. Le fichier en sortie peut \u00EAtre incomplet ou non valable.
+Model_has_been_modified=Le mod\u00E8le a \u00E9t\u00E9 modifi\u00E9
+No=Non
+installing_grass=Installation de GRASS en cours
+grass_error_geometries_none_found=Le fichier en sortie ne contient aucun type de g\u00E9om\u00E9trie valable. V\u00E9rifier la top\u00F4logie dans le mapset
+grass_warning_geometries_none_found=Le fichier en sortie ne contient aucun type de g\u00E9om\u00E9trie valable. V\u00E9rifier lla topologie dans le fichier en entr\u00E9e.
+Group=Groupe
+The_following_URLs_are_wrong_or_not_available=Les adresses URL suivantes sont incorrectes ou non-disponibles -
+OK=Accepter
+Output_folder=R\u00E9pertoire de sortie
+batch_html=batch.html
+Parameters=Param\u00E8tres
+Use_extent_from_view=Utiliser l'\u00E9tendue de la vue 
+Name=Nom
+GRASS_error_create_temp_mapset=Erreur de cr\u00E9ation d'un mapset temporaire
+Warnings=Avertissements
+Table=Table
+Raster_Layers=Couches matricielles (raster)
+Autofill_with_field_values=Remplir automatiquement avec les valeurs de colonne
+grass_warning_title=Probl\u00E8me d'ex\u00E9cution de GRASS
+Input_type=Type en entr\u00E9e
+Value_type=Type de valeur
+Mandatory_input=Entr\u00E9e obligatoire
+Selection=S\u00E9lection
+Add_image=Ajouter image
+grass_shell_url=www.mingw.org/wiki/MSYS
+Run=Ex\u00E9cuter
+Wrong_or_missing_region=Emprise d'analyse incorrecte
+Activate_WPS=Activer WPS
+Vector_layers=Couches vectorielles
+[optional]=[optionnel]
+Delete_model=Supprimer mod\u00E8le
+Layer=Couche
+Do_you_want_to_start_a_new_model_without_saving_changes?=Voulez-vous commencer un nouveau mod\u00E8le sans sauvegarder les changements?
+Number_of_cols_z=Nombre de colonnes (z)
+More_than_one_month_ago=Plus d'un mois auparavant
+graph-chart=graphique/tableau
+Boolean_value=Valeur bool\u00E9enne
+Delete_row=Supprimer ligne
+grass_error_shell_missing=Interpr\u00E8te de commandes (sh.exe) manquant. Ajuster les param\u00E8tres de configuration. Un interpr\u00E8te de commandes pour Windows peut \u00EAtre trouv\u00E9 ici \:
+Add=Ajouter
+Files=Fichiers
+Coordinate=Coordonn\u00E9e
+Multiple_input=Entr\u00E9e multiple
+Extent__values=\u00C9tendue (valeurs)
+Invalid_description=Description incorrecte
+Modify_output_names=Modifier nom des sorties
+Search=Rechercher
+Numerical_value=Valeur num\u00E9rique
+Number_of_rows-cols=Nombre de lignes/colonnes
+Field=Colonne
+commandline_html=commandline.html
+Do_you_want_to_open_a_new_model_without_saving_changes?=Voulez-vous ouvrir un nouveau mod\u00E8le sans sauvegarder  les changements?
+Multiple_selection=S\u00E9lection multiple
+grass_error_import_failed=Erreur d'importation des donn\u00E9es dans le mapset
+Numerical_Value=Valeur num\u00E9rique
+grass_info_setup_success=Installation de GRASS r\u00E9ussie. Nouveaux algorithmes \: 
+Raster_layers=Couches matricielles (raster)
+Copy=Copier
+Number_of_records=Nombre d'enregistrements
+Open=Ouvrir
+XXX_days_ago=Depuis XXX jours 
+Capas_raster=Couches matricielles (raster)
+Algorithm_created_by=Algorithme cr\u00E9\u00E9 par
+Outputs=Sorties
+Commands=Commandes
+Min_value=Valeur minimale
+Vector_any_type=Tout type vectoriel
+Any=Tout
+Error_executing_GRASS_process=Erreur d'ex\u00E9cution du processus de GRASS
+Any_type=Tout type
+User_defined=D\u00E9fini par l'utilisateur
+Process=Processus
+File=Fichier
+Data=Donn\u00E9es
+grass_error_setup=Impossible d'installer GRASS. V\u00E9rifier les param\u00E8tres et essayer \u00E0 nouveau.
+grass_error_grassrc_missing=Fichier de configuration '.grassrc6' manquant. R\u00E9installer GRASS ou utiliser un mapset temporaire
+Show_algorithm_dialog=Afficher les bo\u00EEtes de dialogue d'ex\u00E9cution
+Show_table=Montrer la table
+[layer]=[couche]
+Models=Mod\u00E8les
+0_elements_selected=Aucun \u00E9l\u00E9ment s\u00E9lectionn\u00E9
+User_notes=Notes de l'utilisateur
+String=Cha\u00EEne de caract\u00E8res
+Execute_as_batch_process=Traiter par lots
+Show_help=Afficher Aide
+Expand_all=D\u00E9velopper tout
+[Save_to_temporary_file]=[Sauvegarder dans fichier temporaire]
+Band=Bandes
+Text=Texte
+Elements=\u00C9l\u00E9ments
+Clear_history=Supprimer historique
+Information=Information
+Inputs=Entr\u00E9es
+Select_coordinates=S\u00E9lectionner coordonn\u00E9es
+GRASS_lat_lon_mode=Les donn\u00E9es en entr\u00E9e sont en coordonn\u00E9es g\u00E9ographiques lat/long
+Save=Sauvegarder
+Yesterday=Hier
+grass_log_output=Sortie Grass
+from=de
+element_selected=\u00C9l\u00E9ment s\u00E9lectionn\u00E9
+elements_selected=\u00C9l\u00E9ments s\u00E9lectionn\u00E9s
+New=Nouveau
+unchecked=n'est pas coch\u00E9e
+point=point
+Tools=Outils
+Batch_processing=Traitement par lots
+Raster_output=Emprise en sortie
+Point=Point
+Default_value=Valeur par d\u00E9faut
+Lines=Lignes
+Line=Ligne
+modeler_html=modeler.html
+Number_of_features=Nombre d'entit\u00E9s
+Extent_from=\u00C9tendue \u00E0 partir de
+Polygons=Polygones
+GRASS_mapset=GRASS mapset (dossier)
+Polygon=Polygone
+Use_extent_from_layer=Utiliser l'\u00E9tendue de la couche
+Models_folder=R\u00E9pertoire des mod\u00E8les
+Edit_model=\u00C9diter mod\u00E8le
+Procedures=Proc\u00E9dures
+GRASS_folder=R\u00E9pertoire d'installation de GRASS
+Parent_layer_or_table=Couche ou table parente (dont elle d\u00E9pend)
+grass_setup_help=R\u00E9gler les param\u00E8tres de cette fen\u00EAtre et cliquer sur le bouton pour installer GRASS
+Description=Description
+Cell_sizeZ=Taille de cellule (z)
+Vectorial__points=Vectoriel (points)
+grass_error_mapset_folder=Le dossier s\u00E9lectionn\u00E9 n'est pas un mapset valable.
+Remove=Retirer
+Algorithms=Outils et Algorithmes
+grass_warning_siblings=La cr\u00E9ation d'identificateurs n'a pas fonctionn\u00E9 pour les fichiers optionnels en sortie. Certaines fonctionnalit\u00E9s pourraient \u00EAtre limit\u00E9es pour un ou plusieurs modules GRASS
+Output_objects=Objets en sortie
+Introduction=Introduction
+Result=R\u00E9sultat
+Coordinates=Coordonn\u00E9es
+Parent_layer=Couche parente (dont elle d\u00E9pend)
+Cancel=Annuler
+Fixed_table=Table fixe
+Fixed_Table=Table fixe
+grass_error_mapset_locked=Le mapset de GRASS est verrouill\u00E9. Il est possible qu'un autre utilisateur l'utilise d\u00E9j\u00E0.
+Number_of_rows=Nombre de lignes
+Integer=Entier
+Do_not_autofill=Ne pas remplir automatiquement
+Show_WPS_XML=Afficher WPS XML
+grass_info_title=Info interface GRASS
+Rename=Renommer
+Raster_layer=Couche matricielle (raster)
+Float=D\u00E9cimal
+Settings=Configuration

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 369)
@@ -0,0 +1 @@
+org.gvsig.toolbox.gui.ToolboxGUILibrary
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/jsh/shell/Utils.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/jsh/shell/Utils.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/jsh/shell/Utils.java	(revision 369)
@@ -0,0 +1,587 @@
+/*
+ * 20:25:20 20/05/99
+ *
+ * The Java Shell: Utilities.
+ * (C)1999 Romain Guy, Osvaldo Pinali Doederlein.
+ *
+ * LICENSE
+ * =======
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * CHANGES
+ * =======
+ * 1.0.8 - Filled the listRoots method                   (Romain & Osvaldo)
+ * 1.0.7 - Several bug fixes in constructPath            (Romain)
+ * 1.0.6 - Split JDK1.1/1.2                              (Osvaldo)
+ * 1.0.5 - Important bug fix in constructPath(String)    (Romain)
+ * 1.0.4 - Added getSize(Enumeration)                    (Osvaldo)
+ * 1.0.3 - Changed sortStrings bubble-sort algorithm to  (Romain)
+ *         quick-sort (James Gosling)
+ * 1.0.2 - Fixed two little bug in constructPath(String) (Romain)
+ * 1.0.1 - Added listFiles(String[], boolean)            (Romain)
+ *       - Removed unecessary createWhiteSpace(int)      (Romain)
+ *       - Modified getWildCardMatches(String, boolean)  (Romain)
+ *       - Slighty improved javadoc comments             (Romain)
+ * 1.0.0 - Initial release.                              (Romain & Osvaldo)
+ *
+ * LINKS
+ * =====
+ * Contact: mailto@osvaldo.visionnaire.com.br
+ * Site #1: http://www.geocities.com/ResearchTriangle/Node/2005/
+ * Site #2: http://student.vub.ac.be/~opinalid/
+ */
+
+package jsh.shell;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * The Java Shell: Utility pack.
+ *
+ * @author Romain Guy.
+ * @author Osvaldo Pinali Doederlein.
+ */
+
+public class Utils {
+
+   /**
+    * Removes some elements from a String array.
+    *
+    * @param arr
+    *                The array.
+    * @param first
+    *                First element to keep (new 0-index).
+    * @param last
+    *                Last element to keep.
+    * @return Copy of arr[first..]
+    */
+   public static String[] subarray(final String[] arr,
+                                   int first,
+                                   final int last) {
+      final String[] newArr = new String[last - first + 1];
+
+      for (int i = 0; i < newArr.length; ++i, ++first) {
+         newArr[i] = arr[first];
+      }
+
+      return newArr;
+   }
+
+
+   /**
+    * Removes some leading elements from a String array.
+    *
+    * @param arr
+    *                The array.
+    * @param first
+    *                First element to keep (new 0-index).
+    * @return Copy of arr[first..]
+    */
+   public static String[] subarray(final String[] arr,
+                                   final int first) {
+      return subarray(arr, first, arr.length - 1);
+   }
+
+
+   /**
+    * Formats a number of bytes for output.
+    *
+    * @param bytes
+    *                Number of bytes.
+    * @return "xxxxK" form.
+    */
+   public static String fmtBytes(final long bytes) {
+      return Long.toString(bytes / 1024) + "K";
+   }
+
+
+   /**
+    * Formats time for output.
+    *
+    * @param bytes
+    *                Number of milliseconds.
+    * @return "x,yyys" form.
+    */
+   public static String fmtTime(final long ms) {
+      return Float.toString(ms / 1000.0f) + "s";
+   }
+
+
+   /**
+    * Return a String made of spaces.
+    *
+    * @param len
+    *                Number of spaces
+    */
+   public static String getSpaces(final int len) {
+      final StringBuffer buf = new StringBuffer();
+
+      for (int i = 0; i < len; i++) {
+         buf.append(' ');
+      }
+
+      return buf.toString();
+   }
+
+
+   public static String[] toArray(final Vector strings) {
+      final String[] arr = new String[strings.size()];
+
+      for (int i = 0; i < strings.size(); ++i) {
+         arr[i] = (String) strings.elementAt(i);
+      }
+
+      return arr;
+   }
+
+
+   /**
+    * When the user has to specify file names, he can use wildcards (*, ?). This methods handles the usage of these wildcards.
+    *
+    * @param s
+    *                Wilcards
+    * @param sort
+    *                Set to true will sort file names
+    * @return An array of String which contains all files matching <code>s</code> in current directory.
+    * @see Utils#match(String, String)
+    */
+
+   public static String[] getWildCardMatches(final String s,
+                                             final boolean sort) {
+      final String args = new String(s.trim());
+      String files[];
+      final Vector filesThatMatchVector = new Vector();
+      String filesThatMatch[];
+
+      files = (new File(getUserDirectory())).list();
+
+      for (int i = 0; i < files.length; i++) {
+         if (match(args, files[i])) {
+            final File temp = new File(getUserDirectory(), files[i]);
+            filesThatMatchVector.addElement(new String(temp.getName()));
+         }
+      }
+
+      filesThatMatch = new String[filesThatMatchVector.size()];
+      filesThatMatchVector.copyInto(filesThatMatch);
+
+      if (sort) {
+         sortStrings(filesThatMatch);
+      }
+
+      return filesThatMatch;
+   }
+
+
+   /**
+    * This method can determine if a String matches a pattern of wildcards
+    *
+    * @param pattern
+    *                The pattern used for comparison
+    * @param string
+    *                The String to be checked
+    * @return true if <code>string</code> matches <code>pattern</code>
+    * @see Utils#getWildCardMatches(String)
+    */
+
+   public static boolean match(final String pattern,
+                               final String string) {
+      for (int p = 0;; p++) {
+         for (int s = 0;; p++, s++) {
+            final boolean sEnd = (s >= string.length());
+            final boolean pEnd = (p >= pattern.length() || pattern.charAt(p) == '|');
+
+            if (sEnd && pEnd) {
+               return true;
+            }
+            if (sEnd || pEnd) {
+               break;
+            }
+            if (pattern.charAt(p) == '?') {
+               continue;
+            }
+
+            if (pattern.charAt(p) == '*') {
+               int i;
+               p++;
+
+               for (i = string.length(); i >= s; --i) {
+                  if (match(pattern.substring(p), string.substring(i))) {
+                     return true;
+                  }
+               }
+
+               break;
+            }
+
+            if (pattern.charAt(p) != string.charAt(s)) {
+               break;
+            }
+         }
+
+         p = pattern.indexOf('|', p);
+
+         if (p == -1) {
+            return false;
+         }
+      }
+   }
+
+
+   /**
+    * Quick sort an array of Strings.
+    *
+    * @param string
+    *                Strings to be sorted
+    */
+
+   public static void sortStrings(final String[] strings) {
+      sortStrings(strings, 0, strings.length - 1);
+   }
+
+
+   /**
+    * Quick sort an array of Strings.
+    *
+    * @param a
+    *                Strings to be sorted
+    * @param lo0
+    *                Lower bound
+    * @param hi0
+    *                Higher bound
+    */
+
+   public static void sortStrings(final String a[],
+                                  final int lo0,
+                                  final int hi0) {
+      int lo = lo0;
+      int hi = hi0;
+      String mid;
+
+      if (hi0 > lo0) {
+         mid = a[(lo0 + hi0) / 2];
+
+         while (lo <= hi) {
+            while (lo < hi0 && a[lo].compareTo(mid) < 0) {
+               ++lo;
+            }
+
+            while (hi > lo0 && a[hi].compareTo(mid) > 0) {
+               --hi;
+            }
+
+            if (lo <= hi) {
+               swap(a, lo, hi);
+               ++lo;
+               --hi;
+            }
+         }
+
+         if (lo0 < hi) {
+            sortStrings(a, lo0, hi);
+         }
+
+         if (lo < hi0) {
+            sortStrings(a, lo, hi0);
+         }
+      }
+   }
+
+
+   /**
+    * Swaps two Strings.
+    *
+    * @param a
+    *                The array to be swapped
+    * @param i
+    *                First String index
+    * @param j
+    *                Second String index
+    */
+
+   public static void swap(final String a[],
+                           final int i,
+                           final int j) {
+      String T;
+      T = a[i];
+      a[i] = a[j];
+      a[j] = T;
+   }
+
+
+   /**
+    * Returns the user current directory.
+    */
+   public static String getUserDirectory() {
+
+      String folder = SextanteGUI.getOutputFolder();
+      if (folder == null) {
+         folder = System.getProperty("user.home");
+      }
+
+      return folder;
+
+   }
+
+
+   /**
+    * Sometimes, Strings are too long to be correctly displayed. This method will reduce a String, keeping first and last
+    * characters.
+    *
+    * @param longString
+    *                The String to be modified
+    * @param maxLength
+    *                The maximum length of the String
+    * @return A shorter String
+    */
+
+   public static String getShortStringOf(final String longString,
+                                         final int maxLength) {
+      final int len = longString.length();
+
+      if (len < maxLength) {
+         return longString;
+      }
+      else {
+         return longString.substring(0, maxLength / 2) + "..." + longString.substring(len - (maxLength / 2));
+      }
+   }
+
+
+   /**
+    * Because a lot of people still use JDK 1.1, we need this method to create an array of Files from an array of String.
+    *
+    * @param names
+    *                Names of the files
+    * @param construct
+    *                Set it to true if names does not contain full paths
+    * @return An array of Files
+    */
+   public static File[] listFiles(final String[] names,
+                                  final boolean construct) {
+      final File[] files = new File[names.length];
+
+      String path = Utils.getUserDirectory();
+
+      if (construct) {
+         if (!path.endsWith(File.separator)) {
+            path += File.separator;
+         }
+      }
+
+      for (int i = 0; i < files.length; i++) {
+         if (construct) {
+            files[i] = new File(path + names[i]);
+         }
+         else {
+            files[i] = new File(names[i]);
+         }
+      }
+
+      return files;
+   }
+
+
+   /**
+    * Counts things in an Enumeration (and destroys it as a side effect).
+    *
+    * @param enum
+    *                The enumeration, in the start position.
+    * @return Elements found.
+    */
+   public static int getSize(final Enumeration enu) {
+      int size = 0;
+
+      while (enu.hasMoreElements()) {
+         ++size;
+         enu.nextElement();
+      }
+
+      return size;
+   }
+
+
+   /**
+    * Constructs a new path from current user path. This is an easy way to get a path if the user specified, for example,
+    * "..\Java" as new path. This method will return the argument if this one is a path to a root (i.e, if <code>change</code>
+    * is equal to C:\Jdk, constructPath will return C:\Jdk).
+    *
+    * @param change
+    *                The modification to apply to the path
+    * @see Utils#beginsWithRoot(String), Utils#getRoot(String)
+    */
+
+   public static String constructPath(final String change) {
+      if (change == null || beginsWithRoot(change)) {
+         return change;
+      }
+
+      String newPath = getUserDirectory();
+
+      char current;
+      char lastChar = '\0';
+      boolean toAdd = false;
+      StringBuffer buf = new StringBuffer(change.length());
+
+      for (int i = 0; i < change.length(); i++) {
+         switch ((current = change.charAt(i))) {
+            case '.':
+               if (lastChar == '.') {
+                  final String parent = (new File(newPath)).getParent();
+                  if (parent != null) {
+                     newPath = parent;
+                  }
+               }
+               else if (lastChar != '\0' && lastChar != '\\' && lastChar != '/') {
+                  buf.append('.');
+               }
+               lastChar = '.';
+               break;
+            case '\\':
+            case '/':
+               if (lastChar == '\0') {
+                  newPath = getRoot(newPath);
+               }
+               else {
+                  if (!newPath.endsWith("\\")) {
+                     newPath += File.separator + buf.toString();
+                  }
+                  else {
+                     newPath += buf.toString();
+                  }
+                  buf = new StringBuffer();
+                  toAdd = false;
+               }
+               lastChar = '\\';
+               break;
+            case '~':
+               if (i < change.length() - 1) {
+                  if (change.charAt(i + 1) == '\\' || change.charAt(i + 1) == '/') {
+                     newPath = System.getProperties().getProperty("user.home");
+                  }
+                  else {
+                     buf.append('~');
+                  }
+               }
+               else if (i == 0) {
+                  newPath = System.getProperties().getProperty("user.home");
+               }
+               else {
+                  buf.append('~');
+               }
+               lastChar = '~';
+               break;
+            default:
+               lastChar = current;
+               buf.append(current);
+               toAdd = true;
+               break;
+         }
+      }
+
+      if (toAdd) {
+         if (!newPath.endsWith(File.separator)) {
+            newPath += File.separator + buf.toString();
+         }
+         else {
+            newPath += buf.toString();
+         }
+      }
+
+      return newPath;
+   }
+
+
+   /**
+    * It can be necessary to determine which is the root of a path. For example, the root of D:\Projects\Java is D:\.
+    *
+    * @param path
+    *                The path used to get a root
+    * @return The root which contais the specified path
+    */
+
+   public static String getRoot(final String path) {
+      final File roots[] = listRoots(new File(path));
+
+      for (int i = 0; i < roots.length; i++) {
+         if (path.startsWith(roots[i].getPath())) {
+            return roots[i].getPath();
+         }
+      }
+
+      return path;
+   }
+
+
+   /**
+    * It can be necessary to determine if a path begins with a root.
+    *
+    * @param path
+    *                The path to check
+    * @return True if path begins with a root, false otherwise
+    */
+
+   public static boolean beginsWithRoot(final String path) {
+      final File roots[] = listRoots(new File(path));
+
+      for (int i = 0; i < roots.length; i++) {
+         if (path.regionMatches(true, 0, roots[i].getPath(), 0, roots[i].getPath().length())) {
+            return true;
+         }
+      }
+
+      return false;
+   }
+
+
+   /**
+    * We override a Java2 specific method.
+    *
+    * @param f
+    *                A File
+    * @return A list of standards roots
+    */
+
+   public static File[] listRoots(final File f) {
+      if (System.getProperty("os.name").startsWith("Windows")) {
+         return new File[] { new File("A:\\"), new File("B:\\"), new File("C:\\"), new File("D:\\"), new File("E:\\"),
+                  new File("F:\\"), new File("G:\\"), new File("H:\\"), new File("I:\\") };
+         //return new File[]{new File(System.getProperty("java.home").substring(0, 3))};
+      }
+      else {
+         return new File[] { new File("/") };
+      }
+   }
+
+
+   /**
+    * We override a Java2 spcific method.
+    *
+    * @param file
+    *                Determine if this file is hidden or not
+    * @return Always false
+    */
+
+   public boolean isHidden(final File file) {
+      return false;
+   }
+
+}
+
+// End of Utils.java
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/jsh/shell/Utils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/UnwrappableGrassProcessException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/UnwrappableGrassProcessException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/UnwrappableGrassProcessException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.grass;
+
+public class UnwrappableGrassProcessException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/UnwrappableGrassProcessException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerBlackList.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerBlackList.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerBlackList.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.grass;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import es.unex.sextante.core.Sextante;
+
+
+/**
+ * A hard-coded list of those GRASS algorithms not compatible with the SEXTANTE modeler
+ * 
+ * @author volaya
+ * 
+ */
+public class GrassModelerBlackList {
+
+   private static List           m_List;
+   private static final String[] ALGS = {};
+
+   static {
+
+      m_List = new ArrayList();
+      for (int i = 0; i < ALGS.length; i++) {
+         m_List.add(ALGS[i]);
+      }
+
+   }
+
+
+   public static boolean isInBlackList(final GrassAlgorithm alg) {
+
+      return (isInBlackList(alg.getName()));
+
+   }
+
+
+   public static boolean isInBlackList(final String sName) {
+      if (m_List.contains(sName)) {
+         Sextante.addWarningToLog("SEXTANTE GRASS interface: Module " + sName + " disabled: blacklisted.");
+         return (true);
+      }
+      return (false);
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerBlackList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassUtils.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassUtils.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassUtils.java	(revision 369)
@@ -0,0 +1,1366 @@
+package es.unex.sextante.gui.grass;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteGrassSettings;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+
+
+public class GrassUtils {
+
+
+   //For parsing of GRASS message blocks
+   private static boolean        lastWasInfoEnd       = false;
+   private static boolean        lastWasEmpty         = false;
+   private static boolean        insideRegPrimitives  = false;
+
+   //Link to the currently running GRASS algorithm (need this for status updates)
+   private static GrassAlgorithm m_Alg;
+
+   //The currently running GRASS process;
+   private static Process        m_Proc               = null;
+   private static boolean        m_bProcCanceled      = false;
+   private static boolean        m_bProcInterruptible = true;
+
+   //A file for process communication (on Windows)
+   //private static File           m_ComFile            = null;
+
+   //Char array size for raw input stream processing
+   private static final int      MAX_CHARS            = 8192;
+
+   //Temporary color table file constants
+   public static final String    colorTableExt        = "colortable";
+   public static final String    colorTableIdentifier = "SEXTANTE GRASS Interface Color Table";
+   public static final String    colorTableVersion    = "1.0";
+
+   //The default prefix for temporary files and folders
+   public static final String    TEMP_PREFIX          = "SGI";
+
+   private static String         m_sGrassTempMapsetFolder;
+
+   static {
+
+      //      readGroupNames();
+
+   }
+
+
+   //private static HashMap<String, String> m_Groups;
+
+
+   /*
+    * Returns the running GRASS process or null.
+    */
+   public static Process getProcess() {
+      return (m_Proc);
+   }
+
+
+   /*
+    * Returns the status of the running process.
+    */
+   public static boolean isProcessCanceled() {
+      return (m_bProcCanceled);
+   }
+
+
+   /*
+    * Sets interruptible status of current and future processes.
+    */
+   public static void setInterruptible(final boolean choice) {
+      m_bProcInterruptible = choice;
+   }
+
+
+   /*
+    * Cancels the running process.
+    * But only if it is interruptible (it is by default).
+    */
+   public static void cancelProcess() {
+
+      if (m_Proc != null) {
+         if (m_bProcInterruptible) {
+            m_Proc.destroy();
+            m_Proc = null;
+            m_bProcCanceled = true;
+         }
+      }
+
+   }
+
+
+   /**
+    * Creates a compact startup script for GRASS. The script code created may vary, depending on the operating system. This also
+    * creates a temporary GRASS settings file (GISCR).
+    * 
+    * @param cmdline
+    * 
+    * @return The file handler for the created script, NULL on failure.
+    * 
+    */
+   public static File createStartupScript(final String cmdline) {
+      BufferedWriter output = null;
+
+      File script = null;
+      File gisrc = null;
+
+      UUID id;
+      String tmpPrefix;
+      String tmpSuffix;
+      String tmpExtension;
+      String tmpBase;
+      String tmpName;
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+      final String sWinShell = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_WIN_SHELL);
+
+      //Create temporary script file in system's temp dir
+      id = UUID.randomUUID();
+      tmpPrefix = new String(GrassUtils.TEMP_PREFIX);
+      tmpSuffix = new String("_" + id);
+      tmpBase = new String(System.getProperty("java.io.tmpdir"));
+      if (Sextante.isWindows()) {
+         tmpExtension = new String("bat");
+      }
+      else {
+         tmpExtension = new String("sh");
+      }
+      if (tmpBase.endsWith(File.separator)) {
+         tmpName = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + "." + tmpExtension);
+      }
+      else {
+         tmpName = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + "." + tmpExtension);
+      }
+      script = new File(tmpName);
+      script.deleteOnExit();
+
+      //Create a temporary GISRC file in system's temp dir
+      id = UUID.randomUUID();
+      tmpPrefix = new String(GrassUtils.TEMP_PREFIX);
+      tmpSuffix = new String("_" + id);
+      tmpBase = new String(System.getProperty("java.io.tmpdir"));
+      if (tmpBase.endsWith(File.separator)) {
+         tmpName = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + ".gisrc");
+      }
+      else {
+         tmpName = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + ".gisrc");
+      }
+      gisrc = new File(tmpName);
+      gisrc.deleteOnExit();
+
+      //Get GISDBASE, LOCATION and MAPSET from String parameter
+      final String mapset = new String(getGrassMapsetFolder().substring(getGrassMapsetFolder().lastIndexOf(File.separator) + 1,
+               getGrassMapsetFolder().length()));
+      final String path = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));
+      final String location = new String(path.substring(path.lastIndexOf(File.separator) + 1, path.length()));
+      final String gisdbase = new String(path.substring(0, path.lastIndexOf(File.separator)));
+
+      //Write the temporary GISRC file to use in this session
+      try {
+         output = new BufferedWriter(new FileWriter(gisrc));
+         output.write("GISDBASE: " + gisdbase + "\n");
+         output.write("LOCATION_NAME: " + location + "\n");
+         output.write("MAPSET: " + mapset + "\n");
+         output.write("GRASS_GUI: text\n");
+         output.close();
+      }
+      catch (final Exception e) {
+         return (null);
+      }
+
+      //Write the startup script
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         //Startup script for *nix like systems with built-in shell interpreter
+         final String grassfolder = new String(sFolder);
+         try {
+            output = new BufferedWriter(new FileWriter(script));
+            output.write("#!/bin/sh\n");
+            output.write("export GISRC=\"" + gisrc.getAbsolutePath() + "\"\n");
+            output.write("export GISBASE=\"" + grassfolder + "\"\n");
+            output.write("export GRASS_PROJSHARE=\"" + grassfolder + File.separator + "share" + File.separator + "proj" + "\"\n");
+            output.write("export GRASS_MESSAGE_FORMAT=gui\n");
+            output.write("export GRASS_SH=/bin/sh\n");
+            output.write("export GRASS_PERL=/usr/bin/perl\n");
+            output.write("export GRASS_VERSION=\"" + getGrassVersion() + "\"\n");
+            output.write("export GIS_LOCK=$$\n");
+            output.write("\n");
+            output.write("if [ \"$LC_ALL\" ] ; then\n");
+            output.write("\tLCL=`echo \"$LC_ALL\" | sed 's/\\(..\\)\\(.*\\)/\\1/'`\n");
+            output.write("elif [ \"$LC_MESSAGES\" ] ; then\n");
+            output.write("\tLCL=`echo \"$LC_MESSAGES\" | sed 's/\\(..\\)\\(.*\\)/\\1/'`\n");
+            output.write("else\n");
+            output.write("\tLCL=`echo \"$LANG\" | sed 's/\\(..\\)\\(.*\\)/\\1/'`\n");
+            output.write("fi\n");
+            output.write("\n");
+            output.write("if [ -n \"$GRASS_ADDON_PATH\" ] ; then\n");
+            output.write("\tPATH=\"" + grassfolder + "/bin:" + grassfolder + "/scripts:$GRASS_ADDON_PATH:$PATH\"\n");
+            output.write("else\n");
+            output.write("\tPATH=\"" + grassfolder + "/bin:" + grassfolder + "/scripts:$PATH\"\n");
+            output.write("fi\n");
+            output.write("export PATH\n");
+            output.write("\n");
+            if (Sextante.isMacOSX()) {
+               output.write("if [ ! \"$DYLD_LIBRARY_PATH\" ] ; then\n");
+               output.write("\tDYLD_LIBRARY_PATH=\"$GISBASE/lib\"\n");
+               output.write("else\n");
+               output.write("\tDYLD_LIBRARY_PATH=\"$GISBASE/lib:$DYLD_LIBRARY_PATH\"\n");
+               output.write("fi\n");
+               output.write("export DYLD_LIBRARY_PATH\n");
+            }
+            else {
+               output.write("if [ ! \"$LD_LIBRARY_PATH\" ] ; then\n");
+               output.write("\tLD_LIBRARY_PATH=\"$GISBASE/lib\"\n");
+               output.write("else\n");
+               output.write("\tLD_LIBRARY_PATH=\"$GISBASE/lib:$LD_LIBRARY_PATH\"\n");
+               output.write("fi\n");
+               output.write("export LD_LIBRARY_PATH\n");
+            }
+            output.write("\n");
+            output.write("if [ ! \"$GRASS_PYTHON\" ] ; then\n");
+            output.write("\tGRASS_PYTHON=python\n");
+            output.write("fi\n");
+            output.write("export GRASS_PYTHON\n");
+            output.write("if [ ! \"$PYTHONPATH\" ] ; then\n");
+            output.write("\tPYTHONPATH=\"$GISBASE/etc/python\"\n");
+            output.write("else\n");
+            output.write("\tPYTHONPATH=\"$GISBASE/etc/python:$PYTHONPATH\"\n");
+            output.write("fi\n");
+            output.write("export PYTHONPATH\n");
+            output.write("\n");
+            output.write("if [ ! \"$GRASS_GNUPLOT\" ] ; then\n");
+            output.write("\tGRASS_GNUPLOT=\"gnuplot -persist\"\n");
+            output.write("\texport GRASS_GNUPLOT\n");
+            output.write("fi\n");
+            output.write("\n");
+            output.write("if [ \"$GRASS_FONT_CAP\" ] && [ ! -f \"$GRASS_FONT_CAP\" ] ; then\n");
+            output.write("\tg.mkfontcap\n");
+            output.write("fi\n");
+            output.write("\n");
+            output.write("g.gisenv set=\"MAPSET=" + mapset + "\"\n");
+            output.write("g.gisenv set=\"LOCATION=" + location + "\"\n");
+            output.write("g.gisenv set=\"LOCATION_NAME=" + location + "\"\n");
+            output.write("g.gisenv set=\"GISDBASE=" + gisdbase + "\"\n");
+            output.write("g.gisenv set=\"GRASS_GUI=text\"\n");
+            output.write("\n");
+            output.write("\"" + grassfolder + File.separator + "etc" + File.separator + "run\" " + "\"$GRASS_BATCH_JOB\" 1>&2\n");
+            output.write("\n");
+            output.close();
+            setExecutable(script.getAbsolutePath());
+         }
+         catch (final Exception e) {
+            return (null);
+         }
+      }
+      else {//Windows
+
+         //Write windows startup script
+         String shToolsPath = "";
+         if ((sWinShell.length() < 2) || (sWinShell == null)) {
+            return (null);
+         }
+         shToolsPath = sWinShell;
+         shToolsPath = shToolsPath.substring(0, shToolsPath.lastIndexOf(File.separator));
+         try {
+            //m_ComFile.createNewFile();
+            output = new BufferedWriter(new FileWriter(script));
+            //Turn on/off verbose output
+            output.write("@echo off\n");
+            //Settings that would otherwise be done in grassXx.bat
+            output.write("set HOME=" + System.getProperty("user.home") + "\n");
+            output.write("set GISRC=" + gisrc.getAbsolutePath() + "\n");
+            output.write("set GRASS_SH=" + sWinShell + "\n");
+            output.write("set PATH=" + shToolsPath + File.separator + ";" + "%PATH%\n");
+            output.write("set WINGISBASE=" + sFolder + "\n");
+            output.write("set GISBASE=" + sFolder + "\n");
+            output.write("set GRASS_PROJSHARE=" + sFolder + File.separator + "share" + File.separator + "proj" + "\n");
+            output.write("set GRASS_MESSAGE_FORMAT=gui\n");
+            //Replacement code for etc/Init.bat
+            output.write("if \"%GRASS_ADDON_PATH%\"==\"\" set PATH=%WINGISBASE%\\bin;%WINGISBASE%\\scripts;%WINGISBASE%\\lib;%PATH%\n");
+            output.write("if not \"%GRASS_ADDON_PATH%\"==\"\" set PATH=%WINGISBASE%\\bin;%WINGISBASE%\\scripts;%WINGISBASE%\\lib;%GRASS_ADDON_PATH%;%PATH%\n");
+            output.write("\n");
+            output.write("set GRASS_VERSION=" + getGrassVersion() + "\n");
+            output.write("if not \"%LANG%\"==\"\" goto langset\n");
+            output.write("FOR /F \"usebackq delims==\" %%i IN (`\"%WINGISBASE%\\etc\\winlocale\"`) DO @set LANG=%%i\n");
+            output.write(":langset\n");
+            output.write("\n");
+            output.write("set PATHEXT=%PATHEXT%;.PY\n");
+            output.write("set PYTHONPATH=%PYTHONPATH%;%WINGISBASE%\\etc\\python;%WINGISBASE%\\etc\\wxpython\\n");
+            output.write("\n");
+            output.write("g.gisenv.exe set=\"MAPSET=" + mapset + "\"\n");
+            output.write("g.gisenv.exe set=\"LOCATION=" + location + "\"\n");
+            output.write("g.gisenv.exe set=\"LOCATION_NAME=" + location + "\"\n");
+            output.write("g.gisenv.exe set=\"GISDBASE=" + gisdbase + "\"\n");
+            output.write("g.gisenv.exe set=\"GRASS_GUI=text\"\n");
+            output.write(cmdline);
+            output.write("\n");
+            /*output.write("call \"%GRASS_BATCH_JOB%\"\n");
+            output.write("call \"%GRASS_BATCH_JOB%\" > " + m_ComFile.getAbsolutePath() + " 2>&1\n\n");*/
+            output.write("exit\n");
+            output.close();
+         }
+         catch (final Exception e) {
+            return (null);
+         }
+      }
+
+      if (script != null) {
+         return script;
+      }
+      return null;
+   }
+
+
+   /**
+    * Returns a ProcesBuilder ready to execute grass.
+    * 
+    * @param cmdline
+    * 
+    * @return a ProcesBuilder ready to execute grass
+    */
+   static ProcessBuilder getGrassExecutable(final String cmdline) {
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+
+      final List<String> list = new ArrayList<String>();
+      ProcessBuilder pb;
+      pb = new ProcessBuilder(list);
+      final Map env = pb.environment();
+      env.put("GRASS_BATCH_JOB", getBatchJobFile());
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         env.put("GRASS_MESSAGE_FORMAT", "gui");
+         env.put("GISBASE", sFolder);
+         final File script = (createStartupScript(cmdline));
+         if (script != null) {
+            list.add(script.getAbsolutePath());
+         }
+         else {
+            //TODO: need to catch this one level higher!
+            return null;
+         }
+      }
+      else { //windows
+         list.add("cmd.exe");
+         list.add("/C");
+         //list.add("start");
+         //list.add("/max");
+         final File script = (createStartupScript(cmdline));
+         if (script != null) {
+            list.add(script.getAbsolutePath());
+         }
+         else {
+            //TODO: need to catch this one level higher!
+            return null;
+         }
+      }
+      return pb;
+   }
+
+
+   public static String getBatchJobFile() {
+
+      String sFile;
+
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         sFile = "sextante_batch_job.sh";
+      }
+      else {//Windows
+         sFile = "sextante_batch_job.bat";
+      }
+
+      sFile = SextanteGUI.getUserFolder() + File.separator + sFile;
+
+      return sFile;
+
+   }
+
+
+   /**
+    * Returns a GRASS map name which can be safely used to store an imported layer or any other GRASS element (a region setting, a
+    * group) that is significant in our context. When using the name returned by this function, there is virtually no chance that
+    * it will overwrite any existing data in the mapset.
+    * 
+    * Note: valid GRASS MAP names must not contain spaces or special characters, must start on a letter and should not include "-"
+    * (minus)
+    * 
+    * @param sPrefix
+    *                a prefix for the temp map name
+    */
+   public static String getTempMapName(final String sPrefix) {
+      String tmpName;
+      String sName;
+      UUID id;
+      boolean exists;
+
+      do {
+         exists = false;
+         id = UUID.randomUUID();
+         tmpName = new String(sPrefix + id);
+         sName = new String(tmpName.replace('-', '_'));
+         final File vectordir = new File(getGrassMapsetFolder() + File.separator + "vector" + File.separator + sName);
+         final File rasterfile = new File(getGrassMapsetFolder() + File.separator + "cellhd" + File.separator + sName);
+         final File regionfile = new File(getGrassMapsetFolder() + File.separator + "windows" + File.separator + sName);
+         final File voxelfile = new File(getGrassMapsetFolder() + File.separator + "grid3d" + File.separator + sName);
+         final File catfile = new File(getGrassMapsetFolder() + File.separator + "cats" + File.separator + sName);
+         final File groupfile = new File(getGrassMapsetFolder() + File.separator + "group" + File.separator + sName);
+         if (vectordir.exists() || rasterfile.exists() || regionfile.exists() || voxelfile.exists() || catfile.exists()
+             || groupfile.exists()) {
+            exists = true;
+         }
+      }
+      while (exists);
+
+      return (sName);
+   }
+
+
+   /**
+    * Returns a GRASS map name which can be safely used to store an imported layer (i.e. there is no chance that it will overwrite
+    * an existing map in the mapset).
+    * 
+    * Note: valid GRASS MAP names must not contain spaces or special characters, must start on a letter and should not include "-"
+    * (minus)
+    * 
+    */
+   public static String getTempMapName() {
+      return (getTempMapName(GrassUtils.TEMP_PREFIX + "_"));
+   }
+
+
+   /**
+    * Checks if the current GRASS mapset (rather: the location of which it is part) works in lat/lon degrees. We need this
+    * information, because some GRASS modules do not work (well) with lat/lon input data.
+    * 
+    * @return "true" if the current mapset works in lat/lon, "false" otherwise.
+    */
+   public static boolean isLatLon() {
+      String mapSetFolder;
+
+
+      mapSetFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator))
+                                + File.separator + "PERMANENT/PROJ_UNITS");
+
+      try {
+         final FileInputStream fstream = new FileInputStream(mapSetFolder);
+         final DataInputStream in = new DataInputStream(fstream);
+         final BufferedReader br = new BufferedReader(new InputStreamReader(in));
+         String line;
+         while ((line = br.readLine()) != null) {
+            if (line.contains("degree")) {
+               in.close();
+               return (true);
+            }
+         }
+         in.close();
+      }
+      catch (final Exception e) {
+         Sextante.addWarningToLog("GRASS Interface: could not determine coordinate system. Assuming X/Y(/Z) cartesian.\n");
+      }
+      return (false);
+   }
+
+
+   /*
+    * Checks whether a GRASS map contains more than one type of geometry primitives.
+    * We need to know this for shapefile export.
+    *
+    * @param sMapName
+    * 				Name of GRASS map to query
+    */
+   public static boolean isMultiGeom(final String sMapName) throws GrassExecutionException {
+
+      boolean is_multi_geom = false;
+
+      //Get number of objects for each type of geometry in GRASS map
+      final int num_points = GrassVInfoUtils.getNumPoints(sMapName);
+      final int num_lines = GrassVInfoUtils.getNumLines(sMapName);
+      final int num_polygons = GrassVInfoUtils.getNumPolygons(sMapName);
+      final int num_faces = GrassVInfoUtils.getNumFaces(sMapName);
+      final int num_kernels = GrassVInfoUtils.getNumKernels(sMapName);
+
+      //Check for type combinations that would lead to multiple geometry types
+      if (num_points > 0) {
+         if ((num_kernels > 0) || (num_lines > 0) || (num_polygons > 0) || (num_faces > 0)) {
+            is_multi_geom = true;
+         }
+      }
+      if (num_kernels > 0) {
+         if ((num_points > 0) || (num_lines > 0) || (num_polygons > 0) || (num_faces > 0)) {
+            is_multi_geom = true;
+         }
+      }
+      if (num_lines > 0) {
+         if ((num_points > 0) || (num_kernels > 0) || (num_polygons > 0) || (num_faces > 0)) {
+            is_multi_geom = true;
+         }
+      }
+      if (num_polygons > 0) {
+         if ((num_points > 0) || (num_kernels > 0) || (num_lines > 0) || (num_faces > 0)) {
+            is_multi_geom = true;
+         }
+      }
+      if (num_faces > 0) {
+         if ((num_points > 0) || (num_kernels > 0) || (num_lines > 0) || (num_polygons > 0)) {
+            is_multi_geom = true;
+         }
+      }
+
+      if (num_points + num_lines + num_polygons + num_faces + num_kernels == 0) {
+         //No valid geometries. Maybe a topology error?
+         JOptionPane.showMessageDialog(null, Sextante.getText("grass_error_geometries_none_found"),
+                  Sextante.getText("grass_error_title"), JOptionPane.WARNING_MESSAGE);
+         throw new GrassExecutionException();
+      }
+      return (is_multi_geom);
+
+   }
+
+
+   /*
+    * Helper function for runGRASS().
+    *
+    * Takes a line of GRASS output, analyzes it and decides whether to
+    * send it to log and/or progress monitor.
+    * May also do some reformatting before relaying the string for display.
+    *
+    */
+   public static void filterGRASSOutput(String line) throws GrassExecutionException {
+
+      boolean skip = false;
+
+      //just process output if we are running grass form a sextante algorithm
+      if (m_Alg == null) {
+         return;
+      }
+
+      //Speedhack: if this is a progress info line, we can skip 99% of the remaining checks!
+      if (!line.contains("GRASS_INFO_PERCENT")) {
+         //All other lines need to be processed more elaborately
+         if ((line.length() < 2)) {
+            if ((lastWasEmpty == true) || (lastWasInfoEnd == true)) {
+               skip = true;
+            }
+            lastWasEmpty = true;
+         }
+         else {
+            lastWasEmpty = false;
+         }
+
+         if (insideRegPrimitives == true) {
+            skip = true;
+         }
+
+         //substitute lengthy temporary map names
+         if (line.contains(GrassUtils.TEMP_PREFIX) || line.contains("_")) {
+            for (int i = 0; i < m_Alg.getMapNames().size(); i++) {
+               line = line.replace(m_Alg.getMapNames().get(i), "<" + m_Alg.getFileNames().get(i) + ">");
+            }
+            //Use a regular expression for those internal map names that cannot be fully resolved
+            line = line.replaceAll("([_][a-z0-9]{8}[_][a-z0-9]{4}[_][a-z0-9]{4}[_][a-z0-9]{4}[_][a-z0-9]{12})", "[TMP]");
+         }
+
+         //remove the startup script lines
+         if (line.startsWith("set") || line.startsWith("if") || line.startsWith("FOR")) {
+            skip = true;
+         }
+         //There are some lines that we can always skip (chatter from the
+         //GRASS batch job script, etc.)
+         if (line.contains("Welcome to GRASS")) {
+            skip = true;
+         }
+         if (line.contains("Closing monitors ...")) {
+            skip = true;
+         }
+         if (line.contains("Cleaning up temporary files ...")) {
+            skip = true;
+         }
+         if (line.contains("(defined in GRASS_BATCH_JOB variable) was executed.")) {
+            skip = true;
+         }
+         if (line.contains("d.mon: not found")) {
+            skip = true;
+         }
+         if (line.contains("Goodbye from GRASS GIS")) {
+            skip = true;
+         }
+         if (line.contains("Starting GRASS ...")) {
+            skip = true;
+         }
+         if (line.contains("Executing '") && line.contains("' ...")) {
+            skip = true;
+         }
+         if (line.contains("Executing '") && line.contains("' ...")) {
+            skip = true;
+         }
+         if (line.contains("r.out.gdal complete.")) {
+            skip = true;
+         }
+
+         //Some data import/export chit-chat about temporary files we may want to shorten...
+         if (line.contains("Building topology for vector map <")) {
+            line = "Building topology for vector map...";
+            skip = true;
+         }
+         if (line.contains("Registering primitives...")) {
+            insideRegPrimitives = true;
+         }
+         if (line.contains(" primitives registered")) {
+            insideRegPrimitives = false;
+            skip = false;
+         }
+
+         //Format GRASS INFO type messages
+         if (line.contains("GRASS_INFO_MESSAGE")) {
+            if (!line.contains(":")) {
+               skip = true;
+            }
+            else {
+               if (line.length() >= (line.indexOf(":") + 3)) {
+                  line = line.substring(line.indexOf(":") + 2);
+               }
+               else {
+                  line = " ";
+               }
+            }
+         }
+         //If we get an error, we cancel the running module
+         if (line.contains("GRASS_INFO_ERROR") || line.startsWith("ERROR:")) {
+            if (!line.contains(":")) {
+               skip = true;
+            }
+            else {
+               if (line.length() >= (line.indexOf(":") + 3)) {
+                  line = "ERROR: " + line.substring(line.indexOf(":") + 2);
+               }
+               else {
+                  line = " ";
+               }
+            }
+            JOptionPane.showMessageDialog(null, line, Sextante.getText("grass_error_title"), JOptionPane.ERROR_MESSAGE);
+            GrassAlgorithmProvider.addMessage(line);
+            m_bProcCanceled = true;//simulate a cancellation
+            Sextante.addErrorToLog("SEXTANTE GRASS interface: " + line);
+            throw new GrassExecutionException();
+         }
+         if (line.contains("GRASS_INFO_WARNING")) {
+            if (!line.contains(":")) {
+               skip = true;
+            }
+            else {
+               if (line.length() >= (line.indexOf(":") + 3)) {
+                  line = "WARNING: " + line.substring(line.indexOf(":") + 2);
+               }
+               else {
+                  line = " ";
+               }
+            }
+         }
+
+         //After the GRASS_INFO_END tag, there is an annoying newline which we
+         //want to skip...
+         if (line.contains("GRASS_INFO_END")) {
+            lastWasInfoEnd = true;
+         }
+         else {
+            lastWasInfoEnd = false;
+         }
+
+         //Some warning and error messages that can safely be skipped...
+         if (line.contains("<PROJ_INFO> file not found")) {
+            skip = true;
+         }
+         if (line.contains("<PROJ_UNITS> file not found")) {
+            skip = true;
+         }
+         if (line.contains("ERROR 6: SetColorTable() only supported")) {
+            skip = true;
+         }
+         if (line.contains("Unable to set projection")) {
+            skip = true;
+         }
+      }
+
+      //Output whatever is left after filtering.
+      if (!skip) {
+         {//Progress monitor output
+            if (line.contains("GRASS_INFO_PERCENT")) {
+               //if (Sextante.isUnix() || Sextante.isMacOSX()) {
+               m_Alg.updateProgress(Integer.valueOf(line.substring(line.indexOf(":") + 2)), 100);
+               //}
+            }
+         }
+
+         {//Log output
+            //For the log, we may need to skip a few more lines.
+            if (line.contains("GRASS_INFO_PERCENT")) {
+               if (line.contains(": 100")) {
+                  line = "(100%)";
+               }
+               else {
+                  skip = true;
+               }
+            }
+            if (line.contains("GRASS_INFO_END")) {
+               skip = true;
+            }
+            if (!skip) {
+               GrassAlgorithmProvider.addMessage(line);
+            }
+         }
+      }
+      else {
+         lastWasEmpty = true;
+      }
+   }
+
+
+   /*
+    * Checks whether an ASCII character represents a line terminator.
+    */
+   private static boolean isLineTerminator(final char c) {
+
+      if ((c == '\n') || (c == '\r') || (c == '\u0085') || (c == '\u2028') || (c == '\u2029')) {
+         return true;
+      }
+
+      return (false);
+   }
+
+
+   /**
+    * Runs a batch of GRASS commands.
+    * 
+    * @param sCommand
+    *                String buffer containing GRASS commands
+    * 
+    * @param sMessage
+    *                String with message to write into logfile
+    * 
+    */
+   public static void runGRASS(final StringBuffer sCommand,
+                               final String sMessage,
+                               final GrassAlgorithm alg) throws GrassExecutionException {
+      Writer output = null;
+
+      //Link to algorithm for which this is called.
+      m_Alg = alg;
+
+      //Set initial process status
+      m_bProcCanceled = false;
+
+      //On Windows, we need to check if a valid sh.exe was supplied by the user
+      if (Sextante.isWindows()) {
+         final String sWinShell = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_WIN_SHELL);
+         if ((sWinShell == null) || (sWinShell.length() < 2)) {
+            JOptionPane.showMessageDialog(null, Sextante.getText("grass_error_shell_missing") + "\n"
+                                                + Sextante.getText("grass_shell_url"), Sextante.getText("grass_error_title"),
+                     JOptionPane.ERROR_MESSAGE);
+            throw new GrassExecutionException();
+         }
+      }
+
+      //Check that the mapset exists and is not currently locked
+      final File mapset = new File(getGrassMapsetFolder());
+
+      if (!mapset.exists()) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("grass_error_mapset_missing"),
+                  Sextante.getText("grass_error_title"), JOptionPane.ERROR_MESSAGE);
+         throw new GrassExecutionException();
+      }
+      final File lockfile = new File(getGrassMapsetFolder() + File.separator + ".gislock");
+      if (lockfile.exists()) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("grass_error_mapset_locked"),
+                  Sextante.getText("grass_error_title"), JOptionPane.ERROR_MESSAGE);
+         throw new GrassExecutionException();
+      }
+
+      if (!Sextante.isWindows()) {
+         try {
+            output = new BufferedWriter(new FileWriter(GrassUtils.getBatchJobFile()));
+            output.write(sCommand.toString());
+         }
+         catch (final Exception e) {
+            throw new GrassExecutionException();
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  throw new GrassExecutionException();
+               }
+            }
+            setExecutable(getBatchJobFile());
+         }
+      }
+
+      Sextante.addInfoToLog(sMessage + " " + sCommand);
+
+      //Execute GRASS GIS command.
+      //We read every single character it outputs to either
+      //<stdin> or <stderr> console streams. Doing this unbuffered is extremely
+      //inefficient, but the only way we can get "live" status information for
+      //CPU intensive tasks!
+      try {
+         final ProcessBuilder pb = GrassUtils.getGrassExecutable(sCommand.toString());
+         if (Sextante.isWindows()) {
+            final Process process = pb.start();
+            m_Proc = process;
+            final StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());
+            final StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream());
+            errorGobbler.start();
+            outputGobbler.start();
+            process.waitFor();
+         }
+         else {
+            final Process process = pb.start();
+            m_Proc = process;
+            final InputStream eis = process.getErrorStream();
+            final InputStreamReader eisr = new InputStreamReader(eis);
+            final InputStream is = process.getInputStream();
+            final InputStreamReader isr = new InputStreamReader(is);
+            char[] stderr = new char[MAX_CHARS];
+            char[] stdin = new char[MAX_CHARS];
+            int num_read_stderr;
+            int num_read_stdin;
+            int pos_stderr = 0;
+            int pos_stdin = 0;
+
+            final FileInputStream fis = null;
+            final InputStreamReader in = null;
+            final char[] line = new char[MAX_CHARS];
+            final int pos = 0;
+            final int num_read = -1;
+
+            //Read stderr first, as we need that for progress display, and everything
+            //important should come in through STDERR.
+            while (((num_read_stderr = eisr.read(stderr, pos_stderr, 1)) != -1)) {
+               //Process stderr first.
+               if (pos_stderr == (MAX_CHARS - 1)) {
+                  //safety catch
+                  stderr[pos_stderr] = '\n';
+               }
+               if (!isLineTerminator(stderr[pos_stderr])) {
+                  pos_stderr++;
+               }
+               else {
+                  //System.err.println ("STDERR: " + String.copyValueOf(stderr).trim() );
+                  filterGRASSOutput(String.copyValueOf(stderr).trim());
+                  stderr = new char[MAX_CHARS];
+                  pos_stderr = 0;
+               }
+            }
+            //For the rare occasion that something should come in on STDIN: list to it...
+            while (((num_read_stdin = isr.read(stdin, pos_stdin, 1)) != -1)) {
+               //Process stdin
+               if (pos_stdin == (MAX_CHARS - 1)) {
+                  //safety catch
+                  stdin[pos_stdin] = '\n';
+               }
+               if (!isLineTerminator(stdin[pos_stdin])) {
+                  pos_stdin++;
+               }
+               else {
+                  //System.err.println ("STDIN: " + String.copyValueOf(stdin).trim() );
+                  filterGRASSOutput(String.copyValueOf(stdin).trim());
+                  stdin = new char[MAX_CHARS];
+                  pos_stdin = 0;
+               }
+            }
+         }
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+   }
+
+
+   /**
+    * A convenience method to set the owner's execute permission for this abstract pathname.
+    * 
+    * @param pathname
+    *                a pathname string
+    * 
+    * @throws GrassExecutionException
+    */
+   public static void setExecutable(final String pathname) throws GrassExecutionException {
+
+      final String version = System.getProperty("java.version").substring(0, 3);
+      final Float f = Float.valueOf(version);
+      if (f.floatValue() < (float) 1.6) {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            try {
+               Runtime.getRuntime().exec("chmod +x " + pathname);
+            }
+            catch (final IOException e) {
+               throw new GrassExecutionException();
+            }
+         }
+      }
+      else {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            new File(pathname).setExecutable(true);
+         }
+      }
+   }
+
+
+   /**
+    * Creates a temporary location and mapset(s) for GRASS data processing. A minimal set of folders and files is created in the
+    * system's default temporary directory. The settings files are written with sane defaults, so GRASS can do its work. File
+    * structure and content will vary slightly depending on whether the user wants to process lat/lon or x/y data.
+    * 
+    */
+   public static void createTempMapset() throws IOException {
+
+      final boolean bIsLatLon = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_LAT_LON_MODE)).booleanValue();
+      final String tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));
+      final boolean b = new File(tmpFolder).mkdir();
+      new File(tmpFolder + File.separator + "PERMANENT").mkdir();
+      new File(tmpFolder + File.separator + "user").mkdir();
+      new File(tmpFolder + File.separator + "PERMANENT" + File.separator + ".tmp").mkdir();
+      writeGRASSWindow(tmpFolder + File.separator + "PERMANENT" + File.separator + "DEFAULT_WIND");
+      new File(tmpFolder + File.separator + "PERMANENT" + File.separator + "MYNAME").createNewFile();
+      try {
+         final FileWriter fstream = new FileWriter(tmpFolder + File.separator + "PERMANENT" + File.separator + "MYNAME");
+         final BufferedWriter out = new BufferedWriter(fstream);
+         if (!bIsLatLon) {
+            /* XY location */
+            out.write("SEXTANTE GRASS interface: temporary x/y data processing location.\n");
+         }
+         else {
+            /* lat/lon location */
+            out.write("SEXTANTE GRASS interface: temporary lat/lon data processing location.\n");
+         }
+         out.close();
+      }
+      catch (final IOException e) {
+         throw (e);
+      }
+      if (bIsLatLon) {
+         new File(tmpFolder + File.separator + "PERMANENT" + File.separator + "PROJ_INFO").createNewFile();
+         try {
+            final FileWriter fstream = new FileWriter(tmpFolder + File.separator + "PERMANENT" + File.separator + "PROJ_INFO");
+            final BufferedWriter out = new BufferedWriter(fstream);
+            out.write("name: Latitude-Longitude\n");
+            out.write("proj: ll\n");
+            out.write("ellps: wgs84\n");
+            out.close();
+         }
+         catch (final IOException e) {
+            throw (e);
+         }
+         new File(tmpFolder + File.separator + "PERMANENT" + File.separator + "PROJ_UNITS").createNewFile();
+         try {
+            final FileWriter fstream = new FileWriter(tmpFolder + File.separator + "PERMANENT" + File.separator + "PROJ_UNITS");
+            final BufferedWriter out = new BufferedWriter(fstream);
+            out.write("unit: degree\n");
+            out.write("units: degrees\n");
+            out.write("meters: 1.0\n");
+            out.close();
+         }
+         catch (final IOException e) {
+            throw (e);
+         }
+      }
+      writeGRASSWindow(tmpFolder + File.separator + "PERMANENT" + File.separator + "WIND");
+      new File(tmpFolder + File.separator + "user" + File.separator + "dbf").mkdir();
+      new File(tmpFolder + File.separator + "user" + File.separator + ".tmp").mkdir();
+      new File(tmpFolder + File.separator + "user" + File.separator + "VAR").createNewFile();
+      try {
+         final FileWriter fstream = new FileWriter(tmpFolder + File.separator + "user" + File.separator + "VAR");
+         final BufferedWriter out = new BufferedWriter(fstream);
+         out.write("DB_DRIVER: dbf\n");
+         out.write("DB_DATABASE: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/\n");
+         out.close();
+      }
+      catch (final IOException e) {
+         throw (e);
+      }
+      writeGRASSWindow(tmpFolder + File.separator + "user" + File.separator + "WIND");
+   }
+
+
+   /**
+    * Writes GRASS region ("Windows") settings into a text file.
+    * 
+    * @param filename
+    *                Name of the text file to write to
+    */
+   private static void writeGRASSWindow(final String filename) throws IOException {
+
+      new File(filename).createNewFile();
+      try {
+         final FileWriter fstream = new FileWriter(filename);
+         final BufferedWriter out = new BufferedWriter(fstream);
+         final boolean bIsLatLon = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_LAT_LON_MODE)).booleanValue();
+         if (!bIsLatLon) {
+            /* XY location */
+            out.write("proj:       0\n");
+            out.write("zone:       0\n");
+            out.write("north:      1\n");
+            out.write("south:      0\n");
+            out.write("east:       1\n");
+            out.write("west:       0\n");
+            out.write("cols:       1\n");
+            out.write("rows:       1\n");
+            out.write("e-w resol:  1\n");
+            out.write("n-s resol:  1\n");
+            out.write("top:        1\n");
+            out.write("bottom:     0\n");
+            out.write("cols3:      1\n");
+            out.write("rows3:      1\n");
+            out.write("depths:     1\n");
+            out.write("e-w resol3: 1\n");
+            out.write("n-s resol3: 1\n");
+            out.write("t-b resol:  1\n");
+         }
+         else {
+            /* lat/lon location */
+            out.write("proj:       3\n");
+            out.write("zone:       0\n");
+            out.write("north:      1N\n");
+            out.write("south:      0\n");
+            out.write("east:       1E\n");
+            out.write("west:       0\n");
+            out.write("cols:       1\n");
+            out.write("rows:       1\n");
+            out.write("e-w resol:  1\n");
+            out.write("n-s resol:  1\n");
+            out.write("top:        1\n");
+            out.write("bottom:     0\n");
+            out.write("cols3:      1\n");
+            out.write("rows3:      1\n");
+            out.write("depths:     1\n");
+            out.write("e-w resol3: 1\n");
+            out.write("n-s resol3: 1\n");
+            out.write("t-b resol:  1\n");
+         }
+         out.close();
+      }
+      catch (final IOException e) {
+         throw (e);
+      }
+   }
+
+
+   /*
+    * Helper function for deleteTempMapset()
+    */
+   private static boolean deleteDirectory(final File path) {
+      if (path.exists()) {
+         final File[] files = path.listFiles();
+         for (int i = 0; i < files.length; i++) {
+            if (files[i].isDirectory()) {
+               deleteDirectory(files[i]);
+            }
+            else {
+               files[i].delete();
+            }
+         }
+      }
+      return (path.delete());
+   }
+
+
+   /**
+    * Deletes the location and mapset(s) for GRASS data processing.
+    */
+   public static void deleteTempMapset() {
+       if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {
+          String tmpFolder;
+          tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));
+          if (new File(tmpFolder).exists()) {
+             deleteDirectory(new File(tmpFolder));
+          }
+       }
+   }
+
+
+   public static void writeColorTable(final Output out) {
+
+      final FileOutputChannel channel = (FileOutputChannel) out.getOutputChannel();
+
+      //Check if the GRASS module has created a customized color table
+      final File colorTable = new File(getGrassMapsetFolder() + File.separator + "colr" + File.separator + out.getName());
+
+      if (colorTable.exists()) {
+         //Writer for output to simple ASCII file
+         BufferedWriter output = null;
+
+         //We have a GRASS color table: break up into tokens and write as an ASCII file
+         //that's easy to parse.
+         //Write original name of GRASS output map this is associated with into file
+         try {
+            final BufferedReader in = new BufferedReader(new FileReader(colorTable));
+            String line = new String();
+            String token[];
+            String from;
+            String to;
+            String R;
+            String G;
+            String B;
+            int component_no;
+            int start_pos;
+            int errors = 0;
+
+            //Create a temporary file path to store the color table description
+            String filename = channel.getFilename();
+            filename = filename.substring(0, filename.lastIndexOf("."));
+            filename = filename + "." + GrassUtils.colorTableExt;
+
+            //Register temporary file for deletion after JVM terminates
+            final File delFile = new File(filename);
+            delFile.deleteOnExit();
+
+            output = new BufferedWriter(new FileWriter(delFile));
+            output.write(colorTableIdentifier + ";" + colorTableVersion + "\n");//Header
+
+            while ((line = in.readLine()) != null) {
+               if (!line.startsWith("%")) {//Skip header line
+                  token = new String[2];
+                  //First split into both ends of interval, around " " character.
+                  from = null;
+                  to = null;
+                  errors = 0;
+                  for (int i = 0; i < 2; i++) {
+                     if (i == 0) {
+                        token[i] = line.substring(0, line.indexOf(" "));
+                     }
+                     else {
+                        token[i] = line.substring(line.lastIndexOf(" ") + 1, line.length());
+                     }
+                     if ((token[i] != null) && (token[i].length() > 1)) {//Process interval start token
+                        R = null;
+                        G = null;
+                        B = null;
+                        component_no = 0;
+                        //First bit is pixel value
+                        if (i == 0) {
+                           from = token[i].substring(0, token[i].indexOf(":"));
+                        }
+                        else {
+                           to = token[i].substring(0, token[i].indexOf(":"));
+                        }
+                        start_pos = token[i].indexOf(":");
+                        while (start_pos != -1) {//Further tokenize string
+                           token[i] = token[i].substring(start_pos + 1, token[i].length());
+                           //Next bit is an RGB component value
+                           if (token[i].indexOf(":") != -1) {
+                              if (component_no == 0) {
+                                 R = token[i].substring(0, token[i].indexOf(":"));
+                              }
+                              if (component_no == 1) {
+                                 G = token[i].substring(0, token[i].indexOf(":"));
+                              }
+                              if (component_no == 2) {
+                                 B = token[i].substring(0, token[i].indexOf(":"));
+                              }
+                           }
+                           else {
+                              if (component_no == 0) {
+                                 R = token[i].substring(0, token[i].length());
+                              }
+                              if (component_no == 1) {
+                                 G = token[i].substring(0, token[i].length());
+                              }
+                              if (component_no == 2) {
+                                 B = token[i].substring(0, token[i].length());
+                              }
+                           }
+                           start_pos = token[i].indexOf(":");
+                           component_no++;
+                        }
+                        //Sometimes only "R" is specified (gray value)
+                        if (G == null) {
+                           if (R != null) {
+                              G = new String(R);
+                           }
+                        }
+                        if (B == null) {
+                           if (R != null) {
+                              B = new String(R);
+                           }
+                        }
+                        //Check for errors in color table specification
+                        if (R == null) {
+                           errors++;
+                        }
+                        else {
+                           if ((Integer.valueOf(R) < 0) || (Integer.valueOf(R) > 255)) {
+                              errors++;
+                           }
+                        }
+                        if (G == null) {
+                           errors++;
+                        }
+                        else {
+                           if ((Integer.valueOf(G) < 0) || (Integer.valueOf(G) > 255)) {
+                              errors++;
+                           }
+                        }
+                        if (B == null) {
+                           errors++;
+                        }
+                        else {
+                           if ((Integer.valueOf(B) < 0) || (Integer.valueOf(B) > 255)) {
+                              errors++;
+                           }
+                        }
+                        if ((i == 0) && (from == null)) {
+                           errors++;
+                        }
+                        if ((i == 1) && (to == null)) {
+                           errors++;
+                        }
+                        //Write only fully valid interval specifications
+                        if (errors == 0) {
+                           if (i == 0) {
+                              output.write("FROM: " + from + "\n");
+                           }
+                           else {
+                              output.write("TO: " + to + "\n");
+                           }
+                           output.write("R: " + R + "\n");
+                           output.write("G: " + G + "\n");
+                           output.write("B: " + B + "\n");
+                        }
+                     }
+                  }
+               }
+            }
+            if (output != null) {
+               output.close();
+            }
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(Sextante.getText("grass_error_color_table"));
+         }
+      }
+   }
+
+
+   /**
+    * Returns the grass mapset folder as set by the user. Returns a path to a folder in the system's temporary files location if
+    * user is working with temporary GRASS mapset.
+    * 
+    * @return the current grass mapset folder
+    */
+   public static String getGrassMapsetFolder() {
+       return m_sGrassTempMapsetFolder;
+   }
+
+
+   /**
+    * Creates a path and folder in the system's default temporary files path. This will be used to store temporary GRASS mapsets
+    * for data processing. This will only create one new temporary mapset name per session, which should be all we ever need (the
+    * actual temporary GRASS settings files within the mapset are written from scratch each time a GRASS module is run).
+    */
+   public static void createTempMapsetName() {
+      UUID id;
+      String tmpPrefix;
+      String tmpSuffix;
+      String tmpBase;
+      String tmpFolder;
+
+      id = UUID.randomUUID();
+      tmpPrefix = new String(GrassUtils.TEMP_PREFIX);
+      tmpSuffix = new String("_" + id);
+      tmpBase = new String(System.getProperty("java.io.tmpdir"));
+      if (tmpBase.endsWith(File.separator)) {
+         tmpFolder = new String(tmpBase + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + "user");
+      }
+      else {
+         tmpFolder = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + "user");
+      }
+      m_sGrassTempMapsetFolder = tmpFolder;
+
+   }
+
+
+   //
+   /*
+    * Returns the entire version string of the GRASS version we are running.
+    * Returns "null" if anything goes wrong.
+    */
+   private static String getGrassVersion() {
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+      InputStreamReader isr = null;
+      BufferedReader br = null;
+      try {
+         final File file = new File(sFolder + File.separator + "etc" + File.separator + "VERSIONNUMBER");
+         isr = new InputStreamReader(new FileInputStream(file));
+         br = new BufferedReader(isr);
+         final String sLine = br.readLine().trim();
+         return (sLine);
+      }
+      catch (final Exception e) {
+         return (null);
+      }
+      finally {
+         try {
+            br.close();
+            isr.close();
+         }
+         catch (final Exception e) {
+            return (null);
+         }
+      }
+   }
+
+
+}
+
+
+class StreamGobbler
+         extends
+            Thread {
+
+   InputStream is;
+   String      type;
+
+
+   StreamGobbler(final InputStream is) {
+
+      this.is = is;
+
+   }
+
+
+   @Override
+   public void run() {
+      try {
+         final InputStreamReader isr = new InputStreamReader(is);
+         final BufferedReader br = new BufferedReader(isr);
+         String line = null;
+         while ((line = br.readLine()) != null) {
+            try {
+               GrassUtils.filterGRASSOutput(String.copyValueOf(line.toCharArray()).trim());
+               //System.out.println(line);
+            }
+            catch (final GrassExecutionException e) {}
+         }
+      }
+      catch (final IOException ioe) {}
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,384 @@
+package es.unex.sextante.gui.grass;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.exceptions.WrongGrassFolderException;
+import es.unex.sextante.gui.r.RUtils;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteGrassSettings;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+
+public class GrassAlgorithmProvider
+         implements
+            IAlgorithmProvider {
+
+   private static HashMap<String, GeoAlgorithm> m_Algs     = new HashMap<String, GeoAlgorithm>();
+
+   private static StringBuffer                  m_Message  = new StringBuffer();
+
+   private final static ImageIcon               GRASS_ICON = new ImageIcon(
+                                                                    GrassAlgorithmProvider.class.getClassLoader().getResource(
+                                                                             "images/grass.png"));
+
+
+   private static GrassAlgorithm createAlgorithm(final String sFile) {
+
+      final GrassAlgorithm alg = new GrassAlgorithm();
+      try {
+         alg.initialize(sFile);
+         return alg;
+      }
+      catch (final UnwrappableGrassProcessException e) {
+         return null;
+      }
+
+   }
+
+
+   public void initialize() {
+
+      GrassUtils.createTempMapsetName();
+      createAlgorithmsMap();
+
+   }
+
+
+   private void createAlgorithmsMap() {
+
+      m_Algs.clear();
+
+      if ( getGrassDescriptionFolder() == null ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_ACTIVATE, new Boolean(false).toString());
+    	  return;
+      }
+
+      if ( getGrassDescriptionFolder().length() < 1 ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_ACTIVATE, new Boolean(false).toString());
+    	  return;
+      }
+
+      try {
+         final File file = new File(getGrassDescriptionFolder());
+         final String[] files = file.list();
+         if (files != null) {
+            for (final String element : files) {
+               if (element.endsWith(".xml")) {
+                  final GrassAlgorithm alg = createAlgorithm(getGrassDescriptionFolder() + File.separator + element);
+                  if ((alg != null) && !GrassBlackList.isInBlackList(alg)) {
+                     m_Algs.put(alg.getCommandLineName(), alg);
+                  }
+               }
+            }
+         }
+      }
+      catch (final Exception e) {
+         m_Algs.clear();
+      }
+
+   }
+
+
+   /**
+    * Deletes algorithm descriptions and help files
+    */
+   public static void deleteDescriptionFiles() {
+
+      final File file = new File(getGrassDescriptionFolder());
+      final String[] files = file.list();
+
+      if (files != null) {
+         for (final String element : files) {
+            new File(file.getAbsoluteFile() + File.separator + element).delete();
+         }
+      }
+
+   }
+
+
+   /**
+    * Creates xml files calling grass commands using the --interface-description modifier
+    */
+   public static int createAlgorithmsDescriptionFiles() throws WrongGrassFolderException {
+
+      int iAlgorithms = 0;
+      final StringBuffer sb = new StringBuffer();
+      try {
+
+         //Get modules from "bin" folder
+         final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+         File file = new File(sFolder + File.separator + "bin");
+         String[] files = file.list();
+         if (files != null) {
+            if (Sextante.isUnix() || Sextante.isMacOSX()) {
+               for (int i = 0; i < files.length; i++) {
+                  if ((files[i].startsWith("v.") || files[i].startsWith("r.")) && !files[i].startsWith("r3.")
+                      && !files[i].equals("r.mapcalc") && !files[i].equals("r3.mapcalc")) {
+                     final String sCommand = files[i];
+                     if (!GrassBlackList.isInBlackList(sCommand)) {
+                        iAlgorithms++;
+                        sb.append(sCommand + " --interface-description > \"" + getGrassDescriptionFolder() + File.separator
+                                  + sCommand + ".xml\"\n");
+                     }
+                  }
+               }
+               //Get modules from "scripts" folder
+               file = new File(sFolder + File.separator + "scripts");
+               files = file.list();
+               if (files != null) {
+                  for (int i = 0; i < files.length; i++) {
+                     if ((files[i].startsWith("v.") || files[i].startsWith("r.")) && !files[i].equals("r.out.gdal.sh")
+                         && !files[i].startsWith("r3.")) {
+                        final String sCommand = files[i];
+                        if (!GrassBlackList.isInBlackList(sCommand)) {
+                           iAlgorithms++;
+                           sb.append(sCommand + " --interface-description > \"" + getGrassDescriptionFolder() + File.separator
+                                     + sCommand + ".xml\"\n");
+                        }
+                     }
+                  }
+               }
+            }
+            else {//Windows: scripts and C binaries are all in one folder
+               for (int i = 0; i < files.length; i++) {
+                  if ((files[i].endsWith(".exe") || files[i].endsWith(".bat"))
+                      //if ( (files[i].endsWith(".exe") )
+                      && (files[i].startsWith("v.") || files[i].startsWith("r.")) && !files[i].startsWith("r3.")
+                      && !files[i].contains("r.out.gdal.sh") && !files[i].equals("r.mapcalc.exe")
+                      && !files[i].equals("r3.mapcalc.exe")) {
+                     final String sCommand = files[i].substring(0, files[i].length() - 4);
+                     if (!GrassBlackList.isInBlackList(sCommand)) {
+                        iAlgorithms++;
+                        if (files[i].endsWith(".bat")) {
+                           sb.append("cmd.exe /C " + sCommand + " --interface-description > \"" + getGrassDescriptionFolder()
+                                     + File.separator + sCommand + ".xml\"\n");
+                        }
+                        else {
+                           sb.append(sCommand + " --interface-description > \"" + getGrassDescriptionFolder() + File.separator
+                                     + sCommand + ".xml\"\n");
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         if (iAlgorithms == 0) {
+            throw new WrongGrassFolderException();
+         }
+      }
+      catch (final Exception e) {
+         throw new WrongGrassFolderException();
+      }
+
+      try {
+         GrassUtils.createTempMapset();
+         GrassUtils.runGRASS(sb, "Creating GRASS algorithm descriptions", null);
+      }
+      catch (final Exception e) {
+         throw new WrongGrassFolderException();
+      }
+
+      Sextante.addInfoToLog("SEXTANTE GRASS interface: Done setting up GRASS.");
+
+      //createAlgorithmSiblings();
+
+      return iAlgorithms;
+   }
+
+
+   /**
+    * Returns the folder where grass description files (xml file generated using the grass --interface-description modifier) are
+    * located
+    *
+    * @return Returns the folder where grass description files (xml file generated using the grass --interface-description
+    *         modifier) are located
+    */
+   public static String getGrassDescriptionFolder() {
+
+      final String sPath = SextanteGUI.getSextanteInstallPath() + File.separator + "grass" + File.separator + "description";
+      //System.getProperty("user.home") + File.separator + "sextante" + File.separator + "grass";
+
+      final File file = new File(sPath);
+      if (!file.exists()) {
+         file.mkdir();
+      }
+
+      return sPath;
+
+   }
+
+
+   /**
+    * Returns the algorithm corresponding to a given grass algorithm name
+    *
+    * @param sAlgName
+    *                the name of the grass algorithm (the grass command to execute it)
+    * @return the algorithm corresponding to the passed grass algorithm name
+    */
+   public static GrassAlgorithm getGrassAlgorithm(final String sAlgName) {
+
+
+      return (GrassAlgorithm) m_Algs.get(sAlgName);
+
+   }
+
+
+   public HashMap<String, GeoAlgorithm> getAlgorithms() {
+
+      if (Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_ACTIVATE))) {
+         return m_Algs;
+      }
+      else {
+         return new HashMap<String, GeoAlgorithm>();
+      }
+   }
+
+
+   public String getName() {
+
+      return "GRASS";
+
+   }
+
+
+   public HashMap<String, Class> getCustomModelerParameterPanels() {
+
+      final HashMap<String, Class> map = new HashMap<String, Class>();
+      final Set<String> set = m_Algs.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         map.put(iter.next(), GrassModelerParametersPanel.class);
+      }
+
+      return map;
+
+   }
+
+
+   public HashMap<String, Class> getCustomParameterPanels() {
+
+      final HashMap<String, Class> map = new HashMap<String, Class>();
+      final Set<String> set = m_Algs.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         map.put(iter.next(), GrassParametersPanel.class);
+      }
+
+      return map;
+
+   }
+
+
+   public ImageIcon getIcon() {
+
+      return GRASS_ICON;
+
+   }
+
+
+   public Setting getSettings() {
+
+      return new SextanteGrassSettings();
+
+   }
+
+
+   public void update() {
+
+      createAlgorithmsMap();
+
+   }
+
+
+   public Object getAlgorithmHelp(final GeoAlgorithm alg) {
+
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+      String sName = alg.getName();
+      if (sName.contains("(")) {//sibling
+         sName = sName.substring(0, sName.indexOf("(")).trim();
+      }
+      final String sFilename = sName + ".html";
+      final String sURLPath = "file:///" + sFolder + File.separator + "docs" + File.separator + "html" + File.separator
+                              + sFilename;
+
+      try {
+         return new URL(sURLPath);
+      }
+      catch (final MalformedURLException e1) {
+         return null;
+      }
+   }
+
+
+   public String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                          final boolean forceCurrentLocale) {
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+      final String sFilename = alg.getName() + ".html";
+      final String sFullPath = sFolder + File.separator + "docs" + File.separator + "html" + File.separator + sFilename;
+
+      return sFullPath;
+
+   }
+
+
+   public boolean canEditHelp() {
+
+      return false;
+
+   }
+
+
+   public static void deleteAlgorithms() {
+
+      m_Algs.clear();
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      return new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+
+   }
+
+
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+      return new IToolboxRightButtonAction[0];
+
+   }
+
+
+   public static void addMessage(final String s) {
+
+
+      m_Message.append(s + "\n");
+
+   }
+
+
+   public static void publishMessage(final String sDescription) {
+
+      Sextante.getLogger().addToLog(m_Message.toString(), "GRASS", sDescription);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassExecutionException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassExecutionException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassExecutionException.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.gui.grass;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+
+public class GrassExecutionException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public GrassExecutionException() {
+
+      super(Sextante.getText("Error_executing_GRASS_process"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassExecutionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassVInfoUtils.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassVInfoUtils.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassVInfoUtils.java	(revision 369)
@@ -0,0 +1,428 @@
+package es.unex.sextante.gui.grass;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Writer;
+
+import es.unex.sextante.core.Sextante;
+
+public class GrassVInfoUtils {
+
+   //GRASS geometric primitives
+   public static final int GEOM_TYPE_POINT   = 0;
+   public static final int GEOM_TYPE_LINE    = 1;
+   public static final int GEOM_TYPE_POLYGON = 2;
+   public static final int GEOM_TYPE_FACE    = 3; //A simple 3D polygon (3D triangle)
+   public static final int GEOM_TYPE_KERNEL  = 4; //A 3D centroid. Will be treated like a 3D point
+
+
+   /**
+    * Returns the number of geometries of a specified type in a GRASS map. This methods runs the GRASS command "v.info" to obtain
+    * statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    * @param iGeomType
+    *                Type of geometry to query. Choices are: GEOM_TYPE_POINT, GEOM_TYPE_LINE, GEOM_TYPE_POLYGON
+    */
+   public static int getNumGeoms(final String sMapName,
+                                 final int iGeomType) throws GrassExecutionException {
+
+      //      if (isProcessCanceled()) {
+      //         return 0;
+      //      }
+
+      final String cmdline = "v.info -t " + sMapName;
+      Integer numGeoms = 0;
+
+      if (!Sextante.isWindows()) {
+         Writer output = null;
+         try {
+            output = new BufferedWriter(new FileWriter(GrassUtils.getBatchJobFile()));
+            output.write(cmdline);
+         }
+         catch (final Exception e) {
+            throw new GrassExecutionException();
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  throw new GrassExecutionException();
+               }
+            }
+            GrassUtils.setExecutable(GrassUtils.getBatchJobFile());
+         }
+      }
+
+      //Execute GRASS
+      try {
+         final ProcessBuilder pb = GrassUtils.getGrassExecutable(cmdline);
+         final Process process = pb.start();
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            //Proper OS: read from STDIN
+            final InputStream is = process.getErrorStream();
+            final InputStreamReader isr = new InputStreamReader(is);
+            BufferedReader br = null;
+            br = new BufferedReader(isr);
+            String line;
+            process.waitFor();
+
+            while ((line = br.readLine()) != null) {
+               if (line.contains("points=")) {
+                  if (iGeomType == GEOM_TYPE_POINT) {
+                     numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                     break;
+                  }
+               }
+               if (line.contains("lines=")) {
+                  if (iGeomType == GEOM_TYPE_LINE) {
+                     numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                     break;
+                  }
+               }
+               if (line.contains("areas=")) {
+                  if (iGeomType == GEOM_TYPE_POLYGON) {
+                     numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                     break;
+                  }
+               }
+               if (line.contains("faces=")) {
+                  if (iGeomType == GEOM_TYPE_FACE) {
+                     numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                     break;
+                  }
+               }
+               if (line.contains("kernels=")) {
+                  if (iGeomType == GEOM_TYPE_KERNEL) {
+                     numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                     break;
+                  }
+               }
+            }
+            return (numGeoms.intValue());
+         }
+         else {
+            final NumGeomStreamGobbler errorGobbler = new NumGeomStreamGobbler(process.getErrorStream(), iGeomType);
+            final NumGeomStreamGobbler outputGobbler = new NumGeomStreamGobbler(process.getInputStream(), iGeomType);
+            errorGobbler.start();
+            outputGobbler.start();
+            process.waitFor();
+            return outputGobbler.getNumGeoms();
+         }
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+
+   }
+
+
+   /**
+    * Returns the number of geometries of type POINT in a GRASS map. This methods runs the GRASS command "v.info" to obtain
+    * statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static int getNumPoints(final String sMapName) throws GrassExecutionException {
+      int result = 0;
+
+      try {
+         result = getNumGeoms(sMapName, GEOM_TYPE_POINT);
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+      return (result);
+   }
+
+
+   /**
+    * Returns the number of geometries of type LINE in a GRASS map. This methods runs the GRASS command "v.info" to obtain
+    * statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static int getNumLines(final String sMapName) throws GrassExecutionException {
+      int result = 0;
+
+      try {
+         result = getNumGeoms(sMapName, GEOM_TYPE_LINE);
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+      return (result);
+   }
+
+
+   /**
+    * Returns the number of geometries of type POLYGON in a GRASS map. This methods runs the GRASS command "v.info" to obtain
+    * statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static int getNumPolygons(final String sMapName) throws GrassExecutionException {
+      int result = 0;
+
+      try {
+         result = getNumGeoms(sMapName, GEOM_TYPE_POLYGON);
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+      return (result);
+   }
+
+
+   /**
+    * Returns the number of geometries of type FACE in a GRASS map. A face is a simple 3D polygon used to build triangulated 3D
+    * meshes. Some GRASS modules output 3D triangles (faces).
+    * 
+    * Note: In GRASS, the entitites that are usually called "polygons" in any other GIS are actually called "areas" and they are
+    * topological objects, consisting of boundaries and centroids. Proper GRASS areas only exist if there are no major topological
+    * problems in the data (specifidally: overlap). Data with badly overlapping polygons cannot be processed in GRASS without
+    * topological cleaning.
+    * 
+    * This methods runs the GRASS command "v.info" to obtain statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static int getNumFaces(final String sMapName) throws GrassExecutionException {
+      int result = 0;
+
+      try {
+         result = getNumGeoms(sMapName, GEOM_TYPE_FACE);
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+      return (result);
+   }
+
+
+   /**
+    * Returns the number of geometries of type KERNEL in a GRASS map. A kernel is a 3D point. It has the same function as a 2D
+    * centroid for an area in GRASS. However, threre is still a discussion about what is the full equivalent of a 2D area in 3D.
+    * So for the time being, we will just treat kernels like simple 3D points. This methods runs the GRASS command "v.info" to
+    * obtain statistics for the GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static int getNumKernels(final String sMapName) throws GrassExecutionException {
+      int result = 0;
+
+      try {
+         result = getNumGeoms(sMapName, GEOM_TYPE_KERNEL);
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+      return (result);
+   }
+
+
+   /**
+    * Checks if a GRASS vector map contains 3D data. This methods runs the GRASS command "v.info" to obtain statistics for the
+    * GRASS map.
+    * 
+    * @param sMapName
+    *                Name of GRASS map to query
+    * 
+    */
+   public static boolean isMap3D(final String sMapName) throws GrassExecutionException {
+
+      boolean is3D = false;
+
+      final String cmdline = "v.info -t " + sMapName;
+
+      if (!Sextante.isWindows()) {
+         Writer output = null;
+         try {
+            output = new BufferedWriter(new FileWriter(GrassUtils.getBatchJobFile()));
+            output.write(cmdline);
+         }
+         catch (final Exception e) {
+            throw new GrassExecutionException();
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  throw new GrassExecutionException();
+               }
+            }
+            GrassUtils.setExecutable(GrassUtils.getBatchJobFile());
+         }
+      }
+
+      //Execute GRASS
+      try {
+         final ProcessBuilder pb = GrassUtils.getGrassExecutable(cmdline);
+         final Process process = pb.start();
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            //Proper OS: read from STDIN
+            final InputStream is = process.getErrorStream();
+            final InputStreamReader isr = new InputStreamReader(is);
+            final FileInputStream fis = null;
+            final InputStreamReader in = null;
+            BufferedReader br = null;
+            br = new BufferedReader(isr);
+            String line;
+            process.waitFor();
+            while ((line = br.readLine()) != null) {
+               if (line.contains("map3d=1")) {
+                  is3D = true;
+                  break;
+               }
+            }
+         }
+         else {
+            final Is3DStreamGobbler errorGobbler = new Is3DStreamGobbler(process.getErrorStream());
+            final Is3DStreamGobbler outputGobbler = new Is3DStreamGobbler(process.getInputStream());
+            errorGobbler.start();
+            outputGobbler.start();
+            process.waitFor();
+            return outputGobbler.is3D();
+         }
+      }
+      catch (final Exception e) {
+         throw new GrassExecutionException();
+      }
+
+      return (is3D);
+   }
+
+
+}
+
+
+class NumGeomStreamGobbler
+         extends
+            Thread {
+
+   InputStream is;
+   //String      type;
+   int         iGeomType;
+   Integer     numGeoms;
+
+
+   NumGeomStreamGobbler(final InputStream is,
+                        final int iGeomType) {
+
+      this.iGeomType = iGeomType;
+      this.is = is;
+
+   }
+
+
+   public int getNumGeoms() {
+
+      return (numGeoms.intValue());
+
+   }
+
+
+   @Override
+   public void run() {
+      try {
+         final InputStreamReader isr = new InputStreamReader(is);
+         final BufferedReader br = new BufferedReader(isr);
+         String line = null;
+         while ((line = br.readLine()) != null) {
+            if (line.contains("points=")) {
+               if (iGeomType == GrassVInfoUtils.GEOM_TYPE_POINT) {
+                  numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                  break;
+               }
+            }
+            if (line.contains("lines=")) {
+               if (iGeomType == GrassVInfoUtils.GEOM_TYPE_LINE) {
+                  numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                  break;
+               }
+            }
+            if (line.contains("areas=")) {
+               if (iGeomType == GrassVInfoUtils.GEOM_TYPE_POLYGON) {
+                  numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                  break;
+               }
+            }
+            if (line.contains("faces=")) {
+               if (iGeomType == GrassVInfoUtils.GEOM_TYPE_FACE) {
+                  numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                  break;
+               }
+            }
+            if (line.contains("kernels=")) {
+               if (iGeomType == GrassVInfoUtils.GEOM_TYPE_KERNEL) {
+                  numGeoms = Integer.parseInt(line.substring(line.indexOf("=") + 1));
+                  break;
+               }
+            }
+         }
+      }
+      catch (final IOException ioe) {}
+   }
+}
+
+
+class Is3DStreamGobbler
+         extends
+            Thread {
+
+   InputStream is;
+   boolean     bIs3D;
+
+
+   Is3DStreamGobbler(final InputStream is) {
+
+      bIs3D = false;
+      this.is = is;
+
+   }
+
+
+   public boolean is3D() {
+
+      return bIs3D;
+
+   }
+
+
+   @Override
+   public void run() {
+      try {
+         final InputStreamReader isr = new InputStreamReader(is);
+         final BufferedReader br = new BufferedReader(isr);
+         String line = null;
+         while ((line = br.readLine()) != null) {
+            if (line.contains("map3d=1")) {
+               bIs3D = true;
+               break;
+            }
+         }
+      }
+      catch (final IOException ioe) {}
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassVInfoUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassParametersPanel.java	(revision 369)
@@ -0,0 +1,59 @@
+package es.unex.sextante.gui.grass;
+
+import javax.swing.JPanel;
+
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.gui.algorithm.DefaultParametersPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+
+public class GrassParametersPanel
+         extends
+            DefaultParametersPanel {
+
+
+   @Override
+   protected void addNonDataObjects(final JPanel pane) {
+
+      int i;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+
+      m_iCurrentRow = 0;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter.getParameterName().equals(GrassAlgorithm.PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE)) {
+            continue;
+         }
+         if (parameter instanceof ParameterNumericalValue) {
+            addNumericalTextField(pane, (ParameterNumericalValue) parameter);
+         }
+         else if (parameter instanceof ParameterString) {
+            addStringTextField(pane, (ParameterString) parameter);
+         }
+         else if (parameter instanceof ParameterSelection) {
+            addSelection(pane, (ParameterSelection) parameter);
+         }
+         else if (parameter instanceof ParameterFixedTable) {
+            addFixedTable(pane, (ParameterFixedTable) parameter);
+         }
+         else if (parameter instanceof ParameterPoint) {
+            addPoint(pane, (ParameterPoint) parameter);
+         }
+         else if (parameter instanceof ParameterBoolean) {
+            addCheckBox(pane, (ParameterBoolean) parameter);
+         }
+         else if (parameter instanceof ParameterFilepath) {
+            addFilepath(pane, (ParameterFilepath) parameter);
+         }
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithm.java	(revision 369)
@@ -0,0 +1,1976 @@
+package es.unex.sextante.gui.grass;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JOptionPane;
+
+import org.kxml2.io.KXmlParser;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.*;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.algorithm.iterative.SingleFeatureVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteGrassSettings;
+import es.unex.sextante.outputs.*;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+/**
+ * A geoalgorithm that wraps a grass algorithm
+ * 
+ * @author volaya
+ * 
+ */
+public class GrassAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static String         encoding                              = "ISO-8859-1";
+
+   private static final String   PARAMETER                             = "parameter";
+   private static final String   DESCRIPTION                           = "description";
+   private static final String   LABEL                                 = "label";
+   private static final String   TASK                                  = "task";
+   private static final String   NAME                                  = "name";
+   private static final String   TYPE                                  = "type";
+   private static final String   REQUIRED                              = "required";
+   private static final String   MULTIPLE                              = "multiple";
+   private static final String   VALUES                                = "values";
+   private static final String   GISPROMPT                             = "gisprompt";
+   private static final String   AGE                                   = "age";
+   private static final String   ELEMENT                               = "element";
+   private static final String   DEFAULT                               = "default";
+   private static final String   KEYDESC                               = "keydesc";
+   private static final String   FLAG                                  = "flag";
+   private static final String   BOOLEAN                               = "boolean";
+   private static final String   PROMPT                                = "prompt";
+
+   private String                m_sDescriptionFile;
+
+   private String                m_sParameterName;
+   private String                m_sParameterType;
+   private String                m_sParameterRequired;
+   private String                m_sParameterMultiple;
+   private ArrayList<String>     m_Values;
+   private String                m_sGisPromptAge;
+   private String                m_sGisPromptElement;
+   private String                m_sGisPromptPrompt;
+   private String                m_sDescription;
+   private String                m_sTooltip                            = null;
+   private String                m_sDefaultValue;
+   private Boolean               m_bKeydesc;
+
+   private String                m_sLastTag;
+
+   //These arrays map external data files to GRASS map names
+   private ArrayList<String>     m_FilesIn;
+   private ArrayList<String>     m_MapsIn;
+
+   private boolean               m_bIsExecutedFromModeller;
+
+   //Extensions of vector file formats for which OGR provides read support
+   private static final String[] ext_ogr_in                            = { "shp", "mif", "tab", "e00", "ntf", "000", "ddf",
+            "dgn", "bna", "gml", "kml", "gpx", "geojson", "gmt", "dat", "gxt" };
+
+   //Extensions of vector file formats for which OGR provides write support
+   private static final String[] ext_ogr_out                           = { "shp", "mif", "tab", "dgn", "bna", "gml", "kml",
+            "gpx", "geojson", "gmt", "gxt"                            };
+
+   public static final String    PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE = "PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE";
+
+
+   /**
+    * Initializes the geoalgorithm from a grass description file, generated using the --interface-description modifier
+    * 
+    * @param sDescriptionFile
+    *                the description file
+    * @throws UnwrappableGrassProcessException
+    */
+   public void initialize(final String sDescriptionFile) throws UnwrappableGrassProcessException {
+
+      m_sDescriptionFile = sDescriptionFile;
+
+      m_Parameters = new ParametersSet();
+      m_OutputObjects = new OutputObjectsSet();
+
+      defineCharacteristicsFromGrassXML();
+
+   }
+
+
+   /*
+    * Updates the progress bar of the ProgressMonitor object for this algorithm.
+    */
+   public void updateProgress(final int i,
+                              final int n) {
+
+      setProgress(i, n);
+   }
+
+
+   /**
+    * Registers a new "mapping", that is a relation of the form: external file <-> GRASS map. This is important for substituting
+    * the INPUT map name values in the GRASS module to run. Note: Take care to always need associate a GRASS map with a full path
+    * specification, NOT just the actual filename! Otherwise, if the user adds multiple input files which have the same name but
+    * are in different directories, then there will be ambiguity and that means trouble!
+    * 
+    * @param sFileName
+    *                Name of external geodata file
+    * 
+    * @param sMapName
+    *                Name of GRASS map under which the imported file was stored
+    * 
+    */
+   private void registerInMapping(final String sFileName,
+                                  final String sMapName) {
+
+      if ((sFileName != null) && (sMapName != null)) {
+         m_FilesIn.add(sFileName);
+         m_MapsIn.add(sMapName);
+      }
+   }
+
+
+   /**
+    * Returns the name of the GRASS map that corresponds to an imported external data file. Returns null on failure.
+    * 
+    * @param sFileName
+    *                Name of external geodata file
+    * 
+    */
+   private String getInFile(final String sFileName) {
+      for (int i = 0; i < m_FilesIn.size(); i++) {
+         if (m_FilesIn.get(i).equals(sFileName)) {
+            return m_MapsIn.get(i);
+         }
+      }
+      return null;
+   }
+
+
+   /**
+    * Returns the name of the data file that corresponds to a GRASS map. Returns null on failure.
+    * 
+    * @param sMapName
+    *                Name of GRASS map
+    * 
+    */
+   private String getInMap(final String sMapName) {
+      for (int i = 0; i < m_MapsIn.size(); i++) {
+         if (m_MapsIn.get(i).equals(sMapName)) {
+            return m_FilesIn.get(i);
+         }
+      }
+      return null;
+   }
+
+
+   private void defineCharacteristicsFromGrassXML() throws UnwrappableGrassProcessException {
+
+      //output extent is needed to set the GRASS region
+      setUserCanDefineAnalysisExtent(true);
+
+      final File file = new File(m_sDescriptionFile);
+      final KXmlParser parser = new KXmlParser();
+      String modName = null;
+
+      try {
+         parser.setInput(new FileInputStream(file), encoding);
+
+         int tag = parser.nextTag();
+         boolean bOut = false;
+
+         m_bKeydesc = false;//Indicates whether this is a complex numerical range or n-tuple
+         if (parser.getEventType() != KXmlParser.END_DOCUMENT) {
+            while ((tag != KXmlParser.END_DOCUMENT) && !bOut) {
+               switch (tag) {
+                  case KXmlParser.START_TAG:
+                     m_sLastTag = parser.getName();
+                     if (parser.getName().compareTo(TASK) == 0) {
+                        final String sName = parser.getAttributeValue("", NAME);
+                        setName(sName);
+                        if (sName.startsWith("r")) {
+                           setGroup("Raster (r.*)");
+                        }
+                        else if (sName.startsWith("v")) {
+                           setGroup("Vector (v.*)");
+                        }
+                        modName = new String(sName);
+                     }
+                     else if (parser.getName().compareTo(PARAMETER) == 0) {
+                        m_sParameterName = parser.getAttributeValue("", NAME);
+                        m_sParameterType = parser.getAttributeValue("", TYPE);
+                        m_sParameterRequired = parser.getAttributeValue("", REQUIRED);
+                        m_sParameterMultiple = parser.getAttributeValue("", MULTIPLE);
+                        m_sGisPromptAge = "";
+                        m_sGisPromptElement = "";
+                        m_sGisPromptPrompt = "";
+                        m_sDefaultValue = "";
+                        m_Values = null;
+                     }
+                     else if (parser.getName().compareTo(FLAG) == 0) {
+                        m_sParameterName = parser.getAttributeValue("", NAME);
+                        m_sParameterType = BOOLEAN;
+                        //m_sDescription = parser.getText();
+                     }
+                     else if (parser.getName().compareTo(GISPROMPT) == 0) {
+                        m_sGisPromptAge = parser.getAttributeValue("", AGE);
+                        m_sGisPromptElement = parser.getAttributeValue("", ELEMENT);
+                        m_sGisPromptPrompt = parser.getAttributeValue("", PROMPT);
+                     }
+                     else if (parser.getName().compareTo(VALUES) == 0) {
+                        m_Values = new ArrayList<String>();
+                     }
+                     break;
+                  case KXmlParser.END_TAG:
+                     if (parser.getName().compareTo(TASK) == 0) {
+                        bOut = true;
+                     }
+                     if (parser.getName().compareTo(PARAMETER) == 0) {
+                        createParameter();
+                     }
+                     if (parser.getName().compareTo(FLAG) == 0) {
+                        createParameter();
+                     }
+                     else if ((parser.getName().compareTo(DESCRIPTION) == 0) || (parser.getName().compareTo(NAME) == 0)
+                              || (parser.getName().compareTo(DEFAULT) == 0) || (parser.getName().compareTo(KEYDESC) == 0)
+                              || (parser.getName().compareTo(LABEL) == 0)) {
+                        m_sLastTag = "";
+                     }
+                     break;
+                  case KXmlParser.TEXT:
+                     if (m_sLastTag.equals(LABEL)) {
+                        m_sTooltip = parser.getText().trim();
+                     }
+
+                     if (m_sLastTag.equals(DESCRIPTION)) {
+                        if (m_sTooltip == null) {
+                           m_sTooltip = parser.getText().trim();
+                        }
+                        m_sDescription = parser.getText().trim();
+                     }
+                     else if (m_sLastTag.equals(NAME)) {
+                        m_Values.add(parser.getText().trim());
+                     }
+                     else if (m_sLastTag.equals(DEFAULT)) {
+                        m_sDefaultValue = parser.getText().trim();
+                     }
+                     else if (m_sLastTag.equals(KEYDESC)) {
+                        m_bKeydesc = true;
+                     }
+                     break;
+               }
+               if (!bOut) {
+                  tag = parser.next();
+               }
+            }
+         }
+
+         //now we add a fixed parameter that is only used in the modeler, to restrict the geometry type in multi-geometry algorithms
+         if (this.m_OutputObjects.getVectorLayersCount() != 0) {
+            final String[] sOptions = new String[] { Sextante.getText("Points"), Sextante.getText("Lines"),
+                     Sextante.getText("Polygons") };
+            m_Parameters.addSelection(PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE, Sextante.getText("Restrict_geometry_output"),
+                     sOptions);
+         }
+
+      }
+      catch (final Exception e) {
+         //Log any unwrappable modules as warnings
+         if (modName != null) {
+            Sextante.addWarningToLog("SEXTANTE GRASS interface: Failed to wrap GRASS module '" + modName + "'.");
+            Sextante.addWarningToLog("SEXTANTE GRASS interface: Above module will not be available.");
+         }
+         throw new UnwrappableGrassProcessException();
+      }
+
+   }
+
+
+   private void createParameter() throws UnwrappableGrassProcessException {
+
+      if (m_sParameterName.equals("overwrite") || m_sParameterName.equals("quiet") || m_sParameterName.equals("verbose")) {
+         return;
+      }
+
+      Parameter param = null;
+      Output out = null;
+      if (m_sParameterType.compareTo(BOOLEAN) == 0) {
+         param = new ParameterBoolean();
+         final AdditionalInfoBoolean aib = new AdditionalInfoBoolean(false);
+         param.setParameterAdditionalInfo(aib);
+      }
+      else if (m_sParameterType.compareTo("string") == 0) {
+         //All types of parameters that are of the broad class "string",
+         //But not of a specific element type.
+         if ((m_sGisPromptElement == null) || m_sGisPromptElement.equals("")) {
+            if ((m_Values != null) && (m_Values.size() != 0)) {//selection
+               if (m_sParameterMultiple.equals("no")) {//single selection
+                  param = new ParameterSelection();
+                  final AdditionalInfoSelection ais = new AdditionalInfoSelection(m_Values.toArray(new String[0]));
+                  param.setParameterAdditionalInfo(ais);
+               }
+               else {//multiple selection
+                  //TODO: needs a more elegant input widget
+                  param = new ParameterString();
+                  final AdditionalInfoString ais = new AdditionalInfoString();
+                  ais.setDefaultString(m_sDefaultValue);
+                  param.setParameterAdditionalInfo(ais);
+               }
+            }
+            else {//any other old string
+               if (getName().equals("v.in.ogr")) {
+                  final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(false, true, false, ext_ogr_in);
+                  param = new ParameterFilepath();
+                  param.setParameterAdditionalInfo(aif);
+               }
+               else if (getName().equals("v.out.ogr")) {
+                  final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(false, true, false, ext_ogr_out);
+                  param = new ParameterFilepath();
+                  param.setParameterAdditionalInfo(aif);
+               }
+               else {//All other GRASS modules: create simple string parameter
+                  param = new ParameterString();
+                  final AdditionalInfoString ais = new AdditionalInfoString();
+                  ais.setDefaultString(m_sDefaultValue);
+                  param.setParameterAdditionalInfo(ais);
+               }
+            }
+         }
+         else {//specific string type parameters, such as raster or vector maps
+            if (m_sParameterMultiple.equals("yes")) {//multiple input maps
+               if (m_sGisPromptElement.equals("cell")) {
+                  param = new ParameterMultipleInput();
+                  AdditionalInfoMultipleInput aimi = null;
+                  aimi = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_RASTER,
+                           m_sParameterRequired.equals("yes"));
+                  param.setParameterAdditionalInfo(aimi);
+               }
+               else if (m_sGisPromptElement.equals("vector")) {
+                  param = new ParameterMultipleInput();
+                  AdditionalInfoMultipleInput aimi = null;
+                  aimi = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY,
+                           m_sParameterRequired.equals("yes"));
+                  param.setParameterAdditionalInfo(aimi);
+               }
+               else if (m_sGisPromptElement.equals("dbcolumn")) {
+                  //TODO: needs a more elegant input widget
+                  param = new ParameterString();
+                  final AdditionalInfoString ais = new AdditionalInfoString();
+                  ais.setDefaultString(m_sDefaultValue);
+                  ais.setIsField(true);
+                  param.setParameterAdditionalInfo(ais);
+               }
+               else {
+                  throw new UnwrappableGrassProcessException();
+               }
+            }
+            else {
+               if (m_sGisPromptAge.startsWith("old")) {
+                  if (m_sGisPromptElement.equals("cell")) {
+                     param = new ParameterRasterLayer();
+                     final AdditionalInfoRasterLayer airl = new AdditionalInfoRasterLayer(m_sParameterRequired.equals("yes"));
+                     param.setParameterAdditionalInfo(airl);
+                  }
+                  else if (m_sGisPromptElement.equals("vector")) {
+                     param = new ParameterVectorLayer();
+                     final AdditionalInfoVectorLayer aivl = new AdditionalInfoVectorLayer(
+                              AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, m_sParameterRequired.equals("yes"));
+                     param.setParameterAdditionalInfo(aivl);
+                  }
+                  //a table field
+                  else if (m_sGisPromptElement.equals("dbcolumn")) {
+                     //TODO: needs a more elegant input widget
+                     param = new ParameterString();
+                     final AdditionalInfoString ais = new AdditionalInfoString();
+                     ais.setDefaultString(m_sDefaultValue);
+                     ais.setIsField(true);
+                     param.setParameterAdditionalInfo(ais);
+                  }
+                  else if (m_sGisPromptElement.equals("file")) {
+                     param = new ParameterFilepath();
+                     if (m_sGisPromptPrompt.startsWith("dsn")) {//DSN parameter for v.in.ogr/v.out.ogr
+                        final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(true, true, false, null);
+                        param.setParameterAdditionalInfo(aif);
+                     }
+                     else if (getName().equals("v.in.dxf")) {
+                        final String ext[] = { "dxf" };
+                        final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(false, true, false, ext);
+                        param = new ParameterFilepath();
+                        param.setParameterAdditionalInfo(aif);
+                     }
+                     else { //all other input files
+                        final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(false, true, false, null);
+                        param.setParameterAdditionalInfo(aif);
+                     }
+                  }
+                  else {//Any other GRASS elements: just treat them as strings
+                     param = new ParameterString();
+                     final AdditionalInfoString ais = new AdditionalInfoString();
+                     ais.setDefaultString(m_sDefaultValue);
+                     param.setParameterAdditionalInfo(ais);
+                  }
+               }
+               else {//output
+                  if (m_sGisPromptElement.equals("cell") || m_sGisPromptElement.equals("tiff")) {
+                     out = new OutputRasterLayer();
+                  }
+                  else if (m_sGisPromptElement.equals("vector")) {
+                     out = new OutputVectorLayer();
+                  }
+                  else if (m_sGisPromptElement.equals("file")) {
+                     param = new ParameterFilepath();
+                     final AdditionalInfoFilepath aif = new AdditionalInfoFilepath(false, false, false, null);
+                     param.setParameterAdditionalInfo(aif);
+                  }
+               }
+            }
+         }
+      }
+      else if (m_sParameterType.compareTo("float") == 0) {
+         if (m_sParameterMultiple.equals("yes") || (m_bKeydesc == true)) {
+            //handle multiple numbers, ranges and tuples as strings
+            param = new ParameterString();
+            final AdditionalInfoString ais = new AdditionalInfoString();
+            ais.setDefaultString(m_sDefaultValue);
+            param.setParameterAdditionalInfo(ais);
+         }
+         else {
+            param = new ParameterNumericalValue();
+            param.setParameterName(m_sParameterName);
+            param.setParameterDescription(m_sDescription);
+            double dDefaultValue;
+            try {
+               dDefaultValue = Double.parseDouble(m_sDefaultValue.trim());
+            }
+            catch (final NumberFormatException e) {
+               dDefaultValue = 0;
+            }
+            final AdditionalInfoNumericalValue ainv = new AdditionalInfoNumericalValue(
+                     AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, dDefaultValue, Double.NEGATIVE_INFINITY,
+                     Double.MAX_VALUE);
+            param.setParameterAdditionalInfo(ainv);
+         }
+      }
+      else if (m_sParameterType.compareTo("integer") == 0) {
+         if (m_sParameterMultiple.equals("yes") || (m_bKeydesc == true)) {
+            //handle multiple numbers, ranges and tuples as a string
+            param = new ParameterString();
+            final AdditionalInfoString ais = new AdditionalInfoString();
+            ais.setDefaultString(m_sDefaultValue);
+            param.setParameterAdditionalInfo(ais);
+         }
+         else {
+            int iDefaultValue;
+            try {
+               iDefaultValue = Integer.parseInt(m_sDefaultValue.trim());
+            }
+            catch (final NumberFormatException e) {
+               iDefaultValue = 0;
+            }
+            //Skip layer=1 options
+            if (!(m_sGisPromptElement.equals("layer") && (iDefaultValue == 1))) {
+               param = new ParameterNumericalValue();
+               param.setParameterName(m_sParameterName);
+               param.setParameterDescription(m_sDescription);
+               final AdditionalInfoNumericalValue ainv = new AdditionalInfoNumericalValue(
+                        AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, iDefaultValue, Integer.MIN_VALUE, Integer.MAX_VALUE);
+               param.setParameterAdditionalInfo(ainv);
+            }
+         }
+      }
+
+      if (param != null) {
+         if (param instanceof ParameterBoolean) {
+            //Flags (boolean): prefix a "-" to the name to avoid collision
+            //with option= parameters of the same name (e.g. v.in.ascii has "z=" and "-z"!
+            param.setParameterName("-" + m_sParameterName);
+            param.setParameterDescription("(-" + m_sParameterName + ") " + m_sDescription);
+         }
+         else {
+            param.setParameterName(m_sParameterName);
+            param.setParameterDescription(m_sParameterName);
+         }
+         param.setParameterTooltip(m_sTooltip);
+         try {
+            m_Parameters.addParameter(param);
+         }
+         catch (final RepeatedParameterNameException e) {
+            throw new UnwrappableGrassProcessException();
+         }
+
+         m_sTooltip = null;
+
+         //modify some options that we are unable to support in their original form
+         if (getName().equals("r.colors")) {
+            if (param.getParameterName().equals("map")) {
+               final AdditionalInfoRasterLayer airl = new AdditionalInfoRasterLayer(true);
+               param.setParameterAdditionalInfo(airl);
+            }
+         }
+         //drop some options that we are unable to support in their
+         //TODO: use a helper function: dropParam ( sModuleName, sParamName[] );
+         try {
+            if (getName().equals("r.colors")) {
+               if (param.getParameterName().equals("raster")) {
+                  m_Parameters.removeParameter(param);
+               }
+               if (param.getParameterName().equals("-r")) {
+                  m_Parameters.removeParameter(param);
+               }
+               if (param.getParameterName().equals("-w")) {
+                  m_Parameters.removeParameter(param);
+               }
+               if (param.getParameterName().equals("-i")) {
+                  m_Parameters.removeParameter(param);
+               }
+            }
+            if (getName().equals("r.mapcalculator")) {
+               if (param.getParameterName().equals("help")) {
+                  m_Parameters.removeParameter(param);
+               }
+               if (param.getParameterName().equals("-e")) {
+                  m_Parameters.removeParameter(param);
+               }
+               if (param.getParameterName().equals("-o")) {
+                  m_Parameters.removeParameter(param);
+               }
+            }
+            if (getName().equals("r.null")) {
+               if (param.getParameterName().equals("-c") || param.getParameterName().equals("-n")
+                   || param.getParameterName().equals("-r")) {
+                  m_Parameters.removeParameter(param);
+               }
+            }
+            if (getName().equals("v.what.vect")) {
+               if (param.getParameterName().equals("qlayer")) {
+                  m_Parameters.removeParameter(param);
+               }
+            }
+         }
+         catch (final Exception e) {
+            throw new UnwrappableGrassProcessException();
+         }
+
+      }
+
+
+      if (out != null) {
+         //Set output GRASS map to a name that will have no chance to overwrite an existing map.
+         //Add this stage, we combine GRASS option name and value into one string.
+         //Later, we will have to split those two tokens again into separate strings.
+
+         //volaya: No need to do all that...
+         out.setName(m_sParameterName /*+ "=" + GrassUtils.getTempMapName(m_sParameterName + "_")*/);
+         out.setDescription(m_sDescription /*this.getName() + ": " + m_sParameterName*/);
+         m_OutputObjects.add(out);
+      }
+   }
+
+
+   /*
+    * Process parameter values to guard against common problems.
+    * Some GRASS algorithms cannot be wrapped into a sane UI automatically.
+    * We will adjust those manually.
+    * TODO: there is too much redundant code here: write some helper functions to cut
+    * TODO: down on code complexity.
+    */
+   private void preprocessParams() {
+
+      try {
+         //r.in.gdal: correct bogus default "0" for "band")
+         if (getName().equals("r.in.gdal")) {
+            final Parameter band = m_Parameters.getParameter("band");
+            if (band.getParameterValueAsInt() == 0) {
+               m_Parameters.removeParameter("band");
+            }
+         }
+         //r.in.srtm: drop file extension from input filename)
+         if (getName().equals("r.in.srtm")) {
+            final Parameter input = m_Parameters.getParameter("input");
+            String filename = new String(input.getParameterValueAsString().trim());
+            if (filename.endsWith(".hgt")) {
+               filename = filename.substring(0, filename.lastIndexOf(".hgt"));
+            }
+            if (filename.endsWith(".hgt.zip")) {
+               filename = filename.substring(0, filename.lastIndexOf(".hgt.zip"));
+            }
+         }
+         //r.out.gdal: make sure to wrap "metaopt=" and "createopt=" option values in quotation marks
+         if (getName().equals("r.out.gdal")) {
+            final Parameter metaopt = m_Parameters.getParameter("metaopt");
+            if ((metaopt.getParameterValueAsString() != null) && (metaopt.getParameterValueAsString().trim().length() > 1)) {
+               if (!metaopt.getParameterValueAsString().trim().startsWith("\"")) {
+                  metaopt.setParameterValue("\"" + metaopt.getParameterValueAsString().trim());
+               }
+               if (!metaopt.getParameterValueAsString().trim().endsWith("\"")) {
+                  metaopt.setParameterValue(metaopt.getParameterValueAsString().trim() + "\"");
+               }
+            }
+            final Parameter createopt = m_Parameters.getParameter("createopt");
+            if ((createopt.getParameterValueAsString() != null) && (createopt.getParameterValueAsString().trim().length() > 1)) {
+               if (!createopt.getParameterValueAsString().trim().startsWith("\"")) {
+                  createopt.setParameterValue("\"" + createopt.getParameterValueAsString().trim());
+               }
+               if (!createopt.getParameterValueAsString().trim().endsWith("\"")) {
+                  createopt.setParameterValue(createopt.getParameterValueAsString().trim() + "\"");
+               }
+            }
+         }
+         //v.in.ogr: handle DSN and LAYER name awkwardness
+         if (getName().equals("v.in.ogr")) {
+            final Parameter dsn = m_Parameters.getParameter("dsn");
+            if ((dsn.getParameterValueAsString() == null) || (dsn.getParameterValueAsString().trim().length() < 1)) {
+               final Parameter layer = m_Parameters.getParameter("layer");
+               dsn.setParameterValue(layer.getParameterValueAsString());
+               m_Parameters.removeParameter("layer");
+            }
+         }
+         //v.out.ogr: handle DSN and LAYER name awkwardness
+         if (getName().equals("v.out.ogr")) {
+            final Parameter dsn = m_Parameters.getParameter("dsn");
+            if ((dsn.getParameterValueAsString() == null) || (dsn.getParameterValueAsString().trim().length() < 1)) {
+               final Parameter layer = m_Parameters.getParameter("olayer");
+               final Parameter format = m_Parameters.getParameter("format");
+               final String filename = new String(layer.getParameterValueAsString());
+               String ext_new = "";
+               //Make sure to enclose dsco= option value in quotation marks
+               final Parameter dsco = m_Parameters.getParameter("dsco");
+               if ((dsco.getParameterValueAsString() != null) && (dsco.getParameterValueAsString().trim().length() > 1)) {
+
+                  if (!dsco.getParameterValueAsString().trim().startsWith("\"")) {
+                     dsco.setParameterValue("\"" + dsco.getParameterValueAsString().trim());
+                  }
+                  if (!dsco.getParameterValueAsString().trim().endsWith("\"")) {
+                     dsco.setParameterValue(dsco.getParameterValueAsString().trim() + "\"");
+                  }
+               }
+               //Make sure to enclose lco= option value in quotation marks, too.
+               final Parameter lco = m_Parameters.getParameter("lco");
+               if ((lco.getParameterValueAsString() != null) && (lco.getParameterValueAsString().trim().length() > 1)) {
+                  if (!lco.getParameterValueAsString().trim().startsWith("\"")) {
+                     lco.setParameterValue("\"" + lco.getParameterValueAsString().trim());
+                  }
+                  if (!lco.getParameterValueAsString().trim().endsWith("\"")) {
+                     lco.setParameterValue(lco.getParameterValueAsString().trim() + "\"");
+                  }
+               }
+               if (format.getParameterValueAsString().equals("ESRI_Shapefile")) {
+                  ext_new = new String(".shp");
+               }
+               if (format.getParameterValueAsString().equals("MapInfo_File")) {
+                  ext_new = new String(".tab");
+                  //MapInfo files: switch to ASCII output extension
+                  if ((dsco.getParameterValueAsString() != null) && (dsco.getParameterValueAsString().trim().length() > 1)) {
+                     if (dsco.getParameterValueAsString().trim().contains("")) {
+                        ext_new = new String(".mif");
+                     }
+                  }
+               }
+               if (format.getParameterValueAsString().equals("DGN")) {
+                  ext_new = new String(".dgn");
+               }
+               if (format.getParameterValueAsString().equals("BNA")) {
+                  ext_new = new String(".bna");
+               }
+               if (format.getParameterValueAsString().equals("CSV")) {
+                  ext_new = new String(".csv");
+               }
+               if (format.getParameterValueAsString().equals("GML")) {
+                  ext_new = new String(".gml");
+               }
+               if (format.getParameterValueAsString().equals("GPX")) {
+                  ext_new = new String(".gpx");
+               }
+               if (format.getParameterValueAsString().equals("KML")) {
+                  ext_new = new String(".kml");
+               }
+               if (format.getParameterValueAsString().equals("GeoJSON")) {
+                  ext_new = new String(".geojson");
+               }
+               if (format.getParameterValueAsString().equals("GMT")) {
+                  ext_new = new String(".gmt");
+               }
+               if (format.getParameterValueAsString().equals("Geoconcept")) {
+                  ext_new = new String(".gxt");
+               }
+               if (!filename.toLowerCase().endsWith(ext_new)) {
+                  layer.setParameterValue(filename + ext_new);
+               }
+               dsn.setParameterValue(layer.getParameterValueAsString());
+               m_Parameters.removeParameter("olayer");
+            }
+         }
+         //v.to.3d: circumvent SEXTANTE parsing problem ("height" must be set)
+         if (getName().equals("v.to.3d")) {
+            final Parameter column = m_Parameters.getParameter("column");
+            if ((column.getParameterValueAsString() != null) && (column.getParameterValueAsString().trim().length() > 0)) {
+               m_Parameters.removeParameter("height");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog("Error parsing parameters for GRASS module " + this.getName() + "\n");
+      }
+
+      //Drop all parameters that have no value (except flags)
+      final ArrayList remove = new ArrayList();
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         if (!(param instanceof ParameterBoolean)) {
+            try {
+               if ((param instanceof ParameterMultipleInput)) {
+                  final ArrayList sValues = param.getParameterValueAsArrayList();
+                  if (sValues.size() < 1) {
+                     remove.add(param.getParameterName());
+                  }
+               }
+               else {
+                  final String value = new String(param.getParameterValueAsString());
+                  if ((value == null) || (value.trim().length() < 1)) {
+                     remove.add(param.getParameterName());
+                  }
+               }
+            }
+            catch (final Exception e) {}
+         }
+      }
+      for (int i = 0; i < remove.size(); i++) {
+         try {
+            m_Parameters.removeParameter((String) remove.get(i));
+         }
+         catch (final Exception e) {}
+      }
+
+      //quote all parameter strings that have whitespace
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         try {
+            final String value = new String(param.getParameterValueAsString());
+            if (value.contains(" ")) {
+               param.setParameterValue((String) "\"" + value.trim() + "\"");
+            }
+         }
+         catch (final Exception e) {}
+      }
+
+   }
+
+
+   /*
+    * Further processing of GRASS module options, after data was imported
+    * but before the actual GRASS module is run.
+    */
+   private void preprocessBeforeExec() {
+      try {
+
+         //r.mapcalc: subsitute mapnames in formula
+         if (getName().equals("r.mapcalculator")) {
+            final Parameter formula = m_Parameters.getParameter("formula");
+            if ((formula.getParameterValueAsString() != null) && (formula.getParameterValueAsString().trim().length() > 0)) {
+               String expression = formula.getParameterValueAsString().trim();
+               //Now we substitute all *map parameters.
+               //We'll be tolerant: user can say "amap", but also "A" etc.
+               //We don't know which maps have been specified, so we try/catch all of them.
+               final String long_names[] = { "amap", "bmap", "cmap", "dmap", "emap", "fmap" };
+               final String short_names[] = { "A", "B", "C", "D", "E", "F" };
+               for (int i = 0; i < long_names.length; i++) {
+                  try {
+                     final Parameter map = m_Parameters.getParameter(long_names[i]);
+                     final String filename = ((FileOutputChannel) map.getParameterValueAsRasterLayer().getOutputChannel()).getFilename();
+                     final String subst = getInFile(filename);
+                     if ((subst != null) && (subst.trim().length() > 0)) {
+                        expression = expression.replace(short_names[i], subst);
+                        expression = expression.replace(long_names[i], subst);
+                     }
+                  }
+                  catch (final Exception map_e) {}//These are all harmless
+               }
+               formula.setParameterValue("\"" + expression + "\"");
+            }
+         }
+
+
+      }
+      catch (final Exception e) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("grass_warning_postprocess"),
+                  Sextante.getText("grass_warning_title"), JOptionPane.WARNING_MESSAGE);
+      }
+   }
+
+
+   /*
+    * post-process parameter values to guard against common problems.
+    * The code here fixes any issues that must be taken care of before
+    * data can be exported.
+    */
+   private void postProcessBeforeExport() {
+      try {
+         //v.distance: need to export values uploaded into existing attribute table field(s)
+         if (getName().equals("v.distance")) {
+            final Parameter column = m_Parameters.getParameter("column");
+            if ((column.getParameterValueAsString() != null) && (column.getParameterValueAsString().trim().length() > 0)) {
+               final Parameter from = m_Parameters.getParameter("from");
+               final String mapname = new String(
+                        getInFile(((FileOutputChannel) from.getParameterValueAsVectorLayer().getOutputChannel()).getFilename()));
+               final Parameter upload = m_Parameters.getParameter("upload");
+               final Output tmpOut = new OutputVectorLayer();
+               tmpOut.setDescription("v.distance (+" + upload.getParameterValueAsString().trim() + ")");
+               tmpOut.setName(mapname);
+               m_OutputObjects.add(tmpOut);
+               tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+            }
+         }
+         //v.edit: directly manipulates input map
+         if (getName().equals("v.edit")) {
+            final Parameter map = m_Parameters.getParameter("map");
+            final String filename = ((FileOutputChannel) map.getParameterValueAsVectorLayer().getOutputChannel()).getFilename();
+            final String mapname = new String(getInFile(filename));
+            final Output tmpOut = new OutputVectorLayer();
+            tmpOut.setDescription("v.edit (edited)");
+            tmpOut.setName(mapname);
+            m_OutputObjects.add(tmpOut);
+            tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+         }
+         //v.what.vect: directly manipulates input map
+         if (getName().equals("v.what.vect")) {
+            final Parameter vector = m_Parameters.getParameter("vector");
+            final String filename = ((FileOutputChannel) vector.getParameterValueAsVectorLayer().getOutputChannel()).getFilename();
+            final String mapname = new String(getInFile(filename));
+            final Output tmpOut = new OutputVectorLayer();
+            tmpOut.setDescription("v.what.vect (query)");
+            tmpOut.setName(mapname);
+            m_OutputObjects.add(tmpOut);
+            tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+         }
+         //r.null: directly manipulates input map
+         if (getName().equals("r.null")) {
+            final Parameter map = m_Parameters.getParameter("map");
+            final String filename = ((FileOutputChannel) map.getParameterValueAsRasterLayer().getOutputChannel()).getFilename();
+            final String mapname = new String(getInFile(filename));
+            final Output tmpOut = new OutputRasterLayer();
+            tmpOut.setDescription("r.null (null)");
+            tmpOut.setName(mapname);
+            m_OutputObjects.add(tmpOut);
+            tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+         }
+         //r.colors: directly manipulates input map
+         if (getName().equals("r.colors")) {
+            final Parameter map = m_Parameters.getParameter("map");
+            final String filename = ((FileOutputChannel) map.getParameterValueAsRasterLayer().getOutputChannel()).getFilename();
+            final String mapname = new String(getInFile(filename));
+            final Output tmpOut = new OutputRasterLayer();
+            tmpOut.setDescription("r.colors (colors)");
+            tmpOut.setName(mapname);
+            m_OutputObjects.add(tmpOut);
+            tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+         }
+         //r.colors.stddev: directly manipulates input map
+         if (getName().equals("r.colors.stddev")) {
+            final Parameter input = m_Parameters.getParameter("input");
+            final String filename = ((FileOutputChannel) input.getParameterValueAsRasterLayer().getOutputChannel()).getFilename();
+            final String mapname = new String(getInFile(filename));
+            final Output tmpOut = new OutputRasterLayer();
+            tmpOut.setDescription("r.colors.stddev (colors)");
+            tmpOut.setName(mapname);
+            m_OutputObjects.add(tmpOut);
+            tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+         }
+
+
+      }
+      catch (final Exception e) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("grass_warning_postprocess"),
+                  Sextante.getText("grass_warning_title"), JOptionPane.WARNING_MESSAGE);
+      }
+
+   }
+
+   
+   /*
+    * Normally, GRASS always works on ALL features in a vector map, regardless
+    * of the extent of the computational region. But this is not how SEXTANTE
+    * works by default.
+    * Therefore, we take the extents of the computational region and pass them
+    * as a spatial= option to v.in.ogr.
+    * This filter can be toggled of by the user in the SEXTANTE GRASS settings.
+    */
+   private String applyBBoxFilter ( final IVectorLayer layer ) 
+   {
+	   String result = new String ("");
+
+	   final boolean noVectBBox = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_NO_VECT_BBOX)).booleanValue();
+       if (noVectBBox) {
+          return result;
+       }	   
+	   
+	   result += " spatial=";
+
+	   result += m_AnalysisExtent.getXMin() +",";
+	   result += m_AnalysisExtent.getYMin() +",";
+	   result += m_AnalysisExtent.getXMax() +",";
+	   result += m_AnalysisExtent.getYMax();
+
+	   return result;
+   }
+
+   
+   /* Try to duplicate any selection filters.
+    * This will translate the IDs of selected features (if the host GIS supports this)
+    * into ranges of the form "1-3","8-14", etc.
+    * We will then pass these to v.extract to get only the selected features from
+    * the imported map. The string returned by this method contains a number of GRASS
+    * command that must be run AFTER v.in.ogr.
+    */
+   private String applySelectionFilter ( final IVectorLayer layer, final String mapname, List<Integer> keys )
+   {
+	   String result = new String ("");
+	   final List<IVectorLayerFilter> filterList = layer.getFilters(); 
+	   String line = new String ();
+	   int numFilters = filterList.size();
+
+	   for ( int iFilter = 0; iFilter < numFilters; iFilter ++ ) {
+		   IVectorLayerFilter Filter = filterList.get(iFilter);
+		   if ( Filter instanceof SelectionFilter ) {
+			   List<String> rangesList = new ArrayList<String>();
+			   int start=-2;
+			   int end=-2;
+			   boolean range_open = false;
+			   for ( int iFeature = 0; iFeature < ((SelectionFilter)Filter).getLast(); iFeature ++ ) {
+				   boolean selected;
+				   selected = filterList.get(iFilter).accept(null, iFeature);
+				   if ( selected ) {
+					   if ( iFeature > (end+1) ) {
+						   if ( end != - 2 ) {
+							   /* create new range */
+							   if ( start == end ) {
+								   line = (start+1) + "";
+							   } else {
+								   line = (start+1) + "-" + (end+1);
+							   }
+							   for ( int i = start+1; i <= end+1; i ++ ) {
+								   keys.add(i);
+							   }
+							   rangesList.add(line);
+							   range_open = false;
+							   start = iFeature;
+						   } else {
+							   start = iFeature;
+						   }
+						   end = iFeature;
+						   range_open = true;
+					   } else {
+						   end = iFeature;
+					   }
+				   }
+			   }
+			   if ( range_open == true ) {
+				   /* create new range */
+				   if ( start == end ) {
+					   line = (start+1) + "";
+				   } else {
+					   line = (start+1) + "-" + (end+1);
+				   }
+				   for ( int i = start+1; i <= end+1; i ++ ) {
+					   keys.add(i);
+				   }				   
+				   rangesList.add(line);
+			   }
+			   /*
+			    * Build the v.extract command line needed to remove all features except
+			    * the selected ones
+			    */
+			   if ( rangesList.size() > 0 ) {
+				   result = "v.extract --quiet --overwrite input=" + mapname + " output=" + mapname + "2" + " list=";
+				   for ( int iRange = 0; iRange < rangesList.size(); iRange ++ ) {
+					   if ( iRange < (rangesList.size()-1) ) {
+						   result += rangesList.get(iRange) + ",";
+					   }
+					   else {
+						   result += rangesList.get(iRange);
+					   }					   
+				   }
+				   result += "\n";				   
+			   }
+		   }
+	   }
+	   /* if a selection was extracted: swap extraction with original data */
+	   if ( result.length() > 1 ) {		   
+		   result += "g.remove vect=" + mapname + " --quiet\n";
+		   result += "g.rename vect=" + mapname + "2," + mapname +" --quiet\n";
+	   }
+
+	   return result;
+   }
+   
+   
+   @Override
+   public void defineCharacteristics() {}
+
+
+   /**
+    * PROCESS THE GRASS ALGORITHM 
+    * This method imports geodata from external sources in the GRASS mapset,
+    * runs the GRASS algorithm (module) on it and then exports the results back 
+    * as new SEXTANTE layers.
+    */
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final boolean bIsInPolylines = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_IN_POLYLINES)).booleanValue();
+
+      StringBuffer sCommand = new StringBuffer();
+
+      boolean gotKilled = false;
+      GrassUtils.setInterruptible(true);
+
+      //Preprocess some tricky parameters
+      preprocessParams();
+
+      //Send starting message to log viewer
+      final String modName = new String("| STARTING GRASS module: " + this.getName() + " |");
+      GrassAlgorithmProvider.addMessage("   ");
+      final StringBuffer decoration = new StringBuffer("+");
+      for (int i = 0; i < (modName.length() - 2); i++) {
+         decoration.append("-");
+      }
+      decoration.append("+");
+      GrassAlgorithmProvider.addMessage(decoration.toString());
+      GrassAlgorithmProvider.addMessage(modName);
+      GrassAlgorithmProvider.addMessage(decoration.toString());
+      GrassAlgorithmProvider.addMessage("   ");
+
+      /* Create a temporary GRASS mapset */
+      try {
+         GrassUtils.createTempMapset();
+      }
+      catch (final IOException e) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("GRASS_error_create_temp_mapset") + "\n" + e.getMessage(), "",
+                  JOptionPane.ERROR_MESSAGE);
+      }
+
+      //Initialize "files<->GRASS maps" relations arrays
+      m_FilesIn = new ArrayList<String>();
+      m_MapsIn = new ArrayList<String>();
+
+      //Get GISDBASE, LOCATION and MAPSET from String parameter
+      final String mapset = new String(GrassUtils.getGrassMapsetFolder().substring(GrassUtils.getGrassMapsetFolder().lastIndexOf(File.separator) + 1,
+    		  GrassUtils.getGrassMapsetFolder().length()));
+      final String path = new String(GrassUtils.getGrassMapsetFolder().substring(0, GrassUtils.getGrassMapsetFolder().lastIndexOf(File.separator)));
+      final String location = new String(path.substring(path.lastIndexOf(File.separator) + 1, path.length()));
+      final String gisdbase = new String(path.substring(0, path.lastIndexOf(File.separator)));      
+      
+      final boolean bCompatMode = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_COMPATIBILITY_MODE)).booleanValue();
+      
+      //Default DB driver is SQLite, but if it is not supported, then DBF will
+      //be the fallback choice.
+      if ( bCompatMode == false ) {
+    	  sCommand.append("db.connect driver=sqlite database='"+gisdbase+File.separator+location+File.separator+mapset+File.separator+"sqlite.db'\n");
+      }
+      
+      //Set GRASS region
+      if (getUserCanDefineAnalysisExtent()) {
+    	 if ( 	(m_AnalysisExtent.getYMin() == m_AnalysisExtent.getYMax()) || 
+    			(m_AnalysisExtent.getXMin() == m_AnalysisExtent.getXMax()) ) {
+    		 // This can happen if we are running in iterative execution mode.
+    		 sCommand.append("g.region");
+    		 sCommand.append(" n=1");
+    		 sCommand.append(" s=0");
+    		 sCommand.append(" e=1");
+    		 sCommand.append(" w=0");
+    		 sCommand.append(" res=" + Double.toString(m_AnalysisExtent.getCellSize()) + "\n");
+    	 } else {
+    		 sCommand.append("g.region");
+    		 sCommand.append(" n=" + Double.toString(m_AnalysisExtent.getYMax()));
+    		 sCommand.append(" s=" + Double.toString(m_AnalysisExtent.getYMin()));
+    		 sCommand.append(" e=" + Double.toString(m_AnalysisExtent.getXMax()));
+    		 sCommand.append(" w=" + Double.toString(m_AnalysisExtent.getXMin()));
+    		 sCommand.append(" res=" + Double.toString(m_AnalysisExtent.getCellSize()) + "\n");
+    	 }
+      }
+
+      //
+      //PREPROCESSING: SET GRASS REGION
+      //
+      try {
+         GrassUtils.runGRASS(sCommand, "Setting GRASS region:", this);
+      }
+      catch (final Exception e) {
+         gotKilled = true;
+      }
+
+      sCommand = new StringBuffer();
+
+      final ArrayList<String> rasterLayers = new ArrayList<String>();
+      final ArrayList<String> vectorLayers = new ArrayList<String>();
+
+      //Commands for using external layers into grass location
+      String sFilename;
+      File file;
+
+      //Import raster layers: single layer input options
+      ArrayList layers = m_Parameters.getParametersOfType(ParameterRasterLayer.class);
+      for (int i = 0; i < layers.size(); i++) {
+         final IRasterLayer layer = ((ParameterRasterLayer) layers.get(i)).getParameterValueAsRasterLayer();
+         if (layer != null) {
+            final IOutputChannel channel = layer.getOutputChannel();
+            if (channel instanceof FileOutputChannel) {
+               sFilename = ((FileOutputChannel) channel).getFilename();
+            }
+            else {
+               throw new GeoAlgorithmExecutionException(
+                        Sextante.getText("Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers"));
+            }
+
+            //Create a safe GRASS map name for the imported layer
+            final String sGrassName = GrassUtils.getTempMapName();
+
+            //Import or attach raster layer via GDAL
+            if ( bCompatMode == true ) {
+            	sCommand.append("r.in.gdal");
+            } else { 
+            	sCommand.append("r.external");
+            }
+            sCommand.append(" input=\"" + sFilename + "\"");
+            sCommand.append(" band=1");
+            sCommand.append(" output=" + sGrassName);
+            sCommand.append(" --overwrite -o\n");
+            rasterLayers.add(sGrassName);
+
+            //Map relation between imported file and new GRASS map.
+            //We will need this later to substitute the GRASS input options.
+            registerInMapping(sFilename, sGrassName);
+         }
+      }
+
+      //Import raster layers: multiple layer input options (e.g. r.patch)
+      ArrayList multiLayers = m_Parameters.getParametersOfType(ParameterMultipleInput.class);
+      for (int i = 0; i < multiLayers.size(); i++) {
+         final AdditionalInfo ai = ((ParameterMultipleInput) multiLayers.get(i)).getParameterAdditionalInfo();
+         if (((AdditionalInfoMultipleInput) ai).getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+            final ArrayList layerList = ((ParameterMultipleInput) multiLayers.get(i)).getParameterValueAsArrayList();
+            for (int j = 0; j < layerList.size(); j++) {
+               //Run the input procedure as many times as we have input maps for this multiple maps option...
+               final IRasterLayer layer = ((IRasterLayer) layerList.get(j));
+               if (layer != null) {
+                  final IOutputChannel channel = layer.getOutputChannel();
+                  if (channel instanceof FileOutputChannel) {
+                     sFilename = ((FileOutputChannel) channel).getFilename();
+                  }
+                  else {
+                     throw new GeoAlgorithmExecutionException(
+                              Sextante.getText("Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers"));
+                  }
+
+                  //Create a safe GRASS map name for the imported layer
+                  final String sGrassName = GrassUtils.getTempMapName();
+
+                  //Import or attach raster layer via GDAL
+                  if ( bCompatMode == true ) {
+                  	sCommand.append("r.in.gdal");
+                  } else { 
+                  	sCommand.append("r.external");
+                  }
+                  sCommand.append(" input=\"" + sFilename + "\"");
+                  sCommand.append(" band=1");
+                  sCommand.append(" output=" + sGrassName);
+                  sCommand.append(" --overwrite -o\n");
+                  rasterLayers.add(sGrassName);
+                  
+                  //Add NULL value mask if SEXTANTE null value is forwarded
+                  final boolean bSEXTANTENull = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_USE_SEXTANTE_NULL)).booleanValue();
+                  if (bSEXTANTENull == true ) { 
+                	  sCommand.append("r.null map=" + sGrassName);
+                	  sCommand.append(" setnull=\"" + Double.toString(SextanteGUI.getOutputFactory().getDefaultNoDataValue()) + "\"");
+                	  sCommand.append("\n");
+                  }
+
+                  //Map relation between imported file and new GRASS map.
+                  //We will need this later to substitute the GRASS input options.
+                  //registerInMapping( file.getName(), sGrassName);
+                  registerInMapping(sFilename, sGrassName);
+               }
+            }
+         }
+      }
+
+      //Attaching vector layers as external OGR datasets is problematic, we will
+      //import them as a new GRASS map instead. This consumes extra time and diskspace,
+      //but it is much more robust.
+
+      //Import vector layers: single layer input options
+      layers = m_Parameters.getParametersOfType(ParameterVectorLayer.class);
+
+      boolean bRunIteratively = false;
+      String sIterMap = null;
+      int iIteration = -1;
+      //"keys" is were we keep the original cat values in strictly increasing order
+      List<Integer> keys = new ArrayList<Integer>();
+      
+      for (int i = 0; i < layers.size(); i++) {
+         IVectorLayer layer = ((ParameterVectorLayer) layers.get(i)).getParameterValueAsVectorLayer();
+         if (layer != null) {
+            IOutputChannel channel = layer.getOutputChannel();
+            
+            sFilename="";
+            
+            if (channel instanceof FileOutputChannel) {
+                sFilename = ((FileOutputChannel) channel).getFilename();
+            }            
+            else {
+                if (channel == null) {
+                	//This can happen if we are running in iterative mode.
+                	if ( layer instanceof SingleFeatureVectorLayer ) {
+                		iIteration = ((SingleFeatureVectorLayer)layer).getID();
+                		layer = ((SingleFeatureVectorLayer)layer).getOriginalLayer();
+                		channel = layer.getOutputChannel();
+                		sFilename = ((FileOutputChannel) channel).getFilename();
+                		bRunIteratively = true;
+                	} else {
+                		throw new GeoAlgorithmExecutionException(Sextante.getText("output_channel_null"));
+                	}
+                } else {
+                	//TODO: implement support for PostGIS here!
+                    throw new GeoAlgorithmExecutionException(
+                            Sextante.getText("Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers"));
+                }
+            }
+            
+            file = new File(sFilename);
+            final String sName = file.getName().substring(0, file.getName().indexOf('.'));
+            
+            //Create a safe GRASS map name for the imported layer
+            final String sGrassName = GrassUtils.getTempMapName();
+            if ( bRunIteratively ) {
+            	sIterMap = new String (sGrassName);
+            }
+            //Check for selection filter
+            String sSelectionFilter = new String (applySelectionFilter(layer,sGrassName,keys));
+            //build v.in.ogr command
+            sCommand.append("v.in.ogr");
+            String sParent = file.getParent();
+            if (sParent.endsWith(File.separator)) {
+               sParent = sParent.substring(0, sParent.length() - 1);
+            }
+            if (bIsInPolylines) {
+               sCommand.append(" type=line");
+            }
+            sCommand.append(" min_area=-1");//Make sure to import every polygon
+            sCommand.append(" dsn=\"" + sParent + "\"");
+            sCommand.append(" layer=" + sName);            
+            sCommand.append(" output=" + sGrassName);
+            String sBoxFilter = applyBBoxFilter(layer);
+            //Apply a bounding box filter (bbox set to current region),
+            //only if we are not running in iterative mode,
+            //and the user has not set GRASS to ignore the region for vector input,
+            //and there is no active selection filter
+            if ( ( sBoxFilter.length() > 1 ) && (bRunIteratively == false ) && ( sSelectionFilter.length() < 1 ) ) {
+            	sCommand.append ( sBoxFilter );
+            }
+            sCommand.append(" --overwrite -o");
+            final boolean bCleanPolygons = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_CLEAN_POLYGONS)).booleanValue();
+            if (!bCleanPolygons) {
+               sCommand.append(" -c");
+            }
+            final boolean bIs3DVMode = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_3D_V_MODE)).booleanValue();
+            if (bIs3DVMode) {
+               sCommand.append(" -z");
+            }
+            sCommand.append("\n");
+            
+            //If there is a selection filter: apply it now!
+            if ( sSelectionFilter.length() > 1 ) {
+            	sCommand.append ( sSelectionFilter );
+            }
+            
+            //If running in iterative mode, we extract only the one feature needed
+            //for the present iteration and work on the resulting 1-feature map.
+            if ( bRunIteratively ) {
+            	sCommand.append("v.extract --quiet --overwrite");
+            	sCommand.append(" input=" + sIterMap);
+            	sCommand.append(" output=" + sIterMap + "2");
+            	if ( sSelectionFilter.length() > 1 ) {
+            		//If we have a selection, then we need to retrieve the original keys
+            		sCommand.append(" list=" + keys.get(iIteration-1));
+            	} else {
+            		sCommand.append(" list=" + iIteration);
+            	}
+            	sCommand.append("\n");
+            	sCommand.append("g.remove vect=" + sIterMap);
+            	sCommand.append(" --quiet");
+            	sCommand.append("\n");
+            	sCommand.append("g.rename vect=" + sIterMap + "2");
+            	sCommand.append("," + sIterMap);
+            	sCommand.append(" --quiet");
+            	sCommand.append("\n");
+            }
+            
+            vectorLayers.add(sGrassName);
+                        
+            //Map relation between imported file and new GRASS map.
+            //We will need this later to substitute the GRASS input options.
+            registerInMapping(sFilename, sGrassName);            
+         }
+      }
+
+      //Import vector layers: multiple layer input options (e.g. v.patch)
+      multiLayers = m_Parameters.getParametersOfType(ParameterMultipleInput.class);
+      for (int i = 0; i < multiLayers.size(); i++) {
+         final AdditionalInfo ai = ((ParameterMultipleInput) multiLayers.get(i)).getParameterAdditionalInfo();
+         if (((AdditionalInfoMultipleInput) ai).getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY) {
+            final ArrayList layerList = ((ParameterMultipleInput) multiLayers.get(i)).getParameterValueAsArrayList();
+            for (int j = 0; j < layerList.size(); j++) {
+               //Run the input procedure as many times as we have input maps for this multiple maps option...
+               final IVectorLayer layer = ((IVectorLayer) layerList.get(j));
+               if (layer != null) {
+                  final IOutputChannel channel = layer.getOutputChannel();
+                  if (channel instanceof FileOutputChannel) {
+                     sFilename = ((FileOutputChannel) channel).getFilename();
+                  }
+                  else {
+                     throw new GeoAlgorithmExecutionException(
+                              Sextante.getText("Input_layers_are_not_compatible_with_GRASS_usage_\nMust_be_file-based_layers"));
+                  }
+                  file = new File(sFilename);
+                  final String sName = file.getName().substring(0, file.getName().indexOf('.'));
+
+                  //Create a safe GRASS map name for the imported layer
+                  final String sGrassName = GrassUtils.getTempMapName();
+                  //Check for selection filter
+                  String sSelectionFilter = new String (applySelectionFilter(layer,sGrassName,keys));
+                  //build v.in.ogr command
+                  sCommand.append("v.in.ogr");
+                  String sParent = file.getParent();
+                  if (sParent.endsWith(File.separator)) {
+                     sParent = sParent.substring(0, sParent.length() - 1);
+                  }
+                  if (bIsInPolylines) {
+                     sCommand.append(" type=line");
+                  }
+                  sCommand.append(" min_area=-1");//Make sure to import every polygon
+                  sCommand.append(" dsn=\"" + sParent + "\"");
+                  sCommand.append(" layer=" + sName);
+                  sCommand.append(" output=" + sGrassName);
+                  String sBoxFilter = applyBBoxFilter(layer);
+                  //Apply a bounding box filter (bbox set to current region),
+                  //only if the user has not set GRASS to ignore the region for vector input,
+                  //and there is no active selection filter
+                  if ( ( sBoxFilter.length() > 1 ) && ( sSelectionFilter.length() < 1 ) ) {
+                  	sCommand.append ( sBoxFilter );
+                  }                  
+                  sCommand.append(" --overwrite -o");
+                  final boolean bCleanPolygons = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_CLEAN_POLYGONS)).booleanValue();
+                  if (!bCleanPolygons) {
+                     sCommand.append(" -c");
+                  }            
+                  final boolean bIs3DVMode = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_3D_V_MODE)).booleanValue();
+                  if (bIs3DVMode) {
+                     sCommand.append(" -z");
+                  }
+                  sCommand.append("\n");                  
+
+                  //If there is a selection filter: apply it now!
+                  if ( sSelectionFilter.length() > 1 ) {
+                  	sCommand.append ( sSelectionFilter );
+                  }
+                  
+                  vectorLayers.add(sGrassName);
+
+                  //Map relation between imported file and new GRASS map.
+                  //We will need this later to substitute the GRASS input options.
+                  registerInMapping(sFilename, sGrassName);
+               }
+            }
+         }
+      }
+
+
+      //
+      //PROCESSING STEP ONE: IMPORT DATA INTO GRASS MAPSET
+      //
+      if (m_MapsIn.size() > 0) {
+         GrassAlgorithmProvider.addMessage("   ");
+         GrassAlgorithmProvider.addMessage("[IMPORTING data into GRASS]");
+         GrassAlgorithmProvider.addMessage("   ");
+         setProgressText("Importing data...");
+         if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+            try {            	
+               GrassUtils.runGRASS(sCommand, "Importing data into GRASS:", this);
+            }
+            catch (final Exception e) {
+               gotKilled = true;
+            }
+         }
+      }
+
+      sCommand = new StringBuffer();
+
+      //Check whether import was successful and abort, if not.
+      //This is easy, we just need to check if the new raster map's data exists on disk.
+      //In the case of a raster map, a file with the temp name must exist in the "cellhd" directory.
+      //In the case of a vector map, it's a directory with the temp name.
+      //Step through all entries in the file <-> GRASS map relations array and see if they exists in either form (good enough).
+      for (int i = 0; i < m_MapsIn.size(); i++) {
+         final File rasterfile = new File(GrassUtils.getGrassMapsetFolder() + File.separator + "cellhd" + File.separator
+                                          + m_MapsIn.get(i));
+         final File vectordir = new File(GrassUtils.getGrassMapsetFolder() + File.separator + "vector" + File.separator
+                                         + m_MapsIn.get(i));
+         if (!rasterfile.exists() && !vectordir.exists()) {
+            JOptionPane.showMessageDialog(null, Sextante.getText("grass_error_import_failed"),
+                     Sextante.getText("grass_error_title"), JOptionPane.ERROR_MESSAGE);
+            throw new GrassExecutionException();
+         }
+      }
+      
+      //resolve temporary output files
+      for (int i = 0; i < m_OutputObjects.getOutputDataObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         out.setOutputChannel(this.getOutputChannel(out.getName()));
+      }
+      
+      //Process some more parameters: after data was imported, but before it gets
+      //processed.
+      preprocessBeforeExec();
+      
+      //Command for executing the algorithm
+      sCommand.append(this.getName());
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         if (param.getParameterName().equals(PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE)) {
+            continue;
+         }
+         if (param instanceof ParameterBoolean) {
+            //GRASS processing flags
+            if (param.getParameterValueAsBoolean()) {
+               sCommand.append(" " + param.getParameterName());//flags already contain the "-" as part of their names!
+            }
+         }
+         else {
+            if (param instanceof ParameterDataObject) {
+               //GRASS input map(s)
+               final IDataObject dataObject = (IDataObject) ((ParameterDataObject) param).getParameterValueAsObject();
+               if (dataObject != null) {
+                   //Substitute option value with the name of the GRASS map that relates
+                   //to this input file.
+                  sCommand.append(" ");
+                  sCommand.append(param.getParameterName());
+                  sCommand.append("=");
+                  if ( bRunIteratively ) {
+                	  file = new File (sIterMap);
+                	  sCommand.append(sIterMap);
+                  } else {
+                      file = new File(((FileOutputChannel) dataObject.getOutputChannel()).getFilename());
+                      sCommand.append(getInFile(((FileOutputChannel) dataObject.getOutputChannel()).getFilename()));
+                  }
+               }
+            }
+            else {
+               if (param instanceof ParameterMultipleInput) {
+                  final ArrayList sValues = param.getParameterValueAsArrayList();
+                  sCommand.append(" ");
+                  sCommand.append(param.getParameterName());
+                  sCommand.append("=");
+                  //Check if it's a list of input maps or just strings
+                  final AdditionalInfo ai = ((ParameterMultipleInput) param).getParameterAdditionalInfo();
+                  if ((((AdditionalInfoMultipleInput) ai).getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER)
+                      || (((AdditionalInfoMultipleInput) ai).getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)) {
+                     //Got input Maps: Substitute file names for GRASS temp map names
+                     for (int j = 0; j < sValues.size(); j++) {
+                        if (((AdditionalInfoMultipleInput) ai).getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+                           final IRasterLayer layer = ((IRasterLayer) sValues.get(j));
+                           sFilename = new String(((FileOutputChannel) layer.getOutputChannel()).getFilename());
+                        }
+                        else {
+                           final IVectorLayer layer = ((IVectorLayer) sValues.get(j));
+                           sFilename = new String(((FileOutputChannel) layer.getOutputChannel()).getFilename());
+                        }
+                        sCommand.append(getInFile(sFilename));
+                        if (j < (sValues.size() - 1)) {
+                           sCommand.append(",");
+                        }
+                     }
+                  }
+                  else {
+                     //Got something else: Just append option values
+                     for (int k = 0; k < sValues.size(); k++) {
+                        sCommand.append(sValues.get(k));
+                        if (k < (sValues.size() - 1)) {
+                           sCommand.append(",");
+                        }
+                     }
+                  }
+               }
+               /*
+               else { 
+               if (param instanceof ParameterNumericalValue) {        	 
+                   //Numerical values can be passed as strings
+                   final String sValue = param.getParameterValueAsString();
+                   if ((sValue != null) && !sValue.trim().equals("")) {
+                      sCommand.append(" ");
+                      sCommand.append(param.getParameterName());
+                      sCommand.append("=");
+                      sCommand.append(sValue);
+                   }
+               } 
+               */        
+
+               else {
+                  //Any other GRASS option: should be just a simple string
+                  final String sValue = param.getParameterValueAsString();
+                  if ((sValue != null) && !sValue.trim().equals("")) {
+                     sCommand.append(" ");
+                     sCommand.append(param.getParameterName());
+                     sCommand.append("=");
+                     sCommand.append(sValue);
+                  }
+               }
+            }
+         }         
+      }
+      
+      for (int i = 0; i < m_OutputObjects.getOutputDataObjectsCount(); i++) {
+         //All GRASS options that create output
+         final Output out = m_OutputObjects.getOutput(i);
+         final IOutputChannel channel = out.getOutputChannel();
+         if (!(channel instanceof NullOutputChannel)) {
+            sCommand.append(" ");
+            sCommand.append(out.getName() + "=" + out.getName());
+         }
+         //Modify name of output option (drop option name) for further processing
+         //final String tmpString = out.getName();
+         //out.setName(tmpString.substring(tmpString.indexOf('=') + 1));
+      }
+
+      sCommand.append(" --overwrite\n");
+
+
+      //
+      //PROCESSING STEP TWO: Run GRASS command
+      //
+      GrassAlgorithmProvider.addMessage("   ");
+      GrassAlgorithmProvider.addMessage("[EXECUTING GRASS command]");
+      GrassAlgorithmProvider.addMessage("   ");
+      String cmd = sCommand.toString();
+      for (int i = 0; i < m_MapsIn.size(); i++) {
+         cmd = cmd.replace(m_MapsIn.get(i), "<" + m_FilesIn.get(i) + ">");
+      }
+      //Use a regular expression for those internal map names that cannot be fully resolved
+      cmd = cmd.replaceAll("([_][a-z0-9]{8}[_][a-z0-9]{4}[_][a-z0-9]{4}[_][a-z0-9]{4}[_][a-z0-9]{12})", "[TMP]");
+      cmd = cmd.substring(0, cmd.length() - 1);
+      GrassAlgorithmProvider.addMessage(cmd);
+      GrassAlgorithmProvider.addMessage("   ");
+      setProgress(0, 100);
+      setProgressText("Processing...");
+      if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+         try {
+            GrassUtils.runGRASS(sCommand, "Running GRASS command:", this);
+         }
+         catch (final Exception e) {
+            gotKilled = true;
+         }
+      }
+
+      sCommand = new StringBuffer();
+
+      //Run any post-processing code that may be necessary,
+      //after running the GRASS command but before exporting the data
+      if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+         postProcessBeforeExport();
+      }
+
+      //Commands for exporting results to non-grass format (shapefile)
+      //Alas: ESRI shapefiles only support one geometry type per file.
+      //So: split all GRASS multi-geom maps into single-geom maps.
+      //Create new output objects for the new maps.
+      //Delete old multi-geom map.
+      if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+         final int numRuns = m_OutputObjects.getOutputDataObjectsCount();
+         for (int i = 0; i < numRuns; i++) {
+            final Output out = m_OutputObjects.getOutput(i);
+            final IOutputChannel channel = out.getOutputChannel();
+            if (channel instanceof NullOutputChannel) {
+               continue;
+            }
+            if (out instanceof OutputVectorLayer) {
+               /* it's a vector layer: check geometry types */
+               if (GrassUtils.isMultiGeom(out.getName()) == true) {
+                  //We have a multiple geometry map: split it up!
+                  final StringBuffer sSplitCommand = new StringBuffer();
+                  /* separate out points and kernels */
+                  if (GrassVInfoUtils.getNumPolygons(out.getName()) > 0) {
+                     final String sTempMap = new String(GrassUtils.getTempMapName());
+                     sSplitCommand.append("v.extract type=area input=");
+                     sSplitCommand.append(out.getName());
+                     sSplitCommand.append(" output=");
+                     sSplitCommand.append(sTempMap);
+                     sSplitCommand.append("\n");
+                     //Add to list of layers to delete later
+                     vectorLayers.add(sTempMap);
+                     //Create new output object
+                     final Output tmpOut = new OutputVectorLayer();
+                     tmpOut.setDescription(out.getDescription() + " (polygons)");
+                     tmpOut.setName(sTempMap);
+                     m_OutputObjects.add(tmpOut);
+                     tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+                  }
+                  if (GrassVInfoUtils.getNumFaces(out.getName()) > 0) {
+                     final String sTempMap = new String(GrassUtils.getTempMapName());
+                     sSplitCommand.append("v.extract type=face input=");
+                     sSplitCommand.append(out.getName());
+                     sSplitCommand.append(" output=");
+                     sSplitCommand.append(sTempMap);
+                     sSplitCommand.append("\n");
+                     //Add to list of layers to delete later
+                     vectorLayers.add(sTempMap);
+                     //Create new output object
+                     final Output tmpOut = new OutputVectorLayer();
+                     tmpOut.setDescription(out.getDescription() + " (faces)");
+                     tmpOut.setName(sTempMap);
+                     m_OutputObjects.add(tmpOut);
+                     tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+                  }
+                  if (GrassVInfoUtils.getNumLines(out.getName()) > 0) {
+                     final String sTempMap = new String(GrassUtils.getTempMapName());
+                     sSplitCommand.append("v.extract type=line input=");
+                     sSplitCommand.append(out.getName());
+                     sSplitCommand.append(" output=");
+                     sSplitCommand.append(sTempMap);
+                     sSplitCommand.append("\n");
+                     //Add to list of layers to delete later
+                     vectorLayers.add(sTempMap);
+                     //Create new output object
+                     final Output tmpOut = new OutputVectorLayer();
+                     tmpOut.setDescription(out.getDescription() + " (lines)");
+                     tmpOut.setName(sTempMap);
+                     m_OutputObjects.add(tmpOut);
+                     tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+                  }
+                  if (GrassVInfoUtils.getNumPoints(out.getName()) > 0) {
+                     final String sTempMap = new String(GrassUtils.getTempMapName());
+                     sSplitCommand.append("v.extract type=point input=");
+                     sSplitCommand.append(out.getName());
+                     sSplitCommand.append(" output=");
+                     sSplitCommand.append(sTempMap);
+                     sSplitCommand.append("\n");
+                     //Add to list of layers to delete later
+                     vectorLayers.add(sTempMap);
+                     //Create new output object
+                     final Output tmpOut = new OutputVectorLayer();
+                     tmpOut.setDescription(out.getDescription() + " (points)");
+                     tmpOut.setName(sTempMap);
+                     m_OutputObjects.add(tmpOut);
+                     tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+                  }
+                  if (GrassVInfoUtils.getNumKernels(out.getName()) > 0) {
+                     //TODO: kernel support is not implemented in GRASS 6.4's v.extract...
+                     //TODO: ...for now, we will just convert all kernels to points and...
+                     //TODO: ...output them to a separate map.
+                     final String sTempMap = new String(GrassUtils.getTempMapName());
+                     sSplitCommand.append("v.type type=kernel,point input=");
+                     sSplitCommand.append(out.getName());
+                     sSplitCommand.append(" output=");
+                     sSplitCommand.append(sTempMap);
+                     sSplitCommand.append("\n");
+                     //Add to list of layers to delete later
+                     vectorLayers.add(sTempMap);
+                     //Create new output object
+                     final Output tmpOut = new OutputVectorLayer();
+                     tmpOut.setDescription(out.getDescription() + " (kernels)");
+                     tmpOut.setName(sTempMap);
+                     m_OutputObjects.add(tmpOut);
+                     tmpOut.setOutputChannel(this.getOutputChannel(tmpOut.getName()));
+                  }
+
+                  //We can now delete the original Output object
+                  m_OutputObjects.remove(out);
+
+                  //
+                  //INTERMEDIATE STEP: Split GRASS map into single geom type maps
+                  //
+                  if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+                     try {
+                        GrassUtils.runGRASS(sSplitCommand, "Splitting up multiple type geometries:", this);
+                     }
+                     catch (final Exception e) {
+                        gotKilled = true;
+                     }
+                  }
+               }
+            }
+         }
+
+         //END ( if !gotKilled && Canceled )
+      }
+
+      if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+         for (int i = 0; i < m_OutputObjects.getOutputDataObjectsCount(); i++) {
+            final Output out = m_OutputObjects.getOutput(i);
+            final IOutputChannel channel = out.getOutputChannel();
+            if (!(channel instanceof FileOutputChannel)) {
+               continue;
+            }
+            final FileOutputChannel foc = (FileOutputChannel) channel;
+            if (out instanceof OutputVectorLayer) {
+               //Now we dump all output vector layers into shapefiles.
+               //The type= option of v.out.ogr determines which geometry types will be written
+               //into the output shapefile. First, we call v.info -t <GRASS map> to find out which
+               //geometries the GRASS map contains. Then we need to call v.out.ogr as often as it
+               //takes to write out all the geometry types.
+
+               //Check if the map geometries have 3D coordinates
+               final boolean is_3d = GrassVInfoUtils.isMap3D(out.getName());
+
+               //These will have to be set depending on the data in the GRASS map (see below)
+               String optType = null;
+               String optLCO = null;
+
+               int num_points = 0;
+               int num_kernels = 0;
+               int num_lines = 0;
+               int num_polygons = 0;
+               int num_faces = 0;
+               //Query all output vector maps again. At this point, we can
+               //assume that they are all single geom type.
+               if (m_bIsExecutedFromModeller) {
+                  final int iType = m_Parameters.getParameter(PARAMETER_RESTRICT_VECTOR_OUTPUT_TYPE).getParameterValueAsInt();
+                  if (iType == OutputVectorLayer.SHAPE_TYPE_POINT) {
+                     num_points = 1;
+                  }
+                  else if (iType == OutputVectorLayer.SHAPE_TYPE_LINE) {
+                     num_lines = 1;
+                  }
+                  else if (iType == OutputVectorLayer.SHAPE_TYPE_POLYGON) {
+                     num_polygons = 1;
+                  }
+               }
+               else {
+                  num_points = GrassVInfoUtils.getNumPoints(out.getName());
+                  num_kernels = GrassVInfoUtils.getNumKernels(out.getName());
+                  num_lines = GrassVInfoUtils.getNumLines(out.getName());
+                  num_polygons = GrassVInfoUtils.getNumPolygons(out.getName());
+                  num_faces = GrassVInfoUtils.getNumFaces(out.getName());
+               }
+
+               if (num_points > 0) {
+                  optType = new String("point");
+                  if (is_3d) {
+                     optLCO = new String("\"SHPT=POINTZ\"");
+                  }
+                  else {
+                     optLCO = new String("\"SHPT=POINT\"");
+                  }
+               }
+               if (num_kernels > 0) {
+                  optType = new String("kernel");
+                  optLCO = new String("\"SHPT=POINTZ\"");
+               }
+               if (num_lines > 0) {
+                  optType = new String("line");
+                  if (is_3d) {
+                     optLCO = new String("\"SHPT=ARCZ\"");
+                  }
+                  else {
+                     optLCO = new String("\"SHPT=ARC\"");
+                  }
+               }
+               if (num_polygons > 0) {
+                  optType = new String("area");
+                  if (is_3d) {
+                     optLCO = new String("\"SHPT=POLYGONZ\"");
+                  }
+                  else {
+                     optLCO = new String("\"SHPT=POLYGON\"");
+                  }
+               }
+               if (num_faces > 0) {
+                  optType = new String("face");
+                  optLCO = new String("\"SHPT=POLYGONZ\"");
+               }
+
+               //GRASS 6.4.3 has support for "-s" to skip "cat" field export!
+               
+               if ( bCompatMode == false ) {
+            	   sCommand.append("v.out.ogr -s -c input=");
+               } else {
+            	   sCommand.append("v.out.ogr -c input=");
+               }
+               sCommand.append(out.getName());
+               file = new File(foc.getFilename());
+               sCommand.append(" dsn=\"" + file.getParent() + "\"");
+               final String sName = file.getName().substring(0, file.getName().indexOf('.'));
+               sCommand.append(" format=ESRI_Shapefile");
+               sCommand.append(" olayer=" + sName);
+               if (optType != null) {
+                  sCommand.append(" type=" + optType);
+               }
+               if (optLCO != null) {
+                  sCommand.append(" lco=" + optLCO);
+               }
+               sCommand.append("\n");
+               vectorLayers.add(out.getName());
+
+            }
+            else if (out instanceof OutputRasterLayer) {
+               //Raster layer output: adjust region to layer before exporting
+               final boolean bSEXTANTENull = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_USE_SEXTANTE_NULL)).booleanValue();
+               sCommand.append("g.region rast=" + out.getName() + "\n");
+               sCommand.append("r.out.gdal -c");
+               if ( bSEXTANTENull == true ) {
+            	   sCommand.append(" nodata=\"" + Double.toString(SextanteGUI.getOutputFactory().getDefaultNoDataValue()) + "\"");
+               }
+               sCommand.append(" createopt=\"TFW=YES,COMPRESS=LZW\"");
+               sCommand.append(" input=");
+               sCommand.append(out.getName());
+               sCommand.append(" output=\"" + foc.getFilename() + "\"");
+               sCommand.append("\n");
+               /* Write GRASS color table to a temporary, very simple ASCII file.
+                * The receiving GIS can later pick it up from there and make use of it,
+                * if it wants to.
+                */
+               GrassUtils.writeColorTable(out);
+               rasterLayers.add(out.getName());
+            }
+         }
+
+         //END ( if !gotKilled && Canceled )
+      }
+
+
+      //
+      //PROCESSING STEP THREE: Export data from GRASS mapset
+      //
+      if (m_OutputObjects.getOutputDataObjectsCount() > 0) {
+         GrassAlgorithmProvider.addMessage("   ");
+         GrassAlgorithmProvider.addMessage("[EXPORTING data from GRASS]");
+         GrassAlgorithmProvider.addMessage("   ");
+         setProgressText("Exporting data...");
+         if (!gotKilled && !GrassUtils.isProcessCanceled()) {
+            try {
+               GrassUtils.runGRASS(sCommand, "Exporting data from GRASS:", this);
+            }
+            catch (final Exception e) {
+               gotKilled = true;
+            }
+         }
+      }
+
+
+      /* Delete temporary mapset */
+      GrassUtils.deleteTempMapset();
+
+      GrassAlgorithmProvider.publishMessage("Executing GRASS Algorithm");
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public GeoAlgorithm getNewInstance() throws InstantiationException, IllegalAccessException {	   
+	   
+      final GrassAlgorithm alg = this.getClass().newInstance();
+      alg.setOutputObjects(m_OutputObjects.getNewInstance());
+      alg.setName(this.getName());
+      alg.setParameters(m_Parameters.getNewInstance());      
+      alg.setIsDeterminatedProcess(true);
+      alg.setUserCanDefineAnalysisExtent(getUserCanDefineAnalysisExtent());
+      alg.setDescriptionFile(m_sDescriptionFile);
+      alg.m_bIsExecutedFromModeller = false;
+
+      return alg;
+
+   }
+
+
+   /**
+    * Sets the xml file with the description of the algorithm
+    * 
+    * @param descriptionFile
+    *                the xml file with the description of the algorithm
+    */
+   private void setDescriptionFile(final String descriptionFile) {
+
+      m_sDescriptionFile = descriptionFile;
+
+   }
+
+
+   /**
+    * Returns a list of strings with internally used GRASS map names.
+    * 
+    * @return List of strings with internally used GRASS map names.
+    */
+   public ArrayList<String> getMapNames() {
+      return m_MapsIn;
+   }
+
+
+   /**
+    * Returns a list of strings with file names corresponding to internally used GRASS map names.
+    * 
+    * @return List of strings with file names corresponding to internally used GRASS map names.
+    */
+   public ArrayList<String> getFileNames() {
+      return m_FilesIn;
+   }
+
+
+   @Override
+   public String getCommandLineName() {
+
+      return "grass:" + this.getName();
+
+   }
+
+
+   @Override
+   public boolean isSuitableForModelling() {
+
+      return !GrassModelerBlackList.isInBlackList(this);
+
+
+   }
+
+
+   @Override
+   public boolean preprocessForModeller(final Object obj) {
+
+      m_bIsExecutedFromModeller = true;
+
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassBlackList.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassBlackList.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassBlackList.java	(revision 369)
@@ -0,0 +1,60 @@
+package es.unex.sextante.gui.grass;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import es.unex.sextante.core.Sextante;
+
+
+/**
+ * A hard-coded list of those GRASS algorithms not compatible with SEXTANTE, that should not be shown in the toolbox or any other
+ * SEXTANTE component
+ *
+ * @author volaya
+ *
+ */
+public class GrassBlackList {
+
+   private static List           m_List;
+   private static final String[] ALGS = { "v.build.polylines", "v.build", "v.category", "v.convert", "v.db.connect",
+            "v.digit", "v.in.db", "v.in.sites", "v.kernel", "v.label.sa",
+            "v.label", "v.lrs.create", "v.lrs.label", "v.lrs.segment", "v.lrs.where", "v.proj", "v.support", "v.to.rast3",
+            "v.what", "v.what.rast", "r.compress", "r.random.surface", "r.region",
+            "r.support", "r.support.stats", "r.timestamp", "r.to.rast3", "r.to.rast3elev", "r.what",
+            "r.what.color", "v.net.alloc", "v.net", "v.net.iso", "v.net.path", "v.net.salesman", "v.net.steiner", "v.net.visibility",
+            "r.le.setup", "r.le.patch","r.le.pixel","r.le.trace","r.li.cwed","r.li.dominance","r.li.edgedensity",
+            "r.li.mpa","r.li.mps","r.li.padcv","r.li.padrange","r.li.padsd","r.li.patchdensity","r.li.patchnum",
+            "r.li.richness","r.li.setup","r.li.shannon","r.li.shape","r.li.simpson","r.series",
+            "r.blend","r.cats", "r.mask", "r.tileset","v.build.all", "v.centroids", "v.convert.all",
+            "v.db.addcol","v.db.addtable","v.db.dropcol","v.db.droptable","v.db.join","v.db.reconnect.all",
+            "v.db.renamecol","v.db.univar","v.db.update","v.in.e00","v.in.sites.all","v.univar.sh",
+            "r.external","v.external", "v.colors", "v.in.garmin", "v.in.gpsbabel", "v.out.gpsbabel",
+            "r.proj", "v.proj", "r.category"}; 
+   
+   static {
+
+      m_List = new ArrayList();
+      for (int i = 0; i < ALGS.length; i++) {
+         m_List.add(ALGS[i]);
+      }
+
+   }
+
+
+   public static boolean isInBlackList(final GrassAlgorithm alg) {
+
+	   return ( isInBlackList (alg.getName()) );
+
+   }
+
+
+   public static boolean isInBlackList(final String sName) {
+	   if ( m_List.contains(sName)) {
+		   Sextante.addWarningToLog("SEXTANTE GRASS interface: Module " + sName + " disabled: blacklisted.");
+		   return ( true );
+	   }
+	   return ( false );
+   }
+   
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassBlackList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,236 @@
+package es.unex.sextante.gui.grass;
+
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.util.HashMap;
+
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.ParameterContainer;
+import es.unex.sextante.gui.modeler.DefaultModelerParametersPanel;
+import es.unex.sextante.gui.modeler.OutputLayerSettingsPanel;
+import es.unex.sextante.gui.modeler.OutputParameterContainer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+public class GrassModelerParametersPanel
+         extends
+            DefaultModelerParametersPanel {
+
+   private JComboBox jComboRestrictGeometryType;
+
+
+   @Override
+   protected void addOutputObjects(final JPanel pane) {
+
+      super.addOutputObjects(pane);
+
+      addTitleLabel(pane, Sextante.getText("grass_restrict_geometry_ouput"), m_iCurrentRow, false);
+      
+      final String[] options = new String[] { Sextante.getText("Points"), Sextante.getText("Lines"), Sextante.getText("Polygons") };
+      jComboRestrictGeometryType = new JComboBox(options);
+      pane.add(jComboRestrictGeometryType, getStringTableCoords(2, m_iCurrentRow));
+      m_iCurrentRow++;
+
+   }
+
+
+   private boolean makeNumericalValueAssignment(final HashMap map,
+		   final ParameterContainer parameterContainer) {
+
+	   double dValue;
+	   ObjectAndDescription oad;
+	   Parameter parameter = null;
+	   String sKey = null, sInnerKey;
+	   Double value;
+	   String sAssignment;
+
+	   final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+	   final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+	   final String sValue = textField.getText();
+
+	   try {
+		   parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+		   final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+		   final double dMin = ai.getMinValue();
+		   final double dMax = ai.getMaxValue();
+		   sKey = parameter.getParameterName();
+		   final Object ob = comboBox.getSelectedItem();
+		   if (ob instanceof ObjectAndDescription) {
+			   oad = (ObjectAndDescription) ob;
+			   sAssignment = (String) oad.getObject();
+			   map.put(sKey, sAssignment);
+			   return true;
+		   }
+		   else {
+			   try {
+				   dValue = Double.parseDouble(sValue);
+				   if ((dValue < dMin) || (dValue > dMax)) {
+					   return false;
+				   }
+				   sInnerKey = getInnerParameterKey();
+				   map.put(sKey, sInnerKey);
+				   value = new Double(dValue);
+				   m_DataObjects.put(sInnerKey, new ObjectAndDescription("Numerical Value", value));
+				   return true;
+			   }
+			   catch (final NumberFormatException e) {
+				   return false;
+			   }
+		   }
+	   }
+	   catch (final Exception e) {
+		   Sextante.addErrorToLog(e);
+		   return false;
+	   }
+
+   }   
+   
+   
+   @Override
+   public boolean assignParameters(final HashMap map) {	   
+
+
+	   boolean bAssigningOK = true;
+	   int i;
+	   ParameterContainer parameterContainer;	   
+
+	   /* Many GRASS modules have non-mandatory Numerical and String options.
+	    * Therefore, we cannot use a strict settings check for GRASS algorithms. */
+	   for (i = 0; i < m_InputParameterContainer.size(); i++) {
+		   parameterContainer = (ParameterContainer) m_InputParameterContainer.get(i);
+		   if (parameterContainer.getType().equals("Table") || parameterContainer.getType().equals("Vector Layer")
+				   || parameterContainer.getType().equals("Raster Layer") || parameterContainer.getType().equals("Point")) {
+			   makeDataObjectAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Multiple Input")) {
+			   makeMultipleInputAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Numerical Value")) {
+			   makeNumericalValueAssignment(map, parameterContainer);
+			   bAssigningOK = true;
+		   }
+		   else if (parameterContainer.getType().equals("String")) {
+			   makeStringAssignment(map, parameterContainer);
+			   bAssigningOK = true;
+		   }
+		   else if (parameterContainer.getType().equals("Boolean")) {
+			   bAssigningOK = makeBooleanAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Fixed Table")) {
+			   bAssigningOK = makeFixedTableAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Filepath")) {
+			   bAssigningOK = makeFilepathAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Band")) {
+			   bAssigningOK = makeRasterBandAssignment(map, parameterContainer);
+		   }
+		   else if (parameterContainer.getType().equals("Table Field")) {
+			   makeTableFieldAssignment(map, parameterContainer);
+			   bAssigningOK = true;
+		   }
+		   else if (parameterContainer.getType().equals("Selection")) {
+			   bAssigningOK = makeSelectionAssignment(map, parameterContainer);
+		   }
+
+		   if (!bAssigningOK) {
+			   return false;
+		   }
+	   }
+
+	   m_GlobalAlgorithm.setGeometryTypeRestriction(jComboRestrictGeometryType.getSelectedIndex());
+	   
+	   /* set output objects */
+	   final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+	   final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+	   for (i = 0; i < m_OutputParameterDefinitionContainer.size(); i++) {
+		   final OutputParameterContainer opc = (OutputParameterContainer) m_OutputParameterDefinitionContainer.get(i);
+		   final OutputLayerSettingsPanel olsp = (OutputLayerSettingsPanel) opc.getContainer();
+		   final String sName = opc.getName() + this.m_sAlgorithmName;
+		   if (olsp.getKeepAsFinalResult()) {
+			   try {
+				   final Output out = ooset.getOutput(opc.getName());
+				   final Output outToAdd = out.getClass().newInstance();
+				   outToAdd.setName(sName);
+				   outToAdd.setDescription(olsp.getName());
+				   oosetGlobal.add(outToAdd);
+			   }
+			   catch (final Exception e) {
+			   }
+		   }
+		   else {
+			   oosetGlobal.remove(sName);
+		   }
+	   }	   
+	   
+	   return (true);
+   }
+
+
+   @Override
+   protected double[][] getTableLayoutMatrix() {
+
+      int i;
+      int iRows = 0;
+
+      final double iSizeColumns[] = { 10, TableLayoutConstants.FILL, 360, 10 };
+
+      iRows += m_Algorithm.getNumberOfParameters();
+
+      if (m_Algorithm.requiresRasterLayers() || m_Algorithm.requiresMultipleRasterLayers()
+          || m_Algorithm.requiresMultipleRasterBands()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresVectorLayers() || m_Algorithm.requiresMultipleVectorLayers()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresTables() || m_Algorithm.requiresMultipleTables()) {
+         iRows++;
+      }
+      if (m_Algorithm.requires3DRasterLayers()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresNonDataObjects()) {
+         iRows++;
+      }
+
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      int iOutput = ooSet.getOutputObjectsCount();
+
+      final int iVectorLayers = ooSet.getVectorLayersCount();
+      if (iVectorLayers != 0) {
+         iRows += 2;
+         iOutput += 2;
+      }
+
+      if (iOutput != 0) {
+         iRows += (iOutput + 1);
+      }
+
+
+      final double iSizeRows[] = new double[iRows];
+      for (i = 0; i < iRows - iOutput; i++) {
+         iSizeRows[i] = CELL_HEIGHT;
+      }
+      for (i = iRows - iOutput; i < iRows; i++) {
+         iSizeRows[i] = CELL_HEIGHT * 2.5;
+      }
+
+      final double iSize[][] = new double[2][];
+      iSize[0] = iSizeColumns;
+      iSize[1] = iSizeRows;
+
+      return iSize;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassProgressMonitor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassProgressMonitor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassProgressMonitor.java	(revision 369)
@@ -0,0 +1,285 @@
+package es.unex.sextante.gui.grass;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JProgressBar;
+import javax.swing.JScrollPane;
+import javax.swing.JTextPane;
+import javax.swing.SwingUtilities;
+import javax.swing.WindowConstants;
+import javax.swing.text.DefaultStyledDocument;
+
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.toolbox.TransparentScrollPane;
+
+/**
+ * An extended progress monitor for GRASS modules showing a progress bar and a text output area.
+ *
+ * @author volaya
+ *
+ */
+public class GrassProgressMonitor
+         extends
+            JDialog {
+
+   private StringBuffer sTextBuffer;
+
+   private JLabel       jTitle;
+   private JButton      jButtonCancel;
+   private JProgressBar jProgressBar;
+   private JScrollPane  jScrollPaneGRASS;
+   private JTextPane    jTextGRASS;
+   private boolean      m_bCanceled;
+
+
+   /**
+    * Constructor
+    *
+    * @param sText
+    *                The text to show
+    * @param bDeterminate
+    *                true if the process to monitor is determinate
+    * @param parent
+    *                the parent dialog
+    */
+   public GrassProgressMonitor(final String sText,
+                               final boolean bDeterminate,
+                               final JDialog parent) {
+
+      super(parent, "", false);
+
+      setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+      setLocationRelativeTo(null);
+
+      m_bCanceled = false;
+
+      initGUI(sText, bDeterminate);
+
+   }
+
+
+   /**
+    * Constructor. Uses the main frame as the parent component
+    *
+    * @param sText
+    *                The text to show
+    * @param bDeterminate
+    *                true if the process to monitor is determinate
+    */
+   public GrassProgressMonitor(final String sText,
+                               final boolean bDeterminate) {
+
+      super(SextanteGUI.getMainFrame(), "", false);
+
+      setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+      setLocationRelativeTo(null);
+
+      m_bCanceled = false;
+
+      initGUI(sText, bDeterminate);
+
+   }
+
+
+   private void initGUI(final String sText,
+                        boolean bDeterminate) {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 6.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 6.0 },
+               { 1.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 1, 15.0, 1.0, 25.0, 1.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      setPreferredSize(new Dimension(650, 450));
+      setSize(new Dimension(350, 450));
+      getContentPane().setLayout(thisLayout);
+      {
+         jTitle = new JLabel(sText);
+         getContentPane().add(jTitle, "1, 1, 2, 1");
+      }
+      {
+         jButtonCancel = new JButton();
+         getContentPane().add(jButtonCancel, "2, 6");
+         jButtonCancel.setText("Cancelar");
+         jButtonCancel.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               cancel();
+            }
+         });
+      }
+      {
+         jProgressBar = new JProgressBar();
+         jProgressBar.setIndeterminate(!bDeterminate);
+         if (bDeterminate) {
+            jProgressBar.setMinimum(0);
+            jProgressBar.setMaximum(100);
+            jProgressBar.setValue(0);
+         }
+         getContentPane().add(jProgressBar, "1, 4, 2, 4");
+      }
+      {
+         jTextGRASS = new NonWordWrapPane();
+         jTextGRASS.setStyledDocument(new DefaultStyledDocument());
+         jTextGRASS.setFont(new Font("Monospaced", Font.PLAIN, 12));
+         jTextGRASS.setContentType("text/plain");
+         jTextGRASS.setEditable(false);
+         jScrollPaneGRASS = new TransparentScrollPane();
+         jScrollPaneGRASS.setBackground(Color.white);
+         jScrollPaneGRASS.setSize(new java.awt.Dimension(650, 450));
+         jScrollPaneGRASS.setViewportView(jTextGRASS);
+         getContentPane().add(jScrollPaneGRASS, "1, 2, 2, 2");
+      }
+
+      sTextBuffer = new StringBuffer("");
+
+   }
+
+
+   private void cancel() {
+
+      m_bCanceled = true;
+
+   }
+
+
+   /**
+    * Returns true if the process has been canceled using the cancel button
+    *
+    * @return true if the process has been canceled
+    */
+   public boolean isCanceled() {
+
+      return m_bCanceled;
+
+   }
+
+
+   /**
+    * Adds a line of status text output to the text area.
+    *
+    * @param sText
+    *                the description
+    */
+   public void addText(final String sText) {
+
+      try {
+         SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+               sTextBuffer.append(sText);
+               jTextGRASS.setText("");
+            }
+         });
+      }
+      catch (final Exception e) {}
+
+
+   }
+
+
+	/**
+	 * Sets the description to show at the top of the progress monitor
+	 *
+	 * @param sDescription
+	 *                the description
+	 */
+	public void setDescription(final String sDescription) {
+
+		try {
+			Runnable runnable = new Runnable() {
+				public void run() {
+					jTitle.setText(sDescription);
+				}
+			};
+			if (SwingUtilities.isEventDispatchThread()){
+				runnable.run();
+			}
+			else{
+				SwingUtilities.invokeAndWait(runnable);
+			}
+		}
+		catch (final Exception e) {}
+
+
+	}
+
+
+	/**
+	 * Sets the current progress value (in the range 1-100)
+	 *
+	 * @param iValue
+	 */
+	public void setProgress(final int iValue) {
+
+		try {
+			Runnable runnable = new Runnable() {
+				public void run() {
+					jProgressBar.setValue(iValue);
+				}
+			};
+			if (SwingUtilities.isEventDispatchThread()){
+				runnable.run();
+			}
+			else{
+				SwingUtilities.invokeAndWait(runnable);
+			}
+		}
+		catch (final Exception e) {}
+
+	}
+
+
+	/**
+	 * Sets whether the process being monitored is determinate or not
+	 *
+	 * @param bDeterminate
+	 */
+	public void setDeterminate(final boolean bDeterminate) {
+
+		try {
+			Runnable runnable = new Runnable() {
+				public void run() {
+					jProgressBar.setIndeterminate(!bDeterminate);
+				}
+			};
+			if (SwingUtilities.isEventDispatchThread()){
+				runnable.run();
+			}
+			else{
+				SwingUtilities.invokeAndWait(runnable);
+			}
+		}
+		catch (final Exception e) {}
+
+	}
+
+
+   private class NonWordWrapPane
+            extends
+               JTextPane {
+
+      public NonWordWrapPane() {
+
+         super();
+
+      }
+
+
+      @Override
+      public boolean getScrollableTracksViewportWidth() {
+
+         return false;
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/grass/GrassProgressMonitor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettingsPanel.java	(revision 369)
@@ -0,0 +1,240 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.r.RAlgorithmProvider;
+
+
+public class SextanteRSettingsPanel
+         extends
+            SettingPanel {
+
+   private FileSelectionPanel jRFolder;
+   private JButton            jButton;
+   private JLabel             jLabelFolder;
+   private JLabel             jLabelLoadRScripts;
+   private JCheckBox          jActivateCheckBox;
+   private JCheckBox          jPortableCheckBox;
+   private JLabel             jLabelScriptsFolder;
+   private FileSelectionPanel jRScriptsFolder;
+
+
+   @Override
+   protected void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { SextanteConfigurationDialog.SPACER_SMALL,
+            	   TableLayoutConstants.FILL,
+            	   TableLayoutConstants.FILL,
+            	   SextanteConfigurationDialog.SPACER_SMALL },
+               { SextanteConfigurationDialog.SPACER_SMALL,
+            		   TableLayoutConstants.MINIMUM, // row 1
+            		   TableLayoutConstants.MINIMUM, // row 2
+            		   TableLayoutConstants.MINIMUM, // row 3
+            		   TableLayoutConstants.MINIMUM, // row 4
+            		   TableLayoutConstants.MINIMUM, // row 5
+            		   TableLayoutConstants.MINIMUM, // row 6
+            		   TableLayoutConstants.MINIMUM, // row 7
+            		   TableLayoutConstants.FILL,
+					   TableLayoutConstants.MINIMUM,
+					   SextanteConfigurationDialog.SPACER_SMALL } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+
+      jActivateCheckBox = new JCheckBox(Sextante.getText("ActivateProvider") + " \"R\"" );
+      final String sActivate = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_ACTIVATE);
+      final boolean bActivate = Boolean.parseBoolean(sActivate);
+      jActivateCheckBox.setSelected(bActivate);
+      this.add(jActivateCheckBox, "1,1");
+
+      this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 2, 2, 2");
+      /* -----------------------------------------------------------*/
+
+      jPortableCheckBox = new JCheckBox(Sextante.getText("Portable"));
+      final String sActivatePortable = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_PORTABLE);
+      final boolean bActivatePortable = Boolean.parseBoolean(sActivatePortable);
+      jPortableCheckBox.setEnabled(bActivate);
+      jPortableCheckBox.setSelected(bActivatePortable);
+      this.add(jPortableCheckBox, "1,3");
+
+      jLabelFolder = new JLabel();
+      jLabelFolder.setEnabled(bActivate);
+      if ( bActivatePortable == true ) {
+    	  jLabelFolder.setEnabled(false);
+      }
+      this.add(jLabelFolder, "1, 4");
+      jLabelFolder.setText(Sextante.getText("R_folder"));
+      jRFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+      jRFolder.getTextField().setEnabled(bActivate);
+      jRFolder.getButton().setEnabled(bActivate);
+      if ( bActivatePortable == true ) {
+    	  jRFolder.getTextField().setEnabled(false);
+          jRFolder.getButton().setEnabled(false);
+      }
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_FOLDER);
+      jRFolder.setFilepath(sFolder);
+      this.add(jRFolder, "2, 4");
+
+      jLabelScriptsFolder = new JLabel();
+      jLabelScriptsFolder.setEnabled(bActivate);
+      if ( bActivatePortable == true ) {
+    	  jLabelScriptsFolder.setEnabled(false);
+      }
+      this.add(jLabelScriptsFolder, "1, 5");
+      jLabelScriptsFolder.setText(Sextante.getText("R_Scripts_folder"));
+      jRScriptsFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+      jRScriptsFolder.getTextField().setEnabled(bActivate);
+      jRScriptsFolder.getButton().setEnabled(bActivate);
+      if ( bActivatePortable == true ) {
+    	  jRScriptsFolder.getTextField().setEnabled(false);
+          jRScriptsFolder.getButton().setEnabled(false);
+      }
+      final String sScriptsFolder = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER);
+      jRScriptsFolder.setFilepath(sScriptsFolder);
+      this.add(jRScriptsFolder, "2, 5");
+
+      this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 6, 2, 6");
+      /* -----------------------------------------------------------*/
+
+      jLabelLoadRScripts = new JLabel();
+      jLabelLoadRScripts.setText( Sextante.getText("update_library") );
+      jLabelLoadRScripts.setEnabled(bActivate);
+      this.add(jLabelLoadRScripts, "1, 7");
+      jButton = new JButton(Sextante.getText("load_R_scripts"));
+      jButton.setEnabled(bActivate);
+      this.add(jButton, "2, 7");
+
+      /* add provider logo and URL */
+      final URL res = getClass().getClassLoader().getResource("images/Rlogo.gif");
+      if (res != null) {
+    	  final ImageIcon logo = new ImageIcon(res);
+    	  JLabel logoLabel = new JLabel(logo);
+    	  logoLabel.setIconTextGap(4);
+    	  logoLabel.setVerticalTextPosition(SwingConstants.BOTTOM);
+    	  logoLabel.setText("<html><i><a href=http://www.r-project.org/>http://www.r-project.org/</a></i></html>");
+    	  this.add(logoLabel,"1, 9, 2, 9");
+      }
+
+
+      /* Action listeners for widgets */
+
+      jActivateCheckBox.addActionListener(new ActionListener() {
+          public void actionPerformed(final ActionEvent arg0) {
+             setCursor(new Cursor(Cursor.WAIT_CURSOR));
+             SextanteGUI.setSettingParameterValue(SextanteRSettings.R_ACTIVATE,
+                      new Boolean(jActivateCheckBox.isSelected()).toString());
+             SextanteGUI.updateAlgorithmProvider(RAlgorithmProvider.class);
+             //Activate/deactivate the remaining widgets on this page
+             boolean active = jActivateCheckBox.isSelected();
+             jPortableCheckBox.setEnabled(active);
+        	 jLabelFolder.setEnabled(active);
+        	 jRFolder.getTextField().setEnabled(active);
+             jRFolder.getButton().setEnabled(active);
+             jLabelScriptsFolder.setEnabled(active);
+             jRScriptsFolder.getTextField().setEnabled(active);
+             jRScriptsFolder.getButton().setEnabled(active);
+             jLabelLoadRScripts.setEnabled(active);
+             jButton.setEnabled(active);
+             jActivateCheckBox.getParent().repaint();
+             active = jPortableCheckBox.isSelected();
+             if ( active == true ) {
+            	 jLabelFolder.setEnabled(false);
+            	 jRFolder.getTextField().setEnabled(false);
+                 jRFolder.getButton().setEnabled(false);
+                 jLabelScriptsFolder.setEnabled(false);
+                 jRScriptsFolder.getTextField().setEnabled(false);
+                 jRScriptsFolder.getButton().setEnabled(false);
+             }
+             setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+          }
+       });
+
+      jPortableCheckBox.addActionListener(new ActionListener() {
+          public void actionPerformed(final ActionEvent arg0) {
+             setCursor(new Cursor(Cursor.WAIT_CURSOR));
+             SextanteGUI.setSettingParameterValue(SextanteRSettings.R_PORTABLE,
+                      new Boolean(jPortableCheckBox.isSelected()).toString());
+             //Set portable R bin dir
+             SextanteGUI.checkDir ( Sextante.PORTABLE_R_FOLDER, true, "R" );
+             String sPath = new String (SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_FOLDER);
+             SextanteGUI.setSettingParameterValue(SextanteRSettings.R_FOLDER, sPath);
+             jRFolder.setFilepath(sPath);
+             //Set portable scripts dir
+             SextanteGUI.checkDir ( Sextante.PORTABLE_R_SCRIPTS_FOLDER, false, "R user scripts" );
+             sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_SCRIPTS_FOLDER;
+             SextanteGUI.setSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER, sPath);
+             jRScriptsFolder.setFilepath(sPath);
+             //Activate/deactivate the remaining widgets on this page
+             final boolean active = jPortableCheckBox.isSelected();
+             if ( active == true ) {
+            	 jLabelFolder.setEnabled(false);
+            	 jRFolder.getTextField().setEnabled(false);
+                 jRFolder.getButton().setEnabled(false);
+                 jLabelScriptsFolder.setEnabled(false);
+                 jRScriptsFolder.getTextField().setEnabled(false);
+                 jRScriptsFolder.getButton().setEnabled(false);
+             } else {
+            	 jLabelFolder.setEnabled(true);
+            	 jRFolder.getTextField().setEnabled(true);
+                 jRFolder.getButton().setEnabled(true);
+                 jLabelScriptsFolder.setEnabled(true);
+                 jRScriptsFolder.getTextField().setEnabled(true);
+                 jRScriptsFolder.getButton().setEnabled(true);
+             }
+             setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+          }
+       });
+
+      /* this one refreshes the registry of R scripts */
+      jButton.addActionListener(new ActionListener() {
+          public void actionPerformed(final ActionEvent arg0) {
+             SextanteGUI.setSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER, jRScriptsFolder.getFilepath());
+             SextanteGUI.updateAlgorithmProvider(RAlgorithmProvider.class);
+             final int iNumAlgs = Sextante.getAlgorithms().get(new RAlgorithmProvider().getName()).size();
+             JOptionPane.showMessageDialog(null, Sextante.getText("RScriptsLoaded") + " " + iNumAlgs + ". ",
+                      Sextante.getText("Scripts"), JOptionPane.INFORMATION_MESSAGE);
+          }
+       });
+
+   }
+
+
+   @Override
+   public HashMap<String, String> getValues() {
+
+      final HashMap<String, String> map = new HashMap<String, String>();
+      String path = jRFolder.getFilepath();
+      if (path != null) {
+         map.put(SextanteRSettings.R_FOLDER, path);
+      }
+      path = jRScriptsFolder.getFilepath();
+      if (path != null) {
+         map.put(SextanteRSettings.R_SCRIPTS_FOLDER, path);
+      }
+      map.put(SextanteRSettings.R_ACTIVATE, new Boolean(jActivateCheckBox.isSelected()).toString());
+      return map;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettings.java	(revision 369)
@@ -0,0 +1,44 @@
+package es.unex.sextante.gui.settings;
+
+import java.io.File;
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class SextanteModelerSettings
+extends
+Setting {
+
+	public static final String MODELS_PORTABLE	= "ModelsPortable";
+	public static final String MODELS_FOLDER 	= "ModelsFolder";
+
+
+	@Override
+	public void createPanel() {
+
+		panel = new SextanteModelerSettingsPanel();
+
+	}
+
+
+	@Override
+	public String getName() {
+
+		return Sextante.getText("Models");
+
+	}
+
+
+	@Override
+	public HashMap<String, String> getInitValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(MODELS_PORTABLE, Boolean.TRUE.toString());
+		map.put(MODELS_FOLDER, SextanteGUI.getSextanteHomePath() + File.separator + Sextante.PORTABLE_MODELS_FOLDER);
+
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettings.java	(revision 369)
@@ -0,0 +1,44 @@
+package es.unex.sextante.gui.settings;
+
+import java.io.File;
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class SextanteScriptsSettings
+extends
+Setting {
+
+	public static final String SCRIPTS_PORTABLE	= "ScriptsPortable";
+	public static final String SCRIPTS_FOLDER 	= "ScriptsFolder";
+
+
+	@Override
+	public void createPanel() {
+
+		panel = new SextanteScriptsSettingsPanel();
+
+	}
+
+
+	@Override
+	public String getName() {
+
+		return Sextante.getText("Scripts");
+
+	}
+
+
+	@Override
+	public HashMap<String, String> getInitValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(SCRIPTS_PORTABLE, Boolean.TRUE.toString());
+		map.put(SCRIPTS_FOLDER, SextanteGUI.getSextanteHomePath() + File.separator + Sextante.PORTABLE_SCRIPTS_FOLDER);
+
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettingsPanel.java	(revision 369)
@@ -0,0 +1,226 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.saga.SagaAlgorithmProvider;
+import es.unex.sextante.gui.saga.SagaExecutionException;
+import es.unex.sextante.gui.saga.SagaUtils;
+
+
+public class SextanteSagaSettingsPanel
+extends
+SettingPanel {
+
+	private JCheckBox          jActivateCheckBox;
+	private JCheckBox          jPortableCheckBox;
+	private JLabel             jLabelSagaFolder;
+	private FileSelectionPanel jSagaFolder;
+	private JLabel             jLabelUpdate;
+	private JButton            jButtonUpdate;
+
+
+
+	@Override
+	protected void initGUI() {
+
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ SextanteConfigurationDialog.SPACER_SMALL,
+					TableLayoutConstants.FILL,
+					TableLayoutConstants.FILL,
+					SextanteConfigurationDialog.SPACER_SMALL},
+					{ SextanteConfigurationDialog.SPACER_SMALL,
+						TableLayoutConstants.MINIMUM, // row 1
+						TableLayoutConstants.MINIMUM, // row 2
+						TableLayoutConstants.MINIMUM, // row 3
+						TableLayoutConstants.MINIMUM, // row 4
+						TableLayoutConstants.MINIMUM, // row 5
+						TableLayoutConstants.MINIMUM, // row 6
+						TableLayoutConstants.FILL,
+						TableLayoutConstants.MINIMUM, // row 8
+						SextanteConfigurationDialog.SPACER_SMALL } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		this.setLayout(thisLayout);
+
+		jActivateCheckBox = new JCheckBox(Sextante.getText("ActivateProvider") + " SAGA GIS");
+		final String sActivate = SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_ACTIVATE);
+		final boolean bActivate = Boolean.parseBoolean(sActivate);
+		jActivateCheckBox.setSelected(bActivate);
+		this.add(jActivateCheckBox, "1, 1");
+
+		this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 2, 2, 2");
+		/* ----------------------------------------------------------- */
+
+		jPortableCheckBox = new JCheckBox(Sextante.getText("Portable"));
+		final String sActivatePortable = SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_PORTABLE);
+		final boolean bActivatePortable = Boolean.parseBoolean(sActivatePortable);
+		jPortableCheckBox.setEnabled(bActivate);
+		jPortableCheckBox.setSelected(bActivatePortable);
+		this.add(jPortableCheckBox, "1, 3");
+
+		jLabelSagaFolder = new JLabel();
+		jLabelSagaFolder.setEnabled(bActivate);
+		if (bActivatePortable == true) {
+			jLabelSagaFolder.setEnabled(false);
+		}
+		this.add(jLabelSagaFolder, "1, 4");
+		jLabelSagaFolder.setText(Sextante.getText("Saga_folder"));
+		jSagaFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+		jSagaFolder.getTextField().setEnabled(bActivate);
+		jSagaFolder.getButton().setEnabled(bActivate);
+		if (bActivatePortable == true) {
+			jSagaFolder.getTextField().setEnabled(false);
+			jSagaFolder.getButton().setEnabled(false);
+		}
+		final String sFolder = SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_FOLDER);
+		jSagaFolder.setFilepath(sFolder);
+		this.add(jSagaFolder, "2, 4");
+
+		this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 5, 2, 5");
+		/* ----------------------------------------------------------- */
+
+		jLabelUpdate = new JLabel();
+		jLabelUpdate.setText( Sextante.getText("update_library") );
+		jLabelUpdate.setEnabled(bActivate);
+		this.add(jLabelUpdate, "1, 6");
+		jButtonUpdate = new JButton(Sextante.getText("load_SAGA_modules"));
+		jButtonUpdate.setEnabled(bActivate);
+		this.add(jButtonUpdate, "2, 6");
+
+		/* add provider logo and URL */
+		final URL res = getClass().getClassLoader().getResource("images/logo_saga.png");
+		if (res != null) {
+			final ImageIcon logo = new ImageIcon(res);
+			JLabel logoLabel = new JLabel(logo);
+			logoLabel.setIconTextGap(4);
+			logoLabel.setVerticalTextPosition(SwingConstants.BOTTOM);
+			logoLabel.setText("<html><i><a href=http://www.saga-gis.org/>http://www.saga-gis.org/</a></i></html>");
+			this.add(logoLabel,"1, 8, 2, 8");
+		}
+
+		/**********************************/
+		/** Action listeners for widgets **/
+		/**********************************/
+
+		jActivateCheckBox.addActionListener(new ActionListener() {
+			public void actionPerformed(final ActionEvent arg0) {
+				setCursor(new Cursor(Cursor.WAIT_CURSOR));
+				SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_ACTIVATE,
+						new Boolean(jActivateCheckBox.isSelected()).toString());
+				SextanteGUI.updateAlgorithmProvider(SagaAlgorithmProvider.class);
+				/* toggle remaining widgets on or off */
+				boolean active = jActivateCheckBox.isSelected();
+				jPortableCheckBox.setEnabled(active);
+				jLabelSagaFolder.setEnabled(active);
+				jSagaFolder.getTextField().setEnabled(active);
+				jSagaFolder.getButton().setEnabled(active);
+				jLabelUpdate.setEnabled(active);
+				jButtonUpdate.setEnabled(active);
+				jActivateCheckBox.getParent().repaint();
+				active = jPortableCheckBox.isSelected();
+				if ( active == true ) {
+					jLabelSagaFolder.setEnabled(false);
+					jSagaFolder.getTextField().setEnabled(false);
+					jSagaFolder.getButton().setEnabled(false);
+				}
+				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+			}
+		});
+
+		jPortableCheckBox.addActionListener(new ActionListener() {
+			public void actionPerformed(final ActionEvent arg0) {
+				setCursor(new Cursor(Cursor.WAIT_CURSOR));
+				SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_PORTABLE,
+						new Boolean(jPortableCheckBox.isSelected()).toString());
+				//Set portable SAGA bin dir
+				SextanteGUI.checkDir ( Sextante.PORTABLE_SAGA_FOLDER, true, "SAGA GIS" );
+				String sPath = new String (SextanteGUI.getSextanteInstallPath() + File.separator +
+						Sextante.PORTABLE_SAGA_FOLDER);
+				SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_FOLDER, sPath);
+				jSagaFolder.setFilepath(sPath);
+				//Activate/deactivate the remaining widgets on this page
+				final boolean active = jPortableCheckBox.isSelected();
+				if ( active == true ) {
+					jLabelSagaFolder.setEnabled(false);
+					jSagaFolder.getTextField().setEnabled(false);
+					jSagaFolder.getButton().setEnabled(false);
+
+				} else {
+					jLabelSagaFolder.setEnabled(true);
+					jSagaFolder.getTextField().setEnabled(true);
+					jSagaFolder.getButton().setEnabled(true);
+
+				}
+				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+			}
+		});
+
+		jButtonUpdate.addActionListener(new ActionListener() {
+			public void actionPerformed(final ActionEvent arg0) {
+				SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_FOLDER, jSagaFolder.getFilepath());
+				setupSaga();
+			}
+		});
+
+	}
+
+
+	protected void setupSaga() {
+
+		try {
+			this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+			SagaUtils.installSaga();
+			SextanteGUI.updateAlgorithmProvider(SagaAlgorithmProvider.class);
+			final HashMap<String, GeoAlgorithm> algs = Sextante.getAlgorithms().get("SAGA");
+			int iNumAlgs = 0;
+			if (algs != null) {
+				iNumAlgs = algs.size();
+			}
+			this.setCursor(Cursor.getDefaultCursor());
+			JOptionPane.showMessageDialog(null, Sextante.getText("SagaAlgorithmsLoaded") + " " + iNumAlgs + ".",
+					Sextante.getText("SAGA"), JOptionPane.INFORMATION_MESSAGE);
+		}
+		catch (final SagaExecutionException e) {
+			e.printStackTrace();
+			JOptionPane.showMessageDialog(null, Sextante.getText("ErrorInstallingSaga"), Sextante.getText("SAGA"),
+					JOptionPane.ERROR_MESSAGE);
+		}
+
+	}
+
+
+	@Override
+	public HashMap<String, String> getValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(SextanteSagaSettings.SAGA_ACTIVATE, new Boolean(jActivateCheckBox.isSelected()).toString());
+		map.put(SextanteSagaSettings.SAGA_PORTABLE, new Boolean(jPortableCheckBox.isSelected()).toString());
+		final String path = jSagaFolder.getFilepath();
+		if (path != null) {
+			map.put(SextanteSagaSettings.SAGA_FOLDER, path);
+		}
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettingsPanel.java	(revision 369)
@@ -0,0 +1,171 @@
+
+
+package es.unex.sextante.gui.settings;
+
+import javax.swing.SwingConstants;
+
+import info.clearthought.layout.TableLayout;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongSettingValuesException;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupConfiguration;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupsOrganizer;
+
+
+public class SextanteGeneralSettingsPanel
+         extends
+            SettingPanel {
+
+
+   private JCheckBox  jCheckBoxChangeNames;
+   private JLabel     jLabelResults;
+   private FileSelectionPanel jFolderResults;
+   private JLabel     jLabelNoDataValue;
+   private JLabel     jLabelToolboxSettings;
+   private JLabel     jLabelConfigPath;
+   private JTextField jTextFieldNoData;
+   private JCheckBox  jCheckBoxUseInternalNames;
+   private JButton    jButtonConfigureGroups;
+   private JCheckBox  jCheckBoxShowMostRecent;
+   private JTextField jTextFieldConfigPath;
+
+
+   @Override
+   protected void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { SextanteConfigurationDialog.SPACER_SMALL,
+            	   TableLayout.FILL, TableLayout.FILL,
+            	   SextanteConfigurationDialog.SPACER_SMALL },
+               { SextanteConfigurationDialog.SPACER_SMALL, // row 0 (spacer)
+            	   TableLayout.MINIMUM, // row 1
+            	   TableLayout.MINIMUM, // row 2
+            	   TableLayout.MINIMUM, // row 3
+            	   TableLayout.MINIMUM, // row 4
+            	   TableLayout.MINIMUM, // row 5
+            	   TableLayout.MINIMUM, // row 6
+            	   TableLayout.MINIMUM, // row 7
+            	   TableLayout.MINIMUM, // row 8
+                   TableLayout.FILL, // row 9
+                   TableLayout.MINIMUM, // row 10
+                   SextanteConfigurationDialog.SPACER_SMALL } }); //row 11
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      {
+         final boolean bUseInternalNames = new Boolean(
+                  SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.USE_INTERNAL_NAMES)).booleanValue();
+         final boolean bModiFyResultsNames = new Boolean(
+                  SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.MODIFY_NAMES)).booleanValue();
+         final boolean bShowMostRecent = new Boolean(
+                  SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.SHOW_MOST_RECENT)).booleanValue();
+
+         jLabelResults = new JLabel();
+         this.add(jLabelResults, "1, 1");
+         jLabelResults.setText(Sextante.getText("Output_folder"));
+         jFolderResults = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+         this.add(jFolderResults, "2,1");
+         jFolderResults.setFilepath(SextanteGUI.getOutputFolder());
+
+         jCheckBoxChangeNames = new JCheckBox();
+         jCheckBoxChangeNames.setText(Sextante.getText("Modify_output_names"));
+         jCheckBoxChangeNames.setSelected(bModiFyResultsNames);
+         this.add(jCheckBoxChangeNames, "1, 2, 2, 2");
+
+         jCheckBoxUseInternalNames = new JCheckBox();
+         jCheckBoxUseInternalNames.setText(Sextante.getText("Use_internal_names_for_outputs"));
+         jCheckBoxUseInternalNames.setSelected(bUseInternalNames);
+         this.add(jCheckBoxUseInternalNames, "1, 3, 2, 3");
+
+         this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 4, 2, 4");
+         /* -----------------------------------------------------------*/
+
+         jLabelNoDataValue = new JLabel();
+         jLabelNoDataValue.setText(Sextante.getText("Default_no_data_value"));
+         this.add(jLabelNoDataValue, "1, 5");
+         jTextFieldNoData = new JTextField();
+         final String sNoDataValue = Double.toString(SextanteGUI.getOutputFactory().getDefaultNoDataValue());
+         jTextFieldNoData.setText(sNoDataValue);
+         this.add(jTextFieldNoData, "2, 5");
+
+         this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 6, 2, 6");
+         /* -----------------------------------------------------------*/
+
+         jButtonConfigureGroups = new JButton(Sextante.getText("ConfigureAlgGroups") + "..." );
+         jButtonConfigureGroups.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent arg0) {
+               configureGroups();
+            }
+         });
+         this.add(jButtonConfigureGroups, "2, 7, 2, 7");
+         jLabelToolboxSettings = new JLabel();
+         jLabelToolboxSettings.setText(Sextante.getText("Toolbox"));
+         this.add(jLabelToolboxSettings, "1, 7");
+
+         jCheckBoxShowMostRecent = new JCheckBox(Sextante.getText("ShowMostRecent"));
+         jCheckBoxShowMostRecent.setSelected(bShowMostRecent);
+         this.add(jCheckBoxShowMostRecent, "1, 8, 2, 8");
+
+         jLabelConfigPath = new JLabel();
+         jLabelConfigPath.setText(Sextante.getText("Config_path_label"));
+         this.add(jLabelConfigPath, "1, 10");
+         jTextFieldConfigPath = new JTextField();
+         jTextFieldConfigPath.setText(SextanteGUI.getUserFolder());
+         jTextFieldConfigPath.setEditable(false);
+         this.add(jTextFieldConfigPath, "2, 10");
+      }
+
+   }
+
+
+   protected void configureGroups() {
+
+      final AlgorithmGroupsConfigurationDialog dialog = new AlgorithmGroupsConfigurationDialog();
+      dialog.setVisible(true);
+
+      final HashMap<String, AlgorithmGroupConfiguration> map = dialog.getGrouppingsMap();
+      if (map != null) {
+         AlgorithmGroupsOrganizer.setConfiguration(map);
+         AlgorithmGroupsOrganizer.saveSettings();
+      }
+
+   }
+
+
+   @Override
+   public HashMap<String, String> getValues() throws WrongSettingValuesException {
+
+      final HashMap<String, String> map = new HashMap<String, String>();
+      String path = jFolderResults.getFilepath();
+      if (path != null) {
+         map.put(SextanteGeneralSettings.RESULTS_FOLDER, path);
+      }
+      map.put(SextanteGeneralSettings.MODIFY_NAMES, new Boolean(jCheckBoxChangeNames.isSelected()).toString());
+      map.put(SextanteGeneralSettings.USE_INTERNAL_NAMES, new Boolean(jCheckBoxUseInternalNames.isSelected()).toString());
+      map.put(SextanteGeneralSettings.SHOW_MOST_RECENT, new Boolean(jCheckBoxShowMostRecent.isSelected()).toString());
+      try {
+         final double dValue = Double.parseDouble(jTextFieldNoData.getText());
+         SextanteGUI.getOutputFactory().setDefaultNoDataValue(dValue);
+      }
+      catch (final Exception e) {
+         throw new WrongSettingValuesException();
+      }
+      map.put(SextanteGeneralSettings.DEFAULT_NO_DATA_VALUE, jTextFieldNoData.getText());
+
+      return map;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettingsPanel.java	(revision 369)
@@ -0,0 +1,635 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.HashMap;
+
+import javax.imageio.ImageIO;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongGrassFolderException;
+import es.unex.sextante.gui.exceptions.WrongGrassMapsetFolderException;
+import es.unex.sextante.gui.exceptions.WrongGrassWinShellException;
+import es.unex.sextante.gui.grass.GrassAlgorithmProvider;
+
+public class SextanteGrassSettingsPanel extends SettingPanel {
+
+	// Officially supported GRASS version range
+	public static final int MAJOR_MIN = 6;
+	public static final int MAJOR_MAX = 6;
+	public static final int MINOR_MIN = 4;
+	public static final int MINOR_MAX = 4;
+
+	private JCheckBox jActivateCheckBox;
+	private JCheckBox jPortableCheckBox;
+	private JLabel jLabelGrassFolder;
+	private FileSelectionPanel jGrassFolder;
+	private JLabel jLabelWinShell;
+	private FileSelectionPanel jWinShellFile;
+	private JLabel jLabelUpdate;
+	private JButton jButtonUpdate;
+	private JCheckBox jCheckBoxLatLon;
+	private JCheckBox jCheckBox3DV;
+	private JCheckBox jCheckBoxNoVectBBox;
+	private JCheckBox jCheckBoxInPolylines;
+	private JCheckBox jCheckBoxCleanPolygons;
+	private JCheckBox jCheckBoxSextanteNull;
+	private JCheckBox jCheckBoxCompatibility;
+
+	@Override
+	protected void initGUI() {
+
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ SextanteConfigurationDialog.SPACER_SMALL,
+						TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+						SextanteConfigurationDialog.SPACER_SMALL },
+				{
+						SextanteConfigurationDialog.SPACER_SMALL,
+						TableLayoutConstants.MINIMUM, // row 1
+						TableLayoutConstants.MINIMUM, // row 2
+						TableLayoutConstants.MINIMUM, // row 3
+						TableLayoutConstants.MINIMUM, // row 4
+						TableLayoutConstants.MINIMUM, // row 5
+						TableLayoutConstants.MINIMUM, // row 6
+						TableLayoutConstants.MINIMUM, // row 7
+						TableLayoutConstants.MINIMUM, // row 8
+						TableLayoutConstants.MINIMUM, // row 9
+						TableLayoutConstants.MINIMUM, // row 10
+						TableLayoutConstants.MINIMUM, // row 11
+						TableLayoutConstants.MINIMUM, // row 12
+						TableLayoutConstants.MINIMUM, // row 13
+						TableLayoutConstants.MINIMUM, // row 14
+						TableLayoutConstants.MINIMUM, // row 15
+						TableLayoutConstants.FILL,
+						TableLayoutConstants.MINIMUM, // row 17
+						SextanteConfigurationDialog.SPACER_SMALL } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		this.setLayout(thisLayout);
+		{
+			jActivateCheckBox = new JCheckBox(Sextante.getText("ActivateProvider") + " GRASS GIS");
+			final String sActivate = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_ACTIVATE);
+			final boolean bActivate = Boolean.parseBoolean(sActivate);
+			jActivateCheckBox.setSelected(bActivate);
+			this.add(jActivateCheckBox, "1, 1");
+
+			this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 2, 2, 2");
+			/* ----------------------------------------------------------- */
+
+			jPortableCheckBox = new JCheckBox(Sextante.getText("Portable"));
+			final String sActivatePortable = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_PORTABLE);
+			final boolean bActivatePortable = Boolean.parseBoolean(sActivatePortable);
+			jPortableCheckBox.setEnabled(bActivate);
+			jPortableCheckBox.setSelected(bActivatePortable);
+			this.add(jPortableCheckBox, "1, 3");
+
+			jLabelGrassFolder = new JLabel();
+			jLabelGrassFolder.setEnabled(bActivate);
+			if (bActivatePortable == true) {
+				jLabelGrassFolder.setEnabled(false);
+			}
+			this.add(jLabelGrassFolder, "1, 4");
+			jLabelGrassFolder.setText(Sextante.getText("GRASS_folder"));
+			jGrassFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+			jGrassFolder.getTextField().setEnabled(bActivate);
+			jGrassFolder.getButton().setEnabled(bActivate);
+			if (bActivatePortable == true) {
+				jGrassFolder.getTextField().setEnabled(false);
+				jGrassFolder.getButton().setEnabled(false);
+			}
+			final String sFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+			jGrassFolder.setFilepath(sFolder);
+			this.add(jGrassFolder, "2, 4");
+
+			/* the file selector for sh.exe will only be active if we are running on Windows */
+			jLabelWinShell = new JLabel();
+			jLabelWinShell.setEnabled(bActivate && Sextante.isWindows());
+			if (bActivatePortable == true) {
+				jLabelWinShell.setEnabled(false);
+			}
+			this.add(jLabelWinShell, "1, 5");
+			jLabelWinShell.setText("Windows " + Sextante.getText("grass_windows_shell"));
+			jWinShellFile = new FileSelectionPanel(true, true, new String[] {"sh.exe", null}, Sextante.getText("selector_choose_file"));
+			jWinShellFile.getTextField().setEnabled(bActivate && Sextante.isWindows());
+			jWinShellFile.getButton().setEnabled(bActivate && Sextante.isWindows());
+			if (bActivatePortable == true) {
+				jWinShellFile.getTextField().setEnabled(false);
+				jWinShellFile.getButton().setEnabled(false);
+			}
+			final String sScriptsFolder = SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_WIN_SHELL);
+			jWinShellFile.setFilepath(sScriptsFolder);
+			this.add(jWinShellFile, "2, 5");
+
+			this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 6, 2, 6");
+			/* ----------------------------------------------------------- */
+
+			jLabelUpdate = new JLabel();
+			jLabelUpdate.setText( Sextante.getText("update_library") );
+			jLabelUpdate.setEnabled(bActivate);
+			this.add(jLabelUpdate, "1, 7");
+			jButtonUpdate = new JButton(Sextante.getText("load_GRASS_modules"));
+			jButtonUpdate.setEnabled(bActivate);
+			this.add(jButtonUpdate, "2, 7");
+
+			this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 8, 2, 8");
+			/* ----------------------------------------------------------- */
+
+			jCheckBoxLatLon = new JCheckBox(Sextante.getText ("GRASS_lat_lon_mode"));
+			jCheckBoxLatLon.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_LAT_LON_MODE)).booleanValue());
+			this.add(jCheckBoxLatLon, "1, 9, 2, 9");
+
+			jCheckBox3DV = new JCheckBox();
+			jCheckBox3DV.setText(Sextante.getText("grass_input_3d"));
+			jCheckBox3DV.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_3D_V_MODE)).booleanValue());
+			this.add(jCheckBox3DV, "1, 10, 2, 10");
+
+			jCheckBoxNoVectBBox = new JCheckBox(Sextante.getText("grass_no_vect_bbox"));
+			jCheckBoxNoVectBBox.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_NO_VECT_BBOX)).booleanValue());
+			this.add(jCheckBoxNoVectBBox, "1, 11, 2, 11");
+
+			jCheckBoxInPolylines = new JCheckBox();
+			jCheckBoxInPolylines.setText(Sextante.getText("grass_import_polylines"));
+			jCheckBoxInPolylines.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_IN_POLYLINES)).booleanValue());
+			this.add(jCheckBoxInPolylines, "1, 12, 2, 12");
+
+			jCheckBoxCleanPolygons = new JCheckBox();
+			jCheckBoxCleanPolygons.setText(Sextante.getText("grass_clean_polygons"));
+			jCheckBoxCleanPolygons.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_CLEAN_POLYGONS)).booleanValue());
+			this.add(jCheckBoxCleanPolygons, "1, 13, 2, 13");
+
+			jCheckBoxSextanteNull = new JCheckBox();
+			jCheckBoxSextanteNull.setText(Sextante.getText("grass_use_sextante_null"));
+			jCheckBoxSextanteNull.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_USE_SEXTANTE_NULL)).booleanValue());
+			this.add(jCheckBoxSextanteNull, "1, 14, 2, 14");
+
+			jCheckBoxCompatibility = new JCheckBox();
+			jCheckBoxCompatibility.setText(Sextante.getText("grass_compatibility_mode"));
+			jCheckBoxCompatibility.setSelected(new Boolean(SextanteGUI.getSettingParameterValue
+					(SextanteGrassSettings.GRASS_COMPATIBILITY_MODE)).booleanValue());
+			this.add(jCheckBoxCompatibility, "1, 15, 2, 15");
+
+		}
+
+		/* add provider logo and URL */
+		final URL res = getClass().getClassLoader().getResource("images/grass.smlogo.gif");
+		if (res != null) {
+			final ImageIcon logo = new ImageIcon(res);
+			JLabel logoLabel = new JLabel(logo);
+			logoLabel.setIconTextGap(4);
+			logoLabel.setVerticalTextPosition(SwingConstants.BOTTOM);
+			logoLabel.setText("<html><i><a href=http://grass.osgeo.org/>http://grass.osgeo.org/</a></i></html>");
+			this.add(logoLabel,"1, 17, 2, 17");
+		}
+
+		/**********************************/
+		/** Action listeners for widgets **/
+		/**********************************/
+		{
+			jActivateCheckBox.addActionListener(new ActionListener() {
+				public void actionPerformed(final ActionEvent arg0) {
+					setCursor(new Cursor(Cursor.WAIT_CURSOR));
+					SextanteGUI.setSettingParameterValue(
+							SextanteGrassSettings.GRASS_ACTIVATE, new Boolean(
+									jActivateCheckBox.isSelected()).toString());
+					SextanteGUI.updateAlgorithmProvider(GrassAlgorithmProvider.class);
+					/* toggle remaining widgets on or off */
+					boolean active = jActivateCheckBox.isSelected();
+					jPortableCheckBox.setEnabled(active);
+					jLabelGrassFolder.setEnabled(active);
+					jGrassFolder.getTextField().setEnabled(active);
+					jGrassFolder.getButton().setEnabled(active);
+					if ( Sextante.isWindows()) {
+						jLabelWinShell.setEnabled(active);
+						jWinShellFile.getTextField().setEnabled(active);
+						jWinShellFile.getButton().setEnabled(active);
+					}
+					jLabelUpdate.setEnabled(active);
+					jButtonUpdate.setEnabled(active);
+					jCheckBoxLatLon.setEnabled(active);
+					jCheckBox3DV.setEnabled(active);
+					jCheckBoxNoVectBBox.setEnabled(active);
+					jCheckBoxInPolylines.setEnabled(active);
+					jCheckBoxCleanPolygons.setEnabled(active);
+					jCheckBoxSextanteNull.setEnabled(active);
+					jCheckBoxCompatibility.setEnabled(active);
+					jActivateCheckBox.getParent().repaint();
+					active = jPortableCheckBox.isSelected();
+					if ( active == true ) {
+						jLabelGrassFolder.setEnabled(false);
+						jGrassFolder.getTextField().setEnabled(false);
+						jGrassFolder.getButton().setEnabled(false);
+						if ( Sextante.isWindows()) {
+							jLabelWinShell.setEnabled(false);
+							jWinShellFile.getTextField().setEnabled(false);
+							jWinShellFile.getButton().setEnabled(false);
+						}
+					}
+					setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+				}
+			});
+		}
+
+	      jPortableCheckBox.addActionListener(new ActionListener() {
+	          public void actionPerformed(final ActionEvent arg0) {
+	             setCursor(new Cursor(Cursor.WAIT_CURSOR));
+	             SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_PORTABLE,
+	                      new Boolean(jPortableCheckBox.isSelected()).toString());
+	             //Set portable GRASS bin dir
+	             SextanteGUI.checkDir ( Sextante.PORTABLE_GRASS_FOLDER, true, "GRASS GIS" );
+	             String sPath = new String (SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_GRASS_FOLDER);
+	             SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER, sPath);
+	             jGrassFolder.setFilepath(sPath);
+	             if ( Sextante.isWindows()) {
+	            	 //Set portable sh.exe file
+	            	 SextanteGUI.checkFile ( Sextante.PORTABLE_MSYS_FILE, false, "GRASS GIS shell scripts" );
+	            	 sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_MSYS_FILE;
+	            	 SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_WIN_SHELL, sPath);
+	            	 jWinShellFile.setFilepath(sPath);
+	             }
+	             //Activate/deactivate the remaining widgets on this page
+	             final boolean active = jPortableCheckBox.isSelected();
+	             if ( active == true ) {
+					jLabelGrassFolder.setEnabled(false);
+					jGrassFolder.getTextField().setEnabled(false);
+					jGrassFolder.getButton().setEnabled(false);
+					if ( Sextante.isWindows()) {
+						jLabelWinShell.setEnabled(false);
+						jWinShellFile.getTextField().setEnabled(false);
+						jWinShellFile.getButton().setEnabled(false);
+					}
+	             } else {
+					jLabelGrassFolder.setEnabled(true);
+					jGrassFolder.getTextField().setEnabled(true);
+					jGrassFolder.getButton().setEnabled(true);
+					if ( Sextante.isWindows()) {
+						jLabelWinShell.setEnabled(true);
+						jWinShellFile.getTextField().setEnabled(true);
+						jWinShellFile.getButton().setEnabled(true);
+					}
+				}
+	            setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+	          }
+	       });
+
+	      /* trigger update of GRASS modules registry */
+	      jButtonUpdate.addActionListener(new ActionListener() {
+	    	  public void actionPerformed(final ActionEvent evt) {
+	    		  jButtonSetupGRASSActionPerformed(evt);
+	    	  }
+	      });
+	}
+
+
+	@Override
+	public HashMap<String, String> getValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+
+		map.put(SextanteGrassSettings.GRASS_ACTIVATE, new Boolean(jActivateCheckBox.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_PORTABLE, new Boolean(jPortableCheckBox.isSelected()).toString());
+		final String GrassPath = jWinShellFile.getFilepath();
+		if (GrassPath != null) {
+			map.put(SextanteGrassSettings.GRASS_FOLDER, jGrassFolder.getFilepath());
+		}
+		if (Sextante.isWindows()) {
+			final String shellPath = jWinShellFile.getFilepath();
+			if (shellPath != null) {
+				map.put(SextanteGrassSettings.GRASS_WIN_SHELL, shellPath);
+			}
+		}
+		map.put(SextanteGrassSettings.GRASS_LAT_LON_MODE, new Boolean(jCheckBoxLatLon.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_3D_V_MODE, new Boolean(jCheckBox3DV.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_NO_VECT_BBOX, new Boolean(jCheckBoxNoVectBBox.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_IN_POLYLINES, new Boolean(jCheckBoxInPolylines.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_CLEAN_POLYGONS, new Boolean(jCheckBoxCleanPolygons.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_USE_SEXTANTE_NULL, new Boolean(jCheckBoxSextanteNull.isSelected()).toString());
+		map.put(SextanteGrassSettings.GRASS_COMPATIBILITY_MODE, new Boolean(jCheckBoxCompatibility.isSelected()).toString());
+		return map;
+	}
+
+	// Attempt to setup GRASS
+	private void jButtonSetupGRASSActionPerformed(final ActionEvent evt) {
+
+		// we set these values here in advance, since they are needed to perform
+		// grass initialization. Have to look for a workaround to avoid this...
+		final HashMap<String, String> map = getValues();
+		SextanteGUI.setSettings(map);
+
+		GrassAlgorithmProvider.deleteDescriptionFiles();
+		GrassAlgorithmProvider.deleteAlgorithms();
+
+		boolean failed = false;
+		// 1: GRASS installation folder
+		try {
+			this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+			checkGrassFolder();
+			this.setCursor(Cursor.getDefaultCursor());
+		} catch (final WrongGrassFolderException e) {
+			this.setCursor(Cursor.getDefaultCursor());
+			JOptionPane.showMessageDialog(null, Sextante
+					.getText("grass_error_binaries_folder"), Sextante
+					.getText("grass_error_title"), JOptionPane.ERROR_MESSAGE);
+			jGrassFolder.setFilepath("");
+			failed = true;
+		} finally {
+			this.setCursor(Cursor.getDefaultCursor());
+		}
+		// 2: On Windows: sh.exe
+		if (Sextante.isWindows() && (failed == false)) {
+			try {
+				this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+				if (checkGrassWinShell(jWinShellFile.getFilepath()) > 0) {
+					this.setCursor(Cursor.getDefaultCursor());
+					JOptionPane.showMessageDialog(null, Sextante
+							.getText("grass_warning_missing_cmd"), Sextante
+							.getText("grass_warning_title"),
+							JOptionPane.WARNING_MESSAGE);
+				}
+				this.setCursor(Cursor.getDefaultCursor());
+			} catch (final WrongGrassWinShellException e) {
+				this.setCursor(Cursor.getDefaultCursor());
+				JOptionPane.showMessageDialog(null, Sextante
+						.getText("grass_error_win_shell_binary")
+						+ "\n" + Sextante.getText("grass_shell_url"), Sextante
+						.getText("grass_error_title"),
+						JOptionPane.ERROR_MESSAGE);
+				failed = true;
+				GrassAlgorithmProvider.deleteAlgorithms();
+				SextanteGUI.getGUIFactory().updateToolbox();
+				jWinShellFile.setFilepath("");
+			} finally {
+				this.setCursor(Cursor.getDefaultCursor());
+			}
+		}
+
+		// 3: GRASS version
+		if (!isSupported() && (failed == false)) {
+			this.setCursor(Cursor.getDefaultCursor());
+			JOptionPane.showMessageDialog(null, Sextante
+					.getText("grass_warning_version"), Sextante
+					.getText("grass_warning_title"),
+					JOptionPane.WARNING_MESSAGE);
+		}
+
+		// Setup GRASS!!!
+		int num_algs = 0;
+		try {
+			this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+			num_algs = GrassAlgorithmProvider
+					.createAlgorithmsDescriptionFiles();
+			this.setCursor(Cursor.getDefaultCursor());
+		} catch (final Exception e) {
+			this.setCursor(Cursor.getDefaultCursor());
+			JOptionPane.showMessageDialog(null, Sextante
+					.getText("grass_error_setup"), "",
+					JOptionPane.ERROR_MESSAGE);
+		} finally {
+			this.setCursor(Cursor.getDefaultCursor());
+		}
+		this.setCursor(Cursor.getDefaultCursor());
+		if (num_algs > 0) {
+			// Success
+			SextanteGUI.updateAlgorithmProvider(GrassAlgorithmProvider.class);
+			final HashMap<String, GeoAlgorithm> algs = Sextante.getAlgorithms()
+					.get("GRASS");
+			int iNumAlgs = 0;
+			if (algs != null) {
+				iNumAlgs = algs.size();
+			}
+			JOptionPane.showMessageDialog(null, Sextante
+					.getText("grass_info_setup_success")
+					+ " " + iNumAlgs + ". ", Sextante
+					.getText("grass_info_title"),
+					JOptionPane.INFORMATION_MESSAGE);
+		}
+	}
+
+	private void checkGrassFolder() throws WrongGrassFolderException {
+
+		final String grassFolder = jGrassFolder.getFilepath();
+		// Minimal set of GRASS modules we need
+		final String[] check_modules = { "g.region", "g.remove", "r.in.gdal",
+				"r.info", "r.null", "r.out.gdal", "v.in.ogr", "v.info",
+				"v.out.ogr", null };
+
+		// Check if this is actually a valid shell and throw an error, if it's
+		// not.
+		if (grassFolder == null) {
+			throw new WrongGrassFolderException();
+		}
+
+		if (grassFolder.length() < 2) {
+			throw new WrongGrassFolderException();
+		}
+
+		if (grassFolder.trim().equals("")) {
+			throw new WrongGrassFolderException();
+		}
+
+		File check = new File(grassFolder);
+		if (!check.exists()) {
+			throw new WrongGrassFolderException();
+		}
+
+		check = new File(grassFolder + File.separator + "etc" + File.separator
+				+ "VERSIONNUMBER");
+		if (!check.exists()) {
+			throw new WrongGrassFolderException();
+		}
+
+		// Check for minimal set of GRASS modules
+		int i = 0;
+		while (check_modules[i] != null) {
+			if (Sextante.isUnix() || Sextante.isMacOSX()) {
+				check = new File(grassFolder + File.separator + "bin"
+						+ File.separator + check_modules[i]);
+			} else {
+				check = new File(grassFolder + File.separator + "bin"
+						+ File.separator + check_modules[i] + ".exe");
+			}
+			if (!check.exists()) {
+				throw new WrongGrassFolderException();
+			}
+			i++;
+		}
+
+	}
+
+	private int checkGrassWinShell(final String grassWinShell)
+			throws WrongGrassWinShellException {
+
+		int num_missing = 0;
+
+		// Minimal set of command line tools we need to run GRASS scripts
+		final String[] check_commands = { "which", "gawk.exe", "cut.exe",
+				"grep.exe", "basename.exe", "sed.exe", "install.exe",
+				"curl.exe", "bc.exe", "wc.exe", "paste.exe", "head.exe",
+				"tail.exe", "cat.exe", "expr.exe", "xargs.exe", "ls.exe",
+				"sort.exe", "cs2cs.exe", "gdalwarp.exe", "unzip.exe" };
+
+		// r.in.aster needs gdalwarp
+		// r.in.srtm needs unzip
+		// bc.exe needs readline5.dll
+		// v.in.garmin needs gpstrans and gardump
+		// v.in/out.gpsbabel need gpsbabel
+		// some scripts need curl
+		// some scripts need cs2cs
+
+		// Check if this is actually a valid shell and throw an error, if it's
+		// not.
+		if (grassWinShell == null) {
+			throw new WrongGrassWinShellException();
+		}
+
+		if (grassWinShell.length() < 2) {
+			throw new WrongGrassWinShellException();
+		}
+
+		if (grassWinShell.trim().equals("")) {
+			throw new WrongGrassWinShellException();
+		}
+
+		final File check = new File(grassWinShell);
+		if (!check.exists()) {
+			throw new WrongGrassWinShellException();
+		}
+
+		// Look for required (recommended) binaries in "bin" folders of MSYS
+		// and GRASS installation.
+		// Note: if they are missing here, they could still be in some
+		// user-defined
+		// folder in %PATH%, so we only issue a warning and log all "missing"
+		// binary names.
+		String shToolsPath = grassWinShell;
+		shToolsPath = shToolsPath.substring(0, shToolsPath
+				.lastIndexOf(File.separator));
+		String GrassPath = jGrassFolder.getFilepath();
+		GrassPath = GrassPath + File.separator + "bin";
+		for (final String element : check_commands) {
+			boolean missing = false;
+			final File check_sh = new File(shToolsPath + File.separator
+					+ element);
+			final File check_grass = new File(GrassPath + File.separator
+					+ element);
+			if (!check_sh.exists() && !check_grass.exists()) {
+				missing = true;
+			}
+			if (missing == true) {
+				Sextante
+						.addWarningToLog("SEXTANTE GRASS interface: External command "
+								+ element
+								+ " not found in either '"
+								+ shToolsPath + "' or '" + GrassPath + "'");
+				num_missing++;
+			}
+		}
+
+		return (num_missing);
+	}
+
+	/*
+	 * Returns the major version number of the GRASS version we are running.
+	 * Returns "-1" if anything goes wrong.
+	 */
+	private static int getGrassMajorVersion() {
+
+		final String sFolder = SextanteGUI
+				.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+		InputStreamReader isr = null;
+		BufferedReader br = null;
+		try {
+			final File file = new File(sFolder + File.separator + "etc"
+					+ File.separator + "VERSIONNUMBER");
+			isr = new InputStreamReader(new FileInputStream(file));
+			br = new BufferedReader(isr);
+			final String sLine = br.readLine();
+			final String[] sNumbers = sLine.split("\\.");
+			final String sMajor = sNumbers[0];
+			return (Integer.parseInt(sMajor));
+		} catch (final Exception e) {
+			return (-1);
+		} finally {
+			try {
+				br.close();
+				isr.close();
+			} catch (final Exception e) {
+				return (-1);
+			}
+		}
+	}
+
+	/*
+	 * Returns the minor version number of the GRASS version we are running.
+	 * Returns "-1" if anything goes wrong.
+	 */
+	private static int getGrassMinorVersion() {
+
+		final String sFolder = SextanteGUI
+				.getSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER);
+		InputStreamReader isr = null;
+		BufferedReader br = null;
+		try {
+			final File file = new File(sFolder + File.separator + "etc"
+					+ File.separator + "VERSIONNUMBER");
+			isr = new InputStreamReader(new FileInputStream(file));
+			br = new BufferedReader(isr);
+			final String sLine = br.readLine();
+			final String[] sNumbers = sLine.split("\\.");
+			final String sMinor = sNumbers[1];
+			return (Integer.parseInt(sMinor));
+		} catch (final Exception e) {
+			return (-1);
+		} finally {
+			try {
+				br.close();
+				isr.close();
+			} catch (final Exception e) {
+				return (-1);
+			}
+		}
+	}
+
+	/*
+	 * Returns true only if the detected GRASS version is not too old or too
+	 * young to be supported by this interface.
+	 */
+	public static boolean isSupported() {
+		if ((getGrassMajorVersion() < MAJOR_MIN)
+				|| (getGrassMajorVersion() > MAJOR_MAX)) {
+			return (false);
+		}
+		if ((getGrassMinorVersion() < MINOR_MIN)
+				|| (getGrassMinorVersion() > MINOR_MAX)) {
+			return (false);
+		}
+		return (true);
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SettingPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SettingPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SettingPanel.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gui.settings;
+
+import java.awt.Dimension;
+import java.util.HashMap;
+
+import javax.swing.JPanel;
+
+import es.unex.sextante.gui.exceptions.WrongSettingValuesException;
+
+public abstract class SettingPanel
+         extends
+            JPanel {
+
+
+   public SettingPanel() {
+
+      super();
+      setPreferredSize(new Dimension(400, 300));
+
+      initGUI();
+   }
+
+
+   protected abstract void initGUI();
+
+
+   public abstract HashMap<String, String> getValues() throws WrongSettingValuesException;
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SettingPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationDialog.java	(revision 369)
@@ -0,0 +1,182 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.TableModel;
+import javax.swing.table.TableColumn;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupConfiguration;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupsOrganizer;
+
+public class AlgorithmGroupsConfigurationDialog
+extends
+JDialog {
+
+
+	private HashMap<String, AlgorithmGroupConfiguration> m_Map;
+	private JButton                                      jButtonCancel;
+	private JButton                                      jButtonRestore;
+	private JTable                                       jTable;
+	private JScrollPane                                  jScrollPane;
+	private JButton                                      jButtonOK;
+	private boolean                                      m_bIsDefaultSettings;
+
+
+	public AlgorithmGroupsConfigurationDialog() {
+
+		super(SextanteGUI.getMainFrame(), true);
+		initGUI();
+
+	}
+
+
+	private void initGUI() {
+
+		m_Map = AlgorithmGroupsOrganizer.getGrouppingMap();
+
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ 3.0,
+					TableLayout.MINIMUM, // 1: Restore Default
+					TableLayout.FILL, // 2: Filler
+					90.0, // 3: Cancel
+					6.0, // 4: Spacer
+					90.0, // 5: Ok
+					3.0 },
+				{ 3.0, TableLayout.FILL, 3.0, 30.0, 3.0 } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		getContentPane().setLayout(thisLayout);
+
+		{
+			jButtonRestore = new JButton();
+			getContentPane().add(jButtonRestore, "1, 3");
+			jButtonRestore.setText(Sextante.getText("RestoreDefault"));
+			jButtonRestore.addActionListener(new ActionListener() {
+				public void actionPerformed(final ActionEvent evt) {
+					jButtonRestoreActionPerformed(evt);
+				}
+			});
+		}
+		{
+			jButtonCancel = new JButton();
+			getContentPane().add(jButtonCancel, "3, 3");
+			jButtonCancel.setText(Sextante.getText("Cancel"));
+			jButtonCancel.addActionListener(new ActionListener() {
+				public void actionPerformed(final ActionEvent evt) {
+					jButtonCancelActionPerformed(evt);
+				}
+			});
+		}
+		{
+			jButtonOK = new JButton();
+			getContentPane().add(jButtonOK, "5, 3");
+			jButtonOK.setText(Sextante.getText("OK"));
+			jButtonOK.addActionListener(new ActionListener() {
+				public void actionPerformed(final ActionEvent evt) {
+					jButtonOKActionPerformed(evt);
+				}
+			});
+		}
+		{
+			jScrollPane = new JScrollPane();
+			getContentPane().add(jScrollPane, "1, 1, 5, 1");
+			TableModel jTableModel;
+			if (m_Map.size() == 0) {
+				jTableModel = new AlgorithmGroupsConfigurationTableModel(this);
+				m_bIsDefaultSettings = true;
+			}
+			else {
+				jTableModel = new AlgorithmGroupsConfigurationTableModel(m_Map, this);
+			}
+			jTable = new JTable();
+			jTable.getTableHeader().setReorderingAllowed(false);
+			jScrollPane.setViewportView(jTable);
+			jTable.setModel(jTableModel);
+			TableColumn column = null;
+			/* Set column widths. */
+			for (int i = 0; i < 5; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    column.setPreferredWidth(100);
+			    if ( i == 2 || i == 4 ) {
+			        column.setPreferredWidth(50);
+			    }
+			    if ( i == 1 ) {
+			    	column.setPreferredWidth(150);
+			    }
+			}
+
+		}
+		{
+			this.setTitle(Sextante.getText("Toolbox")+ " - " + Sextante.getText("ConfigureAlgGroups"));
+			this.setSize(800, 500);
+			//this.pack();
+			this.setLocationRelativeTo(null);
+		}
+
+
+	}
+
+
+	public HashMap<String, AlgorithmGroupConfiguration> getGrouppingsMap() {
+
+		return m_Map;
+
+	}
+
+
+	private void jButtonOKActionPerformed(final ActionEvent evt) {
+
+		m_Map.clear();
+		if (!m_bIsDefaultSettings) {
+			for (int i = 0; i < jTable.getRowCount(); i++) {
+				final AlgorithmGroupConfiguration conf = new AlgorithmGroupConfiguration();
+				conf.setGroup(jTable.getValueAt(i, 2).toString());
+				conf.setSubgroup(jTable.getValueAt(i, 3).toString());
+				conf.setShow(((Boolean) jTable.getValueAt(i, 4)).booleanValue());
+				m_Map.put(jTable.getValueAt(i, 0).toString(), conf);
+			}
+		}
+		this.dispose();
+		this.setVisible(false);
+
+	}
+
+
+	private void jButtonCancelActionPerformed(final ActionEvent evt) {
+
+		m_Map = null;
+		this.dispose();
+		this.setVisible(false);
+
+
+	}
+
+
+	private void jButtonRestoreActionPerformed(final ActionEvent evt) {
+
+		m_Map.clear();
+		final TableModel jTableModel = new AlgorithmGroupsConfigurationTableModel(this);
+		jTable.setModel(jTableModel);
+		m_bIsDefaultSettings = true;
+
+	}
+
+
+	public void hasBeenModified() {
+
+		m_bIsDefaultSettings = false;
+
+	}
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettings.java	(revision 369)
@@ -0,0 +1,48 @@
+package es.unex.sextante.gui.settings;
+
+import java.io.File;
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+public class SextanteRSettings
+         extends
+            Setting {
+
+   public static final String R_ACTIVATE       = "RActivate";
+   public static final String R_PORTABLE       = "RPortable";
+   public static final String R_FOLDER         = "RFolder";
+   public static final String R_SCRIPTS_FOLDER = "RScriptsFolder";
+
+
+   @Override
+   public void createPanel() {
+
+      panel = new SextanteRSettingsPanel();
+
+   }
+
+
+   @Override
+   public String getName() {
+
+      return "R";
+
+   }
+
+
+   @Override
+   public HashMap<String, String> getInitValues() {
+
+      final HashMap<String, String> map = new HashMap<String, String>();
+      map.put(R_ACTIVATE, Boolean.FALSE.toString());
+      map.put(R_PORTABLE, Boolean.TRUE.toString());
+      map.put(R_FOLDER, SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_FOLDER);
+      map.put(R_FOLDER, SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_SCRIPTS_FOLDER);
+      return map;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteRSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteConfigurationDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteConfigurationDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteConfigurationDialog.java	(revision 369)
@@ -0,0 +1,243 @@
+package es.unex.sextante.gui.settings;
+
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTree;
+import javax.swing.JLabel;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongSettingValuesException;
+import es.unex.sextante.gui.toolbox.ToolboxPanel;
+
+public class SextanteConfigurationDialog
+         extends
+            JDialog {
+
+   private final Setting[]               m_Settings;
+   private SettingPanel                  m_CurrentPanel;
+   private TreePath                      m_Path;
+   private final HashMap<String, String> m_Values;
+
+   private JButton                       jButtonCancel;
+   private JTree                         jTree;
+   private JSplitPane                    jSplitPane;
+   private JButton                       jButtonOk;
+   private JLabel						 jLabelVersion;
+
+   public static final double SPACER_SMALL = 3.0;
+   public static final double SPACER_MEDIUM = 6.0;
+   public static final double SPACER_LARGE = 9.0;
+
+   /**
+    * Constructor
+    *
+    * @param panel
+    *                the current toolbox panel. It will be updated with the changes made in this dialog
+    * @param parent
+    *                The parent dialog of this settings dialog
+    */
+   public SextanteConfigurationDialog(final ToolboxPanel panel,
+                                      final JDialog parent) {
+
+      super(parent, Sextante.getText("Toolbox")+ " - " + Sextante.getText("Settings"), true);
+
+      final Setting[] settings = new Setting[] { new SextanteGeneralSettings() };
+      final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+      m_Settings = new Setting[settings.length + providers.size()];
+      System.arraycopy(settings, 0, m_Settings, 0, settings.length);
+      for (int i = 0; i < providers.size(); i++) {
+         m_Settings[i + settings.length] = providers.get(i).getSettings();
+      }
+
+      m_Values = new HashMap<String, String>();
+
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   /**
+    * Constructor. Uses the main frame as the parent component
+    *
+    * @param panel
+    *                the current toolbox panel. It will be updated with the changes made in this dialog
+    */
+   public SextanteConfigurationDialog(final ToolboxPanel panel) {
+
+      super(SextanteGUI.getMainFrame(), Sextante.getText("Toolbox")+ " - " + Sextante.getText("Settings"), true);
+
+      final Setting[] settings = new Setting[] { new SextanteGeneralSettings() }; // add more Setting objects here if required
+      final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+      m_Settings = new Setting[settings.length + providers.size()];
+      System.arraycopy(settings, 0, m_Settings, 0, settings.length);
+      for (int i = 0; i < providers.size(); i++) {
+         m_Settings[i + settings.length] = providers.get(i).getSettings();
+      }
+
+      m_Values = new HashMap<String, String>();
+
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   protected void changeSetting() {
+
+      if (m_Path != null) {
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+         final Object obj = node.getUserObject();
+         if (obj instanceof Setting) {
+            final Setting setting = (Setting) obj;
+            try {
+               final HashMap<String, String> values = m_CurrentPanel.getValues();
+               jSplitPane.remove(m_CurrentPanel);
+               m_CurrentPanel = setting.getPanel();
+               jSplitPane.add(m_CurrentPanel, JSplitPane.RIGHT);
+               m_CurrentPanel.setPreferredSize(new java.awt.Dimension(389, 211));
+               final Set<String> set = values.keySet();
+               final Iterator<String> iter = set.iterator();
+               while (iter.hasNext()) {
+                  final String key = iter.next();
+                  m_Values.put(key, values.get(key));
+               }
+            }
+            catch (final WrongSettingValuesException e) {
+               JOptionPane.showMessageDialog(null, e.getMessage(), "", JOptionPane.WARNING_MESSAGE);
+            }
+         }
+      }
+
+   }
+
+
+   private void fillTree() {
+
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Settings"));
+      for (final Setting element : m_Settings) {
+         final DefaultMutableTreeNode node = new DefaultMutableTreeNode(element);
+         mainNode.add(node);
+      }
+      final DefaultTreeModel model = new DefaultTreeModel(mainNode);
+      jTree.setModel(model);
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 3.0, 160.0, TableLayoutConstants.FILL, 170.0, 3.0, 170.0, 3.0 },
+               { TableLayoutConstants.FILL, 3.0, 30.0, 3.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      getContentPane().setLayout(thisLayout);
+      this.setResizable(false);
+      {
+    	  jLabelVersion = new JLabel();
+    	  jLabelVersion.setText("<html><i>" + Sextante.getText("version") +
+    			  " " + Sextante.getVersionNumber() + "</i></html>");
+    	  getContentPane().add(jLabelVersion, "1, 2");
+      }
+      {
+         jButtonCancel = new JButton();
+         getContentPane().add(jButtonCancel, "3, 2");
+         jButtonCancel.setText(Sextante.getText("Cancel"));
+         jButtonCancel.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               jButtonCancelActionPerformed(evt);
+            }
+         });
+      }
+      {
+         jButtonOk = new JButton();
+         getContentPane().add(jButtonOk, "5, 2");
+         jButtonOk.setText(Sextante.getText("OK"));
+         jButtonOk.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               jButtonOkActionPerformed(evt);
+            }
+         });
+      }
+      {
+         jSplitPane = new JSplitPane();
+         getContentPane().add(jSplitPane, "0, 0, 6, 1");
+         {
+            jTree = new JTree();
+            jTree.setPreferredSize(new java.awt.Dimension(164, 422));
+            jSplitPane.add(jTree, JSplitPane.LEFT);
+            final MouseListener ml = new MouseAdapter() {
+               @Override
+               public void mousePressed(MouseEvent e) {
+                  m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+                  changeSetting();
+               }
+            };
+            jTree.addMouseListener(ml);
+            fillTree();
+         }
+      }
+      this.setSize(634, 466);
+
+      m_CurrentPanel = m_Settings[0].getPanel();
+      jSplitPane.add(m_CurrentPanel, JSplitPane.RIGHT);
+      jTree.setSelectionRow(1);
+
+   }
+
+
+   private void jButtonOkActionPerformed(final ActionEvent evt) {
+
+      try {
+         final HashMap<String, String> values = m_CurrentPanel.getValues();
+         final Set<String> set = values.keySet();
+         final Iterator<String> iter = set.iterator();
+         while (iter.hasNext()) {
+            final String key = iter.next();
+            m_Values.put(key, values.get(key));
+         }
+
+         SextanteGUI.setSettings(m_Values);
+         SextanteGUI.saveSettings();
+
+         dispose();
+         setVisible(false);
+
+         SextanteGUI.getGUIFactory().updateToolbox();
+      }
+      catch (final WrongSettingValuesException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), "", JOptionPane.WARNING_MESSAGE);
+      }
+
+   }
+
+
+   private void jButtonCancelActionPerformed(final ActionEvent evt) {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteConfigurationDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettingsPanel.java	(revision 369)
@@ -0,0 +1,143 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.cmd.ScriptAlgorithmProvider;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class SextanteScriptsSettingsPanel
+extends
+SettingPanel {
+
+//	private JCheckBox          jPortableCheckBox;
+	private JLabel             jLabelScripts;
+	private FileSelectionPanel jScriptsFolder;
+	private JLabel             jLabelUpdate;
+	private JButton            jButtonUpdate;
+
+
+	@Override
+	protected void initGUI() {
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ 	SextanteConfigurationDialog.SPACER_SMALL,
+					TableLayoutConstants.FILL,
+					TableLayoutConstants.FILL,
+					SextanteConfigurationDialog.SPACER_SMALL },
+					{ 	SextanteConfigurationDialog.SPACER_SMALL,
+						TableLayoutConstants.MINIMUM, //row 1
+						TableLayoutConstants.MINIMUM, //row 2
+						TableLayoutConstants.MINIMUM, //row 3
+						TableLayoutConstants.MINIMUM, //row 4
+						TableLayoutConstants.FILL } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		this.setLayout(thisLayout);
+
+//		jPortableCheckBox = new JCheckBox(Sextante.getText("Portable"));
+//		final String sActivatePortable = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_PORTABLE);
+		final boolean bActivatePortable = true;
+//		jPortableCheckBox.setSelected(bActivatePortable);
+//		this.add(jPortableCheckBox, "1, 1");
+
+		jLabelScripts = new JLabel();
+		jLabelScripts.setEnabled(true);
+		if (bActivatePortable == true) {
+			jLabelScripts.setEnabled(false);
+		}
+		jLabelScripts.setText(Sextante.getText("Scripts_folder"));
+		this.add(jLabelScripts, "1, 2");
+		jScriptsFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+		jScriptsFolder.getTextField().setEnabled(true);
+		jScriptsFolder.getButton().setEnabled(true);
+		if (bActivatePortable == true) {
+			jScriptsFolder.getTextField().setEnabled(false);
+			jScriptsFolder.getButton().setEnabled(false);
+		}
+		final String sFolder = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+		jScriptsFolder.setFilepath(sFolder);
+		this.add(jScriptsFolder, "2, 2");
+
+		this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 3, 2, 3");
+		/* ----------------------------------------------------------- */
+
+		jLabelUpdate = new JLabel();
+		jLabelUpdate.setText( Sextante.getText("update_library") );
+		jLabelUpdate.setEnabled(true);
+		this.add(jLabelUpdate, "1, 4");
+		jButtonUpdate = new JButton(Sextante.getText("load_scripts"));
+		this.add(jButtonUpdate, "2, 4");
+
+		/**********************************/
+		/** Action listeners for widgets **/
+		/**********************************/
+
+//		jPortableCheckBox.addActionListener(new ActionListener() {
+//			public void actionPerformed(final ActionEvent arg0) {
+//				setCursor(new Cursor(Cursor.WAIT_CURSOR));
+//				SextanteGUI.setSettingParameterValue(SextanteScriptsSettings.SCRIPTS_PORTABLE,
+//						new Boolean(jPortableCheckBox.isSelected()).toString());
+//				//Set portable user scripts folder
+//				SextanteGUI.checkDir ( Sextante.PORTABLE_SCRIPTS_FOLDER, true, "Toolbox user scripts" );
+//				String sPath = new String (SextanteGUI.getSextanteHomePath() + File.separator +
+//						Sextante.PORTABLE_SCRIPTS_FOLDER);
+//				SextanteGUI.setSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER, sPath);
+//				jScriptsFolder.setFilepath(sPath);
+//				//Activate/deactivate the remaining widgets on this page
+//				final boolean active = jPortableCheckBox.isSelected();
+//				if ( active == true ) {
+//					jLabelScripts.setEnabled(false);
+//					jScriptsFolder.getTextField().setEnabled(false);
+//					jScriptsFolder.getButton().setEnabled(false);
+//
+//				} else {
+//					jLabelScripts.setEnabled(true);
+//					jScriptsFolder.getTextField().setEnabled(true);
+//					jScriptsFolder.getButton().setEnabled(true);
+//
+//				}
+//				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+//			}
+//		});
+
+		jButtonUpdate.addActionListener(new ActionListener() {
+			public void actionPerformed(final ActionEvent arg0) {
+				SextanteGUI.setSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER, jScriptsFolder.getFilepath());
+				SextanteGUI.updateAlgorithmProvider(ScriptAlgorithmProvider.class);
+				final int iNumAlgs = Sextante.getAlgorithms().get(new ScriptAlgorithmProvider().getName()).size();
+				JOptionPane.showMessageDialog(null, Sextante.getText("ScriptsLoaded") + " " + iNumAlgs + ". ",
+						Sextante.getText("Scripts"), JOptionPane.INFORMATION_MESSAGE);
+			}
+		});
+	}
+
+
+	@Override
+	public HashMap<String, String> getValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(SextanteScriptsSettings.SCRIPTS_PORTABLE, Boolean.TRUE.toString());
+		final String path = jScriptsFolder.getFilepath();
+		if (path != null) {
+			map.put(SextanteScriptsSettings.SCRIPTS_FOLDER, path);
+		}
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteScriptsSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettingsPanel.java	(revision 369)
@@ -0,0 +1,146 @@
+package es.unex.sextante.gui.settings;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JSeparator;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.cmd.ScriptAlgorithmProvider;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.ModelerAlgorithmProvider;
+
+public class SextanteModelerSettingsPanel
+extends
+SettingPanel {
+
+
+/**
+	 *
+	 */
+	private static final long serialVersionUID = -8733800198911499985L;
+//	private JCheckBox          jPortableCheckBox;
+	private JLabel             jLabelModels;
+	private FileSelectionPanel jModelsFolder;
+	private JButton            jButtonUpdate;
+	private JLabel             jLabelUpdate;
+
+
+	@Override
+	protected void initGUI() {
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ 	SextanteConfigurationDialog.SPACER_SMALL,
+					TableLayoutConstants.FILL,
+					TableLayoutConstants.FILL,
+					SextanteConfigurationDialog.SPACER_SMALL },
+					{ 	SextanteConfigurationDialog.SPACER_SMALL,
+						TableLayoutConstants.MINIMUM, //row 1
+						TableLayoutConstants.MINIMUM, //row 2
+						TableLayoutConstants.MINIMUM, //row 3
+						TableLayoutConstants.MINIMUM, //row 4
+						TableLayoutConstants.FILL } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		this.setLayout(thisLayout);
+
+//		jPortableCheckBox = new JCheckBox(Sextante.getText("Portable"));
+//		final String sActivatePortable = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_PORTABLE);
+		final boolean bActivatePortable = true;
+//		jPortableCheckBox.setSelected(bActivatePortable);
+//		this.add(jPortableCheckBox, "1, 1");
+
+		jLabelModels = new JLabel();
+		jLabelModels.setEnabled(true);
+		if (bActivatePortable == true) {
+			jLabelModels.setEnabled(false);
+		}
+		jLabelModels.setText(Sextante.getText("Models_folder"));
+		this.add(jLabelModels, "1, 2");
+		jModelsFolder = new FileSelectionPanel(true, true, (String[]) null, Sextante.getText("selector_choose_folder"));
+		jModelsFolder.getTextField().setEnabled(true);
+		jModelsFolder.getButton().setEnabled(true);
+		if (bActivatePortable == true) {
+			jModelsFolder.getTextField().setEnabled(false);
+			jModelsFolder.getButton().setEnabled(false);
+		}
+		final String sFolder = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+		jModelsFolder.setFilepath(sFolder);
+		this.add(jModelsFolder, "2, 2");
+
+		this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 3, 2, 3");
+		/* ----------------------------------------------------------- */
+
+		jLabelUpdate = new JLabel();
+		jLabelUpdate.setText( Sextante.getText("update_library") );
+		jLabelUpdate.setEnabled(true);
+		this.add(jLabelUpdate, "1, 4");
+		jButtonUpdate = new JButton(Sextante.getText("load_models"));
+		this.add(jButtonUpdate, "2, 4");
+
+		/**********************************/
+		/** Action listeners for widgets **/
+		/**********************************/
+
+//		jPortableCheckBox.addActionListener(new ActionListener() {
+//			public void actionPerformed(final ActionEvent arg0) {
+//				setCursor(new Cursor(Cursor.WAIT_CURSOR));
+//				SextanteGUI.setSettingParameterValue(SextanteModelerSettings.MODELS_PORTABLE,
+//						new Boolean(jPortableCheckBox.isSelected()).toString());
+//				//Set portable user models folder
+//				SextanteGUI.checkDir ( Sextante.PORTABLE_MODELS_FOLDER, true, "Toolbox user models" );
+//				String sPath = new String (SextanteGUI.getSextanteHomePath() + File.separator +
+//						Sextante.PORTABLE_MODELS_FOLDER);
+//				SextanteGUI.setSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER, sPath);
+//				jModelsFolder.setFilepath(sPath);
+//				//Activate/deactivate the remaining widgets on this page
+////				final boolean active = jPortableCheckBox.isSelected();
+////				if ( active == true ) {
+//					jLabelModels.setEnabled(false);
+//					jModelsFolder.getTextField().setEnabled(false);
+//					jModelsFolder.getButton().setEnabled(false);
+//
+////				} else {
+////					jLabelModels.setEnabled(true);
+////					jModelsFolder.getTextField().setEnabled(true);
+////					jModelsFolder.getButton().setEnabled(true);
+////
+////				}
+//				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+//			}
+//		});
+
+		jButtonUpdate.addActionListener(new ActionListener() {
+			public void actionPerformed(final ActionEvent arg0) {
+				SextanteGUI.setSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER, jModelsFolder.getFilepath());
+				SextanteGUI.updateAlgorithmProvider(ModelerAlgorithmProvider.class);
+				final int iNumAlgs = Sextante.getAlgorithms().get(new ModelerAlgorithmProvider().getName()).size();
+				JOptionPane.showMessageDialog(null, Sextante.getText("ModelsLoaded") + " " + iNumAlgs + ". ",
+						Sextante.getText("Models"), JOptionPane.INFORMATION_MESSAGE);
+			}
+		});
+	}
+
+
+	@Override
+	public HashMap<String, String> getValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		final String path = jModelsFolder.getFilepath();
+		map.put(SextanteModelerSettings.MODELS_PORTABLE, Boolean.TRUE.toString());
+		if (path != null) {
+			map.put(SextanteModelerSettings.MODELS_FOLDER, path);
+		}
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteModelerSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationTableModel.java	(revision 369)
@@ -0,0 +1,159 @@
+package es.unex.sextante.gui.settings;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupConfiguration;
+
+public class AlgorithmGroupsConfigurationTableModel
+         extends
+            AbstractTableModel {
+
+   private final Object[][]                         m_Data;
+   private final String[]                           COLUMN_NAMES;
+   private final AlgorithmGroupsConfigurationDialog m_Parent;
+
+
+   public AlgorithmGroupsConfigurationTableModel(final HashMap<String, AlgorithmGroupConfiguration> confMap,
+                                                 final AlgorithmGroupsConfigurationDialog parent) {
+
+
+      m_Parent = parent;
+
+      COLUMN_NAMES = new String[] { Sextante.getText("AlgName"), Sextante.getText("AlgCmdName"), Sextante.getText("AlgGroup"),
+               Sextante.getText("AlgSubgroup"), Sextante.getText("ShowAlgorithm") };
+
+      final ArrayList<Object> data = new ArrayList<Object>();
+      final HashMap<String, HashMap<String, GeoAlgorithm>> map = Sextante.getAlgorithms();
+
+      final Set<String> set = map.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sKey = iter.next();
+         final HashMap<String, GeoAlgorithm> group = map.get(sKey);
+         final Set<String> set2 = group.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final String sKey2 = iter2.next();
+            final GeoAlgorithm alg = group.get(sKey2);
+            final AlgorithmGroupConfiguration conf = confMap.get(alg.getCommandLineName());
+            if (conf == null) {
+               data.add(new Object[] { alg.getCommandLineName(), alg.getName(), sKey, alg.getGroup(), Boolean.TRUE });
+            }
+            else {
+               data.add(new Object[] { alg.getCommandLineName(), alg.getName(), conf.getGroup(), conf.getSubgroup(),
+                        new Boolean(conf.isShow()) });
+            }
+         }
+      }
+
+      m_Data = new Object[data.size()][5];
+      for (int j = 0; j < m_Data.length; j++) {
+         m_Data[j] = (Object[]) data.get(j);
+      }
+
+   }
+
+
+   public AlgorithmGroupsConfigurationTableModel(final AlgorithmGroupsConfigurationDialog parent) {
+
+      super();
+
+      m_Parent = parent;
+
+      COLUMN_NAMES = new String[] { Sextante.getText("AlgCmdName"), Sextante.getText("AlgName"), Sextante.getText("AlgGroup"),
+               Sextante.getText("AlgSubgroup"), Sextante.getText("ShowAlgorithm") };
+
+      final ArrayList<Object> data = new ArrayList<Object>();
+      final HashMap<String, HashMap<String, GeoAlgorithm>> map = Sextante.getAlgorithms();
+
+      final Set<String> set = map.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sKey = iter.next();
+         final HashMap<String, GeoAlgorithm> group = map.get(sKey);
+         final Set<String> set2 = group.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final String sKey2 = iter2.next();
+            final GeoAlgorithm alg = group.get(sKey2);
+            data.add(new Object[] { alg.getCommandLineName(), alg.getName(), sKey, alg.getGroup(), Boolean.TRUE });
+         }
+      }
+
+      m_Data = new Object[data.size()][5];
+      for (int j = 0; j < m_Data.length; j++) {
+         m_Data[j] = (Object[]) data.get(j);
+      }
+
+
+   }
+
+
+   public int getColumnCount() {
+
+
+      return 5;
+
+   }
+
+
+   public int getRowCount() {
+
+      return m_Data.length;
+
+   }
+
+
+   public Object getValueAt(final int rowIndex,
+                            final int columnIndex) {
+
+      return m_Data[rowIndex][columnIndex];
+
+   }
+
+
+   @Override
+   public String getColumnName(final int iCol) {
+
+      return COLUMN_NAMES[iCol];
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int c) {
+
+      return getValueAt(0, c).getClass();
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int iRow,
+                                 final int iCol) {
+
+      return (iCol != 0) && (iCol != 1);
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int row,
+                          final int col) {
+
+      m_Data[row][col] = value;
+      m_Parent.hasBeenModified();
+      fireTableCellUpdated(row, col);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/AlgorithmGroupsConfigurationTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettings.java	(revision 369)
@@ -0,0 +1,48 @@
+
+
+package es.unex.sextante.gui.settings;
+
+import java.io.File;
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+public class SextanteSagaSettings
+extends
+Setting {
+
+	public static final String SAGA_ACTIVATE      = "SagaActivate";
+	public static final String SAGA_PORTABLE      = "SagaPortable";
+	public static final String SAGA_FOLDER        = "SagaFolder";
+
+
+	@Override
+	public void createPanel() {
+
+		panel = new SextanteSagaSettingsPanel();
+
+	}
+
+
+	@Override
+	public String getName() {
+
+		return "SAGA";
+
+	}
+
+
+	@Override
+	public HashMap<String, String> getInitValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(SAGA_ACTIVATE, Boolean.FALSE.toString());
+		map.put(SAGA_PORTABLE, Boolean.TRUE.toString());
+		map.put(SAGA_FOLDER, SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_SAGA_FOLDER);
+		return map;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteSagaSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettings.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.settings;
+
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+
+public class SextanteGeneralSettings
+         extends
+            Setting {
+
+   public static final String RESULTS_FOLDER 		= "ResultsFolder";
+   public static final String MODIFY_NAMES          = "ModifyNames";
+   public static final String USE_INTERNAL_NAMES    = "UseInternalNames";
+   public static final String DEFAULT_NO_DATA_VALUE = "NoDataValue";
+   public static final String SHOW_MOST_RECENT      = "ShowMostRecent";
+
+
+   @Override
+   public String getName() {
+      return Sextante.getText("General");
+   }
+
+
+   @Override
+   public void createPanel() {
+
+      panel = new SextanteGeneralSettingsPanel();
+
+   }
+
+
+   @Override
+   public HashMap<String, String> getInitValues() {
+
+      final HashMap<String, String> map = new HashMap<String, String>();
+      map.put(RESULTS_FOLDER, System.getProperty("user.home"));
+      map.put(MODIFY_NAMES, Boolean.FALSE.toString());
+      map.put(USE_INTERNAL_NAMES, Boolean.FALSE.toString());
+      map.put(DEFAULT_NO_DATA_VALUE, "-99999");
+
+      return map;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGeneralSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettings.java	(revision 369)
@@ -0,0 +1,65 @@
+
+
+package es.unex.sextante.gui.settings;
+
+import java.io.File;
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+public class SextanteGrassSettings
+extends
+Setting {
+
+	public static final String GRASS_ACTIVATE        = "GrassActivate";
+	public static final String GRASS_PORTABLE        = "GrassPortable";
+	public static final String GRASS_FOLDER          = "GrassBinariesFolder";
+	public static final String GRASS_WIN_SHELL       = "GrassWinShell";
+	public static final String GRASS_LAT_LON_MODE    = "GrassLatLonMode";
+	public static final String GRASS_3D_V_MODE       = "Grass3DVMode";
+	public static final String GRASS_NO_VECT_BBOX    = "GrassNoVectBBox";
+	public static final String GRASS_IN_POLYLINES    = "GrassInPolylines";
+	public static final String GRASS_CLEAN_POLYGONS  = "GrassCleanPolygons";
+	public static final String GRASS_USE_SEXTANTE_NULL  = "GrassUseSextanteNull";
+	public static final String GRASS_COMPATIBILITY_MODE  = "GrassCompatibilityMode";
+
+
+	@Override
+	public HashMap<String, String> getInitValues() {
+
+		final HashMap<String, String> map = new HashMap<String, String>();
+		map.put(GRASS_ACTIVATE, Boolean.FALSE.toString());
+		map.put(GRASS_PORTABLE, Boolean.TRUE.toString());
+		map.put(GRASS_FOLDER, SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_GRASS_FOLDER);
+		map.put(GRASS_WIN_SHELL, SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_MSYS_FILE);
+		map.put(GRASS_LAT_LON_MODE, Boolean.FALSE.toString());
+		map.put(GRASS_3D_V_MODE, Boolean.FALSE.toString());
+		map.put(GRASS_NO_VECT_BBOX, Boolean.FALSE.toString());
+		map.put(GRASS_IN_POLYLINES, Boolean.FALSE.toString());
+		map.put(GRASS_CLEAN_POLYGONS, Boolean.FALSE.toString());
+		map.put(GRASS_USE_SEXTANTE_NULL, Boolean.FALSE.toString());
+		map.put(GRASS_COMPATIBILITY_MODE, Boolean.FALSE.toString());
+
+		return map;
+
+	}
+
+
+	@Override
+	public void createPanel() {
+
+		panel = new SextanteGrassSettingsPanel();
+
+	}
+
+
+	@Override
+	public String getName() {
+
+		return "GRASS";
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/SextanteGrassSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/Setting.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/Setting.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/Setting.java	(revision 369)
@@ -0,0 +1,37 @@
+package es.unex.sextante.gui.settings;
+
+import java.util.HashMap;
+
+public abstract class Setting {
+
+   protected SettingPanel panel;
+
+
+   public SettingPanel getPanel() {
+
+      if (panel == null) {
+         createPanel();
+      }
+
+      return panel;
+
+   }
+
+
+   public abstract void createPanel();
+
+
+   public abstract String getName();
+
+
+   @Override
+   public String toString() {
+
+      return getName();
+
+   }
+
+
+   public abstract HashMap<String, String> getInitValues();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/settings/Setting.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AnalysisExtentPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AnalysisExtentPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AnalysisExtentPanel.java	(revision 369)
@@ -0,0 +1,428 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+
+public class AnalysisExtentPanel
+         extends
+            javax.swing.JPanel {
+
+   protected static final int   BIG_SIZE = 5000000;
+
+   private JTextField           jTextFieldCols;
+   private JTextField           jTextFieldRows;
+   protected JTextField         jTextFieldCellSize;
+   protected JTextField         jTextFieldXMax;
+   protected JTextField         jTextFieldXMin;
+   protected JTextField         jTextFieldYMax;
+   protected JTextField         jTextFieldYMin;
+   private JLabel               jLabelRowsCols;
+   private JLabel               jLabelCellSize;
+   private JLabel               jLabelRangeY;
+   private JLabel               jLabelRangeX;
+   protected JPanel             jPanelAnalysisExtentValues;
+   private JPanel               jPanelAnalysisExtentOptions;
+   private JRadioButton         jRadioButtonAdjustToInputDataExtent;
+   private JRadioButton         jRadioButtonUserDefinedExtent;
+   private ButtonGroup          jButtonGroup;
+
+   protected final GeoAlgorithm m_Algorithm;
+   protected AnalysisExtent     m_AnalysisExtent;
+
+
+   public AnalysisExtentPanel(final GeoAlgorithm algorithm) {
+
+      super();
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      /*final TableLayout jPanelParametersRasterLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 10.0 },
+               { TableLayoutConstants.FILL, 140.0, 120.0, TableLayoutConstants.FILL } });*/
+      final TableLayout jPanelAnalysisExtentLayout = new TableLayout(new double[][] { { 1.0, TableLayoutConstants.FILL, 1.0 },
+               { 1.0,/*TableLayoutConstants.FILL,*/TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, /*140.0, 120.0,*/
+               1.0 /*TableLayoutConstants.FILL*/} });
+      jPanelAnalysisExtentLayout.setHGap(5);
+      jPanelAnalysisExtentLayout.setVGap(5);
+      this.setLayout(jPanelAnalysisExtentLayout);
+
+      this.add(getJPanelAnalysisExtentOptions(), "1, 1");
+      this.add(getJPanelAnalysisExtentValues(), "1, 2");
+      if (m_Algorithm.canDefineOutputExtentFromInput()) {
+         getJPanelAnalysisExtentValues().setVisible(false);
+      }
+      else {
+         getJPanelAnalysisExtentValues().setVisible(true);
+      }
+
+   }
+
+
+   public void adjustExtent() throws TooLargeGridExtentException, WrongAnalysisExtentException {
+
+      m_Algorithm.setAnalysisExtent((AnalysisExtent) null);
+      m_AnalysisExtent = null;
+      if (!getJRadioButtonAdjustToInputDataExtent().isSelected()) {
+         m_AnalysisExtent = new AnalysisExtent();
+         try {
+            m_AnalysisExtent.setCellSize(Double.parseDouble(jTextFieldCellSize.getText()));
+            m_AnalysisExtent.setXRange(Double.parseDouble(jTextFieldXMin.getText()),
+                     Double.parseDouble(jTextFieldXMax.getText()), true);
+            m_AnalysisExtent.setYRange(Double.parseDouble(jTextFieldYMin.getText()),
+                     Double.parseDouble(jTextFieldYMax.getText()), true);
+         }
+         catch (final NumberFormatException e) {
+            throw new WrongAnalysisExtentException(Sextante.getText("Wrong_or_missing_region"));
+         }
+
+         /* benducke: let's just assume the other knows what (s)he is doing...
+         if (m_AnalysisExtent.getNX() * m_AnalysisExtent.getNY() > BIG_SIZE) {
+            throw new TooLargeGridExtentException(Sextante.getText("The_selected_grid_extent_seems_too_large") + "("
+                                                  + Integer.toString(m_AnalysisExtent.getNX()) + " X "
+                                                  + Integer.toString(m_AnalysisExtent.getNY()) + ")\n"
+                                                  + Sextante.getText("Are_you_sure_you_want_to_use_it?"));
+         }
+         */
+      }
+
+
+   }
+
+
+   private ButtonGroup getJButtonGroup() {
+      if (jButtonGroup == null) {
+         jButtonGroup = new ButtonGroup();
+      }
+      return jButtonGroup;
+   }
+
+
+   protected JRadioButton getJRadioButtonUserDefinedExtent() {
+
+      if (jRadioButtonUserDefinedExtent == null) {
+         jRadioButtonUserDefinedExtent = new JRadioButton();
+         jRadioButtonUserDefinedExtent.setText(Sextante.getText("User_defined"));
+         jRadioButtonUserDefinedExtent.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(final java.awt.event.ActionEvent e) {
+               setTextFieldsEnabled(true);
+               extentHasChanged();
+            }
+         });
+      }
+
+
+      return jRadioButtonUserDefinedExtent;
+   }
+
+
+   protected JRadioButton getJRadioButtonAdjustToInputDataExtent() {
+
+      if (jRadioButtonAdjustToInputDataExtent == null) {
+         jRadioButtonAdjustToInputDataExtent = new JRadioButton();
+         jRadioButtonAdjustToInputDataExtent.setText(Sextante.getText("Fit_to_input_layers"));
+         jRadioButtonAdjustToInputDataExtent.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(final java.awt.event.ActionEvent e) {
+               getJPanelAnalysisExtentValues().setVisible(false);
+            }
+         });
+      }
+
+
+      return jRadioButtonAdjustToInputDataExtent;
+   }
+
+
+   private JPanel getJPanelAnalysisExtentOptions() {
+      if (jPanelAnalysisExtentOptions == null) {
+         jPanelAnalysisExtentOptions = new JPanel();
+         final TableLayout jPanelRasterExtentOptionsLayout = new TableLayout(
+                  new double[][] {
+                           { 5., TableLayoutConstants.FILL, 5. },
+                           { TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                    TableLayoutConstants.FILL } });
+         jPanelRasterExtentOptionsLayout.setHGap(5);
+         jPanelRasterExtentOptionsLayout.setVGap(5);
+         jPanelAnalysisExtentOptions.setLayout(jPanelRasterExtentOptionsLayout);
+         jPanelAnalysisExtentOptions.setPreferredSize(new java.awt.Dimension(660, 150));
+         jPanelAnalysisExtentOptions.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Extent_from")));
+         jPanelAnalysisExtentOptions.add(getJRadioButtonUserDefinedExtent(), "1, 2");
+         getJButtonGroup().add(getJRadioButtonUserDefinedExtent());
+         if (m_Algorithm.canDefineOutputExtentFromInput()) {
+            jPanelAnalysisExtentOptions.add(getJRadioButtonAdjustToInputDataExtent(), "1, 1");
+            getJButtonGroup().add(getJRadioButtonAdjustToInputDataExtent());
+            getJRadioButtonAdjustToInputDataExtent().setSelected(true);
+         }
+         else {
+            getJRadioButtonUserDefinedExtent().setSelected(true);
+         }
+
+      }
+      return jPanelAnalysisExtentOptions;
+   }
+
+
+   protected JPanel getJPanelAnalysisExtentValues() {
+
+      if (jPanelAnalysisExtentValues == null) {
+         jPanelAnalysisExtentValues = new JPanel();
+         final TableLayout jPanelRasterExtentValuesLayout = new TableLayout(new double[][] {
+                  { 255.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL },
+                  { TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                           TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL } });
+         jPanelRasterExtentValuesLayout.setHGap(5);
+         jPanelRasterExtentValuesLayout.setVGap(5);
+         jPanelAnalysisExtentValues.setLayout(jPanelRasterExtentValuesLayout);
+         jPanelAnalysisExtentValues.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Extent__values")));
+         jPanelAnalysisExtentValues.setPreferredSize(new java.awt.Dimension(660, 145));
+         jPanelAnalysisExtentValues.add(getJLabelRangeX(), "0, 0");
+         jPanelAnalysisExtentValues.add(getJLabelCellSize(), "0, 2");
+         jPanelAnalysisExtentValues.add(getJTextFieldCellSize(), "1, 2");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMin(), "1, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMax(), "2, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMin(), "1, 1");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMax(), "2, 1");
+         jPanelAnalysisExtentValues.add(getJLabelRangeY(), "0, 1");
+         jPanelAnalysisExtentValues.add(getJLabelRowsCols(), "0, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldRows(), "1, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldCols(), "2, 3");
+      }
+      return jPanelAnalysisExtentValues;
+   }
+
+
+   protected JLabel getJLabelRangeX() {
+
+      if (jLabelRangeX == null) {
+         jLabelRangeX = new JLabel();
+         jLabelRangeX.setText(Sextante.getText("Range_X"));
+      }
+      return jLabelRangeX;
+
+   }
+
+
+   protected JTextField getNewJTextField() {
+
+      final JTextField jTextField = new JTextField();
+      jTextField.addFocusListener(new FocusAdapter() {
+         @Override
+         public void focusLost(final FocusEvent e) {
+            final JTextField textField = (JTextField) e.getSource();
+            final String content = textField.getText();
+            if (content.length() != 0) {
+               try {
+                  final double d = Double.parseDouble(content);
+                  extentHasChanged();
+               }
+               catch (final NumberFormatException nfe) {
+                  getToolkit().beep();
+                  textField.requestFocus();
+               }
+            }
+         }
+      });
+      jTextField.addKeyListener(new KeyAdapter() {
+         @Override
+         public void keyTyped(final KeyEvent event) {
+            validateKeyTyping(event);
+         }
+      });
+
+      return jTextField;
+   }
+
+
+   protected JTextField getJTextFieldXMin() {
+      if (jTextFieldXMin == null) {
+         jTextFieldXMin = getNewJTextField();
+      }
+      return jTextFieldXMin;
+   }
+
+
+   protected JTextField getJTextFieldXMax() {
+      if (jTextFieldXMax == null) {
+         jTextFieldXMax = getNewJTextField();
+      }
+      return jTextFieldXMax;
+   }
+
+
+   protected JTextField getJTextFieldYMin() {
+      if (jTextFieldYMin == null) {
+         jTextFieldYMin = getNewJTextField();
+      }
+      return jTextFieldYMin;
+   }
+
+
+   protected JTextField getJTextFieldYMax() {
+      if (jTextFieldYMax == null) {
+         jTextFieldYMax = getNewJTextField();
+      }
+      return jTextFieldYMax;
+   }
+
+
+   protected JLabel getJLabelRangeY() {
+      if (jLabelRangeY == null) {
+         jLabelRangeY = new JLabel();
+         jLabelRangeY.setText(Sextante.getText("Range_Y"));
+      }
+      return jLabelRangeY;
+   }
+
+
+   protected JLabel getJLabelCellSize() {
+      if (jLabelCellSize == null) {
+         jLabelCellSize = new JLabel();
+         jLabelCellSize.setText(Sextante.getText("Cell_size"));
+      }
+      return jLabelCellSize;
+   }
+
+
+   protected JTextField getJTextFieldCellSize() {
+      if (jTextFieldCellSize == null) {
+         jTextFieldCellSize = new JTextField();
+         jTextFieldCellSize.setText("1");
+         jTextFieldCellSize.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(final FocusEvent e) {
+               final JTextField textField = (JTextField) e.getSource();
+               final String content = textField.getText();
+               if (content.length() != 0) {
+                  try {
+                     final double d = Double.parseDouble(content);
+                     if (d <= 0) {
+                        throw new NumberFormatException();
+                     }
+                     else {
+                        extentHasChanged();
+                     }
+                  }
+                  catch (final NumberFormatException nfe) {
+                     getToolkit().beep();
+                     textField.requestFocus();
+                  }
+               }
+
+            }
+         });
+         jTextFieldCellSize.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyTyped(final KeyEvent event) {
+               validateKeyTyping(event);
+            }
+         });
+      }
+      return jTextFieldCellSize;
+   }
+
+
+   protected JLabel getJLabelRowsCols() {
+      if (jLabelRowsCols == null) {
+         jLabelRowsCols = new JLabel();
+         jLabelRowsCols.setText(Sextante.getText("Number_of_rows-cols"));
+      }
+      return jLabelRowsCols;
+   }
+
+
+   protected JTextField getJTextFieldRows() {
+      if (jTextFieldRows == null) {
+         jTextFieldRows = new JTextField();
+         jTextFieldRows.setEnabled(false);
+      }
+      return jTextFieldRows;
+   }
+
+
+   protected JTextField getJTextFieldCols() {
+      if (jTextFieldCols == null) {
+         jTextFieldCols = new JTextField();
+         jTextFieldCols.setEnabled(false);
+      }
+      return jTextFieldCols;
+   }
+
+
+   protected void validateKeyTyping(final KeyEvent event) {
+      String text = ((JTextField) event.getSource()).getText();
+      switch (event.getKeyChar()) {
+         case KeyEvent.VK_ENTER:
+            extentHasChanged();
+            break;
+         default:
+            text += event.getKeyChar();
+            break;
+      }
+   }
+
+
+   protected void setTextFieldsEnabled(final boolean bEnabled) {
+
+      getJPanelAnalysisExtentValues().setVisible(true);
+      getJTextFieldXMin().setEnabled(bEnabled);
+      getJTextFieldXMax().setEnabled(bEnabled);
+      getJTextFieldYMin().setEnabled(bEnabled);
+      getJTextFieldYMax().setEnabled(bEnabled);
+
+   }
+
+
+   protected void extentHasChanged() {
+
+      double dRangeX;
+      double dRangeY;
+      double dCellSize;
+      int iRows;
+      int iCols;
+
+      try {
+         dRangeX = Math.abs(Double.parseDouble(getJTextFieldXMax().getText()) - Double.parseDouble(getJTextFieldXMin().getText()));
+         dRangeY = Math.abs(Double.parseDouble(getJTextFieldYMax().getText()) - Double.parseDouble(getJTextFieldYMin().getText()));
+         dCellSize = Double.parseDouble(getJTextFieldCellSize().getText());
+         iRows = (int) Math.floor(dRangeY / dCellSize);
+         iCols = (int) Math.floor(dRangeX / dCellSize);
+         getJTextFieldRows().setText(Integer.toString(iRows));
+         getJTextFieldCols().setText(Integer.toString(iCols));
+      }
+      catch (final NumberFormatException e) {
+         return;
+      }
+
+   }
+
+
+   public AnalysisExtent getExtent() {
+
+      return m_AnalysisExtent;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AnalysisExtentPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersTableModel.java	(revision 369)
@@ -0,0 +1,266 @@
+package es.unex.sextante.gui.batch;
+
+import java.util.ArrayList;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+
+/**
+ * A Table model to be used for a batch process parameters panel
+ * 
+ * @author volaya
+ * 
+ */
+public class ParametersTableModel
+         extends
+            AbstractTableModel {
+
+   private final String[]      m_sColumnNames;
+   private final ArrayList[]   m_Data;
+   private final ParametersSet m_Parameters;
+
+   public static final int     INIT_ROWS = 2;
+
+
+   /**
+    * Constructor
+    * 
+    * @param ps
+    *                the set of input parameters to add to the table. A column will be added for each parameter
+    * @param ooSet
+    *                the set of outputs to add to the table. A column will be added for each output of type layer or table
+    */
+   public ParametersTableModel(final ParametersSet ps,
+                               final OutputObjectsSet ooSet) {
+
+      super();
+
+      int i, j;
+
+      m_Parameters = ps;
+
+      m_sColumnNames = new String[ps.getNumberOfParameters() + ooSet.getOutputDataObjectsCount()];
+      for (i = 0; i < ps.getNumberOfParameters(); i++) {
+         m_sColumnNames[i] = ps.getParameter(i).getParameterDescription();
+      }
+      for (i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+         final Output out = ooSet.getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+             || (out instanceof Output3DRasterLayer)) {
+            m_sColumnNames[i + ps.getNumberOfParameters()] = out.getDescription();
+         }
+      }
+      m_Data = new ArrayList[ps.getNumberOfParameters() + ooSet.getOutputDataObjectsCount()];
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i] = new ArrayList();
+         final String sDefault = getDefaultValue(i);
+         for (j = 0; j < INIT_ROWS; j++) {
+            m_Data[i].add(sDefault);
+         }
+      }
+
+   }
+
+
+   /**
+    * @return Number of columns(fields)
+    */
+   public int getColumnCount() {
+
+      return m_sColumnNames.length;
+
+   }
+
+
+   /**
+    * @return Number of rows
+    */
+   public int getRowCount() {
+
+      return m_Data[0].size();
+
+   }
+
+
+   /**
+    * @param iCol
+    * @return Name of column iCol
+    */
+   @Override
+   public String getColumnName(final int iCol) {
+
+      return m_sColumnNames[iCol];
+
+   }
+
+
+   /**
+    * 
+    * @return An Array of strings with column names
+    */
+   public String[] getColumnNames() {
+
+      return m_sColumnNames;
+
+   }
+
+
+   /**
+    * @param iRow
+    * @param iCol
+    * @return Value at cell [iRow, iCol]
+    */
+   public Object getValueAt(final int iRow,
+                            final int iCol) {
+
+      return m_Data[iCol].get(iRow);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int c) {
+
+      return getValueAt(0, c).getClass();
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int iRow,
+                                 final int iCol) {
+
+      return true;
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          int iRow,
+                          final int iCol) {
+
+      String[] values;
+      Parameter parameter = null;
+      if (iCol < m_Parameters.getNumberOfParameters()) {
+         parameter = m_Parameters.getParameter(iCol);
+      }
+      if (parameter instanceof ParameterDataObject) {
+         values = ((String) value).split(",");
+      }
+      else {
+         values = new String[1];
+         values[0] = (String) value;
+      }
+
+      if (iRow + values.length > getRowCount()) {
+         final int iRowsToAdd = iRow + values.length - getRowCount();
+         for (int i = 0; i < iRowsToAdd; i++) {
+            addRow();
+         }
+      }
+
+      for (int i = 0; i < values.length; i++, iRow++) {
+         //if (iRow < getRowCount()){
+         m_Data[iCol].set(iRow, values[i]);
+         fireTableCellUpdated(iRow, iCol);
+         //}
+      }
+
+
+   }
+
+
+   /**
+    * Adds a new row to the table (i.e. a new single algorithm execution)
+    * 
+    */
+   public void addRow() {
+
+      int i;
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         final String sDefault = getDefaultValue(i);
+         m_Data[i].add(sDefault);
+      }
+
+      this.fireTableRowsInserted(m_Data[0].size(), m_Data[0].size());
+
+   }
+
+
+   /**
+    * Removes a row
+    * 
+    * @param iRow
+    *                the zero-based index of the row to remove
+    */
+   public void removeRow(final int iRow) {
+
+      int i;
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i].remove(iRow);
+      }
+
+      this.fireTableRowsDeleted(iRow, iRow);
+
+   }
+
+
+   private String getDefaultValue(final int iIndex) {
+
+      if (iIndex < m_Parameters.getNumberOfParameters()) {
+         final Parameter parameter = m_Parameters.getParameter(iIndex);
+         try {
+            if (parameter instanceof ParameterBand) {
+               return "1";
+            }
+            else if (parameter instanceof ParameterBoolean) {
+               return "true";
+            }
+            else if (parameter instanceof ParameterSelection) {
+               final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+               return ai.getValues()[0];
+            }
+            else if (parameter instanceof ParameterString) {
+               final AdditionalInfoString ai = (AdditionalInfoString) parameter.getParameterAdditionalInfo();
+               return ai.getDefaultString();
+            }
+            else if (parameter instanceof ParameterNumericalValue) {
+               final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+               return Double.toString(ai.getDefaultValue());
+            }
+            else {
+               return "";
+            }
+         }
+         catch (final Exception e) {
+            return "";
+         }
+      }
+      else {
+         return "";
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TridimensionalAnalysisExtentPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TridimensionalAnalysisExtentPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TridimensionalAnalysisExtentPanel.java	(revision 369)
@@ -0,0 +1,285 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+
+public class TridimensionalAnalysisExtentPanel
+         extends
+            AnalysisExtentPanel {
+
+   private JTextField jTextFieldZMin;
+   private JTextField jTextFieldZMax;
+   private JLabel     jLabelRangeZ;
+   private JLabel     jLabelCellSizeZ;
+   private JLabel     jLabelColsZ;
+   private JTextField jTextFieldColsZ;
+   private JTextField jTextFieldCellSizeZ;
+
+
+   public TridimensionalAnalysisExtentPanel(final GeoAlgorithm algorithm) {
+
+      super(algorithm);
+
+   }
+
+
+   @Override
+   public void adjustExtent() throws TooLargeGridExtentException, WrongAnalysisExtentException {
+
+      m_Algorithm.setAnalysisExtent((AnalysisExtent) null);
+      m_AnalysisExtent = null;
+      if (!getJRadioButtonAdjustToInputDataExtent().isSelected()) {
+         m_AnalysisExtent = new AnalysisExtent();
+         try {
+            m_AnalysisExtent.setCellSize(Double.parseDouble(jTextFieldCellSize.getText()));
+            m_AnalysisExtent.setCellSizeZ(Double.parseDouble(jTextFieldCellSizeZ.getText()));
+            m_AnalysisExtent.setXRange(Double.parseDouble(jTextFieldXMin.getText()),
+                     Double.parseDouble(jTextFieldXMax.getText()), true);
+            m_AnalysisExtent.setYRange(Double.parseDouble(jTextFieldYMin.getText()),
+                     Double.parseDouble(jTextFieldYMax.getText()), true);
+            m_AnalysisExtent.setZRange(Double.parseDouble(jTextFieldZMin.getText()),
+                     Double.parseDouble(jTextFieldZMax.getText()), true);
+         }
+         catch (final NumberFormatException e) {
+            throw new WrongAnalysisExtentException(Sextante.getText("Wrong_or_missing_region"));
+         }
+         /* benducke: let's just assume the other knows what (s)he is doing...
+         if (m_AnalysisExtent.getNX() * m_AnalysisExtent.getNY() > BIG_SIZE) {
+            throw new TooLargeGridExtentException(Sextante.getText("The_selected_grid_extent_seems_too_large") + "("
+                                                  + Integer.toString(m_AnalysisExtent.getNX()) + " X "
+                                                  + Integer.toString(m_AnalysisExtent.getNY()) + ")\n"
+                                                  + Sextante.getText("Are_you_sure_you_want_to_use_it?"));
+         }
+         */
+      }
+
+
+   }
+
+
+   @Override
+   protected JPanel getJPanelAnalysisExtentValues() {
+
+      if (jPanelAnalysisExtentValues == null) {
+         jPanelAnalysisExtentValues = new JPanel();
+         final TableLayout jPanelRasterExtentValuesLayout = new TableLayout(new double[][] {
+                  { 255.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL },
+                  { TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                           TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                           TableLayoutConstants.MINIMUM } });
+         jPanelRasterExtentValuesLayout.setHGap(5);
+         jPanelRasterExtentValuesLayout.setVGap(5);
+         jPanelAnalysisExtentValues.setLayout(jPanelRasterExtentValuesLayout);
+         jPanelAnalysisExtentValues.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Extent__values")));
+         jPanelAnalysisExtentValues.setPreferredSize(new java.awt.Dimension(660, 145));
+         jPanelAnalysisExtentValues.add(getJLabelRangeX(), "0, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMin(), "1, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMax(), "2, 0");
+         jPanelAnalysisExtentValues.add(getJLabelRangeY(), "0, 1");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMin(), "1, 1");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMax(), "2, 1");
+         jPanelAnalysisExtentValues.add(getJLabelCellSize(), "0, 2");
+         jPanelAnalysisExtentValues.add(getJTextFieldCellSize(), "1, 2");
+         jPanelAnalysisExtentValues.add(getJLabelRowsCols(), "0, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldRows(), "1, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldCols(), "2, 3");
+
+         jPanelAnalysisExtentValues.add(getJLabelRangeZ(), "0, 4");
+         jPanelAnalysisExtentValues.add(getJTextFieldZMin(), "1, 4");
+         jPanelAnalysisExtentValues.add(getJTextFieldZMax(), "2, 4");
+         jPanelAnalysisExtentValues.add(getJLabelCellSizeZ(), "0, 5");
+         jPanelAnalysisExtentValues.add(getJTextFieldCellSizeZ(), "1, 5");
+         jPanelAnalysisExtentValues.add(getJLabelColsZ(), "0, 6");
+         jPanelAnalysisExtentValues.add(getJTextFieldColsZ(), "1, 6");
+      }
+      return jPanelAnalysisExtentValues;
+
+   }
+
+
+   protected JTextField getJTextFieldZMin() {
+      if (jTextFieldZMin == null) {
+         jTextFieldZMin = getNewJTextFieldZ();
+      }
+      return jTextFieldZMin;
+   }
+
+
+   protected JTextField getJTextFieldZMax() {
+      if (jTextFieldZMax == null) {
+         jTextFieldZMax = getNewJTextFieldZ();
+      }
+      return jTextFieldZMax;
+   }
+
+
+   protected JLabel getJLabelRangeZ() {
+      if (jLabelRangeZ == null) {
+         jLabelRangeZ = new JLabel();
+         jLabelRangeZ.setText(Sextante.getText("Range_Z"));
+      }
+      return jLabelRangeZ;
+   }
+
+
+   protected JLabel getJLabelCellSizeZ() {
+      if (jLabelCellSizeZ == null) {
+         jLabelCellSizeZ = new JLabel();
+         jLabelCellSizeZ.setText(Sextante.getText("Cell_sizeZ"));
+      }
+      return jLabelCellSizeZ;
+   }
+
+
+   protected JTextField getJTextFieldCellSizeZ() {
+      if (jTextFieldCellSizeZ == null) {
+         jTextFieldCellSizeZ = new JTextField();
+         jTextFieldCellSizeZ.setText("1");
+         jTextFieldCellSizeZ.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(final FocusEvent e) {
+               final JTextField textField = (JTextField) e.getSource();
+               final String content = textField.getText();
+               if (content.length() != 0) {
+                  try {
+                     final double d = Double.parseDouble(content);
+                     if (d <= 0) {
+                        throw new NumberFormatException();
+                     }
+                     else {
+                        extentZHasChanged();
+                     }
+                  }
+                  catch (final NumberFormatException nfe) {
+                     getToolkit().beep();
+                     textField.requestFocus();
+                  }
+               }
+
+            }
+         });
+         jTextFieldCellSizeZ.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyTyped(final KeyEvent event) {
+               validateKeyTypingZ(event);
+            }
+         });
+      }
+      return jTextFieldCellSizeZ;
+
+   }
+
+
+   protected JLabel getJLabelColsZ() {
+      if (jLabelColsZ == null) {
+         jLabelColsZ = new JLabel();
+         jLabelColsZ.setText(Sextante.getText("Number_of_cols_z"));
+      }
+      return jLabelColsZ;
+   }
+
+
+   protected JTextField getJTextFieldColsZ() {
+      if (jTextFieldColsZ == null) {
+         jTextFieldColsZ = new JTextField();
+         jTextFieldColsZ.setEnabled(false);
+      }
+      return jTextFieldColsZ;
+   }
+
+
+   private JTextField getNewJTextFieldZ() {
+
+      final JTextField jTextField = new JTextField();
+      jTextField.addFocusListener(new FocusAdapter() {
+         @Override
+         public void focusLost(final FocusEvent e) {
+            final JTextField textField = (JTextField) e.getSource();
+            final String content = textField.getText();
+            if (content.length() != 0) {
+               try {
+                  final double d = Double.parseDouble(content);
+                  extentZHasChanged();
+               }
+               catch (final NumberFormatException nfe) {
+                  getToolkit().beep();
+                  textField.requestFocus();
+               }
+            }
+         }
+      });
+      jTextField.addKeyListener(new KeyAdapter() {
+         @Override
+         public void keyTyped(final KeyEvent event) {
+            validateKeyTypingZ(event);
+         }
+      });
+
+      return jTextField;
+   }
+
+
+   private void validateKeyTypingZ(final KeyEvent event) {
+
+      String text = ((JTextField) event.getSource()).getText();
+      switch (event.getKeyChar()) {
+         case KeyEvent.VK_ENTER:
+            extentZHasChanged();
+            break;
+         default:
+            text += event.getKeyChar();
+            break;
+      }
+   }
+
+
+   @Override
+   protected void setTextFieldsEnabled(final boolean bEnabled) {
+
+      getJPanelAnalysisExtentValues().setVisible(true);
+      getJTextFieldXMin().setEnabled(bEnabled);
+      getJTextFieldXMax().setEnabled(bEnabled);
+      getJTextFieldYMin().setEnabled(bEnabled);
+      getJTextFieldYMax().setEnabled(bEnabled);
+      /*getJTextFieldZMin().setEnabled(bEnabled);
+      getJTextFieldZMax().setEnabled(bEnabled);*/
+
+   }
+
+
+   private void extentZHasChanged() {
+
+      double dRange;
+      double dCellSize;
+      int iCols;
+
+      try {
+         dRange = Math.abs(Double.parseDouble(getJTextFieldZMax().getText()) - Double.parseDouble(getJTextFieldZMin().getText()));
+         dCellSize = Double.parseDouble(getJTextFieldCellSizeZ().getText());
+         iCols = (int) Math.floor(dRange / dCellSize);
+         getJTextFieldColsZ().setText(Integer.toString(iCols));
+      }
+      catch (final NumberFormatException e) {
+         return;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TridimensionalAnalysisExtentPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessMonitorableTask.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessMonitorableTask.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessMonitorableTask.java	(revision 369)
@@ -0,0 +1,224 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.swing.BorderFactory;
+import javax.swing.JDialog;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.JTextPane;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.table.DefaultTableModel;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.additionalResults.AdditionalResults;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputNumericalValue;
+
+/**
+ * A task to execute a batch process.
+ * 
+ * @author volaya
+ * 
+ */
+public class BatchProcessMonitorableTask
+         implements
+            Runnable {
+
+   private StringBuffer                                     m_sLog;
+   private final ArrayList                                  m_Parameters;
+   private final ArrayList                                  m_Outputs;
+   private final AnalysisExtent                             m_AnalysisExtent;
+   private final GeoAlgorithm                               m_Algorithm;
+   private final ITaskMonitor                               m_ProgressMonitor;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   /**
+    * Creates a new task
+    * 
+    * @param algorithm
+    *                the algorithm to execute
+    * @param parameters
+    *                a list of maps, each one of them containing parameter values for each execution of the algorithm
+    * @param outputs
+    *                a list of maps, each one of them containing output settings for each execution of the algorithm
+    * @param analysisExtent
+    *                the output extent to use
+    */
+   public BatchProcessMonitorableTask(final GeoAlgorithm algorithm,
+                                      final ArrayList parameters,
+                                      final ArrayList outputs,
+                                      final AnalysisExtent analysisExtent,
+                                      final JDialog parent) {
+
+      m_Parameters = parameters;
+      m_NumericalOutputs = new ArrayList<ArrayList<OutputNumericalValue>>();
+      m_Outputs = outputs;
+      m_AnalysisExtent = analysisExtent;
+      m_Algorithm = algorithm;
+      m_ProgressMonitor = SextanteGUI.getOutputFactory().getTaskMonitor(algorithm.getName(), algorithm.isDeterminatedProcess(),
+               parent);
+
+   }
+
+
+   /**
+    * Runs the batch process
+    */
+   public void run() {
+
+      final String LINE = "----------------------------------------\n";
+
+      BatchProcessSingleUnit unit = null;
+
+      m_sLog = new StringBuffer();
+
+      for (int i = 0; i < m_Parameters.size(); i++) {
+
+         m_sLog.append(Sextante.getText("Process") + " " + Integer.toString(i) + "\n");
+         m_sLog.append(LINE);
+
+         m_ProgressMonitor.setDescriptionPrefix("[" + Integer.toString(i + 1) + "/" + Integer.toString(m_Parameters.size()) + "]");
+
+         try {
+            int iPercent = (int) ((double) (i * 100) / (double) m_Parameters.size());
+            iPercent = Math.min(Math.max(0, iPercent), 100);
+            final HashMap param = (HashMap) m_Parameters.get(i);
+            final HashMap output = (HashMap) m_Outputs.get(i);
+            final GeoAlgorithm alg = m_Algorithm.getNewInstance();
+            unit = new BatchProcessSingleUnit(alg, param, output, m_AnalysisExtent, m_ProgressMonitor, m_NumericalOutputs);
+
+            final ExecutorService pool = Executors.newFixedThreadPool(2);
+            final Future<Boolean> future = pool.submit(unit);
+            Boolean success = null;
+            success = future.get();
+            if (!success.booleanValue() || m_ProgressMonitor.isCanceled()) {
+               m_sLog.append(unit.getLog());
+               m_sLog.append(Sextante.getText("Error_or_process_canceled_by_user") + "\n");
+               break;
+            }
+            getAdditionalResults(alg);
+            m_sLog.append(unit.getLog().toString());
+            m_sLog.append("OK!\n");
+         }
+         catch (final InterruptedException e) {
+            m_sLog.append(unit.getLog().toString());
+         }
+         catch (final ExecutionException e) {
+            m_sLog.append(unit.getLog().toString());
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+
+         m_sLog.append(LINE + "\n");
+      }
+
+      final JScrollPane table = createNumericalOutputsTable();
+
+      if (table != null) {
+         AdditionalResults.addComponent(new ObjectAndDescription(m_Algorithm.getName() + "["
+                                                                 + Sextante.getText("Batch_processing") + "]", table));
+      }
+
+      m_ProgressMonitor.close();
+
+      final JTextArea jTextArea = new JTextArea();
+      jTextArea.setEditable(false);
+      jTextArea.setText(m_sLog.toString());
+      jTextArea.setFont(new Font("Courier", Font.PLAIN, 11));
+      final JScrollPane scrollPane = new JScrollPane();
+      scrollPane.setPreferredSize(new Dimension(600, 400));
+      scrollPane.setViewportView(jTextArea);
+      scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+      jTextArea.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+
+      SextanteGUI.getGUIFactory().showGenericInfoDialog(scrollPane, Sextante.getText("Batch_processing"));
+
+   }
+
+
+   private void getAdditionalResults(final GeoAlgorithm alg) {
+
+      final OutputObjectsSet ooSet = alg.getOutputObjects();
+
+      for (int i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+
+         final Output out = ooSet.getOutput(i);
+         final String sDescription = out.getDescription();
+         final Object object = out.getOutputObject();
+         if (object instanceof String) {
+            JTextPane jTextPane;
+            JScrollPane jScrollPane;
+            jTextPane = new JTextPane();
+            jTextPane.setEditable(false);
+            jTextPane.setContentType("text/html");
+            jTextPane.setText((String) object);
+            jScrollPane = new JScrollPane();
+            jScrollPane.setViewportView(jTextPane);
+            jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+            jTextPane.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+            AdditionalResults.addComponent(new ObjectAndDescription(sDescription, jScrollPane));
+         }
+         else if (object instanceof Component) {
+            AdditionalResults.addComponent(new ObjectAndDescription(sDescription, object));
+         }
+
+      }
+
+   }
+
+
+   private JScrollPane createNumericalOutputsTable() {
+
+      if (m_NumericalOutputs.size() == 0) {
+         return null;
+      }
+
+      final JScrollPane jScrollPane = new JScrollPane();
+      final JTable jTable = new JTable();
+      jScrollPane.setViewportView(jTable);
+
+
+      final int iRecordsCount = m_NumericalOutputs.size();
+      final int iFieldsCount = m_NumericalOutputs.get(0).size();
+      final String[] fields = new String[iFieldsCount];
+      for (int i = 0; i < fields.length; i++) {
+         fields[i] = m_NumericalOutputs.get(0).get(i).getDescription();
+      }
+
+      final String[][] data = new String[iRecordsCount][fields.length];
+
+      for (int i = 0; i < iRecordsCount; i++) {
+         for (int j = 0; j < iFieldsCount; j++) {
+            data[i][j] = m_NumericalOutputs.get(i).get(j).getOutputObject().toString();
+         }
+      }
+
+      final DefaultTableModel model = new DefaultTableModel();
+      model.setDataVector(data, fields);
+      jTable.setModel(model);
+      jTable.setEnabled(false);
+
+      return jScrollPane;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessMonitorableTask.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessDialog.java	(revision 369)
@@ -0,0 +1,359 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTabbedPane;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+
+/**
+ * A dialog to enter parameter values for a batch process
+ */
+public class BatchProcessDialog
+         extends
+            JDialog {
+
+   private final GeoAlgorithm  m_Algorithm;
+   private JButton             jButtonCancel;
+   private JButton             jButtonOK;
+   private JButton             jButtonHelp;
+   private ParametersPanel     jParametersPanel;
+   private JButton             jButtonSave;
+   private JButton             jButtonOpen;
+   private AnalysisExtentPanel jRasterExtentPanel;
+   private JTabbedPane         jTabbedPanel;
+   private JLabel              jLabelName;
+   private final JDialog       m_Parent;
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute in the batch process.
+    * @param parent
+    *                the parent dialog
+    */
+   public BatchProcessDialog(final GeoAlgorithm alg,
+                             final JDialog parent) {
+
+      super(parent, Sextante.getText("Batch_processing"), true);
+
+      m_Algorithm = alg;
+      m_Parent = parent;
+
+      initGUI();
+
+      this.setLocationRelativeTo(null);
+
+   }
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute in the batch process.
+    */
+   public BatchProcessDialog(final GeoAlgorithm alg) {
+
+      super(SextanteGUI.getMainFrame(), Sextante.getText("Batch_processing"), true);
+      this.setLocationRelativeTo(null);
+
+      m_Algorithm = alg;
+      m_Parent = null;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      try {
+         final TableLayout thisLayout = new TableLayout(new double[][] {
+                  { 5.0, 70.0, TableLayoutConstants.FILL, 100.0, 100.0, TableLayoutConstants.FILL, 5.0, 100.0, 100.0, 5.0 },
+                  { 5.0, 20.0, 5.0, TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+         getContentPane().setLayout(thisLayout);
+         this.setPreferredSize(new java.awt.Dimension(800, 600));
+         this.setSize(new java.awt.Dimension(800, 600));
+         {
+            jButtonHelp = new JButton();
+            getContentPane().add(jButtonHelp, "1, 5");
+            jButtonHelp.setText(Sextante.getText("Help"));
+            jButtonHelp.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  showHelp();
+               }
+            });
+         }
+         {
+            jTabbedPanel = new JTabbedPane();
+            getContentPane().add(jTabbedPanel, "1, 3, 8, 3");
+            {
+               jParametersPanel = new ParametersPanel(m_Algorithm);
+               jTabbedPanel.addTab(Sextante.getText("Parameters"), null, jParametersPanel, null);
+               jParametersPanel.setPreferredSize(new java.awt.Dimension(446, 225));
+            }
+            {
+               if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+                  if (m_Algorithm.is3D()) {
+                     jRasterExtentPanel = new TridimensionalAnalysisExtentPanel(m_Algorithm);
+                  }
+                  else {
+                     jRasterExtentPanel = new AnalysisExtentPanel(m_Algorithm);
+                  }
+                  jTabbedPanel.addTab(Sextante.getText("Raster_output"), null, jRasterExtentPanel, null);
+               }
+            }
+
+         }
+         {
+            jButtonOK = new JButton();
+            getContentPane().add(jButtonOK, "7, 5");
+            jButtonOK.setText(Sextante.getText("OK"));
+            jButtonOK.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  executeBatchProcess();
+               }
+            });
+         }
+         {
+            jButtonCancel = new JButton();
+            getContentPane().add(jButtonCancel, "8, 5");
+            jButtonCancel.setText(Sextante.getText("Cancel"));
+            jButtonCancel.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  cancel();
+               }
+            });
+         }
+         {
+            jLabelName = new JLabel(m_Algorithm.getName().toUpperCase());
+            jLabelName.setFont(new java.awt.Font("Tahoma", 1, 12));
+            getContentPane().add(jLabelName, "1, 1, 7, 1");
+         }
+         {
+            jButtonOpen = new JButton();
+            getContentPane().add(jButtonOpen, "3, 5");
+            jButtonOpen.setText(Sextante.getText("Open"));
+            jButtonOpen.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  open();
+               }
+            });
+         }
+         {
+            jButtonSave = new JButton();
+            getContentPane().add(jButtonSave, "4, 5");
+            jButtonSave.setText(Sextante.getText("Save"));
+            jButtonSave.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  save();
+               }
+            });
+         }
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void save() {
+
+      final ParametersTableModel table = jParametersPanel.getTableModel();
+
+      final JFileChooser fc = new JFileChooser();
+      final GenericFileFilter filter = new GenericFileFilter("csv", "Comma-Separated Values");
+
+      fc.setFileFilter(filter);
+      final int returnVal = fc.showSaveDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final File file = fc.getSelectedFile();
+         Writer output = null;
+         try {
+            output = new BufferedWriter(new FileWriter(file));
+            final int iRows = table.getRowCount();
+            final int iCols = table.getColumnCount();
+            for (int iRow = 0; iRow < iRows; iRow++) {
+               for (int iCol = 0; iCol < iCols; iCol++) {
+                  final String s = table.getValueAt(iRow, iCol).toString();
+                  output.write(s);
+                  if (iCol < (iCols - 1)) {
+                     output.write("|");
+                  }
+               }
+               output.write("\n");
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void open() {
+
+      try {
+         final JFileChooser fc = new JFileChooser();
+         final GenericFileFilter filter = new GenericFileFilter("csv", "Comma-Separated Values");
+
+         fc.setFileFilter(filter);
+         final int returnVal = fc.showOpenDialog(this);
+
+         if (returnVal == JFileChooser.APPROVE_OPTION) {
+            final File file = fc.getSelectedFile();
+            BufferedReader input = null;
+
+            final ParametersTableModel table = jParametersPanel.getTableModel();
+            final int iRows = table.getRowCount();
+
+            input = new BufferedReader(new FileReader(file));
+            String sLine = null;
+            int i = 1;
+            while ((sLine = input.readLine()) != null) {
+               if (i > iRows) {
+                  table.addRow();
+               }
+               processLine(sLine, table, i - 1);
+               i++;
+            }
+            input.close();
+         }
+      }
+      catch (final Exception e) {
+         JOptionPane.showMessageDialog(this, Sextante.getText("Could_not_open_selected_file"), Sextante.getText("Error"),
+                  JOptionPane.ERROR_MESSAGE);
+      }
+
+
+   }
+
+
+   private void processLine(final String line,
+                            final ParametersTableModel table,
+                            final int iRow) {
+
+      try {
+         final String[] tokens = line.split("\\|");
+         for (int i = 0; i < tokens.length; i++) {
+            table.setValueAt(tokens[i], iRow, i);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   private void showHelp() {
+
+      SextanteGUI.getGUIFactory().showHelpDialog("batch");
+
+   }
+
+
+   private void executeBatchProcess() {
+
+      final ArrayList param = new ArrayList();
+      final ArrayList output = new ArrayList();
+
+      try {
+         try {
+            assignParameters(param, output);
+         }
+         catch (final TooLargeGridExtentException e) {
+            final int iRet = JOptionPane.showConfirmDialog(null, e.getMessage(), Sextante.getText("Warning"),
+                     JOptionPane.YES_NO_OPTION);
+            if (iRet != JOptionPane.YES_OPTION) {
+               this.jTabbedPanel.setSelectedIndex(1);
+               return;
+            }
+         }
+         AnalysisExtent extent = null;
+         if (jRasterExtentPanel != null) {
+            extent = jRasterExtentPanel.getExtent();
+         }
+
+         final BatchProcessMonitorableTask task = new BatchProcessMonitorableTask(m_Algorithm, param, output, extent, m_Parent);
+
+         final Thread th = new Thread(task);
+         th.start();
+
+         cancel();
+
+      }
+      catch (final WrongInputException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPanel.setSelectedIndex(0);
+      }
+      catch (final WrongAnalysisExtentException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPanel.setSelectedIndex(1);
+      }
+
+   }
+
+
+   private void assignParameters(final ArrayList param,
+                                 final ArrayList output) throws WrongInputException, WrongAnalysisExtentException,
+                                                        TooLargeGridExtentException {
+
+      if (!jParametersPanel.assignParameters(param, output)) {
+         throw new WrongInputException(Sextante.getText("Wrong_or_missing_parameters_definition"));
+      }
+
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         jRasterExtentPanel.adjustExtent();
+      }
+
+
+   }
+
+
+   private void cancel() {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanel.java	(revision 369)
@@ -0,0 +1,495 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+import java.io.File;
+import java.util.StringTokenizer;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.algorithm.FixedTableDialog;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+public class ParameterCellPanel
+         extends
+            JPanel {
+
+   private JTextField   textField;
+   private JButton      button;
+   private final Object m_Object;
+   private final JTable m_Table;
+
+
+   public ParameterCellPanel(final Object obj,
+                             final JTable table) {
+
+      super();
+
+      m_Object = obj;
+      m_Table = table;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      textField = new JTextField("");
+      textField.setMaximumSize(new java.awt.Dimension(340, 18));
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed(evt);
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+
+      if ((m_Object instanceof ParameterString) || (m_Object instanceof ParameterNumericalValue)
+          || (m_Object instanceof ParameterTableField)) {
+         this.add(textField, "0, 0, 1, 0");
+      }
+      else {
+         this.add(textField, "0,  0");
+         this.add(button, "1,  0");
+      }
+
+   }
+
+
+   private void btnActionPerformed(final ActionEvent e) {
+
+      if (m_Object instanceof ParameterBand) {
+         assignBand();
+      }
+      else if (m_Object instanceof ParameterPoint) {
+         assignPoint();
+      }
+      else if (m_Object instanceof ParameterBoolean) {
+         assignBoolean();
+      }
+      else if (m_Object instanceof ParameterDataObject) {
+         assignDataObject();
+      }
+      else if (m_Object instanceof ParameterFixedTable) {
+         assignFixedTable();
+      }
+      else if (m_Object instanceof ParameterSelection) {
+         assignSelection();
+      }
+      else if (m_Object instanceof ParameterMultipleInput) {
+         assignMultipleInput();
+      }
+      else if (m_Object instanceof Output) {
+         assignOutput();
+      }
+
+      m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+
+   }
+
+
+   private void assignOutput() {
+
+      int returnVal;
+      String sExt[];
+      String sDesc;
+      final JFileChooser fc = new JFileChooser();
+
+      if (m_Object instanceof OutputRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().getRasterLayerOutputExtensions();
+         sDesc = Sextante.getText("Raster_layers");
+      }
+      else if (m_Object instanceof Output3DRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().get3DRasterLayerOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("3D_Raster_layers"));
+      }
+      else if (m_Object instanceof OutputVectorLayer) {
+         sExt = SextanteGUI.getOutputFactory().getVectorLayerOutputExtensions();
+         sDesc = Sextante.getText("Vector_layer");
+      }
+      else if (m_Object instanceof OutputTable) {
+         sExt = SextanteGUI.getOutputFactory().getTableOutputExtensions();
+         sDesc = Sextante.getText("Tables");
+      }
+      else {
+         return;
+      }
+
+      fc.setFileFilter(new GenericFileFilter(sExt, sDesc));
+
+      final String sColumnNames[] = new String[m_Table.getColumnCount() - 1];
+      for (int i = 0, j = 0; i < sColumnNames.length; i++) {
+         if (i != m_Table.getSelectedColumn()) {
+            sColumnNames[j] = m_Table.getColumnName(i);
+            j++;
+         }
+      }
+      fc.setAccessory(new AutoCompletePanel(sColumnNames));
+      returnVal = fc.showSaveDialog(this.getParent().getParent());
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         String sFile = fc.getSelectedFile().getAbsolutePath();
+         int i;
+         for (i = 0; i < sExt.length; i++) {
+            if (sFile.endsWith(sExt[i])) {
+               break;
+            }
+         }
+         if (i == sExt.length) {
+            sFile = sFile + "." + sExt[0];
+         }
+
+         String sFile2;
+         final int iRow = m_Table.getSelectedRow();
+         final int iCol = m_Table.getSelectedColumn();
+
+         final int iAutoFill = ((AutoCompletePanel) fc.getAccessory()).getAutoFill();
+         if (iAutoFill == AutoCompletePanel.AUTOFILL_NUMBER) {
+            int iCount = 1;
+            for (i = iRow; i < m_Table.getRowCount(); i++) {
+               sFile2 = sFile.substring(0, sFile.lastIndexOf(".")) + Integer.toString(iCount)
+                        + sFile.substring(sFile.lastIndexOf("."), sFile.length());
+               m_Table.setValueAt(sFile2, i, iCol);
+               iCount++;
+               if (i == iRow) {
+                  textField.setText(sFile2);
+               }
+            }
+         }
+         else if (iAutoFill == AutoCompletePanel.AUTOFILL_FIELD) {
+            final int iField = ((AutoCompletePanel) fc.getAccessory()).getField();
+            final ParameterCellPanelEditor ce = (ParameterCellPanelEditor) m_Table.getCellEditor(0, iField);
+            for (i = iRow; i < m_Table.getRowCount(); i++) {
+               String sCellValue = m_Table.getValueAt(i, iField).toString();
+               if (ce.isFilenameCell()) {
+                  if (!sCellValue.trim().equals("")) {
+                     final File f = new File(sCellValue);
+                     sCellValue = f.getName().substring(0, f.getName().lastIndexOf("."));
+                  }
+               }
+               sFile2 = sFile.substring(0, sFile.lastIndexOf(".")) + sCellValue
+                        + sFile.substring(sFile.lastIndexOf("."), sFile.length());
+               m_Table.setValueAt(sFile2, i, iCol);
+               if (i == iRow) {
+                  textField.setText(sFile2);
+               }
+            }
+         }
+         else {
+            textField.setText(sFile);
+         }
+      }
+
+   }
+
+
+   private void assignMultipleInput() {
+
+      AdditionalInfoMultipleInput ai;
+      final ParameterMultipleInput parameter = (ParameterMultipleInput) m_Object;
+      try {
+         ai = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+         if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+            final MultipleBandSelectionDialog dialog = new MultipleBandSelectionDialog(textField.getText());
+            dialog.pack();
+            dialog.setVisible(true);
+            final String sSel = dialog.getSelectionAsString();
+            if (sSel != null) {
+               textField.setText(sSel);
+            }
+         }
+         else {
+            int returnVal;
+            String sExt[];
+            String sDesc;
+            final JFileChooser fc = new JFileChooser();
+
+            if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+               sExt = SextanteGUI.getInputFactory().getRasterLayerInputExtensions();
+               sDesc = Sextante.getText("Raster_layers");
+            }
+            else if ((ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)
+                     || (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT)
+                     || (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE)
+                     || (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON)) {
+               sExt = SextanteGUI.getInputFactory().getVectorLayerInputExtensions();
+               sDesc = Sextante.getText("Vector_layer");
+            }
+            else if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_TABLE) {
+               sExt = SextanteGUI.getInputFactory().getTableInputExtensions();
+               sDesc = Sextante.getText("Tables");
+            }
+            else {
+               return;
+            }
+
+            fc.setFileFilter(new GenericFileFilter(sExt, sDesc));
+            fc.setMultiSelectionEnabled(true);
+            returnVal = fc.showOpenDialog(this.getParent().getParent());
+
+            if (returnVal == JFileChooser.APPROVE_OPTION) {
+               final StringBuffer sValue = new StringBuffer();
+               final File[] files = fc.getSelectedFiles();
+               for (int i = 0; i < files.length; i++) {
+                  sValue.append(files[i].getAbsolutePath());
+                  if (i < files.length - 1) {
+                     sValue.append(",");
+                  }
+               }
+               m_Table.getModel().setValueAt(sValue.toString(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+               textField.setText(sValue.toString());
+            }
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   private void assignFixedTable() {
+
+      final FixedTableModel model = getTableModelFromString();
+
+
+      final FixedTableDialog dialog = new FixedTableDialog(SextanteGUI.getMainFrame(), model);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      textField.setText(model.getAsCSV());
+
+   }
+
+
+   public FixedTableModel getTableModelFromString() {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel = null;
+      final StringTokenizer st = new StringTokenizer(textField.getText(), ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      final Parameter parameter = (Parameter) m_Object;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iCols, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return tableModel;
+            }
+         }
+         else {
+            if (iToken % iCols != 0) {
+               return tableModel;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iCol = (int) Math.floor(iToken / (double) iCols);
+            iRow = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iCol, iRow);
+            iToken++;
+         }
+
+         return tableModel;
+      }
+      catch (final Exception e) {
+         return tableModel;
+      }
+
+   }
+
+
+   private void assignBand() {
+
+      final int MAX_BANDS = 250;
+
+      final String[] possibilities = new String[MAX_BANDS];
+      for (int i = 0; i < possibilities.length; i++) {
+         possibilities[i] = Integer.toString(i + 1);
+      }
+
+      final String s = (String) JOptionPane.showInputDialog(null, Sextante.getText("Band"), Sextante.getText("Band"),
+               JOptionPane.PLAIN_MESSAGE, null, possibilities, possibilities[0]);
+
+      if (s != null) {
+         textField.setText(s);
+      }
+
+   }
+
+
+   private void assignPoint() {
+
+      final Frame window = new Frame();
+      final Point2D pt = new Point2D.Double();
+      final PointSelectionDialog dialog = new PointSelectionDialog(window, pt);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      if (dialog.getOK()) {
+         textField.setText(Double.toString(pt.getX()) + "," + Double.toString(pt.getY()));
+      }
+
+   }
+
+
+   private void assignSelection() {
+
+      final Parameter parameter = (Parameter) m_Object;
+      try {
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+
+         final String[] possibilities = ai.getValues();
+         final String s = (String) JOptionPane.showInputDialog(null, parameter.getParameterDescription(),
+                  parameter.getParameterDescription(), JOptionPane.PLAIN_MESSAGE, null, possibilities, possibilities[0]);
+
+         if (s != null) {
+            textField.setText(s);
+         }
+
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {}
+
+
+   }
+
+
+   private void assignBoolean() {
+
+      final Parameter parameter = (Parameter) m_Object;
+      final String[] possibilities = { Sextante.getText("Yes"), Sextante.getText("No") };
+      final String s = (String) JOptionPane.showInputDialog(null, parameter.getParameterDescription(),
+               parameter.getParameterDescription(), JOptionPane.PLAIN_MESSAGE, null, possibilities, Sextante.getText("Yes"));
+
+      if (s != null) {
+         if (s.equals(Sextante.getText("Yes"))) {
+            textField.setText("true");
+         }
+         else {
+            textField.setText("false");
+         }
+      }
+
+   }
+
+
+   private void assignDataObject() {
+
+      int returnVal;
+      String sExt[];
+      String sDesc;
+      final JFileChooser fc = new JFileChooser();
+
+      if (m_Object instanceof ParameterRasterLayer) {
+         sExt = SextanteGUI.getInputFactory().getRasterLayerInputExtensions();
+         sDesc = Sextante.getText("Raster_layers");
+      }
+      else if (m_Object instanceof ParameterVectorLayer) {
+         sExt = SextanteGUI.getInputFactory().getVectorLayerInputExtensions();
+         sDesc = Sextante.getText("Vector_layers");
+      }
+      else if (m_Object instanceof ParameterTable) {
+         sExt = SextanteGUI.getInputFactory().getTableInputExtensions();
+         sDesc = Sextante.getText("Tables");
+      }
+      else if (m_Object instanceof Parameter3DRasterLayer) {
+         sExt = SextanteGUI.getInputFactory().get3DRasterLayerInputExtensions();
+         sDesc = Sextante.getText("3D_Raster_layers");
+      }
+      else {
+         return;
+      }
+
+      fc.setFileFilter(new GenericFileFilter(sExt, sDesc));
+      fc.setMultiSelectionEnabled(true);
+      returnVal = fc.showOpenDialog(this.getParent().getParent());
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final StringBuffer sValue = new StringBuffer();
+         final File[] files = fc.getSelectedFiles();
+         for (int i = 0; i < files.length; i++) {
+            sValue.append(files[i].getAbsolutePath());
+            if (i < files.length - 1) {
+               sValue.append(",");
+            }
+         }
+         m_Table.getModel().setValueAt(sValue.toString(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         textField.setText(fc.getSelectedFile().getAbsolutePath());
+      }
+
+   }
+
+
+   public String getValue() {
+
+      return textField.getText();
+
+   }
+
+
+   public void setValue(final String sText) {
+
+      textField.setText(sText);
+
+   }
+
+
+   public boolean isFilenameCell() {
+
+      return ((m_Object instanceof ParameterDataObject) || !(m_Object instanceof Parameter));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandsSelectionTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandsSelectionTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandsSelectionTableModel.java	(revision 369)
@@ -0,0 +1,163 @@
+package es.unex.sextante.gui.batch;
+
+import java.util.ArrayList;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A table model to be used at a {@link MultipleBandSelectionDialog}
+ * 
+ * @author volaya
+ * 
+ */
+public class MultipleBandsSelectionTableModel
+         extends
+            AbstractTableModel {
+
+   private final String[]    m_sColumnNames;
+   private final ArrayList[] m_Data;
+
+   public static final int   INIT_ROWS = 1;
+
+
+   public MultipleBandsSelectionTableModel() {
+
+      super();
+
+      int i, j;
+
+      m_sColumnNames = new String[] { Sextante.getText("Layer"), Sextante.getText("Band") };
+      m_Data = new ArrayList[2];
+
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i] = new ArrayList();
+         for (j = 0; j < INIT_ROWS; j++) {
+            m_Data[i].add("");
+         }
+      }
+
+   }
+
+
+   public int getColumnCount() {
+
+      return m_sColumnNames.length;
+
+   }
+
+
+   public int getRowCount() {
+
+      return m_Data[0].size();
+
+   }
+
+
+   @Override
+   public String getColumnName(final int iCol) {
+
+      return m_sColumnNames[iCol];
+
+   }
+
+
+   /**
+    * Returns the names of the columns
+    * 
+    * @return the names of the columns
+    */
+   public String[] getColumnNames() {
+
+      return m_sColumnNames;
+
+   }
+
+
+   public Object getValueAt(final int iRow,
+                            final int iCol) {
+
+      return m_Data[iCol].get(iRow);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int c) {
+
+      return getValueAt(0, c).getClass();
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int iRow,
+                                 final int iCol) {
+
+      return true;
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int iRow,
+                          final int iCol) {
+
+      m_Data[iCol].set(iRow, value);
+      fireTableCellUpdated(iRow, iCol);
+
+   }
+
+
+   /**
+    * Adds a new row to the table
+    * 
+    */
+   public void addRow() {
+
+      int i;
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i].add("");
+      }
+
+      this.fireTableRowsInserted(m_Data[0].size(), m_Data[0].size());
+
+   }
+
+
+   /**
+    * Removes a row from the table
+    * 
+    * @param iRow
+    *                the zero-based index of the row to remove
+    */
+   public void removeRow(final int iRow) {
+
+      int i;
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i].remove(iRow);
+      }
+
+      this.fireTableRowsDeleted(iRow, iRow);
+
+   }
+
+
+   /**
+    * Returns the selected bands as an array with two ArrayList, one of them containing the layers and another one containing the
+    * bands
+    * 
+    * @return the selected bands
+    */
+   public ArrayList[] getData() {
+
+      return m_Data;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandsSelectionTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanel.java	(revision 369)
@@ -0,0 +1,76 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Frame;
+import java.util.ArrayList;
+
+import javax.swing.JTable;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.gui.algorithm.MultipleInputSelectionDialog;
+
+public class RasterBandPanel
+         extends
+            TextFieldAndButton {
+
+   private static final int             MAX_BANDS = 250;
+   private final ObjectAndDescription[] m_Values;
+   private final JTable                 m_Table;
+
+
+   public RasterBandPanel(final JTable table) {
+
+      m_Table = table;
+      m_Values = new ObjectAndDescription[MAX_BANDS];
+
+      for (int i = 0; i < m_Values.length; i++) {
+         m_Values[i] = new ObjectAndDescription(Integer.toString(i + 1), new Integer(i));
+      }
+
+   }
+
+
+   @Override
+   protected void btnActionPerformed() {
+
+      int iCount;
+      final StringBuffer sb = new StringBuffer();
+
+      final Frame window = new Frame();
+
+      final ArrayList selectedIndices = getSelectedIndices();
+      final MultipleInputSelectionDialog dialog = new MultipleInputSelectionDialog(window, m_Values, selectedIndices);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      iCount = selectedIndices.size();
+      for (int i = 0; i < iCount; i++) {
+         final int iValue = ((Integer) selectedIndices.get(i)).intValue() + 1;
+         sb.append(Integer.toString(iValue));
+         if (i < iCount - 1) {
+            sb.append(",");
+         }
+      }
+
+      textField.setText(sb.toString());
+      m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+
+   }
+
+
+   private ArrayList getSelectedIndices() {
+
+      try {
+         final ArrayList list = new ArrayList();
+         final String sTokens[] = textField.getText().split(",");
+         for (final String element : sTokens) {
+            list.add(new Integer(element) - 1);
+         }
+         return list;
+      }
+      catch (final Exception e) {
+         return new ArrayList();
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandSelectionDialog.java	(revision 369)
@@ -0,0 +1,270 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A dialog to select a set of bands for a batch process
+ * 
+ * @author volaya
+ * 
+ */
+public class MultipleBandSelectionDialog
+         extends
+            JDialog {
+
+   private JPanel                           jPanelAddRemoveRows;
+   private JPanel                           jPanelOKCancel;
+   private JScrollPane                      jScrollPane;
+   private JButton                          jButtonRemoveRow;
+   private JButton                          jButtonAddRow;
+   private JButton                          jButtonOK;
+   private JButton                          jButtonCancel;
+   private JTable                           jTable;
+   private MultipleBandsSelectionTableModel m_TableModel;
+   private String                           m_sSel;
+
+
+   public MultipleBandSelectionDialog(final String sValue) {
+
+      super((Frame) null, Sextante.getText("Selection"), true);
+
+      initGUI();
+      fillTable(sValue);
+
+   }
+
+
+   private void fillTable(final String sValue) {
+
+      int i;
+      ArrayList list;
+      HashMap map = new HashMap();
+      String sFile = null;
+      final String[] sTokens = sValue.split(",");
+      for (i = 0; i < sTokens.length; i++) {
+         if (isPositiveInteger(sTokens[i])) {
+            if (sFile == null) {
+               map = null;
+            }
+            list = (ArrayList) map.get(sFile);
+            if (list == null) {
+               map = null;
+               break;
+            }
+            list.add(new Integer(sTokens[i]));
+         }
+         else {
+            sFile = sTokens[i];
+            if (!map.containsKey(sFile)) {
+               map.put(sFile, new ArrayList());
+            }
+         }
+      }
+
+      if (map != null) {
+         final int iSize = map.size() - MultipleBandsSelectionTableModel.INIT_ROWS;
+         for (i = 0; i < iSize; i++) {
+            m_TableModel.addRow();
+         }
+         i = 0;
+         final Set set = map.keySet();
+         final Iterator iter = set.iterator();
+         while (iter.hasNext()) {
+            final String sKey = (String) iter.next();
+            final StringBuffer sb = new StringBuffer();
+            list = (ArrayList) map.get(sKey);
+            m_TableModel.setValueAt(sKey, i, 0);
+            for (int j = 0; j < list.size(); j++) {
+               final Integer band = (Integer) list.get(j);
+               sb.append(band.toString());
+               if (j < list.size() - 1) {
+                  sb.append(",");
+               }
+            }
+            m_TableModel.setValueAt(sb.toString(), i, 1);
+            i++;
+         }
+
+      }
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5., 200., 5.0 },
+               { 5., TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5, 35, 5 } });
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(580, 350));
+      this.setSize(new java.awt.Dimension(580, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1,1,1,2");
+         jScrollPane.setMinimumSize(new java.awt.Dimension(432, 256));
+
+         jTable = new JTable();
+         jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+         jScrollPane.setViewportView(jTable);
+         m_TableModel = new MultipleBandsSelectionTableModel();
+         jTable.setModel(m_TableModel);
+         jTable.getTableHeader().setReorderingAllowed(false);
+         jTable.getColumnModel().getColumn(0).setCellEditor(new RasterFilePanelEditor(jTable));
+         jTable.getColumnModel().getColumn(1).setCellEditor(new RasterBandPanelEditor(jTable));
+         jTable.getColumnModel().getColumn(0).setPreferredWidth(200);
+         jTable.getColumnModel().getColumn(1).setPreferredWidth(200);
+      }
+      {
+         jPanelAddRemoveRows = new JPanel();
+         this.add(jPanelAddRemoveRows, "3,1");
+      }
+      {
+         jButtonRemoveRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonRemoveRow);
+         jButtonRemoveRow.setText(Sextante.getText("Delete_row"));
+         jButtonRemoveRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnRemoveRowActionPerformed();
+            }
+         });
+      }
+      {
+         jButtonAddRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonAddRow);
+         jButtonAddRow.setText(Sextante.getText("Add_row"));
+         jButtonAddRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnAddRowActionPerformed();
+            }
+         });
+      }
+      {
+         jPanelOKCancel = new JPanel();
+         this.add(jPanelOKCancel, "3,4");
+      }
+      {
+         jButtonOK = new JButton();
+         jPanelOKCancel.add(jButtonOK);
+         jButtonOK.setText(Sextante.getText("OK"));
+         jButtonOK.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnOkActionPerformed();
+            }
+         });
+      }
+      {
+         jButtonCancel = new JButton();
+         jPanelOKCancel.add(jButtonCancel);
+         jButtonCancel.setText(Sextante.getText("Cancel"));
+         jButtonCancel.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnCancelActionPerformed();
+            }
+         });
+      }
+
+
+   }
+
+
+   protected void btnOkActionPerformed() {
+
+      setSelection();
+      cancel();
+
+   }
+
+
+   protected void btnCancelActionPerformed() {
+
+      m_sSel = null;
+      cancel();
+
+   }
+
+
+   private void btnAddRowActionPerformed() {
+
+      m_TableModel.addRow();
+
+   }
+
+
+   private void btnRemoveRowActionPerformed() {
+
+      int iRow;
+
+      iRow = jTable.getSelectedRow();
+      if (iRow != -1) {
+         m_TableModel.removeRow(iRow);
+      }
+
+   }
+
+
+   public String getSelectionAsString() {
+
+      return m_sSel;
+
+   }
+
+
+   private void setSelection() {
+
+      final StringBuffer sSel = new StringBuffer();
+      String sBands[];
+
+      for (int i = 0; i < jTable.getRowCount(); i++) {
+         sBands = ((String) jTable.getValueAt(i, 1)).split(",");
+         for (final String element : sBands) {
+            sSel.append(jTable.getValueAt(i, 0));
+            sSel.append(",");
+            sSel.append(element);
+            sSel.append(",");
+         }
+      }
+
+      sSel.deleteCharAt(sSel.length() - 1);
+
+      m_sSel = sSel.toString();
+
+   }
+
+
+   public void cancel() {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private boolean isPositiveInteger(final String s) {
+
+      try {
+         final int i = Integer.parseInt(s);
+         return i > 0;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/MultipleBandSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelEditor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelEditor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelEditor.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.table.TableCellEditor;
+
+public class ParameterCellPanelEditor
+         extends
+            AbstractCellEditor
+         implements
+            TableCellEditor {
+
+   ParameterCellPanel panel;
+
+
+   public ParameterCellPanelEditor(final Object obj,
+                                   final JTable table) {
+
+      panel = new ParameterCellPanel(obj, table);
+
+   }
+
+
+   public Object getCellEditorValue() {
+
+      return panel.getValue();
+
+   }
+
+
+   public Component getTableCellEditorComponent(final JTable table,
+                                                final Object value,
+                                                final boolean isSelected,
+                                                final int row,
+                                                final int column) {
+
+      panel.setValue((String) value);
+
+      return panel;
+
+   }
+
+
+   public ParameterCellPanel getPanel() {
+
+      return panel;
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final EventObject anEvent) {
+
+      if (anEvent instanceof MouseEvent) {
+         return ((MouseEvent) anEvent).getClickCount() >= 2;
+      }
+      return true;
+
+   }
+
+
+   public boolean isFilenameCell() {
+
+      return panel.isFilenameCell();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TextFieldAndButton.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TextFieldAndButton.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TextFieldAndButton.java	(revision 369)
@@ -0,0 +1,78 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+/**
+ * A panel with a text field and a button. Extend this class to define it behaviour when the button is cliked
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class TextFieldAndButton
+         extends
+            JPanel {
+
+   protected JTextField textField;
+   private JButton      button;
+
+
+   public TextFieldAndButton() {
+
+      super();
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      textField = new JTextField("");
+      textField.setMaximumSize(new java.awt.Dimension(340, 18));
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed();
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(textField, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   /**
+    * This method is called when the button is pressed. Override this method to implement the desired behaviour
+    * 
+    */
+   protected abstract void btnActionPerformed();
+
+
+   public String getValue() {
+
+      return textField.getText();
+
+   }
+
+
+   public void setValue(final String sText) {
+
+      textField.setText(sText);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/TextFieldAndButton.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersTableModel.java	(revision 369)
@@ -0,0 +1,269 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.util.ArrayList;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+/**
+ * A Table model to be used for a batch process parameters panel
+ * 
+ * @author volaya
+ * 
+ */
+public class ParametersTableModel
+         extends
+            AbstractTableModel {
+
+   private final String[]      m_sColumnNames;
+   private final ArrayList[]   m_Data;
+   private final ParametersSet m_Parameters;
+
+   public static final int     INIT_ROWS = 2;
+
+
+   /**
+    * Constructor
+    * 
+    * @param ps
+    *                the set of input parameters to add to the table. A column will be added for each parameter
+    * @param ooSet
+    *                the set of outputs to add to the table. A column will be added for each output of type layer or table
+    */
+   public ParametersTableModel(final ParametersSet ps,
+                               final OutputObjectsSet ooSet) {
+
+      super();
+
+      int i, j;
+
+      m_Parameters = ps;
+
+      m_sColumnNames = new String[ps.getNumberOfParameters() + ooSet.getOutputDataObjectsCount()];
+      for (i = 0; i < ps.getNumberOfParameters(); i++) {
+         m_sColumnNames[i] = ps.getParameter(i).getParameterDescription();
+      }
+      for (i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+         final Output out = ooSet.getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof Output3DRasterLayer) || (out instanceof OutputVectorLayer)
+             || (out instanceof OutputTable)) {
+            m_sColumnNames[i + ps.getNumberOfParameters()] = out.getDescription();
+         }
+      }
+      m_Data = new ArrayList[ps.getNumberOfParameters() + ooSet.getOutputDataObjectsCount()];
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i] = new ArrayList();
+         final Object def = getDefaultValue(i);
+         for (j = 0; j < INIT_ROWS; j++) {
+            m_Data[i].add(def);
+         }
+      }
+
+   }
+
+
+   /**
+    * @return Number of columns(fields)
+    */
+   public int getColumnCount() {
+
+      return m_sColumnNames.length;
+
+   }
+
+
+   /**
+    * @return Number of rows
+    */
+   public int getRowCount() {
+
+      return m_Data[0].size();
+
+   }
+
+
+   /**
+    * @param iCol
+    * @return Name of column iCol
+    */
+   @Override
+   public String getColumnName(final int iCol) {
+
+      return m_sColumnNames[iCol];
+
+   }
+
+
+   /**
+    * 
+    * @return An Array of strings with column names
+    */
+   public String[] getColumnNames() {
+
+      return m_sColumnNames;
+
+   }
+
+
+   /**
+    * @param iRow
+    * @param iCol
+    * @return Value at cell [iRow, iCol]
+    */
+   public Object getValueAt(final int iRow,
+                            final int iCol) {
+
+      return m_Data[iCol].get(iRow);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int c) {
+
+      return getValueAt(0, c).getClass();
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int iRow,
+                                 final int iCol) {
+
+      return true;
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int iRow,
+                          final int iCol) {
+
+      m_Data[iCol].set(iRow, value);
+      fireTableCellUpdated(iRow, iCol);
+
+   }
+
+
+   /**
+    * Adds a new row to the table (i.e. a new single algorithm execution)
+    * 
+    */
+   public void addRow() {
+
+      int i;
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         final Object def = getDefaultValue(i);
+         m_Data[i].add(def);
+      }
+
+      this.fireTableRowsInserted(m_Data[0].size(), m_Data[0].size());
+
+   }
+
+
+   /**
+    * Removes a row
+    * 
+    * @param iRow
+    *                the zero-based index of the row to remove
+    */
+   public void removeRow(final int iRow) {
+
+      int i;
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i].remove(iRow);
+      }
+
+      this.fireTableRowsDeleted(iRow, iRow);
+
+   }
+
+
+   private Object getDefaultValue(final int iIndex) {
+
+      if (iIndex < m_Parameters.getNumberOfParameters()) {
+         final Parameter parameter = m_Parameters.getParameter(iIndex);
+         try {
+            if (parameter instanceof ParameterDataObject) {
+               Object objs[] = null;
+               if (parameter instanceof ParameterRasterLayer) {
+                  objs = SextanteGUI.getInputFactory().getRasterLayers();
+               }
+               else if (parameter instanceof Parameter3DRasterLayer) {
+                  objs = SextanteGUI.getInputFactory().get3DRasterLayers();
+               }
+               else if (parameter instanceof ParameterVectorLayer) {
+                  final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) ((ParameterVectorLayer) parameter).getParameterAdditionalInfo();
+                  objs = SextanteGUI.getInputFactory().getVectorLayers(ai.getShapeType());
+               }
+               else if (parameter instanceof ParameterRasterLayer) {
+                  objs = SextanteGUI.getInputFactory().getTables();
+               }
+               if (objs != null) {
+                  return objs[0];
+               }
+               else {
+                  return "";
+               }
+            }
+            else if (parameter instanceof ParameterBand) {
+               return "1";
+            }
+            else if (parameter instanceof ParameterBoolean) {
+               return "true";
+            }
+            else if (parameter instanceof ParameterSelection) {
+               final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+               return ai.getValues()[0];
+            }
+            else if (parameter instanceof ParameterString) {
+               final AdditionalInfoString ai = (AdditionalInfoString) parameter.getParameterAdditionalInfo();
+               return ai.getDefaultString();
+            }
+            else if (parameter instanceof ParameterNumericalValue) {
+               final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+               return Double.toString(ai.getDefaultValue());
+            }
+            else {
+               return "";
+            }
+         }
+         catch (final Exception e) {
+            return "";
+         }
+      }
+      else {
+         return Sextante.getText("[Save_to_temporary_file]");
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessMonitorableTask.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessMonitorableTask.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessMonitorableTask.java	(revision 369)
@@ -0,0 +1,191 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.awt.Dimension;
+import java.awt.Font;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.swing.BorderFactory;
+import javax.swing.JDialog;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.table.DefaultTableModel;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.additionalResults.AdditionalResults;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.OutputNumericalValue;
+
+/**
+ * A task to execute a batch process.
+ * 
+ * @author volaya
+ * 
+ */
+public class BatchProcessMonitorableTask
+         implements
+            Runnable {
+
+   private StringBuffer                                     m_sLog;
+   private final ArrayList                                  m_Parameters;
+   private final ArrayList                                  m_Outputs;
+   private final AnalysisExtent                             m_AnalysisExtent;
+   private final GeoAlgorithm                               m_Algorithm;
+   private final ITaskMonitor                               m_ProgressMonitor;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   /**
+    * Creates a new task
+    * 
+    * @param algorithm
+    *                the algorithm to execute
+    * @param parameters
+    *                a list of maps, each one of them containing parameter values for each execution of the algorithm
+    * @param outputs
+    *                a list of maps, each one of them containing output settings for each execution of the algorithm
+    * @param analysisExtent
+    *                the output extent to use
+    */
+   public BatchProcessMonitorableTask(final GeoAlgorithm algorithm,
+                                      final ArrayList parameters,
+                                      final ArrayList outputs,
+                                      final AnalysisExtent analysisExtent,
+                                      final JDialog parent) {
+
+      m_Parameters = parameters;
+      m_Outputs = outputs;
+      m_NumericalOutputs = new ArrayList<ArrayList<OutputNumericalValue>>();
+      m_AnalysisExtent = analysisExtent;
+      m_Algorithm = algorithm;
+      m_ProgressMonitor = SextanteGUI.getOutputFactory().getTaskMonitor(algorithm.getName(), algorithm.isDeterminatedProcess(),
+               parent);
+
+   }
+
+
+   /**
+    * Runs the batch process
+    */
+   public void run() {
+
+      final String LINE = "----------------------------------------\n";
+
+      BatchProcessSingleUnit unit = null;
+
+      m_sLog = new StringBuffer();
+
+      for (int i = 0; i < m_Parameters.size(); i++) {
+
+         m_sLog.append(Sextante.getText("Process") + " " + Integer.toString(i + 1) + "\n");
+         m_sLog.append(LINE);
+
+         m_ProgressMonitor.setDescriptionPrefix("[" + Integer.toString(i + 1) + "/" + Integer.toString(m_Parameters.size()) + "]");
+
+         try {
+            final HashMap param = (HashMap) m_Parameters.get(i);
+            final HashMap output = (HashMap) m_Outputs.get(i);
+            final GeoAlgorithm alg = m_Algorithm.getNewInstance();
+            unit = new BatchProcessSingleUnit(alg, param, output, m_AnalysisExtent, m_ProgressMonitor, m_NumericalOutputs);
+
+            final ExecutorService pool = Executors.newFixedThreadPool(2);
+            final Future<Boolean> future = pool.submit(unit);
+            Boolean success = null;
+            success = future.get();
+            if (!success.booleanValue() || m_ProgressMonitor.isCanceled()) {
+               m_sLog.append(unit.getLog());
+               m_sLog.append(Sextante.getText("Error_or_process_canceled_by_user") + "\n");
+               break;
+            }
+            //getAdditionalResults(alg);
+            m_sLog.append(unit.getLog().toString());
+            m_sLog.append("OK!\n");
+         }
+         catch (final InterruptedException e) {
+            m_sLog.append(unit.getLog().toString());
+         }
+         catch (final ExecutionException e) {
+            m_sLog.append(unit.getLog().toString());
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+
+         m_sLog.append(LINE + "\n");
+
+         SextanteGUI.getInputFactory().clearDataObjects();
+         SextanteGUI.getInputFactory().createDataObjects();
+
+      }
+
+      final JScrollPane table = createNumericalOutputsTable();
+
+      if (table != null) {
+         AdditionalResults.addComponent(new ObjectAndDescription(m_Algorithm.getName() + "["
+                                                                 + Sextante.getText("Batch_processing") + "]", table));
+      }
+
+      m_ProgressMonitor.close();
+
+      final JTextArea jTextArea = new JTextArea();
+      jTextArea.setEditable(false);
+      jTextArea.setText(m_sLog.toString());
+      jTextArea.setFont(new Font("Courier", Font.PLAIN, 11));
+      final JScrollPane scrollPane = new JScrollPane();
+      scrollPane.setPreferredSize(new Dimension(600, 400));
+      scrollPane.setViewportView(jTextArea);
+      scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+      jTextArea.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+
+      SextanteGUI.getGUIFactory().showGenericInfoDialog(scrollPane, Sextante.getText("Batch_processing"));
+
+   }
+
+
+   private JScrollPane createNumericalOutputsTable() {
+
+      if (m_NumericalOutputs.size() == 0) {
+         return null;
+      }
+
+      final JScrollPane jScrollPane = new JScrollPane();
+      final JTable jTable = new JTable();
+      jScrollPane.setViewportView(jTable);
+
+
+      final int iRecordsCount = m_NumericalOutputs.size();
+      final int iFieldsCount = m_NumericalOutputs.get(0).size();
+      final String[] fields = new String[iFieldsCount];
+      for (int i = 0; i < fields.length; i++) {
+         fields[i] = m_NumericalOutputs.get(0).get(i).getDescription();
+      }
+
+      final String[][] data = new String[iRecordsCount][fields.length];
+
+      for (int i = 0; i < iRecordsCount; i++) {
+         for (int j = 0; j < iFieldsCount; j++) {
+            data[i][j] = m_NumericalOutputs.get(i).get(j).getOutputObject().toString();
+         }
+      }
+
+      final DefaultTableModel model = new DefaultTableModel();
+      model.setDataVector(data, fields);
+      jTable.setModel(model);
+      jTable.setEnabled(false);
+
+      return jScrollPane;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessMonitorableTask.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionDialog.java	(revision 369)
@@ -0,0 +1,127 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+
+import es.unex.sextante.core.Sextante;
+
+public class PointSelectionDialog
+         extends
+            javax.swing.JDialog {
+
+   private JPanel              jPanelMain;
+   private JSeparator          jSeparator;
+   private JButton             jButtonCancel;
+   private JButton             jButtonOK;
+   private final Point2D       m_Point;
+   private PointSelectionPanel pointPanel;
+   private boolean             m_bOK = false;
+
+
+   public PointSelectionDialog(final Frame window,
+                               final Point2D pt) {
+
+
+      super(window, "", true);
+
+      this.setResizable(false);
+
+      m_Point = pt;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            this.setTitle(Sextante.getText("point"));
+            {
+               jPanelMain = new JPanel();
+               getContentPane().add(jPanelMain, BorderLayout.CENTER);
+               jPanelMain.setPreferredSize(new java.awt.Dimension(300, 90));
+               {
+                  pointPanel = new PointSelectionPanel();
+                  pointPanel.setPreferredSize(new java.awt.Dimension(250, 20));
+                  jPanelMain.add(pointPanel);
+
+               }
+               {
+                  jSeparator = new JSeparator();
+                  jPanelMain.add(jSeparator);
+                  jSeparator.setPreferredSize(new java.awt.Dimension(250, 20));
+               }
+               {
+                  jButtonOK = new JButton();
+                  jPanelMain.add(jButtonOK);
+                  jButtonOK.setText(Sextante.getText("OK"));
+                  jButtonOK.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnOKActionPerformed(evt);
+                     }
+                  });
+               }
+               {
+                  jButtonCancel = new JButton();
+                  jPanelMain.add(jButtonCancel);
+                  jButtonCancel.setText(Sextante.getText("Cancel"));
+                  jButtonCancel.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnCancelActionPerformed(evt);
+                     }
+                  });
+               }
+            }
+         }
+         this.setSize(350, 100);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void btnOKActionPerformed(final ActionEvent evt) {
+
+      final Point2D pt = pointPanel.getPoint();
+
+      if (pt == null) {
+         Toolkit.getDefaultToolkit().beep();
+         return;
+      }
+
+      m_Point.setLocation(pt);
+
+      m_bOK = true;
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private void btnCancelActionPerformed(final ActionEvent evt) {
+
+      m_bOK = false;
+      dispose();
+      setVisible(false);
+
+
+   }
+
+
+   public boolean getOK() {
+
+      return m_bOK;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionPanel.java	(revision 369)
@@ -0,0 +1,71 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.geom.Point2D;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+public class PointSelectionPanel
+         extends
+            JPanel {
+
+   private JTextField textFieldX;
+   private JTextField textFieldY;
+   private JLabel     labelX;
+   private JLabel     labelY;
+
+
+   PointSelectionPanel() {
+
+      super();
+
+      InitGUI();
+
+   }
+
+
+   private void InitGUI() {
+
+      textFieldX = new JTextField("0");
+      textFieldY = new JTextField("0");
+      labelX = new JLabel(" X:");
+      labelY = new JLabel(" Y:");
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 25.0, TableLayoutConstants.FILL, 25.0, TableLayoutConstants.FILL, 35.0 }, { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(labelX, "0,  0");
+      this.add(textFieldX, "1,  0");
+      this.add(labelY, "2,  0");
+      this.add(textFieldY, "3,  0");
+
+   }
+
+
+   public Point2D getPoint() {
+
+      try {
+         final Point2D pt = new Point2D.Double(Double.parseDouble(textFieldX.getText()), Double.parseDouble(textFieldY.getText()));
+         return pt;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+
+   }
+
+
+   public void setPoint(final Point2D point) {
+
+      textFieldX.setText(Double.toString(Math.floor(point.getX() * 10000.) / 10000.));
+      textFieldY.setText(Double.toString(Math.floor(point.getY() * 10000.) / 10000.));
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/PointSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessDialog.java	(revision 369)
@@ -0,0 +1,228 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTabbedPane;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.batch.AnalysisExtentPanel;
+import es.unex.sextante.gui.batch.TridimensionalAnalysisExtentPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+
+/**
+ * A dialog to enter parameter values for a batch process that takes input layers from the GIS, not from files
+ */
+public class BatchProcessDialog
+         extends
+            JDialog {
+
+   private final GeoAlgorithm  m_Algorithm;
+   private JButton             jButtonCancel;
+   private JButton             jButtonOK;
+   private JButton             jButtonHelp;
+   private ParametersPanel     jParametersPanel;
+   private AnalysisExtentPanel jRasterExtentPanel;
+   private JTabbedPane         jTabbedPanel;
+   private JLabel              jLabelName;
+   private final JDialog       m_Parent;
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute in the batch process.
+    * @param parent
+    *                the parent dialog
+    */
+   public BatchProcessDialog(final GeoAlgorithm alg,
+                             final JDialog parent) {
+
+      super(parent, Sextante.getText("Batch_processing"), true);
+
+      m_Algorithm = alg;
+      m_Parent = parent;
+
+      initGUI();
+      this.setLocationRelativeTo(null);
+
+   }
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute in the batch process.
+    */
+   public BatchProcessDialog(final GeoAlgorithm alg) {
+
+      super(SextanteGUI.getMainFrame(), Sextante.getText("Batch_processing"), true);
+      this.setLocationRelativeTo(null);
+
+      m_Algorithm = alg;
+      m_Parent = null;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      try {
+         final TableLayout thisLayout = new TableLayout(new double[][] {
+                  { 5.0, 70.0, TableLayoutConstants.FILL, 100.0, 100.0, TableLayoutConstants.FILL, 5.0, 100.0, 100.0, 5.0 },
+                  { 5.0, 20.0, 5.0, TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+         getContentPane().setLayout(thisLayout);
+         this.setPreferredSize(new java.awt.Dimension(800, 600));
+         this.setSize(new java.awt.Dimension(800, 600));
+         {
+            jButtonHelp = new JButton();
+            getContentPane().add(jButtonHelp, "1, 5");
+            jButtonHelp.setText(Sextante.getText("Help"));
+            jButtonHelp.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  showHelp();
+               }
+            });
+         }
+         {
+            jTabbedPanel = new JTabbedPane();
+            getContentPane().add(jTabbedPanel, "1, 3, 8, 3");
+            {
+               jParametersPanel = new ParametersPanel(m_Algorithm);
+               jTabbedPanel.addTab(Sextante.getText("Parameters"), null, jParametersPanel, null);
+               jParametersPanel.setPreferredSize(new java.awt.Dimension(446, 225));
+            }
+            {
+               if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+                  if (m_Algorithm.is3D()) {
+                     jRasterExtentPanel = new TridimensionalAnalysisExtentPanel(m_Algorithm);
+                  }
+                  else {
+                     jRasterExtentPanel = new AnalysisExtentPanel(m_Algorithm);
+                  }
+                  jTabbedPanel.addTab(Sextante.getText("Raster_output"), null, jRasterExtentPanel, null);
+               }
+            }
+
+         }
+         {
+            jButtonOK = new JButton();
+            getContentPane().add(jButtonOK, "7, 5");
+            jButtonOK.setText(Sextante.getText("OK"));
+            jButtonOK.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  executeBatchProcess();
+               }
+            });
+         }
+         {
+            jButtonCancel = new JButton();
+            getContentPane().add(jButtonCancel, "8, 5");
+            jButtonCancel.setText(Sextante.getText("Cancel"));
+            jButtonCancel.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  cancel();
+               }
+            });
+         }
+         {
+            jLabelName = new JLabel(m_Algorithm.getName().toUpperCase());
+            jLabelName.setFont(new java.awt.Font("Tahoma", 1, 12));
+            getContentPane().add(jLabelName, "1, 1, 7, 1");
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void showHelp() {
+
+      SextanteGUI.getGUIFactory().showHelpDialog("batch");
+
+   }
+
+
+   private void executeBatchProcess() {
+
+      final ArrayList param = new ArrayList();
+      final ArrayList output = new ArrayList();
+
+      try {
+         try {
+            assignParameters(param, output);
+         }
+         catch (final TooLargeGridExtentException e) {
+            final int iRet = JOptionPane.showConfirmDialog(null, e.getMessage(), Sextante.getText("Warning"),
+                     JOptionPane.YES_NO_OPTION);
+            if (iRet != JOptionPane.YES_OPTION) {
+               this.jTabbedPanel.setSelectedIndex(1);
+               return;
+            }
+         }
+         AnalysisExtent extent = null;
+         if (jRasterExtentPanel != null) {
+            extent = jRasterExtentPanel.getExtent();
+         }
+
+         final BatchProcessMonitorableTask task = new BatchProcessMonitorableTask(m_Algorithm, param, output, extent, m_Parent);
+         final Thread th = new Thread(task);
+         th.start();
+
+         cancel();
+
+      }
+      catch (final WrongInputException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPanel.setSelectedIndex(0);
+      }
+      catch (final WrongAnalysisExtentException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPanel.setSelectedIndex(1);
+      }
+
+   }
+
+
+   private void assignParameters(final ArrayList param,
+                                 final ArrayList output) throws WrongInputException, WrongAnalysisExtentException,
+                                                        TooLargeGridExtentException {
+
+      if (!jParametersPanel.assignParameters(param, output)) {
+         throw new WrongInputException(Sextante.getText("Wrong_or_missing_parameters_definition"));
+      }
+
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         jRasterExtentPanel.adjustExtent();
+      }
+
+
+   }
+
+
+   private void cancel() {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanel.java	(revision 369)
@@ -0,0 +1,525 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.geom.Point2D;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.algorithm.FixedTableDialog;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.algorithm.MultipleInputSelectionDialog;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+public class ParameterCellPanel
+         extends
+            JPanel {
+
+   private JTextField   textField;
+   private JButton      button;
+   private final Object m_Object;
+   private final JTable m_Table;
+   private JComboBox    comboBox;
+   private Object       m_Value;
+
+
+   public ParameterCellPanel(final Object obj,
+                             final JTable table) {
+
+      super();
+
+      m_Object = obj;
+      m_Table = table;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      textField = new JTextField("");
+      textField.setMaximumSize(new java.awt.Dimension(340, 18));
+      textField.addKeyListener(new KeyListener() {
+         public void keyPressed(final KeyEvent arg0) {
+            m_Value = textField.getText();
+         }
+
+
+         public void keyReleased(final KeyEvent arg0) {}
+
+
+         public void keyTyped(final KeyEvent arg0) {
+            m_Value = textField.getText();
+         }
+      });
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed(evt);
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+
+      if ((m_Object instanceof ParameterString) || (m_Object instanceof ParameterNumericalValue)
+          || (m_Object instanceof ParameterTableField)) {
+         this.add(textField, "0, 0, 1, 0");
+      }
+      else if (m_Object instanceof ParameterDataObject) {
+         comboBox = getDataObjectComboBox();
+         this.add(comboBox, "0, 0, 1, 0");
+      }
+      else {
+         this.add(textField, "0,  0");
+         this.add(button, "1,  0");
+      }
+
+   }
+
+
+   private JComboBox getDataObjectComboBox() {
+
+      Object objs[] = null;
+      try {
+         if (m_Object instanceof ParameterRasterLayer) {
+            objs = SextanteGUI.getInputFactory().getRasterLayers();
+         }
+         else if (m_Object instanceof Parameter3DRasterLayer) {
+            objs = SextanteGUI.getInputFactory().get3DRasterLayers();
+         }
+         else if (m_Object instanceof ParameterVectorLayer) {
+            final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) ((ParameterVectorLayer) m_Object).getParameterAdditionalInfo();
+            objs = SextanteGUI.getInputFactory().getVectorLayers(ai.getShapeType());
+         }
+         else if (m_Object instanceof ParameterTable) {
+            objs = SextanteGUI.getInputFactory().getTables();
+         }
+      }
+      catch (final Exception e) {}
+
+      final JComboBox combo = new JComboBox(objs);
+      combo.addItemListener(new ItemListener() {
+         public void itemStateChanged(final ItemEvent e) {
+            m_Table.getModel().setValueAt(combo.getSelectedItem(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+            m_Value = combo.getSelectedItem();
+            textField.setText(combo.getSelectedItem().toString());
+         }
+
+      });
+
+      return combo;
+
+   }
+
+
+   private void btnActionPerformed(final ActionEvent e) {
+
+      if (m_Object instanceof ParameterBand) {
+         assignBand();
+      }
+      else if (m_Object instanceof ParameterPoint) {
+         assignPoint();
+      }
+      else if (m_Object instanceof ParameterBoolean) {
+         assignBoolean();
+      }
+      else if (m_Object instanceof ParameterFixedTable) {
+         assignFixedTable();
+      }
+      else if (m_Object instanceof ParameterSelection) {
+         assignSelection();
+      }
+      else if (m_Object instanceof ParameterMultipleInput) {
+         assignMultipleInput();
+      }
+      else if (m_Object instanceof Output) {
+         assignOutput();
+      }
+
+      //m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+
+   }
+
+
+   private void assignOutput() {
+
+      int returnVal;
+      String sExt[];
+      String sDesc;
+      final JFileChooser fc = new JFileChooser();
+
+      if (m_Object instanceof OutputRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().getRasterLayerOutputExtensions();
+         sDesc = Sextante.getText("Raster_layers");
+      }
+      else if (m_Object instanceof Output3DRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().get3DRasterLayerOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("3D_Raster_layers"));
+      }
+      else if (m_Object instanceof OutputVectorLayer) {
+         sExt = SextanteGUI.getOutputFactory().getVectorLayerOutputExtensions();
+         sDesc = Sextante.getText("Vector_layer");
+      }
+      else if (m_Object instanceof OutputTable) {
+         sExt = SextanteGUI.getOutputFactory().getTableOutputExtensions();
+         sDesc = Sextante.getText("Tables");
+      }
+      else {
+         return;
+      }
+
+      fc.setFileFilter(new GenericFileFilter(sExt, sDesc));
+
+      final String sColumnNames[] = new String[m_Table.getColumnCount() - 1];
+      for (int i = 0, j = 0; i < sColumnNames.length; i++) {
+         if (i != m_Table.getSelectedColumn()) {
+            sColumnNames[j] = m_Table.getColumnName(i);
+            j++;
+         }
+      }
+      fc.setAccessory(new AutoCompletePanel(sColumnNames));
+      returnVal = fc.showSaveDialog(this.getParent().getParent());
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         String sFile = fc.getSelectedFile().getAbsolutePath();
+         int i;
+         for (i = 0; i < sExt.length; i++) {
+            if (sFile.endsWith(sExt[i])) {
+               break;
+            }
+         }
+         if (i == sExt.length) {
+            sFile = sFile + "." + sExt[0];
+         }
+
+         String sFile2;
+         final int iRow = m_Table.getSelectedRow();
+         final int iCol = m_Table.getSelectedColumn();
+
+         final int iAutoFill = ((AutoCompletePanel) fc.getAccessory()).getAutoFill();
+         if (iAutoFill == AutoCompletePanel.AUTOFILL_NUMBER) {
+            int iCount = 1;
+            for (i = iRow; i < m_Table.getRowCount(); i++) {
+               sFile2 = sFile.substring(0, sFile.lastIndexOf(".")) + Integer.toString(iCount)
+                        + sFile.substring(sFile.lastIndexOf("."), sFile.length());
+               m_Table.setValueAt(sFile2, i, iCol);
+               iCount++;
+               if (i == iRow) {
+                  textField.setText(sFile2);
+               }
+            }
+         }
+         else if (iAutoFill == AutoCompletePanel.AUTOFILL_FIELD) {
+            final int iField = ((AutoCompletePanel) fc.getAccessory()).getField();
+            final ParameterCellPanelEditor ce = (ParameterCellPanelEditor) m_Table.getCellEditor(0, iField);
+            for (i = iRow; i < m_Table.getRowCount(); i++) {
+               String sCellValue = m_Table.getValueAt(i, iField).toString();
+               if (ce.isFilenameCell()) {
+                  if (!sCellValue.trim().equals("")) {
+                     final File f = new File(sCellValue);
+                     sCellValue = f.getName().substring(0, f.getName().lastIndexOf("."));
+                  }
+               }
+               sFile2 = sFile.substring(0, sFile.lastIndexOf(".")) + sCellValue
+                        + sFile.substring(sFile.lastIndexOf("."), sFile.length());
+               m_Table.setValueAt(sFile2, i, iCol);
+               if (i == iRow) {
+                  textField.setText(sFile2);
+               }
+            }
+         }
+         else {
+            textField.setText(sFile);
+         }
+         m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         m_Value = textField.getText();
+      }
+
+   }
+
+
+   private void assignMultipleInput() {
+
+      final ParameterMultipleInput parameter = (ParameterMultipleInput) m_Object;
+      Object[] objs;
+
+      try {
+         final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+         switch (additionalInfo.getDataType()) {
+            case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+               objs = SextanteGUI.getInputFactory().getRasterLayers();
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+               objs = SextanteGUI.getInputFactory().getTables();
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+               objs = SextanteGUI.getInputFactory().getBands();
+               break;
+            default:
+               return;
+         }
+
+         final ArrayList selectedIndices = new ArrayList();
+         final MultipleInputSelectionDialog dialog = new MultipleInputSelectionDialog(SextanteGUI.getMainFrame(), objs,
+                  selectedIndices);
+
+         dialog.pack();
+         dialog.setVisible(true);
+
+         final StringBuffer sText = new StringBuffer();
+         final int iCount = selectedIndices.size();
+         sText.append(Integer.toString(iCount));
+         if (iCount == 1) {
+            sText.append(" " + Sextante.getText("element_selected"));
+         }
+         else {
+            sText.append(" " + Sextante.getText("elements_selected"));
+         }
+
+         int iIndex;
+         final ArrayList selected = new ArrayList();
+
+         for (int i = 0; i < selectedIndices.size(); i++) {
+            iIndex = ((Integer) selectedIndices.get(i)).intValue();
+            selected.add(objs[iIndex]);
+         }
+
+         m_Table.getModel().setValueAt(selected, m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         m_Value = selected;
+         textField.setText(sText.toString());
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void assignFixedTable() {
+
+      final FixedTableModel model = getTableModelFromString();
+
+      final FixedTableDialog dialog = new FixedTableDialog(SextanteGUI.getMainFrame(), model);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      textField.setText(model.getAsCSV());
+      m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+      m_Value = textField.getText();
+
+   }
+
+
+   public FixedTableModel getTableModelFromString() {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel = null;
+      final StringTokenizer st = new StringTokenizer(textField.getText(), ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      final Parameter parameter = (Parameter) m_Object;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iCols, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return tableModel;
+            }
+         }
+         else {
+            if (iToken % iCols != 0) {
+               return tableModel;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iCol = (int) Math.floor(iToken / (double) iCols);
+            iRow = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iCol, iRow);
+            iToken++;
+         }
+
+         return tableModel;
+      }
+      catch (final Exception e) {
+         return tableModel;
+      }
+
+   }
+
+
+   private void assignBand() {
+
+      final int MAX_BANDS = 250;
+
+      final String[] possibilities = new String[MAX_BANDS];
+      for (int i = 0; i < possibilities.length; i++) {
+         possibilities[i] = Integer.toString(i + 1);
+      }
+
+      final String s = (String) JOptionPane.showInputDialog(null, Sextante.getText("Band"), Sextante.getText("Band"),
+               JOptionPane.PLAIN_MESSAGE, null, possibilities, possibilities[0]);
+
+      if (s != null) {
+         textField.setText(s);
+         m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         m_Value = textField.getText();
+      }
+
+   }
+
+
+   private void assignPoint() {
+
+      final Frame window = new Frame();
+      final Point2D pt = new Point2D.Double();
+      final PointSelectionDialog dialog = new PointSelectionDialog(window, pt);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      if (dialog.getOK()) {
+         textField.setText(Double.toString(pt.getX()) + "," + Double.toString(pt.getY()));
+         m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         m_Value = textField.getText();
+      }
+
+   }
+
+
+   private void assignSelection() {
+
+      final Parameter parameter = (Parameter) m_Object;
+      try {
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+
+         final String[] possibilities = ai.getValues();
+         final String s = (String) JOptionPane.showInputDialog(null, parameter.getParameterDescription(),
+                  parameter.getParameterDescription(), JOptionPane.PLAIN_MESSAGE, null, possibilities, possibilities[0]);
+
+         if (s != null) {
+            textField.setText(s);
+            m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+            m_Value = textField.getText();
+         }
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {}
+
+   }
+
+
+   private void assignBoolean() {
+
+      final Parameter parameter = (Parameter) m_Object;
+      final String[] possibilities = { Sextante.getText("Yes"), Sextante.getText("No") };
+      final String s = (String) JOptionPane.showInputDialog(null, parameter.getParameterDescription(),
+               parameter.getParameterDescription(), JOptionPane.PLAIN_MESSAGE, null, possibilities, Sextante.getText("Yes"));
+
+      if (s != null) {
+         if (s.equals(Sextante.getText("Yes"))) {
+            textField.setText("true");
+         }
+         else {
+            textField.setText("false");
+         }
+         m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+         m_Value = textField.getText();
+      }
+
+   }
+
+
+   public Object getValue() {
+
+      return m_Value;
+
+   }
+
+
+   public void setValue(final Object obj) {
+
+      m_Value = obj;
+      textField.setText(obj.toString());
+
+   }
+
+
+   public boolean isFilenameCell() {
+
+      return ((m_Object instanceof ParameterDataObject) || !(m_Object instanceof Parameter));
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/AutoCompletePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/AutoCompletePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/AutoCompletePanel.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A panel with to define autocompletion parameters in a file chooser
+ * 
+ * @author volaya
+ * 
+ */
+public class AutoCompletePanel
+         extends
+            JPanel {
+
+   public static final int NO_AUTOFILL     = 0;
+   public static final int AUTOFILL_NUMBER = 1;
+   public static final int AUTOFILL_FIELD  = 2;
+
+   private JRadioButton    jAutoFillNumberRB;
+   private JRadioButton    jAutoFillFieldRB;
+   private JRadioButton    jNoAutoFillRB;
+   private JComboBox       m_FieldComboBox;
+
+
+   public AutoCompletePanel(final String sFields[]) {
+
+      super();
+
+      initGUI(sFields);
+
+   }
+
+
+   private void initGUI(final String sFields[]) {
+
+      try {
+         this.setPreferredSize(new java.awt.Dimension(400, 100));
+         {
+
+            final TableLayout layout = new TableLayout(new double[][] {
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 10.0, 20, TableLayoutConstants.FILL, 20, TableLayoutConstants.FILL, 20, 10.0 } });
+            layout.setHGap(5);
+            layout.setVGap(5);
+            this.setLayout(layout);
+            this.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Autorellenar")));
+            jNoAutoFillRB = new JRadioButton(Sextante.getText("Do_not_autofill"));
+            jNoAutoFillRB.setSelected(true);
+            this.add(jNoAutoFillRB, "1,1");
+            jAutoFillNumberRB = new JRadioButton(Sextante.getText("Autofill_with_numbers"));
+            this.add(jAutoFillNumberRB, "1,3");
+            jAutoFillFieldRB = new JRadioButton(Sextante.getText("Autofill_with_field_values"));
+            this.add(jAutoFillFieldRB, "1,5");
+            m_FieldComboBox = new JComboBox(sFields);
+            this.add(m_FieldComboBox, "2,5");
+            final ButtonGroup group = new ButtonGroup();
+            group.add(jNoAutoFillRB);
+            group.add(jAutoFillNumberRB);
+            group.add(jAutoFillFieldRB);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   public int getAutoFill() {
+
+      if (jAutoFillNumberRB.isSelected()) {
+         return AUTOFILL_NUMBER;
+      }
+      else if (jAutoFillFieldRB.isSelected()) {
+         return AUTOFILL_FIELD;
+      }
+      else {
+         return NO_AUTOFILL;
+      }
+
+   }
+
+
+   public int getField() {
+
+      return m_FieldComboBox.getSelectedIndex();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/AutoCompletePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessSingleUnit.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessSingleUnit.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessSingleUnit.java	(revision 369)
@@ -0,0 +1,515 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.ProcessTask;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputNumericalValue;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+/**
+ * A task representing a single algorithm execution as a part of a batch process. The process is comprised of several single units
+ * like the one represented by this class
+ * 
+ * @author volaya
+ * 
+ */
+public class BatchProcessSingleUnit
+         implements
+            Callable<Boolean> {
+
+   private final HashMap                                    m_Parameters;
+   private final GeoAlgorithm                               m_Algorithm;
+   private final HashMap                                    m_DataObjects;
+   private final HashMap                                    m_OutputSettings;
+   private StringBuffer                                     m_sLog;
+   private final AnalysisExtent                             m_AnalysisExtent;
+   private final ITaskMonitor                               m_TaskMonitor;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   /**
+    * 
+    * @param alg
+    *                the algorithm to execute
+    * @param parameters
+    *                a map with parameter values, to be used to fill the ParametersSet of the algorithm
+    * @param output
+    *                a map with output settings, to be used to fill the OutputObjectsSet of the algorithm
+    * @param analysisExtent
+    *                the output extent to use
+    * @param numericalOutputs
+    *                an array list to collect numerical outputs produced by the algorithm
+    */
+   public BatchProcessSingleUnit(final GeoAlgorithm alg,
+                                 final HashMap parameters,
+                                 final HashMap output,
+                                 final AnalysisExtent analysisExtent,
+                                 final ITaskMonitor monitor,
+                                 final ArrayList<ArrayList<OutputNumericalValue>> numericalOutputs) {
+
+      m_Algorithm = alg;
+      m_Parameters = parameters;
+      m_OutputSettings = output;
+      m_DataObjects = new HashMap();
+      m_AnalysisExtent = analysisExtent;
+      m_TaskMonitor = monitor;
+      m_NumericalOutputs = numericalOutputs;
+
+   }
+
+
+   /**
+    * Executes the algorithm
+    * 
+    * @return true if the algorithm was not canceled
+    * @throws GeoAlgorithmExecutionException
+    */
+   public Boolean call() throws GeoAlgorithmExecutionException {
+
+      m_sLog = new StringBuffer();
+
+      if (assignParameters() && assignOutputSettings() && assignExtent()) {
+         final ExecutorService pool = Executors.newFixedThreadPool(1);
+         final Future<Boolean> p = pool.submit(new ProcessTask(m_Algorithm, SextanteGUI.getOutputFactory(), m_TaskMonitor));
+         try {
+            final Boolean success = p.get();
+            if ((success != null) && success.booleanValue()) {
+               final Runnable postProcess = SextanteGUI.getPostProcessTask(m_Algorithm, false);
+               if (postProcess != null) {
+                  postProcess.run();
+               }
+               collectIndividualNumericalOutputs();
+               m_DataObjects.clear();
+               return true;
+            }
+            else {
+               m_DataObjects.clear();
+               return false;
+            }
+         }
+         catch (final Exception e) {
+            m_DataObjects.clear();
+            Sextante.addErrorToLog(e);
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+
+      }
+      else {
+         m_DataObjects.clear();
+         return Boolean.valueOf(false);
+      }
+
+   }
+
+
+   private void collectIndividualNumericalOutputs() {
+
+      final ArrayList<OutputNumericalValue> numericalOutputs = new ArrayList<OutputNumericalValue>();
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output out = ooset.getOutput(i);
+         if (out instanceof OutputNumericalValue) {
+            numericalOutputs.add((OutputNumericalValue) out);
+         }
+      }
+
+      m_NumericalOutputs.add(numericalOutputs);
+
+   }
+
+
+   private boolean assignExtent() {
+
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         m_Algorithm.setAnalysisExtent(m_AnalysisExtent);
+         return m_Algorithm.adjustOutputExtent();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   /**
+    * Returns a string with information about the executed process
+    * 
+    * @return a string with information about the executed process
+    */
+   public String getLog() {
+
+      return m_sLog.toString();
+
+   }
+
+
+   private boolean assignOutputSettings() {
+
+      final Set set = m_OutputSettings.keySet();
+      final Iterator iter = set.iterator();
+      try {
+         while (iter.hasNext()) {
+            final String sOutputID = (String) iter.next();
+            final String sValue = (String) m_OutputSettings.get(sOutputID);
+            final Output out = m_Algorithm.getOutputObjects().getOutput(sOutputID);
+            if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)) {
+               m_sLog.append(out.getDescription() + ":");
+               m_sLog.append(sValue + "\n");
+               out.setOutputChannel(new FileOutputChannel(sValue));
+            }
+         }
+
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean assignParameters() {
+
+      final Set set = m_Parameters.keySet();
+      Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         final String sParamID = (String) iter.next();
+         final Object value = m_Parameters.get(sParamID);
+         Parameter parameter;
+         try {
+            parameter = m_Algorithm.getParameters().getParameter(sParamID);
+         }
+         catch (final WrongParameterIDException e) {
+            return false;
+         }
+         if ((parameter instanceof ParameterDataObject) || (parameter instanceof ParameterMultipleInput)) { //data objects first, to avoid problems with dependencies
+            if (!setValue(value, parameter)) {
+               m_sLog.append("[error]\n");
+               return false;
+            }
+            else {
+               m_sLog.append("[ok]\n");
+            }
+         }
+      }
+
+      iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sParamID = (String) iter.next();
+         final Object value = m_Parameters.get(sParamID);
+         Parameter parameter;
+         try {
+            parameter = m_Algorithm.getParameters().getParameter(sParamID);
+         }
+         catch (final WrongParameterIDException e) {
+            return false;
+         }
+         if (!(parameter instanceof ParameterDataObject) && !(parameter instanceof ParameterMultipleInput)) {
+            if (!setValueFromString((String) value, parameter)) {
+               m_sLog.append("[error]\n");
+               return false;
+            }
+            else {
+               m_sLog.append("[ok]\n");
+            }
+         }
+      }
+
+      return true;
+
+   }
+
+
+   private boolean setValue(final Object value,
+                            final Parameter parameter) {
+
+      m_sLog.append(parameter.getParameterDescription());
+      m_sLog.append(":");
+      m_sLog.append(value.toString());
+
+      return parameter.setParameterValue(value);
+
+   }
+
+
+   private boolean setValueFromString(final String sValue,
+                                      final Parameter parameter) {
+
+      m_sLog.append(parameter.getParameterDescription());
+      m_sLog.append(":");
+      m_sLog.append(sValue);
+
+      if (parameter instanceof ParameterNumericalValue) {
+         return assignNumericalValue(sValue, (ParameterNumericalValue) parameter);
+      }
+      else if (parameter instanceof ParameterString) {
+         return assignString(sValue, (ParameterString) parameter);
+      }
+      else if (parameter instanceof ParameterSelection) {
+         return assignSelection(sValue, (ParameterSelection) parameter);
+      }
+      else if (parameter instanceof ParameterFixedTable) {
+         return assignFixedTable(sValue, (ParameterFixedTable) parameter);
+      }
+      else if (parameter instanceof ParameterPoint) {
+         return assignPoint(sValue, (ParameterPoint) parameter);
+      }
+      else if (parameter instanceof ParameterBoolean) {
+         return assignBoolean(sValue, parameter);
+      }
+      else if (parameter instanceof ParameterFilepath) {
+         return assignFilepath(sValue, (ParameterFilepath) parameter);
+      }
+      else if (parameter instanceof ParameterTableField) {
+         return assignTableField(sValue, (ParameterTableField) parameter);
+      }
+      else if (parameter instanceof ParameterBand) {
+         return assignBand(sValue, (ParameterBand) parameter);
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private boolean assignBand(final String sValue,
+                              final ParameterBand parameter) {
+
+      try {
+         final Integer value = new Integer(Integer.parseInt(sValue) - 1);
+         parameter.setParameterValue(value);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignTableField(final String sValue,
+                                    final ParameterTableField parameter) {
+
+      final int iField;
+      try {
+         final AdditionalInfoTableField aivl = (AdditionalInfoTableField) parameter.getParameterAdditionalInfo();
+         final ParametersSet ps = m_Algorithm.getParameters();
+         final String sParent = aivl.getParentParameterName();
+         final Parameter parentParam = ps.getParameter(sParent);
+         if (parentParam instanceof ParameterVectorLayer) {
+            final IVectorLayer layer = ps.getParameterValueAsVectorLayer(sParent);
+            final String[] sNames = layer.getFieldNames();
+            for (int i = 0; i < sNames.length; i++) {
+               if (layer.getFieldName(i).equals(sValue)) {
+                  parameter.setParameterValue(new Integer(i));
+                  return true;
+               }
+            }
+            return false;
+         }
+         else {//table
+            final ITable table = ps.getParameterValueAsTable(sParent);
+            final String[] sNames = table.getFieldNames();
+            for (int i = 0; i < sNames.length; i++) {
+               if (table.getFieldName(i).equals(sValue)) {
+                  parameter.setParameterValue(new Integer(i));
+                  return true;
+               }
+            }
+            return false;
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignFixedTable(final String sValue,
+                                    final ParameterFixedTable parameter) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel;
+      final StringTokenizer st = new StringTokenizer(sValue, ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iCols, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return false;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return false;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iRow = (int) Math.floor(iToken / (double) iCols);
+            iCol = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iRow, iCol);
+            iToken++;
+         }
+
+         parameter.setParameterValue(tableModel);
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+   }
+
+
+   private boolean assignFilepath(final String sValue,
+                                  final ParameterFilepath parameter) {
+
+      parameter.setParameterValue(sValue);
+
+      return true;
+
+   }
+
+
+   private boolean assignPoint(final String sValue,
+                               final ParameterPoint parameter) {
+
+      try {
+         final String[] sCoords = sValue.split(",");
+         final double dX = Double.parseDouble(sCoords[0]);
+         final double dY = Double.parseDouble(sCoords[1]);
+         final Point2D pt = new Point2D.Double(dX, dY);
+         parameter.setParameterValue(pt);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignNumericalValue(final String sValue,
+                                        final ParameterNumericalValue parameter) {
+
+      try {
+         final Double value = new Double(Double.parseDouble(sValue));
+         parameter.setParameterValue(value);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignSelection(final String sValue,
+                                   final ParameterSelection parameter) {
+
+      try {
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+
+         final String[] sValues = ai.getValues();
+         for (int i = 0; i < sValues.length; i++) {
+            if (sValue.equals(sValues[i])) {
+               parameter.setParameterValue(new Integer(i));
+               return true;
+            }
+         }
+
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         return false;
+      }
+
+      return false;
+
+   }
+
+
+   private boolean assignBoolean(final String sValue,
+                                 final Parameter parameter) {
+
+      if (sValue.toLowerCase().equals("true")) {
+         parameter.setParameterValue(new Boolean(true));
+      }
+      else {
+         parameter.setParameterValue(new Boolean(false));
+      }
+
+      return true;
+
+   }
+
+
+   private boolean assignString(final String sValue,
+                                final ParameterString parameter) {
+
+      parameter.setParameterValue(sValue);
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/BatchProcessSingleUnit.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersPanel.java	(revision 369)
@@ -0,0 +1,343 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.TableColumn;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+
+
+/**
+ * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI Builder, which is free for non-commercial use. If
+ * Jigloo is being used commercially (ie, by a corporation, company or business for any purpose whatever) then you should purchase
+ * a license for each developer using Jigloo. Please visit www.cloudgarden.com for details. Use of Jigloo implies acceptance of
+ * these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
+ * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
+ */
+/**
+ * A panel to introduce parameters for a batch process. It features a table where each row represents a single process. The number
+ * of columns depends on the algorithm to execute and the number of parameters it needs
+ * 
+ * @author volaya
+ * 
+ */
+public class ParametersPanel
+         extends
+            JPanel {
+
+   private final GeoAlgorithm   m_Algorithm;
+   private JPanel               jPanelAddRemoveRows;
+   private JScrollPane          jScrollPane;
+   private JButton              jButtonRemoveRow;
+   private JButton              jButtonAddRow;
+   private JTable               jTable;
+   private ParametersTableModel m_TableModel;
+   private JPopupMenu           popupMenu;
+   private JMenuItem            menuItemCopy;
+   private String[][]           m_sClipboard;
+   private JMenuItem            menuItemPaste;
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute
+    */
+   public ParametersPanel(final GeoAlgorithm alg) {
+
+      super();
+
+      m_Algorithm = alg;
+
+      defineTableModel();
+      initGUI();
+
+   }
+
+
+   private void defineTableModel() {
+
+      m_TableModel = new ParametersTableModel(m_Algorithm.getParameters(), m_Algorithm.getOutputObjects());
+
+   }
+
+
+   private void initGUI() {
+
+      int i;
+      final ParametersSet ps = m_Algorithm.getParameters();
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5.0, 120.0, 5.0 },
+               { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(580, 350));
+      this.setSize(new java.awt.Dimension(580, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1,1,1,2");
+         jScrollPane.setMinimumSize(new java.awt.Dimension(432, 256));
+
+         jTable = new JTable();
+         jScrollPane.setViewportView(jTable);
+         initTable();
+
+         int iDataObjectOutputs = 0;
+         for (i = 0; i < ooset.getOutputObjectsCount(); i++) {
+            final Output out = ooset.getOutput(i);
+            if ((out instanceof OutputRasterLayer) || (out instanceof Output3DRasterLayer) || (out instanceof OutputVectorLayer)
+                || (out instanceof OutputTable)) {
+               final TableColumn col = jTable.getColumnModel().getColumn(iDataObjectOutputs + ps.getNumberOfParameters());
+               col.setCellEditor(new ParameterCellPanelEditor(out, jTable));
+               col.setCellRenderer(new ParameterCellPanelRenderer(out));
+               jTable.getColumnModel().getColumn(iDataObjectOutputs + ps.getNumberOfParameters()).setPreferredWidth(200);
+               iDataObjectOutputs++;
+            }
+         }
+
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               if (e.getButton() == MouseEvent.BUTTON3) {
+                  showPopupMenu(e);
+               }
+            }
+         };
+         jTable.addMouseListener(ml);
+
+         {
+            popupMenu = new JPopupMenu("Menu");
+
+            menuItemCopy = new JMenuItem(Sextante.getText("Copy"));
+            menuItemCopy.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  copyCells();
+               }
+            });
+            popupMenu.add(menuItemCopy);
+
+            menuItemPaste = new JMenuItem(Sextante.getText("Paste"));
+            menuItemPaste.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  pasteCells();
+               }
+            });
+            popupMenu.add(menuItemPaste);
+         }
+
+      }
+      {
+         jPanelAddRemoveRows = new JPanel();
+         final TableLayout jPanelAddRemoveRowsLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5.0 },
+                  { 5.0, 25.0, 30.0, TableLayoutConstants.FILL } });
+         jPanelAddRemoveRowsLayout.setHGap(5);
+         jPanelAddRemoveRowsLayout.setVGap(5);
+         jPanelAddRemoveRows.setLayout(jPanelAddRemoveRowsLayout);
+         this.add(jPanelAddRemoveRows, "3,1,4,1");
+      }
+      {
+         jButtonRemoveRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonRemoveRow, "1, 2");
+         jButtonRemoveRow.setText(Sextante.getText("Delete_row"));
+         jButtonRemoveRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnRemoveRowActionPerformed(evt);
+            }
+         });
+      }
+      {
+         jButtonAddRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonAddRow, "1,  1");
+         jButtonAddRow.setText(Sextante.getText("Add_row"));
+         jButtonAddRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnAddRowActionPerformed(evt);
+            }
+         });
+      }
+
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   protected void copyCells() {
+
+      final int[] cols = jTable.getSelectedColumns();
+      final int[] rows = jTable.getSelectedRows();
+      m_sClipboard = new String[rows.length][cols.length];
+
+      for (int j = 0; j < rows.length; j++) {
+         for (int i = 0; i < cols.length; i++) {
+            m_sClipboard[j][i] = (String) jTable.getValueAt(rows[j], cols[i]);
+         }
+      }
+
+   }
+
+
+   protected void pasteCells() {
+
+      if (m_sClipboard == null) {
+         return;
+      }
+
+      int iCol, iRow;
+
+      final int[] cols = jTable.getSelectedColumns();
+      final int[] rows = jTable.getSelectedRows();
+
+      for (final int element : rows) {
+         for (final int element2 : cols) {
+            iRow = (element - rows[0]) % m_sClipboard.length;
+            iCol = (element2 - cols[0]) % m_sClipboard[0].length;
+            jTable.setValueAt(m_sClipboard[iRow][iCol], element, element2);
+         }
+      }
+
+
+   }
+
+
+   private void btnAddRowActionPerformed(final ActionEvent evt) {
+
+      m_TableModel.addRow();
+
+   }
+
+
+   private void btnRemoveRowActionPerformed(final ActionEvent evt) {
+
+      int iRow;
+
+      iRow = jTable.getSelectedRow();
+      if (iRow != -1) {
+         m_TableModel.removeRow(iRow);
+      }
+
+   }
+
+
+   /**
+    * Assign the values introduced by the user. Values for each execution of the algorithm are stored in two maps, one for the
+    * inputs and another one for the outputs. Maps are stored in the passed ArrayLists
+    * 
+    * @param param
+    *                an arraylist to store maps containing input parameters values
+    * @param output
+    *                an arraylist to store maps containing out parameters values
+    * @return returns true if all the values in the current table are correct, false otherwise
+    */
+   public boolean assignParameters(final ArrayList param,
+                                   final ArrayList output) {
+
+      int i, j;
+
+
+      final ParametersSet ps = m_Algorithm.getParameters();
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      for (i = 0; i < m_TableModel.getRowCount(); i++) {
+         final HashMap paramMap = new HashMap();
+         for (j = 0; j < ps.getNumberOfParameters(); j++) {
+            final ParameterCellPanelRenderer rend = (ParameterCellPanelRenderer) jTable.getCellRenderer(i, j);
+            if (!rend.isValueOK()) {
+               return false;
+            }
+            paramMap.put(ps.getParameter(j).getParameterName(), m_TableModel.getValueAt(i, j));
+         }
+         final HashMap outputMap = new HashMap();
+         for (j = 0; j < ooSet.getOutputDataObjectsCount(); j++) {
+            final Output out = ooSet.getOutput(j);
+            if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)) {
+               final String sOut = m_TableModel.getValueAt(i, j + ps.getNumberOfParameters()).toString();
+               if (sOut.equals(Sextante.getText("[Save_to_temporary_file]"))) {
+                  outputMap.put(out.getName(), null);
+               }
+               else {
+                  outputMap.put(out.getName(), sOut);
+               }
+            }
+         }
+         param.add(paramMap);
+         output.add(outputMap);
+      }
+
+      return true;
+
+   }
+
+
+   public ParametersTableModel getTableModel() {
+
+      return m_TableModel;
+
+   }
+
+
+   /**
+    * Sets a new parameters table
+    * 
+    * @param table
+    *                the new table to set
+    */
+   public void setTableModel(final ParametersTableModel table) {
+
+      //Warning: we simply change the assignment, but do not check that
+      //the table schema is consistent
+
+      m_TableModel = table;
+      initTable();
+      this.updateUI();
+
+   }
+
+
+   private void initTable() {
+
+      final ParametersSet ps = m_Algorithm.getParameters();
+      jTable.setModel(m_TableModel);
+      jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+      jTable.getTableHeader().setReorderingAllowed(false);
+      jTable.setColumnSelectionAllowed(true);
+      jTable.setRowSelectionAllowed(true);
+      for (int i = 0; i < ps.getNumberOfParameters(); i++) {
+         final Parameter param = ps.getParameter(i);
+         final TableColumn col = jTable.getColumnModel().getColumn(i);
+         col.setCellEditor(new ParameterCellPanelEditor(param, jTable));
+         col.setCellRenderer(new ParameterCellPanelRenderer(param));
+         jTable.getColumnModel().getColumn(i).setPreferredWidth(200);
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelEditor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelEditor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelEditor.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.table.TableCellEditor;
+
+public class ParameterCellPanelEditor
+         extends
+            AbstractCellEditor
+         implements
+            TableCellEditor {
+
+   ParameterCellPanel panel;
+
+
+   public ParameterCellPanelEditor(final Object obj,
+                                   final JTable table) {
+
+      panel = new ParameterCellPanel(obj, table);
+
+   }
+
+
+   public Object getCellEditorValue() {
+
+      return panel.getValue();
+
+   }
+
+
+   public Component getTableCellEditorComponent(final JTable table,
+                                                final Object value,
+                                                final boolean isSelected,
+                                                final int row,
+                                                final int column) {
+
+      panel.setValue(value);
+
+      return panel;
+
+   }
+
+
+   public ParameterCellPanel getPanel() {
+
+      return panel;
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final EventObject anEvent) {
+
+      if (anEvent instanceof MouseEvent) {
+         return ((MouseEvent) anEvent).getClickCount() >= 2;
+      }
+      return true;
+
+   }
+
+
+   public boolean isFilenameCell() {
+
+      return panel.isFilenameCell();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelRenderer.java	(revision 369)
@@ -0,0 +1,238 @@
+package es.unex.sextante.gui.batch.nonFileBased;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterSelection;
+
+public class ParameterCellPanelRenderer
+         extends
+            DefaultTableCellRenderer {
+
+   private final Object m_Object;
+   private Object       m_Value;
+
+
+   public ParameterCellPanelRenderer(final Object obj) {
+
+      m_Object = obj;
+
+   }
+
+
+   @Override
+   public Component getTableCellRendererComponent(final JTable table,
+                                                  final Object value,
+                                                  final boolean isSelected,
+                                                  final boolean hasFocus,
+                                                  final int rowIndex,
+                                                  final int colIndex) {
+
+      super.getTableCellRendererComponent(table, value, isSelected, hasFocus, rowIndex, colIndex);
+
+      m_Value = table.getModel().getValueAt(rowIndex, colIndex);
+      this.setText(m_Value.toString());
+      if (isValueOK()) {
+         this.setForeground(Color.BLACK);
+      }
+      else {
+         this.setForeground(Color.RED);
+      }
+      return this;
+   }
+
+
+   public boolean isValueOK() {
+
+      if (m_Object instanceof ParameterPoint) {
+         return isPointOK();
+      }
+      else if (m_Object instanceof ParameterDataObject) {
+         return true;
+      }
+      else if (m_Object instanceof ParameterFixedTable) {
+         return isFixedTableOK();
+      }
+      else if (m_Object instanceof ParameterSelection) {
+         return isSelectionOK();
+      }
+      else if (m_Object instanceof ParameterNumericalValue) {
+         return isNumericalValueOK();
+      }
+      else if (m_Object instanceof ParameterMultipleInput) {
+         return isMultipleInputOK();
+      }
+      else if (m_Object instanceof Output) {
+         return isOutputOK();
+      }
+
+      return true;
+
+   }
+
+
+   private boolean isOutputOK() {
+
+      return !((String) m_Value).trim().equals("");
+
+   }
+
+
+   private boolean isMultipleInputOK() {
+
+      AdditionalInfoMultipleInput ai;
+      try {
+         ai = (AdditionalInfoMultipleInput) ((ParameterMultipleInput) m_Object).getParameterAdditionalInfo();
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         return false;
+      }
+      if (m_Value instanceof ArrayList) {
+         final ArrayList list = (ArrayList) m_Value;
+         final int iCount = list.size();
+         return (!ai.getIsMandatory() || (iCount > 0));
+      }
+      else {
+         return !ai.getIsMandatory();
+      }
+
+   }
+
+
+   private boolean isFixedTableOK() {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;;
+      final StringTokenizer st = new StringTokenizer((String) m_Value, ",");
+      AdditionalInfoFixedTable ai;
+      final ParameterFixedTable parameter = (ParameterFixedTable) m_Object;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return false;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return false;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            Double.parseDouble(st.nextToken().trim());
+
+         }
+
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isSelectionOK() {
+
+      try {
+         final ParameterSelection parameter = (ParameterSelection) m_Object;
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+         final String[] sValues = ai.getValues();
+         for (final String element : sValues) {
+            if (((String) m_Value).equals(element)) {
+               return true;
+            }
+         }
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return false;
+
+   }
+
+
+   private boolean isNumericalValueOK() {
+
+      try {
+         final ParameterNumericalValue parameter = (ParameterNumericalValue) m_Object;
+         final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+         final double dMin = ai.getMinValue();
+         final double dMax = ai.getMaxValue();
+         final double dVal = Double.parseDouble((String) m_Value);
+         if ((dVal < dMin) || (dMax < dVal)) {
+            return false;
+         }
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isPointOK() {
+
+      final String[] s = ((String) m_Value).split(",");
+
+      if (s.length != 2) {
+         return false;
+      }
+
+      try {
+         Double.parseDouble(s[0]);
+         Double.parseDouble(s[1]);
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return true;
+
+   }
+
+
+   // The following methods override the defaults for performance reasons
+   @Override
+   public void validate() {}
+
+
+   @Override
+   public void revalidate() {}
+
+
+   @Override
+   protected void firePropertyChange(final String propertyName,
+                                     final Object oldValue,
+                                     final Object newValue) {}
+
+
+   @Override
+   public void firePropertyChange(final String propertyName,
+                                  final boolean oldValue,
+                                  final boolean newValue) {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/nonFileBased/ParameterCellPanelRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanelEditor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanelEditor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanelEditor.java	(revision 369)
@@ -0,0 +1,58 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.table.TableCellEditor;
+
+public class RasterBandPanelEditor
+         extends
+            AbstractCellEditor
+         implements
+            TableCellEditor {
+
+   private final RasterBandPanel panel;
+
+
+   public RasterBandPanelEditor(final JTable table) {
+
+      panel = new RasterBandPanel(table);
+
+   }
+
+
+   public Object getCellEditorValue() {
+
+      return panel.getValue();
+
+   }
+
+
+   public Component getTableCellEditorComponent(final JTable table,
+                                                final Object value,
+                                                final boolean isSelected,
+                                                final int row,
+                                                final int column) {
+
+      panel.setValue((String) value);
+
+      return panel;
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final EventObject anEvent) {
+
+      if (anEvent instanceof MouseEvent) {
+         return ((MouseEvent) anEvent).getClickCount() >= 2;
+      }
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterBandPanelEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionPanel.java	(revision 369)
@@ -0,0 +1,71 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.geom.Point2D;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+public class PointSelectionPanel
+         extends
+            JPanel {
+
+   private JTextField textFieldX;
+   private JTextField textFieldY;
+   private JLabel     labelX;
+   private JLabel     labelY;
+
+
+   PointSelectionPanel() {
+
+      super();
+
+      InitGUI();
+
+   }
+
+
+   private void InitGUI() {
+
+      textFieldX = new JTextField("0");
+      textFieldY = new JTextField("0");
+      labelX = new JLabel(" X:");
+      labelY = new JLabel(" Y:");
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 25.0, TableLayoutConstants.FILL, 25.0, TableLayoutConstants.FILL, 35.0 }, { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(labelX, "0,  0");
+      this.add(textFieldX, "1,  0");
+      this.add(labelY, "2,  0");
+      this.add(textFieldY, "3,  0");
+
+   }
+
+
+   public Point2D getPoint() {
+
+      try {
+         final Point2D pt = new Point2D.Double(Double.parseDouble(textFieldX.getText()), Double.parseDouble(textFieldY.getText()));
+         return pt;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+
+   }
+
+
+   public void setPoint(final Point2D point) {
+
+      textFieldX.setText(Double.toString(Math.floor(point.getX() * 10000.) / 10000.));
+      textFieldY.setText(Double.toString(Math.floor(point.getY() * 10000.) / 10000.));
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionDialog.java	(revision 369)
@@ -0,0 +1,127 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+
+import es.unex.sextante.core.Sextante;
+
+public class PointSelectionDialog
+         extends
+            javax.swing.JDialog {
+
+   private JPanel              jPanelMain;
+   private JSeparator          jSeparator;
+   private JButton             jButtonCancel;
+   private JButton             jButtonOK;
+   private final Point2D       m_Point;
+   private PointSelectionPanel pointPanel;
+   private boolean             m_bOK = false;
+
+
+   public PointSelectionDialog(final Frame window,
+                               final Point2D pt) {
+
+
+      super(window, "", true);
+
+      this.setResizable(false);
+
+      m_Point = pt;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            this.setTitle(Sextante.getText("point"));
+            {
+               jPanelMain = new JPanel();
+               getContentPane().add(jPanelMain, BorderLayout.CENTER);
+               jPanelMain.setPreferredSize(new java.awt.Dimension(300, 90));
+               {
+                  pointPanel = new PointSelectionPanel();
+                  pointPanel.setPreferredSize(new java.awt.Dimension(250, 20));
+                  jPanelMain.add(pointPanel);
+
+               }
+               {
+                  jSeparator = new JSeparator();
+                  jPanelMain.add(jSeparator);
+                  jSeparator.setPreferredSize(new java.awt.Dimension(250, 20));
+               }
+               {
+                  jButtonOK = new JButton();
+                  jPanelMain.add(jButtonOK);
+                  jButtonOK.setText(Sextante.getText("OK"));
+                  jButtonOK.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnOKActionPerformed(evt);
+                     }
+                  });
+               }
+               {
+                  jButtonCancel = new JButton();
+                  jPanelMain.add(jButtonCancel);
+                  jButtonCancel.setText(Sextante.getText("Cancel"));
+                  jButtonCancel.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnCancelActionPerformed(evt);
+                     }
+                  });
+               }
+            }
+         }
+         this.setSize(350, 100);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void btnOKActionPerformed(final ActionEvent evt) {
+
+      final Point2D pt = pointPanel.getPoint();
+
+      if (pt == null) {
+         Toolkit.getDefaultToolkit().beep();
+         return;
+      }
+
+      m_Point.setLocation(pt);
+
+      m_bOK = true;
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private void btnCancelActionPerformed(final ActionEvent evt) {
+
+      m_bOK = false;
+      dispose();
+      setVisible(false);
+
+
+   }
+
+
+   public boolean getOK() {
+
+      return m_bOK;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/PointSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanel.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gui.batch;
+
+import javax.swing.JFileChooser;
+import javax.swing.JTable;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class RasterFilePanel
+         extends
+            TextFieldAndButton {
+
+   private final JTable m_Table;
+
+
+   public RasterFilePanel(final JTable table) {
+
+      m_Table = table;
+
+
+   }
+
+
+   @Override
+   protected void btnActionPerformed() {
+
+      final JFileChooser fc = new JFileChooser();
+
+      fc.setFileFilter(new GenericFileFilter(SextanteGUI.getInputFactory().getRasterLayerInputExtensions(),
+               Sextante.getText("Capas_raster")));
+      fc.setMultiSelectionEnabled(true);
+      final int returnVal = fc.showOpenDialog(this.getParent().getParent());
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         textField.setText(fc.getSelectedFile().getAbsolutePath());
+         m_Table.setValueAt(textField.getText(), m_Table.getSelectedRow(), m_Table.getSelectedColumn());
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AutoCompletePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AutoCompletePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AutoCompletePanel.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A panel to define autocompletion parameters in a file chooser
+ * 
+ * @author volaya
+ * 
+ */
+public class AutoCompletePanel
+         extends
+            JPanel {
+
+   public static final int NO_AUTOFILL     = 0;
+   public static final int AUTOFILL_NUMBER = 1;
+   public static final int AUTOFILL_FIELD  = 2;
+
+   private JRadioButton    jAutoFillNumberRB;
+   private JRadioButton    jAutoFillFieldRB;
+   private JRadioButton    jNoAutoFillRB;
+   private JComboBox       m_FieldComboBox;
+
+
+   public AutoCompletePanel(final String sFields[]) {
+
+      super();
+
+      initGUI(sFields);
+
+   }
+
+
+   private void initGUI(final String sFields[]) {
+
+      try {
+         this.setPreferredSize(new java.awt.Dimension(400, 100));
+         {
+
+            final TableLayout layout = new TableLayout(new double[][] {
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 10.0, 20, TableLayoutConstants.FILL, 20, TableLayoutConstants.FILL, 20, 10.0 } });
+            layout.setHGap(5);
+            layout.setVGap(5);
+            this.setLayout(layout);
+            this.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Autofill")));
+            jNoAutoFillRB = new JRadioButton(Sextante.getText("Do_not_autofill"));
+            jNoAutoFillRB.setSelected(true);
+            this.add(jNoAutoFillRB, "1,1");
+            jAutoFillNumberRB = new JRadioButton(Sextante.getText("Autofill_with_numbers"));
+            this.add(jAutoFillNumberRB, "1,3");
+            jAutoFillFieldRB = new JRadioButton(Sextante.getText("Autofill_with_field_values"));
+            this.add(jAutoFillFieldRB, "1,5");
+            m_FieldComboBox = new JComboBox(sFields);
+            this.add(m_FieldComboBox, "2,5");
+            final ButtonGroup group = new ButtonGroup();
+            group.add(jNoAutoFillRB);
+            group.add(jAutoFillNumberRB);
+            group.add(jAutoFillFieldRB);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   public int getAutoFill() {
+
+      if (jAutoFillNumberRB.isSelected()) {
+         return AUTOFILL_NUMBER;
+      }
+      else if (jAutoFillFieldRB.isSelected()) {
+         return AUTOFILL_FIELD;
+      }
+      else {
+         return NO_AUTOFILL;
+      }
+
+   }
+
+
+   public int getField() {
+
+      return m_FieldComboBox.getSelectedIndex();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/AutoCompletePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessSingleUnit.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessSingleUnit.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessSingleUnit.java	(revision 369)
@@ -0,0 +1,612 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.geom.Point2D;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.concurrent.Callable;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputNumericalValue;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+/**
+ * A task representing a single algoritm execution as a part of a batch process. The process is comprised of several single unit
+ * liske the one represented by this class
+ * 
+ * @author volaya
+ * 
+ */
+public class BatchProcessSingleUnit
+         implements
+            Callable<Boolean> {
+
+   private final HashMap                                    m_Parameters;
+   private final GeoAlgorithm                               m_Algorithm;
+   private final HashMap                                    m_DataObjects;
+   private final HashMap                                    m_OutputSettings;
+   private StringBuffer                                     m_sLog;
+   private final AnalysisExtent                             m_AnalysisExtent;
+   private final ITaskMonitor                               m_TaskMonitor;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   //private JDialog m_Parent;
+
+   /**
+    * 
+    * @param alg
+    *                the algorithm to execute
+    * @param parameters
+    *                a map with parameter values, to be used to fill the ParametersSet of the algorithm
+    * @param output
+    *                a map with output settings, to be used to fill the OutputObjectsSet of the algorithm
+    * @param analysisExtent
+    *                the output extent to use
+    * @param numericalOutputs
+    *                an array list to collect numerical outputs produced by the algorithm
+    */
+   public BatchProcessSingleUnit(final GeoAlgorithm alg,
+                                 final HashMap parameters,
+                                 final HashMap output,
+                                 final AnalysisExtent analysisExtent,
+                                 final ITaskMonitor monitor,
+                                 final ArrayList<ArrayList<OutputNumericalValue>> numericalOutputs) {
+
+      m_Algorithm = alg;
+      m_Parameters = parameters;
+      m_OutputSettings = output;
+      m_DataObjects = new HashMap();
+      m_AnalysisExtent = analysisExtent;
+      m_TaskMonitor = monitor;
+      m_NumericalOutputs = numericalOutputs;
+
+   }
+
+
+   /**
+    * Executes the algorithm
+    * 
+    * @return true if the algorithm was not canceled
+    * @throws GeoAlgorithmExecutionException
+    */
+   public Boolean call() throws GeoAlgorithmExecutionException {
+
+      m_sLog = new StringBuffer();
+
+      if (assignParameters() && assignOutputSettings() && assignExtent()) {
+         final boolean bReturn = m_Algorithm.execute(m_TaskMonitor, SextanteGUI.getOutputFactory());
+         collectIndividualNumericalOutputs();
+         m_DataObjects.clear();
+         return Boolean.valueOf(bReturn);
+      }
+      else {
+         m_DataObjects.clear();
+         return Boolean.valueOf(false);
+      }
+
+   }
+
+
+   private void collectIndividualNumericalOutputs() {
+
+      final ArrayList<OutputNumericalValue> numericalOutputs = new ArrayList<OutputNumericalValue>();
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output out = ooset.getOutput(i);
+         if (out instanceof OutputNumericalValue) {
+            numericalOutputs.add((OutputNumericalValue) out);
+         }
+      }
+
+      m_NumericalOutputs.add(numericalOutputs);
+
+   }
+
+
+   private boolean assignExtent() {
+
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         m_Algorithm.setAnalysisExtent(m_AnalysisExtent);
+         return m_Algorithm.adjustOutputExtent();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   /**
+    * Returns a string with information about the executed process
+    * 
+    * @return a string with information about the executed process
+    */
+   public String getLog() {
+
+      return m_sLog.toString();
+
+   }
+
+
+   private boolean assignOutputSettings() {
+
+      final Set set = m_OutputSettings.keySet();
+      final Iterator iter = set.iterator();
+      try {
+         while (iter.hasNext()) {
+            final String sOutputID = (String) iter.next();
+            final String sValue = (String) m_OutputSettings.get(sOutputID);
+            final Output out = m_Algorithm.getOutputObjects().getOutput(sOutputID);
+            if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+                || (out instanceof Output3DRasterLayer)) {
+               m_sLog.append(out.getDescription() + ":");
+               m_sLog.append(sValue + "\n");
+               out.setOutputChannel(new FileOutputChannel(sValue));
+            }
+         }
+
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean assignParameters() {
+
+      final Set set = m_Parameters.keySet();
+      Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         final String sParamID = (String) iter.next();
+         final String sValue = (String) m_Parameters.get(sParamID);
+         Parameter parameter;
+         try {
+            parameter = m_Algorithm.getParameters().getParameter(sParamID);
+         }
+         catch (final WrongParameterIDException e) {
+            return false;
+         }
+         if (parameter instanceof ParameterDataObject) { //data objects first, to avoid problems with dependencies
+            if (!setValueFromString(sValue, parameter)) {
+               m_sLog.append("[error]\n");
+               return false;
+            }
+            else {
+               m_sLog.append("[ok]\n");
+            }
+         }
+      }
+
+      iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sParamID = (String) iter.next();
+         final String sValue = (String) m_Parameters.get(sParamID);
+         Parameter parameter;
+         try {
+            parameter = m_Algorithm.getParameters().getParameter(sParamID);
+         }
+         catch (final WrongParameterIDException e) {
+            return false;
+         }
+         if (!(parameter instanceof ParameterDataObject)) {
+            if (!setValueFromString(sValue, parameter)) {
+               m_sLog.append("[error]\n");
+               return false;
+            }
+            else {
+               m_sLog.append("[ok]\n");
+            }
+         }
+      }
+
+      return true;
+
+   }
+
+
+   private boolean setValueFromString(final String sValue,
+                                      final Parameter parameter) {
+
+      m_sLog.append(parameter.getParameterDescription());
+      m_sLog.append(":");
+      m_sLog.append(sValue);
+      //m_sLog.append("<br>");
+
+      if (parameter instanceof ParameterNumericalValue) {
+         return assignNumericalValue(sValue, (ParameterNumericalValue) parameter);
+      }
+      else if (parameter instanceof ParameterString) {
+         return assignString(sValue, (ParameterString) parameter);
+      }
+      else if (parameter instanceof ParameterSelection) {
+         return assignSelection(sValue, (ParameterSelection) parameter);
+      }
+      else if (parameter instanceof ParameterFixedTable) {
+         return assignFixedTable(sValue, (ParameterFixedTable) parameter);
+      }
+      else if (parameter instanceof ParameterPoint) {
+         return assignPoint(sValue, (ParameterPoint) parameter);
+      }
+      else if (parameter instanceof ParameterBoolean) {
+         return assignBoolean(sValue, parameter);
+      }
+      else if (parameter instanceof ParameterFilepath) {
+         return assignFilepath(sValue, (ParameterFilepath) parameter);
+      }
+      else if (parameter instanceof ParameterTableField) {
+         return assignTableField(sValue, (ParameterTableField) parameter);
+      }
+      else if (parameter instanceof ParameterBand) {
+         return assignBand(sValue, (ParameterBand) parameter);
+      }
+      else if (parameter instanceof ParameterMultipleInput) {
+         return assignMultipleInput(sValue, (ParameterMultipleInput) parameter);
+      }
+      else if (parameter instanceof ParameterDataObject) {
+         return assignDataObject(sValue, (ParameterDataObject) parameter);
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private boolean assignMultipleInput(final String sValue,
+                                       final ParameterMultipleInput parameter) {
+
+      boolean bLastTokenIsFile = false;
+      final ArrayList array = new ArrayList();
+      IRasterLayer layer;
+      String sFile = null;
+      AdditionalInfoMultipleInput ai;
+      try {
+         ai = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+         final String[] sTokens = sValue.split(",");
+         if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+            for (int i = 0; i < sTokens.length; i++) {
+               if (isPositiveInteger(sTokens[i])) {
+                  if (sFile == null) {
+                     return false;
+                  }
+                  layer = (IRasterLayer) getDataObject(sFile);
+                  if (layer == null) {
+                     return false;
+                  }
+                  array.add(new RasterLayerAndBand(layer, Integer.parseInt(sTokens[i])));
+                  bLastTokenIsFile = false;
+               }
+               else {
+                  if (bLastTokenIsFile) {
+                     return false;
+                  }
+                  final File f = new File(sTokens[i].trim());
+                  if (!f.exists()) {
+                     return false;
+                  }
+                  sFile = sTokens[i];
+                  bLastTokenIsFile = true;
+               }
+            }
+         }
+         else {
+            for (int i = 0; i < sTokens.length; i++) {
+               final File f = new File(sTokens[i].trim());
+               if (!f.exists()) {
+                  return false;
+               }
+               array.add(getDataObject(sTokens[i].trim()));
+            }
+         }
+         parameter.setParameterValue(array);
+         return ((array.size() > 0) || !ai.getIsMandatory()) && !bLastTokenIsFile;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean assignDataObject(final String sValue,
+                                    final ParameterDataObject parameter) {
+
+      final Object obj = getDataObject(sValue);
+
+      if (obj != null) {
+         if (parameter instanceof ParameterRasterLayer) {
+            return parameter.setParameterValue(obj);
+         }
+         else if (parameter instanceof Parameter3DRasterLayer) {
+            return parameter.setParameterValue(obj);
+         }
+         else if (parameter instanceof ParameterVectorLayer) {
+            return parameter.setParameterValue(obj);
+         }
+         else if (parameter instanceof ParameterTable) {
+            return parameter.setParameterValue(obj);
+         }
+         else {
+            return false;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private Object getDataObject(final String sKey) {
+
+      Object obj;
+
+      obj = m_DataObjects.get(sKey);
+
+      if (obj == null) {
+         obj = SextanteGUI.getInputFactory().openDataObjectFromFile(sKey);
+         if (obj != null) {
+            m_DataObjects.put(sKey, obj);
+         }
+      }
+
+      return obj;
+
+   }
+
+
+   private boolean assignBand(final String sValue,
+                              final ParameterBand parameter) {
+
+      try {
+         final Integer value = new Integer(Integer.parseInt(sValue) - 1);
+         parameter.setParameterValue(value);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignTableField(final String sValue,
+                                    final ParameterTableField parameter) {
+
+      try {
+         final AdditionalInfoTableField aivl = (AdditionalInfoTableField) parameter.getParameterAdditionalInfo();
+         final ParametersSet ps = m_Algorithm.getParameters();
+         final String sParent = aivl.getParentParameterName();
+         final Parameter parentParam = ps.getParameter(sParent);
+         if (parentParam instanceof ParameterVectorLayer) {
+            final IVectorLayer layer = ps.getParameterValueAsVectorLayer(sParent);
+            final String[] sNames = layer.getFieldNames();
+            for (int i = 0; i < sNames.length; i++) {
+               if (layer.getFieldName(i).equals(sValue)) {
+                  parameter.setParameterValue(new Integer(i));
+                  return true;
+               }
+            }
+            return false;
+         }
+         else {//table
+            final ITable table = ps.getParameterValueAsTable(sParent);
+            final String[] sNames = table.getFieldNames();
+            for (int i = 0; i < sNames.length; i++) {
+               if (table.getFieldName(i).equals(sValue)) {
+                  parameter.setParameterValue(new Integer(i));
+                  return true;
+               }
+            }
+            return false;
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignFixedTable(final String sValue,
+                                    final ParameterFixedTable parameter) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel;
+      final StringTokenizer st = new StringTokenizer(sValue, ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iCols, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return false;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return false;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iRow = (int) Math.floor(iToken / (double) iCols);
+            iCol = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iRow, iCol);
+            iToken++;
+         }
+
+         parameter.setParameterValue(tableModel);
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+   }
+
+
+   private boolean assignFilepath(final String sValue,
+                                  final ParameterFilepath parameter) {
+
+      parameter.setParameterValue(sValue);
+
+      return true;
+
+   }
+
+
+   private boolean assignPoint(final String sValue,
+                               final ParameterPoint parameter) {
+
+      try {
+         final String[] sCoords = sValue.split(",");
+         final double dX = Double.parseDouble(sCoords[0]);
+         final double dY = Double.parseDouble(sCoords[1]);
+         final Point2D pt = new Point2D.Double(dX, dY);
+         parameter.setParameterValue(pt);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignNumericalValue(final String sValue,
+                                        final ParameterNumericalValue parameter) {
+
+      try {
+         final Double value = new Double(Double.parseDouble(sValue));
+         parameter.setParameterValue(value);
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean assignSelection(final String sValue,
+                                   final ParameterSelection parameter) {
+
+      try {
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+
+         final String[] sValues = ai.getValues();
+         for (int i = 0; i < sValues.length; i++) {
+            if (sValue.equals(sValues[i])) {
+               parameter.setParameterValue(new Integer(i));
+               return true;
+            }
+         }
+
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         return false;
+      }
+
+      return false;
+
+   }
+
+
+   private boolean assignBoolean(final String sValue,
+                                 final Parameter parameter) {
+
+      if (sValue.toLowerCase().equals("true")) {
+         parameter.setParameterValue(new Boolean(true));
+      }
+      else {
+         parameter.setParameterValue(new Boolean(false));
+      }
+
+      return true;
+
+   }
+
+
+   private boolean assignString(final String sValue,
+                                final ParameterString parameter) {
+
+      parameter.setParameterValue(sValue);
+
+      return true;
+
+   }
+
+
+   private boolean isPositiveInteger(final String s) {
+
+      try {
+         final int i = Integer.parseInt(s);
+         return i > 0;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/BatchProcessSingleUnit.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersPanel.java	(revision 369)
@@ -0,0 +1,338 @@
+package es.unex.sextante.gui.batch;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.TableColumn;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+
+
+/**
+ * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI Builder, which is free for non-commercial use. If
+ * Jigloo is being used commercially (ie, by a corporation, company or business for any purpose whatever) then you should purchase
+ * a license for each developer using Jigloo. Please visit www.cloudgarden.com for details. Use of Jigloo implies acceptance of
+ * these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
+ * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
+ */
+/**
+ * A panel to introduce parameters for a batch process. It features a table where each row represents a single process. The number
+ * of columns depends on the algorithm to execute and the number of parameters it needs
+ * 
+ * @author volaya
+ * 
+ */
+public class ParametersPanel
+         extends
+            JPanel {
+
+   private final GeoAlgorithm   m_Algorithm;
+   private JPanel               jPanelAddRemoveRows;
+   private JScrollPane          jScrollPane;
+   private JButton              jButtonRemoveRow;
+   private JButton              jButtonAddRow;
+   private JTable               jTable;
+   private ParametersTableModel m_TableModel;
+   private JPopupMenu           popupMenu;
+   private JMenuItem            menuItemCopy;
+   private String[][]           m_sClipboard;
+   private JMenuItem            menuItemPaste;
+
+
+   /**
+    * Constructor
+    * 
+    * @param alg
+    *                the algorithm to execute
+    */
+   public ParametersPanel(final GeoAlgorithm alg) {
+
+      super();
+
+      m_Algorithm = alg;
+
+      defineTableModel();
+      initGUI();
+
+   }
+
+
+   private void defineTableModel() {
+
+      m_TableModel = new ParametersTableModel(m_Algorithm.getParameters(), m_Algorithm.getOutputObjects());
+
+   }
+
+
+   private void initGUI() {
+
+      int i;
+      final ParametersSet ps = m_Algorithm.getParameters();
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5.0, 120.0, 5.0 },
+               { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(580, 350));
+      this.setSize(new java.awt.Dimension(580, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1,1,1,2");
+         jScrollPane.setMinimumSize(new java.awt.Dimension(432, 256));
+
+         jTable = new JTable();
+         jScrollPane.setViewportView(jTable);
+         initTable();
+
+         int iDataObjectOutputs = 0;
+         for (i = 0; i < ooset.getOutputObjectsCount(); i++) {
+            final Output out = ooset.getOutput(i);
+            if ((out instanceof OutputRasterLayer) || (out instanceof Output3DRasterLayer) || (out instanceof OutputVectorLayer)
+                || (out instanceof OutputTable)) {
+               final TableColumn col = jTable.getColumnModel().getColumn(iDataObjectOutputs + ps.getNumberOfParameters());
+               col.setCellEditor(new ParameterCellPanelEditor(out, jTable));
+               col.setCellRenderer(new ParameterCellPanelRenderer(out));
+               jTable.getColumnModel().getColumn(iDataObjectOutputs + ps.getNumberOfParameters()).setPreferredWidth(200);
+               iDataObjectOutputs++;
+            }
+         }
+
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               if (e.getButton() == MouseEvent.BUTTON3) {
+                  showPopupMenu(e);
+               }
+            }
+         };
+         jTable.addMouseListener(ml);
+
+         {
+            popupMenu = new JPopupMenu("Menu");
+
+            menuItemCopy = new JMenuItem(Sextante.getText("Copy"));
+            menuItemCopy.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  copyCells();
+               }
+            });
+            popupMenu.add(menuItemCopy);
+
+            menuItemPaste = new JMenuItem(Sextante.getText("Paste"));
+            menuItemPaste.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  pasteCells();
+               }
+            });
+            popupMenu.add(menuItemPaste);
+         }
+
+      }
+      {
+         jPanelAddRemoveRows = new JPanel();
+         final TableLayout jPanelAddRemoveRowsLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5.0 },
+                  { 5.0, 25.0, 30.0, TableLayoutConstants.FILL } });
+         jPanelAddRemoveRowsLayout.setHGap(5);
+         jPanelAddRemoveRowsLayout.setVGap(5);
+         jPanelAddRemoveRows.setLayout(jPanelAddRemoveRowsLayout);
+         this.add(jPanelAddRemoveRows, "3,1,4,1");
+      }
+      {
+         jButtonRemoveRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonRemoveRow, "1, 2");
+         jButtonRemoveRow.setText(Sextante.getText("Delete_row"));
+         jButtonRemoveRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnRemoveRowActionPerformed(evt);
+            }
+         });
+      }
+      {
+         jButtonAddRow = new JButton();
+         jPanelAddRemoveRows.add(jButtonAddRow, "1,  1");
+         jButtonAddRow.setText(Sextante.getText("Add_row"));
+         jButtonAddRow.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               btnAddRowActionPerformed(evt);
+            }
+         });
+      }
+
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   protected void copyCells() {
+
+      final int[] cols = jTable.getSelectedColumns();
+      final int[] rows = jTable.getSelectedRows();
+      m_sClipboard = new String[rows.length][cols.length];
+
+      for (int j = 0; j < rows.length; j++) {
+         for (int i = 0; i < cols.length; i++) {
+            m_sClipboard[j][i] = (String) jTable.getValueAt(rows[j], cols[i]);
+         }
+      }
+
+   }
+
+
+   protected void pasteCells() {
+
+      if (m_sClipboard == null) {
+         return;
+      }
+
+      int iCol, iRow;
+
+      final int[] cols = jTable.getSelectedColumns();
+      final int[] rows = jTable.getSelectedRows();
+
+      for (final int element : rows) {
+         for (final int element2 : cols) {
+            iRow = (element - rows[0]) % m_sClipboard.length;
+            iCol = (element2 - cols[0]) % m_sClipboard[0].length;
+            jTable.setValueAt(m_sClipboard[iRow][iCol], element, element2);
+         }
+      }
+
+
+   }
+
+
+   private void btnAddRowActionPerformed(final ActionEvent evt) {
+
+      m_TableModel.addRow();
+
+   }
+
+
+   private void btnRemoveRowActionPerformed(final ActionEvent evt) {
+
+      int iRow;
+
+      iRow = jTable.getSelectedRow();
+      if (iRow != -1) {
+         m_TableModel.removeRow(iRow);
+      }
+
+   }
+
+
+   /**
+    * Assign the values introduced by the user. Values for each execution of the algorithm are stored in two maps, one for the
+    * inputs and another one for the outputs. Maps are stored in the passed ArrayLists
+    * 
+    * @param param
+    *                an arraylist to store maps containing input parameters values
+    * @param output
+    *                an arraylist to store maps containing out parameters values
+    * @return returns true if all the values in the current table are correct, false otherwise
+    */
+   public boolean assignParameters(final ArrayList param,
+                                   final ArrayList output) {
+
+      int i, j;
+
+
+      final ParametersSet ps = m_Algorithm.getParameters();
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      for (i = 0; i < m_TableModel.getRowCount(); i++) {
+         final HashMap paramMap = new HashMap();
+         for (j = 0; j < ps.getNumberOfParameters(); j++) {
+            final ParameterCellPanelRenderer rend = (ParameterCellPanelRenderer) jTable.getCellRenderer(i, j);
+            if (!rend.isValueOK()) {
+               return false;
+            }
+            paramMap.put(ps.getParameter(j).getParameterName(), m_TableModel.getValueAt(i, j));
+         }
+         final HashMap outputMap = new HashMap();
+         for (j = 0; j < ooSet.getOutputDataObjectsCount(); j++) {
+            final Output out = ooSet.getOutput(j);
+            if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+                || (out instanceof Output3DRasterLayer)) {
+               outputMap.put(out.getName(), m_TableModel.getValueAt(i, j + ps.getNumberOfParameters()));
+            }
+         }
+         param.add(paramMap);
+         output.add(outputMap);
+      }
+
+      return true;
+
+   }
+
+
+   public ParametersTableModel getTableModel() {
+
+      return m_TableModel;
+
+   }
+
+
+   /**
+    * Sets a new parameters table
+    * 
+    * @param table
+    *                the new table to set
+    */
+   public void setTableModel(final ParametersTableModel table) {
+
+      //Warning: we simply change the assignment, but do not check that
+      //the table schema is consistent
+
+      m_TableModel = table;
+      initTable();
+      this.updateUI();
+
+   }
+
+
+   private void initTable() {
+
+      final ParametersSet ps = m_Algorithm.getParameters();
+      jTable.setModel(m_TableModel);
+      jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+      jTable.getTableHeader().setReorderingAllowed(false);
+      jTable.setColumnSelectionAllowed(true);
+      jTable.setRowSelectionAllowed(true);
+      for (int i = 0; i < ps.getNumberOfParameters(); i++) {
+         final Parameter param = ps.getParameter(i);
+         final TableColumn col = jTable.getColumnModel().getColumn(i);
+         col.setCellEditor(new ParameterCellPanelEditor(param, jTable));
+         col.setCellRenderer(new ParameterCellPanelRenderer(param));
+         jTable.getColumnModel().getColumn(i).setPreferredWidth(200);
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanelEditor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanelEditor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanelEditor.java	(revision 369)
@@ -0,0 +1,58 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.util.EventObject;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.table.TableCellEditor;
+
+public class RasterFilePanelEditor
+         extends
+            AbstractCellEditor
+         implements
+            TableCellEditor {
+
+   RasterFilePanel panel;
+
+
+   public RasterFilePanelEditor(final JTable table) {
+
+      panel = new RasterFilePanel(table);
+
+   }
+
+
+   public Object getCellEditorValue() {
+
+      return panel.getValue();
+
+   }
+
+
+   public Component getTableCellEditorComponent(final JTable table,
+                                                final Object value,
+                                                final boolean isSelected,
+                                                final int row,
+                                                final int column) {
+
+      panel.setValue((String) value);
+
+      return panel;
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final EventObject anEvent) {
+
+      if (anEvent instanceof MouseEvent) {
+         return ((MouseEvent) anEvent).getClickCount() >= 2;
+      }
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/RasterFilePanelEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelRenderer.java	(revision 369)
@@ -0,0 +1,299 @@
+package es.unex.sextante.gui.batch;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.io.File;
+import java.util.StringTokenizer;
+
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterSelection;
+
+public class ParameterCellPanelRenderer
+         extends
+            DefaultTableCellRenderer {
+
+   private final Object m_Object;
+   private String       m_sValue;
+
+
+   public ParameterCellPanelRenderer(final Object obj) {
+
+      m_Object = obj;
+
+   }
+
+
+   @Override
+   public Component getTableCellRendererComponent(final JTable table,
+                                                  final Object value,
+                                                  final boolean isSelected,
+                                                  final boolean hasFocus,
+                                                  final int rowIndex,
+                                                  final int colIndex) {
+
+      super.getTableCellRendererComponent(table, value, isSelected, hasFocus, rowIndex, colIndex);
+
+      m_sValue = (String) table.getModel().getValueAt(rowIndex, colIndex);
+      this.setText(m_sValue);
+      if (isValueOK()) {
+         this.setForeground(Color.BLACK);
+      }
+      else {
+         this.setForeground(Color.RED);
+      }
+      return this;
+   }
+
+
+   public boolean isValueOK() {
+
+      if (m_Object instanceof ParameterPoint) {
+         return isPointOK();
+      }
+      else if (m_Object instanceof ParameterDataObject) {
+         return isDataObjectOK();
+      }
+      else if (m_Object instanceof ParameterFixedTable) {
+         return isFixedTableOK();
+      }
+      else if (m_Object instanceof ParameterSelection) {
+         return isSelectionOK();
+      }
+      else if (m_Object instanceof ParameterNumericalValue) {
+         return isNumericalValueOK();
+      }
+      else if (m_Object instanceof ParameterMultipleInput) {
+         return isMultipleInputOK();
+      }
+      else if (m_Object instanceof Output) {
+         return isOutputOK();
+      }
+
+      return true;
+
+   }
+
+
+   private boolean isOutputOK() {
+
+      return !m_sValue.trim().equals("");
+
+   }
+
+
+   private boolean isMultipleInputOK() {
+
+      int iCount = 0;
+      boolean bLastTokenIsFile = false;
+      AdditionalInfoMultipleInput ai;
+      final ParameterMultipleInput parameter = (ParameterMultipleInput) m_Object;
+      try {
+         ai = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+         final String[] sTokens = m_sValue.split(",");
+         if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+            for (final String element : sTokens) {
+               if (isPositiveInteger(element)) {
+                  if (!bLastTokenIsFile) {
+                     return false;
+                  }
+                  bLastTokenIsFile = false;
+                  iCount++;
+               }
+               else {
+                  final File f = new File(element.trim());
+                  if (!f.exists()) {
+                     return false;
+                  }
+                  if (bLastTokenIsFile) {
+                     return false;
+                  }
+                  //sFile = sTokens[i];
+                  bLastTokenIsFile = true;
+               }
+            }
+         }
+         else {
+            for (final String element : sTokens) {
+               final File f = new File(element.trim());
+               if (!f.exists()) {
+                  return false;
+               }
+               iCount++;
+            }
+         }
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return (!ai.getIsMandatory() || (iCount > 0)) && !bLastTokenIsFile;
+
+   }
+
+
+   private boolean isPositiveInteger(final String s) {
+
+      try {
+         final int i = Integer.parseInt(s);
+         return i > 0;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isFixedTableOK() {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;;
+      final StringTokenizer st = new StringTokenizer(m_sValue, ",");
+      AdditionalInfoFixedTable ai;
+      final ParameterFixedTable parameter = (ParameterFixedTable) m_Object;
+      try {
+         ai = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = ai.getRowsCount();
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+
+         if (bIsNumberOfRowsFixed) {
+            if (st.countTokens() != iCols * iRows) {
+               return false;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return false;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            Double.parseDouble(st.nextToken().trim());
+         }
+
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isDataObjectOK() {
+
+      final ParameterDataObject parameter = (ParameterDataObject) m_Object;
+      try {
+         final AdditionalInfoDataObject ai = (AdditionalInfoDataObject) parameter.getParameterAdditionalInfo();
+         if (m_sValue.trim().equals("")) {
+            return !ai.getIsMandatory();
+         }
+         else {
+            final File f = new File(m_sValue);
+            return f.exists();
+         }
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isSelectionOK() {
+
+      try {
+         final ParameterSelection parameter = (ParameterSelection) m_Object;
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+         final String[] sValues = ai.getValues();
+         for (final String element : sValues) {
+            if (m_sValue.equals(element)) {
+               return true;
+            }
+         }
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return false;
+
+   }
+
+
+   private boolean isNumericalValueOK() {
+
+      try {
+         final ParameterNumericalValue parameter = (ParameterNumericalValue) m_Object;
+         final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+         final double dMin = ai.getMinValue();
+         final double dMax = ai.getMaxValue();
+         final double dVal = Double.parseDouble(m_sValue);
+         if ((dVal < dMin) || (dMax < dVal)) {
+            return false;
+         }
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private boolean isPointOK() {
+
+      final String[] s = m_sValue.split(",");
+
+      if (s.length != 2) {
+         return false;
+      }
+
+      try {
+         Double.parseDouble(s[0]);
+         Double.parseDouble(s[1]);
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return true;
+
+   }
+
+
+   // The following methods override the defaults for performance reasons
+   @Override
+   public void validate() {}
+
+
+   @Override
+   public void revalidate() {}
+
+
+   @Override
+   protected void firePropertyChange(final String propertyName,
+                                     final Object oldValue,
+                                     final Object newValue) {}
+
+
+   @Override
+   public void firePropertyChange(final String propertyName,
+                                  final boolean oldValue,
+                                  final boolean newValue) {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/batch/ParameterCellPanelRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/LayerCannotBeOverwrittenException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/LayerCannotBeOverwrittenException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/LayerCannotBeOverwrittenException.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class LayerCannotBeOverwrittenException
+         extends
+            Exception {
+
+   public LayerCannotBeOverwrittenException() {
+
+      super(Sextante.getText("Layer_cannot_be_overwritten"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/LayerCannotBeOverwrittenException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassMapsetFolderException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassMapsetFolderException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassMapsetFolderException.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class WrongGrassMapsetFolderException
+         extends
+            Exception {
+
+   public WrongGrassMapsetFolderException() {
+
+      super(Sextante.getText("grass_error_mapset_folder"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassMapsetFolderException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassWinShellException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassWinShellException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassWinShellException.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class WrongGrassWinShellException
+         extends
+            Exception {
+
+   public WrongGrassWinShellException() {
+
+      super(Sextante.getText("grass_error_win_shell_binary") + "\n" + Sextante.getText("grass_shell_url"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassWinShellException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/AlgorithmNotFoundException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/AlgorithmNotFoundException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/AlgorithmNotFoundException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class AlgorithmNotFoundException
+         extends
+            CommandLineException {
+
+   public AlgorithmNotFoundException() {
+
+      super("Algorithm not found.");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/AlgorithmNotFoundException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/TooLargeGridExtentException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/TooLargeGridExtentException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/TooLargeGridExtentException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class TooLargeGridExtentException
+         extends
+            Exception {
+
+   public TooLargeGridExtentException(final String s) {
+
+      super(s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/TooLargeGridExtentException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongSettingValuesException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongSettingValuesException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongSettingValuesException.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class WrongSettingValuesException
+         extends
+            Exception {
+
+   public WrongSettingValuesException() {
+
+      super(Sextante.getText("WrongSettingValues"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongSettingValuesException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelNotFoundException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelNotFoundException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelNotFoundException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class ModelNotFoundException
+         extends
+            CommandLineException {
+
+   public ModelNotFoundException() {
+
+      super("Model not found.");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelNotFoundException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongNumberOfParametersException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongNumberOfParametersException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongNumberOfParametersException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class WrongNumberOfParametersException
+         extends
+            CommandLineException {
+
+   public WrongNumberOfParametersException() {
+
+      super("Wrong number of parameters.");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongNumberOfParametersException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongScriptException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongScriptException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongScriptException.java	(revision 369)
@@ -0,0 +1,20 @@
+package es.unex.sextante.gui.exceptions;
+
+public class WrongScriptException
+         extends
+            Exception {
+
+   public WrongScriptException(final String message) {
+
+      super(message);
+
+   }
+
+
+   public WrongScriptException() {
+
+      super();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongScriptException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OutputExtentNotSetException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OutputExtentNotSetException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OutputExtentNotSetException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class OutputExtentNotSetException
+         extends
+            CommandLineException {
+
+   public OutputExtentNotSetException() {
+
+      super("Could not run algorithm. Output extent not set.");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OutputExtentNotSetException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WPSProcessNotFoundException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WPSProcessNotFoundException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WPSProcessNotFoundException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class WPSProcessNotFoundException
+         extends
+            CommandLineException {
+
+   public WPSProcessNotFoundException() {
+
+      super("WPS process not found.");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WPSProcessNotFoundException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/CommandLineException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/CommandLineException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/CommandLineException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.gui.exceptions;
+
+public class CommandLineException
+         extends
+            Exception {
+
+   public CommandLineException(final String sException) {
+
+      super(sException);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/CommandLineException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelIOException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelIOException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelIOException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.exceptions;
+
+public class ModelIOException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/ModelIOException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassFolderException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassFolderException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassFolderException.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class WrongGrassFolderException
+         extends
+            Exception {
+
+   public WrongGrassFolderException() {
+
+      super(Sextante.getText("grass_error_binaries_folder"));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongGrassFolderException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongViewNameException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongViewNameException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongViewNameException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.exceptions;
+
+public class WrongViewNameException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/WrongViewNameException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OverwrittingNotAllowedException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OverwrittingNotAllowedException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OverwrittingNotAllowedException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.exceptions;
+
+public class OverwrittingNotAllowedException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/exceptions/OverwrittingNotAllowedException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/DateAndCommand.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/DateAndCommand.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/DateAndCommand.java	(revision 369)
@@ -0,0 +1,90 @@
+package es.unex.sextante.gui.history;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+import es.unex.sextante.core.Sextante;
+
+public class DateAndCommand {
+
+   private static long MILLISECS_PER_DAY = 1000 * 60 * 60 * 24;
+
+   private Date        date;
+   private String      command;
+
+
+   public String getDay() {
+
+      if (date.getTime() > History.getSessionStartingTime()) {
+         return Sextante.getText("This_session");
+      }
+
+      final int iDayA = (int) ((System.currentTimeMillis()) / MILLISECS_PER_DAY);
+      final int iDayB = (int) ((date.getTime()) / MILLISECS_PER_DAY);
+      final int iDays = iDayA - iDayB;
+
+      if (iDays == 0) {
+         return Sextante.getText("Today");
+      }
+      else if (iDays == 1) {
+         return Sextante.getText("Yesterday");
+      }
+      else if (iDays < 30) {
+         String s = Sextante.getText("XXX_days_ago");
+         s = s.replace("XXX", Integer.toString(iDays));
+         return s;
+      }
+      else {
+         return Sextante.getText("More_than_one_month_ago");
+      }
+   }
+
+
+   @Override
+   public String toString() {
+
+      final DateFormat formatter = DateFormat.getDateTimeInstance();
+      final String sDate = formatter.format(date);
+      final String s = "[" + sDate + "] " + command;
+
+      return s;
+
+   }
+
+
+   public Date getDate() {
+
+      return date;
+
+   }
+
+
+   public void setDate(final Date date) {
+
+      this.date = date;
+
+   }
+
+
+   public String getCommand() {
+
+      return command;
+
+   }
+
+
+   public void setCommand(final String command) {
+
+      this.command = command;
+
+   }
+
+
+   public String getAsFullText() {
+
+      return toString();//Change THIS!!!
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/DateAndCommand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/History.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/History.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/History.java	(revision 369)
@@ -0,0 +1,216 @@
+package es.unex.sextante.gui.history;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Date;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A class used to store the history of algorithms and commands executed by sextante. All of them are stored as command-line
+ * commands ,and as such can be re-executed later
+ * 
+ * @author volaya
+ * 
+ */
+public class History {
+
+   private static long m_SessionStartingTime;
+
+
+   /**
+    * Adds a set of expressions to the history
+    * 
+    * @param sExp
+    *                an array of expressions
+    */
+   public static void addToHistory(final String[] sExp) {
+
+      for (int i = 0; i < sExp.length; i++) {
+         addToHistory(sExp[i]);
+      }
+
+   }
+
+
+   /**
+    * Adds a single expression to the history
+    * 
+    * @param sExp
+    *                an expression
+    */
+   public static void addToHistory(final String sExp) {
+
+      String s;
+      Writer output = null;
+      s = Long.toString(System.currentTimeMillis()) + "@" + sExp.replace("\\", "\\\\") + "\n";
+
+      try {
+         output = new BufferedWriter(new FileWriter(getHistoryFile(), true));
+         output.write(s);
+         output.flush();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   /**
+    * Returns a list of the 10 most recently used algorithms
+    * 
+    * @return a list of the 10 most recently used algorithms
+    */
+   public static GeoAlgorithm[] getRecentlyUsedAlgs() {
+
+      final ArrayList<String> algs = new ArrayList<String>();
+      final ArrayList<DateAndCommand> history = getHistory();
+      for (int i = history.size() - 1; i > -1; i--) {
+         final DateAndCommand dac = history.get(i);
+         final String command = dac.getCommand();
+         if (command.startsWith("runalg")) {
+            final String sAlg = command.split("\"")[1];
+            if (!algs.contains(sAlg)) {
+               final GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlg);
+               if (alg != null) {
+                  algs.add(sAlg);
+                  if (algs.size() == 10) {
+                     break;
+                  }
+               }
+            }
+         }
+
+      }
+
+      final GeoAlgorithm[] recentAlgs = new GeoAlgorithm[algs.size()];
+      for (int i = 0; i < recentAlgs.length; i++) {
+         recentAlgs[i] = Sextante.getAlgorithmFromCommandLineName(algs.get(i));
+      }
+
+      return recentAlgs;
+
+   }
+
+
+   /**
+    * Returns the history as an array list with expressions and dates
+    * 
+    * @return the history
+    */
+   public static ArrayList<DateAndCommand> getHistory() {
+
+      final ArrayList<DateAndCommand> list = new ArrayList<DateAndCommand>();
+
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(getHistoryFile()));
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            final String[] sTokens = sLine.split("@");
+            final DateAndCommand dac = new DateAndCommand();
+            dac.setDate(new Date(Long.parseLong(sTokens[0])));
+            dac.setCommand(sTokens[1]);
+            list.add(dac);
+         }
+      }
+      catch (final FileNotFoundException ex) {
+         //ex.printStackTrace();
+      }
+      catch (final IOException ex) {
+         //ex.printStackTrace();
+      }
+      finally {
+         try {
+            if (input != null) {
+               input.close();
+            }
+         }
+         catch (final IOException ex) {
+            //ex.printStackTrace();
+         }
+      }
+
+
+      return list;
+
+   }
+
+
+   private static String getHistoryFile() {
+
+        String sPath = SextanteGUI.getSextanteHomePath();
+
+        final File sextanteFolder = new File(sPath);
+        if (!sextanteFolder.exists()) {
+           sextanteFolder.mkdir();
+        }
+
+        sPath = sPath + File.separator + "toolbox.history";
+        return sPath;
+   }
+
+
+   /**
+    * Starts this session, storing its starting time This will be used to refer history commands to this session starting time on
+    * the history dialog
+    */
+   public static void startSession() {
+
+      m_SessionStartingTime = System.currentTimeMillis();
+
+   }
+
+
+   public static long getSessionStartingTime() {
+
+      return m_SessionStartingTime;
+
+   }
+
+
+   public static void clear() {
+
+      Writer output = null;
+
+      try {
+         output = new BufferedWriter(new FileWriter(getHistoryFile(), false));
+         output.flush();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/History.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryDialog.java	(revision 369)
@@ -0,0 +1,94 @@
+package es.unex.sextante.gui.history;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+
+import es.unex.sextante.core.Sextante;
+
+public class HistoryDialog
+         extends
+            JDialog {
+
+   private HistoryPanel m_HistoryPanel;
+   private JButton      jButtonClearLog;
+   private JButton      jButtonClearHistory;
+
+
+   public HistoryDialog(final Frame parent) {
+
+      super(parent, Sextante.getText("History"), true);
+
+      this.setResizable(true);
+
+      init();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void init() {
+
+      this.setPreferredSize(new java.awt.Dimension(650, 380));
+      this.setSize(new java.awt.Dimension(650, 380));
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 7.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        7.0 }, { TableLayoutConstants.FILL, 3.0, 30.0, 3.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      getContentPane().setLayout(thisLayout);
+
+      m_HistoryPanel = new HistoryPanel();
+      getContentPane().add(m_HistoryPanel, "1, 0, 4, 0");
+      {
+         jButtonClearHistory = new JButton();
+         getContentPane().add(jButtonClearHistory, "1, 2, 2, 2");
+         jButtonClearHistory.setText(Sextante.getText("Clear_history"));
+         jButtonClearHistory.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               clearHistory(evt);
+            }
+         });
+      }
+      {
+         jButtonClearLog = new JButton();
+         getContentPane().add(jButtonClearLog, "3, 2, 4, 2");
+         jButtonClearLog.setText(Sextante.getText("Clear_log"));
+         jButtonClearLog.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               clearLog(evt);
+            }
+         });
+      }
+
+   }
+
+
+   public HistoryPanel getHistoryPanel() {
+
+      return m_HistoryPanel;
+
+   }
+
+
+   private void clearLog(final ActionEvent evt) {
+
+      m_HistoryPanel.clearLog();
+
+   }
+
+
+   private void clearHistory(final ActionEvent evt) {
+
+      m_HistoryPanel.clearHistory();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryPanel.java	(revision 369)
@@ -0,0 +1,465 @@
+package es.unex.sextante.gui.history;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTree;
+import javax.swing.text.DefaultStyledDocument;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.LogElement;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.core.SextanteLogHandler;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.core.NamedPoint;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.toolbox.TransparentScrollPane;
+import java.util.List;
+
+public class HistoryPanel
+         extends
+            JPanel {
+
+   private JTree                                          jTree;
+   private JScrollPane                                    jScrollPane;
+   private JMenuItem                                      menuItemExecute;
+   private JMenuItem                                      menuItemShowExecuteDialog;
+   private JPopupMenu                                     popupMenu;
+   private TreePath                                       m_Path;
+   private DateAndCommand                                 m_Command;
+   private ArrayList<DateAndCommand>                      m_Commands;
+   private final HashMap<String, DefaultMutableTreeNode>  m_NodesMap   = new HashMap<String, DefaultMutableTreeNode>();
+   private final HashMap<DefaultMutableTreeNode, Boolean> m_NodeStatus = new HashMap<DefaultMutableTreeNode, Boolean>();
+   private JSplitPane                                     jSplitPane;
+   private NonWordWrapPane                                jNonWordWrapPane;
+   private TransparentScrollPane                          jScrollPaneText;
+
+
+   //   private final ArrayList<LoggingPanel>                  m_LoggingPanels = new ArrayList<LoggingPanel>();
+
+
+   public HistoryPanel() {
+
+      super();
+
+      init();
+
+   }
+
+
+   private void init() {
+
+      this.setPreferredSize(new java.awt.Dimension(650, 380));
+      this.setSize(new java.awt.Dimension(650, 380));
+
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+
+      jSplitPane = new JSplitPane();
+
+      jTree = new JTree();
+      final MouseListener ml = new MouseAdapter() {
+         @Override
+         public void mousePressed(MouseEvent e) {
+            m_Command = null;
+            menuItemExecute.setVisible(false);
+            menuItemShowExecuteDialog.setVisible(false);
+            m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+            if (m_Path != null) {
+               try {
+                  DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                  Object obj = node.getUserObject();
+                  if (obj instanceof DateAndCommand) {
+                     m_Command = (DateAndCommand) obj;
+                     menuItemExecute.setVisible(true);
+                     String sAlg = m_Command.getCommand();
+                     if (sAlg.startsWith("runalg")) {
+                        sAlg = sAlg.substring("runalg(\"".length());
+                        sAlg = sAlg.substring(0, sAlg.indexOf("\""));
+                        GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlg);
+                        IDataObject[] objs = SextanteGUI.getInputFactory().getDataObjects();
+                        if (alg.meetsDataRequirements(objs)) {
+                           menuItemShowExecuteDialog.setVisible(true);
+                        }
+                     }
+                     jNonWordWrapPane.setText(m_Command.getAsFullText());
+                  }
+                  else if (obj instanceof LogElement) {
+                     jNonWordWrapPane.setText(((LogElement) obj).getAsText());
+                  }
+
+               }
+               catch (Exception ex) {}
+            }
+            if (e.getButton() == MouseEvent.BUTTON1) {
+               if ((e.getClickCount() == 2) && (m_Command != null)) {
+                  executeSelectedCommand();
+               }
+            }
+            else if ((e.getButton() == MouseEvent.BUTTON3) && (m_Command != null)) {
+               showPopupMenu(e);
+            }
+         }
+      };
+      jTree.addMouseListener(ml);
+
+      jScrollPane = new JScrollPane();
+      jScrollPane.setViewportView(jTree);
+      jScrollPane.setSize(new java.awt.Dimension(650, 380));
+
+      jSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
+      jSplitPane.setLeftComponent(jScrollPane);
+
+      jNonWordWrapPane = new NonWordWrapPane();
+      jNonWordWrapPane.setStyledDocument(new DefaultStyledDocument());
+      jNonWordWrapPane.setFont(new Font("Monospaced", Font.PLAIN, 12));
+      jNonWordWrapPane.setContentType("text/plain");
+      jNonWordWrapPane.setEditable(false);
+      jScrollPaneText = new TransparentScrollPane();
+      jScrollPaneText.setBackground(Color.white);
+      jScrollPaneText.setSize(new java.awt.Dimension(650, 380));
+      jScrollPaneText.setViewportView(jNonWordWrapPane);
+      jSplitPane.setRightComponent(jScrollPaneText);
+
+      this.add(jSplitPane);
+
+      jSplitPane.setDividerLocation(150);
+
+      updateContent();
+
+      popupMenu = new JPopupMenu("Menu");
+      menuItemExecute = new JMenuItem(Sextante.getText("Run"));
+      menuItemExecute.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            executeSelectedCommand();
+         }
+      });
+      popupMenu.add(menuItemExecute);
+      menuItemShowExecuteDialog = new JMenuItem(Sextante.getText("Show_algorithm_dialog"));
+      menuItemShowExecuteDialog.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            showExecuteDialog();
+         }
+      });
+      popupMenu.add(menuItemShowExecuteDialog);
+      popupMenu.addSeparator();
+
+      final JMenuItem menuItemExpand = new JMenuItem(Sextante.getText("Expand_all"));
+      menuItemExpand.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            expandAll();
+         }
+      });
+      popupMenu.add(menuItemExpand);
+
+      final JMenuItem menuItemCollapse = new JMenuItem(Sextante.getText("Collapse_all"));
+      menuItemCollapse.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            collapseAll();
+         }
+      });
+      popupMenu.add(menuItemCollapse);
+
+   }
+
+
+   protected void showExecuteDialog() {
+
+      if (m_Command == null) {
+         return;
+      }
+
+      String sAlg = m_Command.getCommand();
+
+      if (!sAlg.startsWith("runalg")) {
+         return;
+      }
+
+      sAlg = sAlg.substring("runalg(\"".length());
+      sAlg = sAlg.substring(0, sAlg.indexOf("\""));
+
+      final GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlg);
+      final ArrayList<DateAndCommand> list = new ArrayList<DateAndCommand>();
+      list.add(m_Command);
+
+      SextanteGUI.getGUIFactory().showAlgorithmDialog(alg, null, list);
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      jTree.setSelectionPath(m_Path);
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   public void collapseAll() {
+
+      try {
+         final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+         final TreePath path = new TreePath(root);
+         expandAll(jTree, path, false);
+         jTree.expandPath(path);
+         final TreeNode node = root.getChildAt(0);
+         final TreePath subpath = path.pathByAddingChild(node);
+         jTree.expandPath(subpath);
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   public void expandAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      expandAll(jTree, new TreePath(root), true);
+
+   }
+
+
+   private void expandAll(final JTree tree,
+                          final TreePath parent,
+                          final boolean expand) {
+
+      try {
+         final TreeNode node = (TreeNode) parent.getLastPathComponent();
+         if (node.getChildCount() >= 0) {
+            for (final Enumeration e = node.children(); e.hasMoreElements();) {
+               final TreeNode n = (TreeNode) e.nextElement();
+               final TreePath path = parent.pathByAddingChild(n);
+               expandAll(tree, path, expand);
+            }
+         }
+
+         if (expand) {
+            tree.expandPath(parent);
+         }
+         else {
+            tree.collapsePath(parent);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   private void executeSelectedCommand() {
+
+      if (m_Command == null) {
+         return;
+      }
+
+      final Runnable run = new Runnable() {
+
+         public void run() {
+            try {
+               Interpreter interpreter = new Interpreter();
+               interpreter.getNameSpace().importCommands("es.unex.sextante.gui.cmd.bshcommands");
+               interpreter.eval(m_Command.getCommand());
+            }
+            catch (EvalError e) {
+               JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.ERROR_MESSAGE);
+            }
+         }
+      };
+
+      final Thread th = new Thread(run);
+      th.start();
+
+   }
+
+
+   public void updateContent() {
+
+      jNonWordWrapPane.setText("");
+
+      DefaultMutableTreeNode node;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("History"));
+
+      final DefaultMutableTreeNode commandsNode = new DefaultMutableTreeNode(Sextante.getText("Commands"));
+
+      DefaultMutableTreeNode child;
+      DateAndCommand dac;
+
+      m_Commands = History.getHistory();
+      String sDay;
+
+      Set<String> set = m_NodesMap.keySet();
+      Iterator<String> iterator = set.iterator();
+      while (iterator.hasNext()) {
+         final String key = iterator.next();
+         node = m_NodesMap.get(key);
+         if (node != null) {
+            final boolean bExpanded = jTree.isExpanded(getPath(node));
+            m_NodeStatus.put(node, new Boolean(bExpanded));
+            node.removeAllChildren();
+         }
+      }
+
+      for (int j = 0; j < m_Commands.size(); j++) {
+         dac = m_Commands.get(j);
+         child = new DefaultMutableTreeNode(dac);
+         sDay = dac.getDay();
+         if (m_NodesMap.containsKey(sDay)) {
+            node = m_NodesMap.get(sDay);
+         }
+         else {
+            node = new DefaultMutableTreeNode(sDay);
+            m_NodesMap.put(sDay, node);
+         }
+         node.insert(child, 0);
+      }
+
+      node = m_NodesMap.get(Sextante.getText("This_session"));
+      if (node != null) {
+         if (node.getChildCount() != 0) {
+            commandsNode.add(node);
+         }
+      }
+      node = m_NodesMap.get(Sextante.getText("Today"));
+      if (node != null) {
+         if (node.getChildCount() != 0) {
+            commandsNode.add(node);
+         }
+      }
+      node = m_NodesMap.get(Sextante.getText("Yesterday"));
+      if (node != null) {
+         if (node.getChildCount() != 0) {
+            commandsNode.add(node);
+         }
+      }
+      for (int i = 0; i < 30; i++) {
+         String s = Sextante.getText("XXX_days_ago");
+         s = s.replace("XXX", Integer.toString(i));
+         node = m_NodesMap.get(s);
+         if (node != null) {
+            if (node.getChildCount() != 0) {
+               commandsNode.add(node);
+            }
+         }
+      }
+      node = m_NodesMap.get(Sextante.getText("More_than_one_month_ago"));
+      if (node != null) {
+         if (node.getChildCount() != 0) {
+            commandsNode.add(node);
+         }
+      }
+
+      mainNode.add(commandsNode);
+
+      //add log elements
+      final DefaultMutableTreeNode logElementsNode = new DefaultMutableTreeNode(Sextante.getText("Log_messages"));
+      mainNode.add(logElementsNode);
+
+      final HashMap<String, DefaultMutableTreeNode> map = new HashMap<String, DefaultMutableTreeNode>();
+      final ArrayList<LogElement> elements = Sextante.getLogger().getLogElements();
+      for (int i = 0; i < elements.size(); i++) {
+         final LogElement element = elements.get(elements.size() - 1 - i);
+         if (map.containsKey(element.getType())) {
+            node = map.get(element.getType());
+         }
+         else {
+            node = new DefaultMutableTreeNode(element.getType());
+            map.put(element.getType(), node);
+         }
+         node.add(new DefaultMutableTreeNode(element));
+      }
+
+      set = map.keySet();
+      iterator = set.iterator();
+      while (iterator.hasNext()) {
+         final String key = iterator.next();
+         logElementsNode.add(map.get(key));
+      }
+
+      //add points
+      final DefaultMutableTreeNode pointsNode = new DefaultMutableTreeNode(Sextante.getText("Points"));
+      mainNode.add(pointsNode);
+
+      final List<NamedPoint> coords = SextanteGUI.getGUIFactory().getCoordinatesList();
+
+      for (int i = 0; i < coords.size(); i++) {
+         pointsNode.add(new DefaultMutableTreeNode(coords.get(i).toStringFull()));
+      }
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+      set = m_NodesMap.keySet();
+      iterator = set.iterator();
+      while (iterator.hasNext()) {
+         final String key = iterator.next();
+         node = m_NodesMap.get(key);
+         if (node != null) {
+            final Boolean expanded = m_NodeStatus.get(node);
+            if (expanded != null) {
+               if (expanded.booleanValue()) {
+                  jTree.expandPath(getPath(node));
+               }
+            }
+         }
+      }
+
+
+   }
+
+
+   private TreePath getPath(TreeNode node) {
+
+      final ArrayList list = new ArrayList();
+
+      // Add all nodes to list
+      while (node != null) {
+         list.add(node);
+         node = node.getParent();
+      }
+      Collections.reverse(list);
+
+      // Convert array of nodes to TreePath
+      return new TreePath(list.toArray());
+   }
+
+
+   public void clearHistory() {
+
+      History.clear();
+      updateContent();
+
+   }
+
+
+   public void clearLog() {
+
+      final SextanteLogHandler handler = Sextante.getLogger();
+      handler.clear();
+
+      updateContent();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/HistoryPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/NonWordWrapPane.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/NonWordWrapPane.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/NonWordWrapPane.java	(revision 369)
@@ -0,0 +1,23 @@
+package es.unex.sextante.gui.history;
+
+import javax.swing.JTextPane;
+
+public class NonWordWrapPane
+         extends
+            JTextPane {
+
+   public NonWordWrapPane() {
+
+      super();
+
+   }
+
+
+   @Override
+   public boolean getScrollableTracksViewportWidth() {
+
+      return false;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/history/NonWordWrapPane.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptsIO.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptsIO.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptsIO.java	(revision 369)
@@ -0,0 +1,41 @@
+
+
+package es.unex.sextante.gui.r;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.exceptions.WrongScriptException;
+
+
+public class RScriptsIO {
+
+   public static GeoAlgorithm[] loadRScriptsAsAlgorithms(final String sFolder) {
+
+      final ArrayList<GeoAlgorithm> list = new ArrayList<GeoAlgorithm>();
+      final File folder = new File(sFolder);
+      final String[] files = folder.list();
+      if (files != null) {
+         for (int i = 0; i < files.length; i++) {
+            if (files[i].endsWith("rsx")) {
+               final RAlgorithm alg = new RAlgorithm();
+               try {
+                  alg.initialize(files[i]);
+                  list.add(alg);
+               }
+               catch (final WrongScriptException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+         return list.toArray(new GeoAlgorithm[0]);
+      }
+      else {
+         return new GeoAlgorithm[0];
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptsIO.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RUtils.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RUtils.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RUtils.java	(revision 369)
@@ -0,0 +1,263 @@
+package es.unex.sextante.gui.r;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+
+
+public class RUtils {
+
+   private static ArrayList<String> m_ConsoleResults = new ArrayList<String>();
+   private static ArrayList<String> m_VerboseCommands;
+   private static boolean           m_AddConsoleOutput;
+
+
+   private static void createBatchJob() {
+
+      final String sFilename = getBatchJobFilename();
+      final String sRFolder = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_FOLDER);
+      try {
+         final BufferedWriter output = new BufferedWriter(new FileWriter(sFilename));
+         if (Sextante.isWindows()) {
+            //output.write("echo off\n");
+            output.write("\"" + sRFolder + File.separator + "bin" + File.separator + "R.exe\" CMD BATCH --vanilla \""
+                         + getRScriptFilename() + "\"");
+         }
+         else {
+            //TODO:******************
+         }
+         output.close();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+
+   }
+
+
+   private static String getBatchJobFilename() {
+
+      String sFile;
+
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         sFile = "r_batch_job.sh";
+      }
+      else {//Windows
+         sFile = "r_batch_job.bat";
+      }
+
+      sFile = SextanteGUI.getUserFolder() + File.separator + sFile;
+
+      return sFile;
+
+   }
+
+
+   public static void createRScriptFromRCommands(final String[] sCommands) {
+
+      final String sFilename = getRScriptFilename();
+      try {
+         final BufferedWriter output = new BufferedWriter(new FileWriter(sFilename));
+         for (int i = 0; i < sCommands.length; i++) {
+            output.write(sCommands[i] + "\n");
+         }
+         output.close();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private static String getRScriptFilename() {
+
+      final String sFile = SextanteGUI.getUserFolder() + File.separator + "sextante_script.r";
+
+      return sFile;
+
+   }
+
+
+   private static String getConsoleOutputFilename() {
+
+      final String sFile = SextanteGUI.getUserFolder() + File.separator + "sextante_script.r.Rout";
+
+      return sFile;
+
+   }
+
+
+   public static int executeR(final RAlgorithm alg) throws GeoAlgorithmExecutionException {
+
+      m_ConsoleResults.clear();
+      m_VerboseCommands = alg.getVerboseCommands();
+      m_AddConsoleOutput = false;
+      createBatchJob();
+      createRScriptFromRCommands(alg.getFullSetOfRCommands());
+      final List<String> list = new ArrayList<String>();
+      ProcessBuilder pb;
+      pb = new ProcessBuilder(list);
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         //TODO
+      }
+      else { //windows
+         list.add("cmd.exe");
+         list.add("/C");
+         //list.add("start");
+         list.add(getBatchJobFilename());
+      }
+
+      Process process;
+      try {
+         process = pb.start();
+         final StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());
+         final StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream());
+         errorGobbler.start();
+         outputGobbler.start();
+         final int iReturn = process.waitFor();
+         createConsoleOutput();
+         return iReturn;
+      }
+      catch (final Exception e) {
+         throw new RExecutionException();
+      }
+
+
+   }
+
+
+   private static void createConsoleOutput() {
+
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(getConsoleOutputFilename()));
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            processLine(sLine);
+         }
+      }
+      catch (final FileNotFoundException e) {}
+      catch (final IOException e) {}
+      finally {
+         try {
+            if (input != null) {
+               input.close();
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+   }
+
+
+   public static void setExecutable(final String sFilename) throws RExecutionException {
+
+      final String version = System.getProperty("java.version").substring(0, 3);
+      final Float f = Float.valueOf(version);
+      if (f.floatValue() < (float) 1.6) {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            try {
+               Runtime.getRuntime().exec("chmod +x " + sFilename);
+            }
+            catch (final IOException e) {
+               throw new RExecutionException();
+            }
+         }
+      }
+      else {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            new File(sFilename).setExecutable(true);
+         }
+      }
+   }
+
+
+   public static void processLine(String sLine) {
+
+      if (sLine.startsWith(">")) {
+         sLine = sLine.substring(1).trim();
+         if (m_VerboseCommands.contains(sLine)) {
+            m_AddConsoleOutput = true;
+         }
+         else {
+            m_AddConsoleOutput = false;
+         }
+      }
+      else if (m_AddConsoleOutput) {
+         m_ConsoleResults.add("<p>" + sLine + "</p>\n");
+      }
+
+   }
+
+
+   public static String getConsoleOutput() {
+
+      final StringBuffer out = new StringBuffer();
+      out.append("<font face=\"courier\">\n");
+      out.append("<h2> R Output</h2>\n");
+      for (int i = 0; i < m_ConsoleResults.size(); i++) {
+         out.append(m_ConsoleResults.get(i));
+      }
+      out.append("</font>\n");
+
+      return out.toString();
+
+   }
+
+
+   public static String getScriptsFolder() {
+
+      return SextanteGUI.getSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER);// + File.separator + "description";
+
+   }
+
+}
+
+
+class StreamGobbler
+         extends
+            Thread {
+
+   InputStream is;
+   String      type;
+
+
+   StreamGobbler(final InputStream is) {
+
+      this.is = is;
+
+   }
+
+
+   @Override
+   public void run() {
+      try {
+         final InputStreamReader isr = new InputStreamReader(is);
+         final BufferedReader br = new BufferedReader(isr);
+         String line = null;
+         while ((line = br.readLine()) != null) {
+            //RUtils.processLine(line);
+         }
+      }
+      catch (final IOException ioe) {
+         //ioe.printStackTrace();
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,152 @@
+package es.unex.sextante.gui.r;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+
+
+public class RAlgorithmProvider
+         implements
+            IAlgorithmProvider {
+
+   private HashMap<String, GeoAlgorithm> m_Algs;
+
+   private final static ImageIcon        R_ICON = new ImageIcon(RAlgorithmProvider.class.getClassLoader().getResource(
+                                                         "images/r.png"));
+
+
+   public boolean canEditHelp() {
+
+      return false;
+
+   }
+
+
+   public Object getAlgorithmHelp(final GeoAlgorithm alg) {
+
+      return "";
+
+   }
+
+
+   public String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                          final boolean forceCurrentLocale) {
+
+      return null;
+
+   }
+
+
+   public HashMap<String, GeoAlgorithm> getAlgorithms() {
+
+      if (Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteRSettings.R_ACTIVATE))) {
+         return m_Algs;
+      }
+      else {
+         return new HashMap<String, GeoAlgorithm>();
+      }
+
+   }
+
+
+   public HashMap<String, Class> getCustomModelerParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public HashMap<String, Class> getCustomParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public ImageIcon getIcon() {
+
+      return R_ICON;
+
+   }
+
+
+   public String getName() {
+
+      return "R";
+
+   }
+
+
+   public Setting getSettings() {
+
+      return new SextanteRSettings();
+   }
+
+
+   public void initialize() {
+
+      m_Algs = new HashMap<String, GeoAlgorithm>();
+      
+      if ( RUtils.getScriptsFolder() == null ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteRSettings.R_ACTIVATE, new Boolean(false).toString());    	  
+    	  return;
+      }
+      
+      if ( RUtils.getScriptsFolder().length() < 1 ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteRSettings.R_ACTIVATE, new Boolean(false).toString());  
+    	  return;
+      }
+
+      final GeoAlgorithm[] algs = RScriptsIO.loadRScriptsAsAlgorithms(RUtils.getScriptsFolder());
+
+      for (int i = 0; i < algs.length; i++) {
+         m_Algs.put(algs[i].getCommandLineName(), algs[i]);
+      }
+
+   }
+
+
+   public void update() {
+
+      initialize();
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      final HashMap<NameAndIcon, ArrayList<ToolboxAction>> map = new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+      final NameAndIcon nai = new NameAndIcon("R", R_ICON);
+      final ArrayList<ToolboxAction> list = new ArrayList<ToolboxAction>();
+      list.add(new RConsoleToolboxAction());
+      map.put(nai, list);
+
+      return map;
+   }
+
+
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+      return new IToolboxRightButtonAction[] { new EditRScriptAction() };
+
+   }
+
+
+   public static void addMessage(final String s) {
+
+      Sextante.getLogger().addToLog(s, "R", s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RExecutionException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RExecutionException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RExecutionException.java	(revision 369)
@@ -0,0 +1,21 @@
+
+
+package es.unex.sextante.gui.r;
+
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+
+
+public class RExecutionException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public RExecutionException(final String s) {
+      super(s);
+   }
+
+
+   public RExecutionException() {
+      super("Error executing R");
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RExecutionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithm.java	(revision 369)
@@ -0,0 +1,481 @@
+package es.unex.sextante.gui.r;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongScriptException;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.ImageContainer;
+import es.unex.sextante.outputs.NullOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+public class RAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String R_CONSOLE_OUTPUT     = "R_CONSOLE_OUTPUT";
+   private static final String R_PLOT_OUTPUT        = "R_PLOT_OUTPUT";
+   private boolean             m_bShowConsoleOutput = false;
+   private ArrayList<String>   m_Commands           = new ArrayList<String>();
+   private ArrayList<String>   m_VerboseCommands    = new ArrayList<String>();
+   private String              m_sDescriptionFile;
+   private String              m_sChartFilepath     = null;
+   private boolean             m_bShowPlotOutput;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      RUtils.executeR(this);
+
+      if (m_bShowConsoleOutput) {
+         m_OutputObjects.getOutput(R_CONSOLE_OUTPUT).setOutputObject(RUtils.getConsoleOutput());
+      }
+
+      if (m_bShowPlotOutput) {
+         final ImageContainer cont = new ImageContainer(m_sChartFilepath);
+         m_OutputObjects.getOutput(R_PLOT_OUTPUT).setOutputObject(cont);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   public String[] getFullSetOfRCommands() throws GeoAlgorithmExecutionException {
+
+      final String[] importCommands = getImportCommands();
+      final String[] exportCommands = getExportCommands();
+      final String[] customCommands = getRCommands();
+
+      final String[] allCommands = new String[importCommands.length + customCommands.length + exportCommands.length];
+      System.arraycopy(importCommands, 0, allCommands, 0, importCommands.length);
+      System.arraycopy(customCommands, 0, allCommands, importCommands.length, customCommands.length);
+      System.arraycopy(exportCommands, 0, allCommands, importCommands.length + customCommands.length, exportCommands.length);
+
+      return allCommands;
+
+   }
+
+
+   private String[] getExportCommands() throws GeoAlgorithmExecutionException {
+
+      final ArrayList<String> commands = new ArrayList<String>();
+
+      for (int i = 0; i < m_OutputObjects.getOutputObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         if (out instanceof OutputRasterLayer) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               String sFilename = foc.getFilename();
+               if (!sFilename.endsWith("tif")) {
+                  sFilename = sFilename + ".tif";
+               }
+               foc.setFilename(sFilename);
+               out.setOutputChannel(foc);
+               sFilename = sFilename.replace("\\", "/");
+               commands.add("writeGDAL(" + out.getName() + ",\"" + sFilename + "\")");
+            }
+            else if (channel instanceof NullOutputChannel) {
+               String sFilename = SextanteGUI.getOutputFactory().getTempRasterLayerFilename();
+               sFilename = sFilename.replace("\\", "/");
+               commands.add("writeGDAL(" + out.getName() + ",\"" + sFilename + "\")");
+            }
+            else {
+               throw new UnsupportedOutputChannelException();
+            }
+         }
+         else if (out instanceof OutputVectorLayer) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               String sFilepath = foc.getFilename();
+               if (!sFilepath.endsWith("shp")) {
+                  sFilepath = sFilepath + ".shp";
+               }
+               foc.setFilename(sFilepath);
+               out.setOutputChannel(foc);
+               final File file = new File(sFilepath);
+               String sFilename = file.getName();
+               sFilename = sFilename.substring(0, sFilename.lastIndexOf("."));
+               commands.add("writeOGR(" + out.getName() + ",\"" + file.getParent().replace("\\", "/") + "\",\"" + sFilename
+                            + "\", driver=\"ESRI Shapefile\")");
+            }
+            else if (channel instanceof NullOutputChannel) {
+               final String sFilepath = SextanteGUI.getOutputFactory().getTempVectorLayerFilename();
+               final File file = new File(sFilepath);
+               String sFilename = file.getName();
+               sFilename = sFilename.substring(0, sFilename.lastIndexOf("."));
+               commands.add("writeOGR(" + out.getName() + ",\"" + file.getParent().replace("\\", "/") + "\",\"" + sFilename
+                            + "\", driver=\"ESRI Shapefile\")");
+            }
+            else {
+               throw new UnsupportedOutputChannelException();
+            }
+         }
+
+      }
+
+      if (m_bShowPlotOutput) {
+         commands.add("dev.off()");
+      }
+
+      return commands.toArray(new String[0]);
+
+   }
+
+
+   private String[] getImportCommands() throws GeoAlgorithmExecutionException {
+
+      final ArrayList<String> commands = new ArrayList<String>();
+
+      commands.add("library(\"rgdal\")");
+
+      commands.add("x=c(" + Double.toString(m_AnalysisExtent.getXMin()) + "," + Double.toString(m_AnalysisExtent.getXMax()) + ")");
+      commands.add("y=c(" + Double.toString(m_AnalysisExtent.getYMin()) + "," + Double.toString(m_AnalysisExtent.getYMax()) + ")");
+      commands.add("xy <- cbind(x,y)");
+      commands.add("boundingBox <- SpatialPoints(xy)");
+      commands.add("cellsize=" + Double.toString(m_AnalysisExtent.getCellSize()));
+
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         if (param instanceof ParameterRasterLayer) {
+            final IOutputChannel channel = (param.getParameterValueAsVectorLayer()).getOutputChannel();
+            if (channel instanceof FileOutputChannel) {
+               String sFilepath = ((FileOutputChannel) channel).getFilename();
+               if (!sFilepath.toLowerCase().endsWith("asc") && !!sFilepath.toLowerCase().endsWith("tif")) {
+                  throw new RExecutionException(Sextante.getText("unsupported_file_format"));
+               }
+               sFilepath = sFilepath.replace("\\", "/");
+               commands.add(param.getParameterName() + " = " + "readGDAL(\"" + sFilepath + "\"");
+            }
+            else {
+               throw new RExecutionException(Sextante.getText("error_non_file_based_input"));
+            }
+         }
+         else if (param instanceof ParameterVectorLayer) {
+            final IOutputChannel channel = (param.getParameterValueAsVectorLayer()).getOutputChannel();
+            if (channel instanceof FileOutputChannel) {
+               String sFilepath = ((FileOutputChannel) channel).getFilename();
+               if (!sFilepath.toLowerCase().endsWith("shp")) {
+                  throw new RExecutionException(Sextante.getText("unsupported_file_format"));
+               }
+               String sFilename = new File(sFilepath).getName();
+               sFilename = sFilename.substring(0, sFilename.lastIndexOf("."));
+               sFilepath = sFilepath.replace("\\", "/");
+               commands.add(param.getParameterName() + " = " + "readOGR(\"" + sFilepath + "\",layer=\"" + sFilename + "\")");
+            }
+            else {
+               throw new RExecutionException(Sextante.getText("error_non_file_based_input"));
+            }
+         }
+         else if (param instanceof ParameterTableField) {
+            final int iField = param.getParameterValueAsInt();
+            commands.add(param.getParameterName() + "=" + Integer.toString(iField + 1));
+         }
+         else if (param instanceof ParameterNumericalValue) {
+            final double dValue = param.getParameterValueAsDouble();
+            commands.add(param.getParameterName() + "=" + Double.toString(dValue));
+         }
+         else if (param instanceof ParameterString) {
+            final String s = param.getParameterValueAsString();
+            commands.add(param.getParameterName() + "=" + s);
+         }
+         else if (param instanceof ParameterBoolean) {
+            final boolean b = param.getParameterValueAsBoolean();
+            if (b) {
+               commands.add(param.getParameterName() + "=TRUE");
+            }
+            else {
+               commands.add(param.getParameterName() + "=FALSE");
+            }
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            final ArrayList list = (ArrayList) param.getParameterValueAsObject();
+            for (int j = 0; j < list.size(); j++) {
+               final ILayer layer = (ILayer) list.get(j);
+               if (layer instanceof IRasterLayer) {
+                  final IOutputChannel channel = layer.getOutputChannel();
+                  if (channel instanceof FileOutputChannel) {
+                     String sFilepath = ((FileOutputChannel) channel).getFilename();
+                     if (!sFilepath.toLowerCase().endsWith("asc") && !!sFilepath.toLowerCase().endsWith("tif")) {
+                        throw new RExecutionException(Sextante.getText("unsupported_file_format"));
+                     }
+                     sFilepath = sFilepath.replace("\\", "/");
+                     commands.add("tempvar" + Integer.toString(j) + " = " + "readGDAL(\"" + sFilepath + "\"");
+                  }
+                  else {
+                     throw new RExecutionException(Sextante.getText("error_non_file_based_input"));
+                  }
+               }
+               else if (layer instanceof IVectorLayer) {
+                  final IOutputChannel channel = layer.getOutputChannel();
+                  if (channel instanceof FileOutputChannel) {
+                     String sFilepath = ((FileOutputChannel) channel).getFilename();
+                     if (!sFilepath.toLowerCase().endsWith("shp")) {
+                        throw new RExecutionException(Sextante.getText("unsupported_file_format"));
+                     }
+                     String sFilename = new File(sFilepath).getName();
+                     sFilename = sFilename.substring(0, sFilename.lastIndexOf("."));
+                     sFilepath = sFilepath.replace("\\", "/");
+                     commands.add("tempvar" + Integer.toString(j) + " = " + "readOGR(\"" + sFilepath + "\",layer=\"" + sFilename
+                                  + "\")");
+                  }
+                  else {
+                     throw new RExecutionException(Sextante.getText("error_non_file_based_input"));
+                  }
+               }
+            }
+            final StringBuffer sb = new StringBuffer();
+            sb.append(param.getParameterName());
+            sb.append(" = c(");
+            for (int j = 0; j < list.size(); j++) {
+               if (j != 0) {
+                  sb.append(",");
+               }
+               sb.append("tempvar" + Integer.toString(j));
+            }
+            sb.append(")\n");
+         }
+      }
+
+      if (m_bShowPlotOutput) {
+         m_sChartFilepath = m_OutputFactory.getTempFilenameWithoutExtension() + ".png";
+         m_sChartFilepath = m_sChartFilepath.replace("\\", "/");
+         commands.add("png(\"" + m_sChartFilepath + "\")");
+      }
+
+      return commands.toArray(new String[0]);
+
+   }
+
+
+   private String[] getRCommands() {
+
+      return m_Commands.toArray(new String[0]);
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(false);
+
+   }
+
+
+   public void initialize(final String sDescriptionFile) throws WrongScriptException {
+
+      final String sFolder = RUtils.getScriptsFolder();
+      m_sDescriptionFile = sFolder + File.separator + sDescriptionFile;
+      setName(sDescriptionFile.substring(0, sDescriptionFile.lastIndexOf(".")).replace("_", " "));
+      setGroup("R-Scripts");
+
+      setIsDeterminatedProcess(false);
+      setUserCanDefineAnalysisExtent(true);
+      defineCharacteristicsFromDescriptionFile();
+
+   }
+
+
+   private void defineCharacteristicsFromDescriptionFile() throws WrongScriptException {
+
+      try {
+         final BufferedReader input = new BufferedReader(new FileReader(m_sDescriptionFile));
+         String sLine = input.readLine().trim();
+         while (sLine != null) {
+            if (sLine.startsWith("//")) {
+               processParameterLine(sLine);
+            }
+            else if (sLine.startsWith(">")) {
+               sLine = sLine.substring(1);
+               m_Commands.add(sLine.trim());
+               m_VerboseCommands.add(sLine.trim());
+               if (!m_bShowConsoleOutput) {
+                  addOutputText(R_CONSOLE_OUTPUT, "R Output");
+               }
+               m_bShowConsoleOutput = true;
+            }
+            else {
+               m_Commands.add(sLine.trim());
+            }
+            sLine = input.readLine();
+         }
+         input.close();
+      }
+      catch (final Exception e) {
+         throw new WrongScriptException(e.getMessage());
+      }
+
+   }
+
+
+   private void processParameterLine(String sLine) throws WrongScriptException {
+
+      Parameter param = null;
+      Output out = null;
+      AdditionalInfo additionalInfo = null;
+      sLine = sLine.replace("/", "");
+
+      if (sLine.toLowerCase().equals("showplots")) {
+         m_bShowPlotOutput = true;
+         addOutputImage(R_PLOT_OUTPUT, "R Plots");
+         return;
+      }
+
+      final String[] sTokens = sLine.split("=");
+      if (sTokens[1].toLowerCase().equals("raster")) {
+         param = new ParameterRasterLayer();
+         additionalInfo = new AdditionalInfoRasterLayer(true);
+      }
+      else if (sTokens[1].toLowerCase().equals("vector")) {
+         param = new ParameterVectorLayer();
+         additionalInfo = new AdditionalInfoVectorLayer(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+      }
+      else if (sTokens[1].toLowerCase().equals("table")) {
+         param = new ParameterTable();
+         additionalInfo = new AdditionalInfoTable(true);
+      }
+      else if (sTokens[1].toLowerCase().equals("multiple raster")) {
+         param = new ParameterMultipleInput();
+         additionalInfo = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+      }
+      else if (sTokens[1].toLowerCase().equals("multiple vector")) {
+         param = new ParameterMultipleInput();
+         additionalInfo = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY, true);
+
+      }
+      else if (sTokens[1].toLowerCase().equals("boolean")) {
+         param = new ParameterBoolean();
+         additionalInfo = new AdditionalInfoBoolean(true);
+      }
+      else if (sTokens[1].toLowerCase().startsWith("field")) {
+         param = new ParameterTableField();
+         final String parent = sTokens[1].substring("field".length()).trim();
+         additionalInfo = new AdditionalInfoTableField(parent, true);
+      }
+      else if (sTokens[1].toLowerCase().equals("number")) {
+         param = new ParameterNumericalValue();
+         additionalInfo = new AdditionalInfoNumericalValue(AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0,
+                  Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+      }
+      else if (sTokens[1].toLowerCase().equals("string")) {
+         param = new ParameterString();
+         additionalInfo = new AdditionalInfoString();
+      }
+      else if (sTokens[1].toLowerCase().equals("output raster")) {
+         out = new OutputRasterLayer();
+      }
+      else if (sTokens[1].toLowerCase().equals("output vector")) {
+         out = new OutputVectorLayer();
+      }
+      else if (sTokens[1].toLowerCase().equals("output table")) {
+         out = new OutputTable();
+      }
+      else if (sTokens[1].toLowerCase().equals("group")) {
+         setGroup(sTokens[0]);
+         return;
+      }
+      if (param != null) {
+         param.setParameterName(sTokens[0]);
+         param.setParameterDescription(sTokens[0]);
+         param.setParameterAdditionalInfo(additionalInfo);
+         try {
+            m_Parameters.addParameter(param);
+         }
+         catch (final RepeatedParameterNameException e) {
+            throw new WrongScriptException(e.getMessage());
+         }
+      }
+      else if (out != null) {
+         out.setDescription(sTokens[0]);
+         out.setName(sTokens[0]);
+         m_OutputObjects.add(out);
+      }
+      else {
+         throw new WrongScriptException();
+      }
+
+
+   }
+
+
+   @Override
+   public GeoAlgorithm getNewInstance() throws InstantiationException, IllegalAccessException {
+
+      final RAlgorithm alg = this.getClass().newInstance();
+      alg.setOutputObjects(m_OutputObjects.getNewInstance());
+      alg.setName(this.getName());
+      alg.setGroup(this.getGroup());
+      alg.setParameters(m_Parameters.getNewInstance());
+      alg.setIsDeterminatedProcess(false);
+      alg.setUserCanDefineAnalysisExtent(getUserCanDefineAnalysisExtent());
+      alg.m_Commands = (ArrayList<String>) m_Commands.clone();
+      alg.m_VerboseCommands = (ArrayList<String>) m_VerboseCommands.clone();
+      alg.m_bShowConsoleOutput = m_bShowConsoleOutput;
+      alg.m_bShowPlotOutput = m_bShowPlotOutput;
+
+      return alg;
+
+   }
+
+
+   @Override
+   public String getCommandLineName() {
+
+      final String sName = "r:" + getName().toLowerCase().replace(" ", "");
+      return sName;
+
+   }
+
+
+   public ArrayList<String> getVerboseCommands() {
+
+      return m_VerboseCommands;
+
+   }
+
+
+   public String getFilename() {
+
+      return m_sDescriptionFile;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RConsoleToolboxAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RConsoleToolboxAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RConsoleToolboxAction.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gui.r;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+public class RConsoleToolboxAction
+         extends
+            ToolboxAction {
+
+   @Override
+   public void execute() {
+
+      final RScriptEditingPanel panel = new RScriptEditingPanel();
+      SextanteGUI.getGUIFactory().showGenericDialog("R", panel);
+
+   }
+
+
+   @Override
+   public String getGroup() {
+
+      return Sextante.getText("Tools");
+
+   }
+
+
+   @Override
+   public String getName() {
+
+      return Sextante.getText("CreateNewScript");
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RConsoleToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/EditRScriptAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/EditRScriptAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/EditRScriptAction.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.gui.r;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class EditRScriptAction
+         implements
+            IToolboxRightButtonAction {
+
+   public void execute(final GeoAlgorithm alg) {
+
+      final String sFilename = ((RAlgorithm) alg).getFilename();
+      final RScriptEditingPanel panel = new RScriptEditingPanel(sFilename);
+      SextanteGUI.getGUIFactory().showGenericDialog("R", panel);
+
+   }
+
+
+   public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) {
+
+      return alg instanceof RAlgorithm;
+
+   }
+
+
+   public String getDescription() {
+
+      return Sextante.getText("Edit");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/EditRScriptAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptEditingPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptEditingPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptEditingPanel.java	(revision 369)
@@ -0,0 +1,203 @@
+package es.unex.sextante.gui.r;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+
+public class RScriptEditingPanel
+         extends
+            JPanel {
+
+   private String      m_sFilename;
+   private JButton     jButtonOpen;
+   private JTextArea   jScriptTextArea;
+   private JScrollPane jScrollPaneTextArea;
+   private JButton     jButtonSave;
+
+
+   public RScriptEditingPanel() {
+
+      super();
+
+      initGUI();
+
+   }
+
+
+   public RScriptEditingPanel(final String sScriptFilename) {
+
+      super();
+
+      m_sFilename = sScriptFilename;
+
+      initGUI();
+
+      openFromFile(new File(sScriptFilename));
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout layout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 70.0, 5.0, 70.0, 5 },
+               { TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+      layout.setHGap(5);
+      layout.setVGap(5);
+
+      this.setLayout(layout);
+
+      this.setPreferredSize(new Dimension(600, 500));
+      this.setSize(new Dimension(600, 500));
+      jScriptTextArea = new JTextArea();
+      jScriptTextArea.setEditable(true);
+      jScriptTextArea.setLineWrap(false);
+      jScrollPaneTextArea = new JScrollPane(jScriptTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
+               ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      this.add(jScrollPaneTextArea, "0,0,4,0");
+      jScriptTextArea.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+      jButtonOpen = new JButton(Sextante.getText("Open"));
+      this.add(jButtonOpen, "1, 2");
+      jButtonOpen.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent e) {
+            open();
+         }
+      });
+
+      jButtonSave = new JButton(Sextante.getText("Save"));
+      this.add(jButtonSave, "3, 2");
+      jButtonSave.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent e) {
+            save();
+         }
+      });
+
+
+   }
+
+
+   protected void save() {
+
+      final JFileChooser fc = new JFileChooser();
+      final GenericFileFilter filter = new GenericFileFilter("rsx", "R Script");
+      fc.setFileFilter(filter);
+      if (m_sFilename != null) {
+         fc.setSelectedFile(new File(m_sFilename));
+      }
+      else {
+         final String sFolder = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER);
+         fc.setCurrentDirectory(new File(sFolder));
+      }
+      final int returnVal = fc.showSaveDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final File file = fc.getSelectedFile();
+         m_sFilename = file.getAbsolutePath();
+         saveToFile();
+         SextanteGUI.updateAlgorithmProvider(RAlgorithmProvider.class);
+         SextanteGUI.getGUIFactory().updateToolbox();
+      }
+
+   }
+
+
+   private void saveToFile() {
+
+      Writer output = null;
+      try {
+         output = new BufferedWriter(new FileWriter(m_sFilename));
+         output.write(jScriptTextArea.getText());
+
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+
+   }
+
+
+   protected void open() {
+
+      final JFileChooser fc = new JFileChooser();
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER);
+      fc.setFileFilter(new GenericFileFilter("rsx", "R Script"));
+      fc.setCurrentDirectory(new File(sFolder));
+      final int returnVal = fc.showOpenDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final File file = fc.getSelectedFile();
+         openFromFile(file);
+
+      }
+
+
+   }
+
+
+   private void openFromFile(final File file) {
+
+
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(file));
+         final StringBuffer sText = new StringBuffer();
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            sText.append(sLine + "\n");
+         }
+         jScriptTextArea.setText(sText.toString());
+      }
+      catch (final FileNotFoundException e) {}
+      catch (final IOException e) {}
+      finally {
+         try {
+            if (input != null) {
+               input.close();
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/r/RScriptEditingPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithm.java	(revision 369)
@@ -0,0 +1,228 @@
+package es.unex.sextante.gui.cmd;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongScriptException;
+import es.unex.sextante.gui.settings.SextanteScriptsSettings;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+public class ScriptAlgorithm
+         extends
+            GeoAlgorithm {
+
+
+   private static Interpreter m_Interpreter;
+   private String             m_sDescriptionFile;
+
+
+   public void initialize(final String sDescriptionFile) throws WrongScriptException {
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+      m_sDescriptionFile = sFolder + File.separator + sDescriptionFile;
+      setName(sDescriptionFile.substring(0, sDescriptionFile.indexOf(".")));
+      setGroup("Scripts");
+
+      setIsDeterminatedProcess(false);
+      setUserCanDefineAnalysisExtent(true);
+      defineCharacteristicsFromDescriptionFile();
+
+      FileReader reader;
+      try {
+         reader = new FileReader(m_sDescriptionFile);
+         m_Interpreter.eval(reader);
+      }
+      catch (final Exception e) {
+         throw new WrongScriptException(e.getMessage());
+      }
+
+
+   }
+
+
+   private void defineCharacteristicsFromDescriptionFile() throws WrongScriptException {
+
+      try {
+         final BufferedReader input = new BufferedReader(new FileReader(m_sDescriptionFile));
+         String sLine = input.readLine().trim();
+         while (sLine != null) {
+            if (sLine.startsWith("//")) {
+               processParameterLine(sLine);
+            }
+            sLine = input.readLine();
+         }
+         input.close();
+      }
+      catch (final Exception e) {
+
+         throw new WrongScriptException(e.getMessage());
+      }
+
+
+   }
+
+
+   private void processParameterLine(String sLine) throws WrongScriptException {
+
+      Parameter param = null;
+      Output out = null;
+      AdditionalInfo additionalInfo = null;
+      sLine = sLine.replace("/", "");
+      final String[] sTokens = sLine.split("=");
+      if (sTokens[1].toLowerCase().equals("raster")) {
+         param = new ParameterRasterLayer();
+         additionalInfo = new AdditionalInfoRasterLayer(true);
+      }
+      else if (sTokens[1].toLowerCase().equals("vector")) {
+         param = new ParameterVectorLayer();
+         additionalInfo = new AdditionalInfoVectorLayer(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+      }
+      else if (sTokens[1].toLowerCase().equals("table")) {
+         param = new ParameterTable();
+         additionalInfo = new AdditionalInfoTable(true);
+      }
+      else if (sTokens[1].toLowerCase().equals("multiple raster")) {
+         param = new ParameterMultipleInput();
+         additionalInfo = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+      }
+      else if (sTokens[1].toLowerCase().equals("multiple vector")) {
+         param = new ParameterMultipleInput();
+         additionalInfo = new AdditionalInfoMultipleInput(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY, true);
+
+      }
+      else if (sTokens[1].toLowerCase().equals("boolean")) {
+         param = new ParameterBoolean();
+         additionalInfo = new AdditionalInfoBoolean(true);
+      }
+      else if (sTokens[1].toLowerCase().equals("number")) {
+         param = new ParameterNumericalValue();
+         additionalInfo = new AdditionalInfoNumericalValue(AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0,
+                  Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+      }
+      else if (sTokens[1].toLowerCase().equals("string")) {
+         param = new ParameterString();
+         additionalInfo = new AdditionalInfoString();
+      }
+      else if (sTokens[1].toLowerCase().equals("output raster")) {
+         out = new OutputRasterLayer();
+      }
+      else if (sTokens[1].toLowerCase().equals("output vector")) {
+         out = new OutputVectorLayer();
+      }
+      else if (sTokens[1].toLowerCase().equals("output table")) {
+         out = new OutputTable();
+      }
+
+      if (param != null) {
+         param.setParameterName(sTokens[0]);
+         param.setParameterDescription(sTokens[0]);
+         param.setParameterAdditionalInfo(additionalInfo);
+         try {
+            m_Parameters.addParameter(param);
+         }
+         catch (final RepeatedParameterNameException e) {
+            throw new WrongScriptException(e.getMessage());
+         }
+      }
+      else if (out != null) {
+         out.setDescription(sTokens[0]);
+         out.setName(sTokens[0]);
+         m_OutputObjects.add(out);
+      }
+      else {
+         throw new WrongScriptException();
+      }
+   }
+
+
+   @Override
+   public void defineCharacteristics() {}
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final StringBuffer sb = new StringBuffer(getName() + "(");
+
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         sb.append(param.getCommandLineParameter() + ", ");
+      }
+
+      for (int j = 0; j < m_OutputObjects.getOutputObjectsCount(); j++) {
+         final Output out = m_OutputObjects.getOutput(j);
+         sb.append(out.getCommandLineParameter() + ", ");
+      }
+
+      final String sCommand = sb.substring(0, sb.length() - 2) + ")";
+      try {
+         m_Interpreter.eval(sCommand);
+      }
+      catch (final EvalError e) {
+         e.printStackTrace();
+         throw new GeoAlgorithmExecutionException(e.getErrorText());
+      }
+
+      //we return false because output objects should not be processed
+      return false;
+
+   }
+
+
+   @Override
+   public String getCommandLineName() {
+
+      return getName();
+
+   }
+
+
+   public static void resetInterpreter() {
+
+      m_Interpreter = new Interpreter();
+      m_Interpreter.getNameSpace().importCommands("es.unex.sextante.gui.cmd.bshcommands");
+
+
+   }
+
+
+   public String getDescriptionFile() {
+
+      return m_sDescriptionFile;
+
+   }
+
+
+   public String getFilename() {
+
+      return m_sDescriptionFile;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/BSHDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/BSHDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/BSHDialog.java	(revision 369)
@@ -0,0 +1,47 @@
+package es.unex.sextante.gui.cmd;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.io.FileReader;
+
+import javax.swing.JDialog;
+
+import bsh.Interpreter;
+import bsh.util.JConsole;
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A dialog with a BeanShell interface with extended commands to execute SEXTANTE algorithms
+ * 
+ * @author volaya
+ * 
+ */
+public class BSHDialog
+         extends
+            JDialog {
+
+   public BSHDialog(final Frame parent) {
+
+      super(parent, Sextante.getText("Command_line"), true);
+      setSize(new Dimension(400, 300));
+      setPreferredSize(new Dimension(400, 300));
+      getContentPane().setLayout(new BorderLayout());
+      final JConsole console = new JConsole();
+      getContentPane().add("Center", console);
+      final Interpreter interpreter = new Interpreter(console);
+      interpreter.getNameSpace().importCommands("es.unex.sextante.gui.cmd.bshcommands");
+      final String[] files = ScriptsIO.getScriptFiles();
+      if (files != null) {
+         for (int i = 0; i < files.length; i++) {
+            try {
+               final FileReader reader = new FileReader(files[i]);
+               interpreter.eval(reader);
+            }
+            catch (final Exception e) {}
+         }
+      }
+      new Thread(interpreter).start();
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/BSHDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/Parser.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/Parser.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/Parser.java	(revision 369)
@@ -0,0 +1,474 @@
+package es.unex.sextante.gui.cmd;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.AlgorithmNotFoundException;
+import es.unex.sextante.gui.exceptions.CommandLineException;
+import es.unex.sextante.gui.exceptions.OutputExtentNotSetException;
+import es.unex.sextante.gui.exceptions.WrongNumberOfParametersException;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+/**
+ * This class has methods to parse command-line expressions and create instances of SEXTANTE algorithms from them
+ * 
+ * @author volaya
+ * 
+ */
+public class Parser {
+
+   /**
+    * Returns a ready-to-be-executed instance of a given algorithm, based on its command-line name and an array of strings
+    * representing parameter values
+    * 
+    * @param sAlgName
+    *                the command-line name of the algorithm
+    * @param args
+    *                an array of string representing parameter values
+    * @return an instance of the algorithm with the given parameters
+    * @throws CommandLineException
+    */
+   public static GeoAlgorithm getAlgorithm(final String sAlgName,
+                                           final String[] args) throws CommandLineException {
+
+      int i;
+      ParametersSet ps;
+      Parameter param;
+      String sValue;
+
+      final GeoAlgorithm algorithm = Sextante.getAlgorithmFromCommandLineName(sAlgName);
+
+      if (algorithm == null) {
+         throw new AlgorithmNotFoundException();
+      }
+
+      GeoAlgorithm alg;
+      try {
+         alg = algorithm.getNewInstance();
+      }
+      catch (final Exception e) {
+         throw new CommandLineException("Could not instantiate algorithm");
+      }
+      final int iParamCount = alg.getNumberOfParameters() + alg.getNumberOfOutputObjects();
+
+      if ((args == null) || (args.length != iParamCount)) {
+         throw new WrongNumberOfParametersException();
+      }
+
+      ps = alg.getParameters();
+      for (int j = 0; j < 2; j++) { //twice to avoid errors with dependencies
+         for (i = 0; i < alg.getNumberOfParameters(); i++) {
+            param = ps.getParameter(i);
+            sValue = args[i].trim();
+            if (!setParameter(alg, param, sValue) && (j == 1)) {
+               throw new CommandLineException("Invalid parameter: " + sValue);
+            }
+         }
+         final OutputObjectsSet ooSet = alg.getOutputObjects();
+         for (i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+            final Output out = ooSet.getOutput(i);
+            if ((out instanceof Output3DRasterLayer) || (out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer)
+                || (out instanceof OutputTable)) {
+               sValue = args[i + alg.getNumberOfParameters()].trim();
+               if (sValue.equals("@")) {
+                  if (out instanceof OutputVectorLayer) {
+                     final OutputVectorLayer ovl = (OutputVectorLayer) out;
+                     if (ovl.canOverwrite()) {
+                        try {
+                           final Parameter paramToOverwrite = alg.getParameters().getParameter(
+                                    ((OutputVectorLayer) out).getInputLayerToOverwrite());
+                           final IVectorLayer layerToOverwrite = paramToOverwrite.getParameterValueAsVectorLayer();
+                           out.setOutputChannel(new OverwriteOutputChannel(layerToOverwrite));
+                        }
+                        catch (final Exception e) {
+                           out.setOutputChannel(new FileOutputChannel(null));
+                        }
+                     }
+                     else {
+                        out.setOutputChannel(new FileOutputChannel(null));
+                     }
+                  }
+               }
+               else if (sValue.equals("#")) {
+                  out.setOutputChannel(new FileOutputChannel(null));
+               }
+               else {
+                  out.setOutputChannel(new FileOutputChannel(sValue.trim()));
+               }
+
+               i++;
+            }
+         }
+      }
+      if (adjustOutputExtent(alg)) {
+         return alg;
+      }
+      else {
+         throw new OutputExtentNotSetException();
+      }
+
+
+   }
+
+
+   private static boolean adjustOutputExtent(final GeoAlgorithm alg) {
+
+      if (!alg.getUserCanDefineAnalysisExtent()) {
+         return true;
+      }
+
+      if (CommandLineData.getAutoExtent()) {
+         if (!alg.adjustOutputExtent()) {
+            return false;
+         }
+      }
+      else {
+         final AnalysisExtent ge = CommandLineData.getAnalysisExtent();
+         if (ge != null) {
+            alg.setAnalysisExtent(ge);
+         }
+         else {
+            return false;
+         }
+      }
+
+      return true;
+
+   }
+
+
+   private static boolean setParameter(final GeoAlgorithm alg,
+                                       final Parameter param,
+                                       final String sValue) {
+
+      try {
+         if (param instanceof ParameterDataObject) {
+            if (!sValue.equals("#")) {
+               final Object obj = SextanteGUI.getInputFactory().getInputFromName(sValue);
+               if (obj != null) {
+                  if (param instanceof ParameterVectorLayer) {
+                     if (!param.setParameterValue(obj)) {
+                        return false;
+                     }
+                  }
+                  else if (param instanceof ParameterRasterLayer) {
+                     param.setParameterValue(obj);
+                  }
+                  else if (param instanceof ParameterTable) {
+                     param.setParameterValue(obj);
+                  }
+               }
+               else {
+                  return false;
+               }
+            }
+            else {
+               final AdditionalInfoDataObject ai = (AdditionalInfoDataObject) param.getParameterAdditionalInfo();
+               if (ai.getIsMandatory()) {
+                  return false;
+               }
+               else {
+                  param.setParameterValue(null);
+               }
+            }
+         }
+         else if (param instanceof ParameterNumericalValue) {
+            if (!sValue.equals("#")) {
+               param.setParameterValue(new Double(Double.parseDouble(sValue)));
+            }
+         }
+         else if (param instanceof ParameterString) {
+            if (!sValue.equals("#")) {
+               param.setParameterValue(sValue);
+            }
+         }
+         else if (param instanceof ParameterString) {
+            param.setParameterValue(sValue);
+         }
+         else if (param instanceof ParameterFixedTable) {
+            return setParameterFixedTable(param, sValue);
+         }
+         else if (param instanceof ParameterBoolean) {
+            if (!sValue.equals("#")) {
+               boolean bValue;
+               if (sValue.equals("true")) {
+                  bValue = true;
+               }
+               else if (sValue.equals("false")) {
+                  bValue = false;
+               }
+               else {
+                  return false;
+               }
+               param.setParameterValue(new Boolean(bValue));
+            }
+         }
+         else if (param instanceof ParameterSelection) {
+            if (!sValue.equals("#")) {
+               final int iIndex = Integer.parseInt(sValue);
+               final AdditionalInfoSelection ai = (AdditionalInfoSelection) param.getParameterAdditionalInfo();
+               if ((iIndex < 0) || (iIndex > ai.getValues().length - 1)) {
+                  return false;
+               }
+               else {
+                  param.setParameterValue(new Integer(Integer.parseInt(sValue)));
+               }
+            }
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            if (!sValue.equals("#")) {
+               return setParameterMultipleInput(param, sValue);
+            }
+            else {
+               final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+               if (ai.getIsMandatory()) {
+                  return false;
+               }
+               else {
+                  param.setParameterValue(new ArrayList());
+               }
+            }
+         }
+         else if (param instanceof ParameterPoint) {
+            final StringTokenizer st = new StringTokenizer(sValue, ",");
+            if (st.countTokens() != 2) {
+               return false;
+            }
+            final double x = Double.parseDouble(st.nextToken());
+            final double y = Double.parseDouble(st.nextToken());
+            param.setParameterValue(new Point2D.Double(x, y));
+         }
+         else if (param instanceof ParameterTableField) {
+            final ParametersSet ps = alg.getParameters();
+            final AdditionalInfoTableField ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+            final String sParentName = ai.getParentParameterName();
+            final Parameter parent = ps.getParameter(sParentName);
+            if (parent == null) {
+               return false;
+            }
+            String[] sNames;
+            if (parent instanceof ParameterVectorLayer) {
+               final IVectorLayer vect = parent.getParameterValueAsVectorLayer();
+               sNames = vect.getFieldNames();
+            }
+            else if (parent instanceof ParameterTable) {
+               final ITable table = parent.getParameterValueAsTable();
+               sNames = table.getFieldNames();
+            }
+            else {
+               return false;
+            }
+
+            int iIndex = -1;
+            try {
+               iIndex = Integer.parseInt(sValue);
+            }
+            catch (final NumberFormatException nfe) {
+               for (int i = 0; i < sNames.length; i++) {
+                  if (sValue.equals(sNames[i])) {
+                     iIndex = i;
+                     break;
+                  }
+               }
+            }
+            if ((iIndex >= 0) && (iIndex < sNames.length)) {
+               param.setParameterValue(new Integer(iIndex));
+            }
+            else {
+               return false;
+            }
+         }
+         else if (param instanceof ParameterBand) {
+            final ParametersSet ps = alg.getParameters();
+            final AdditionalInfoBand ai = (AdditionalInfoBand) param.getParameterAdditionalInfo();
+            final String sParentName = ai.getParentParameterName();
+            final Parameter parent = ps.getParameter(sParentName);
+            if (parent == null) {
+               return false;
+            }
+            if (parent instanceof ParameterRasterLayer) {
+               final IRasterLayer raster = parent.getParameterValueAsRasterLayer();
+               final int iIndex = Integer.parseInt(sValue);
+               if ((iIndex > 0) && (iIndex <= raster.getBandsCount())) {
+                  param.setParameterValue(new Integer(iIndex - 1));
+               }
+               else {
+                  return false;
+               }
+            }
+            else {
+               return false;
+            }
+
+         }
+
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      return param.isParameterValueCorrect();
+
+   }
+
+
+   private static boolean setParameterFixedTable(final Parameter param,
+                                                 final String sValue) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel;
+      final StringTokenizer st = new StringTokenizer(sValue, ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      try {
+         ai = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         iRows = (st.countTokens() / iCols);
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iRows, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (iRows != ai.getRowsCount()) {
+               return false;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return false;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iRow = (int) Math.floor(iToken / (double) iCols);
+            iCol = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iRow, iCol);
+            iToken++;
+         }
+
+         param.setParameterValue(tableModel);
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private static boolean setParameterMultipleInput(final Parameter param,
+                                                    final String sValue) {
+
+      final ArrayList array = new ArrayList();
+      final StringTokenizer st = new StringTokenizer(sValue, ",");
+      String sToken;
+      Object obj = null;
+      AdditionalInfoMultipleInput ai;
+      int iType;
+      try {
+         ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+         iType = ai.getDataType();
+         while (st.hasMoreTokens()) {
+            sToken = st.nextToken().trim();
+            if (iType == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+               if (((IVectorLayer) obj).getShapeType() != IVectorLayer.SHAPE_TYPE_LINE) {
+                  return false;
+               }
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+               if (((IVectorLayer) obj).getShapeType() != IVectorLayer.SHAPE_TYPE_POLYGON) {
+                  return false;
+               }
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+               if (((IVectorLayer) obj).getShapeType() != IVectorLayer.SHAPE_TYPE_POLYGON) {
+                  return false;
+               }
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_TABLE) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+            }
+            else if (iType == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+               obj = SextanteGUI.getInputFactory().getInputFromName(sToken);
+               sToken = st.nextToken().trim();
+               final int iBand = Integer.parseInt(sToken) - 1;
+               if (obj != null) {
+                  if ((iBand >= 0) && (iBand < ((IRasterLayer) obj).getBandsCount())) {
+                     obj = new RasterLayerAndBand((IRasterLayer) obj, iBand);
+                  }
+                  else {
+                     return false;
+                  }
+               }
+            }
+            else {
+               return false;
+            }
+
+            if (obj == null) {
+               return false;
+            }
+            else {
+               array.add(obj);
+            }
+         }
+         param.setParameterValue(array);
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/Parser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CreateScriptToolboxAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CreateScriptToolboxAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CreateScriptToolboxAction.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gui.cmd;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+public class CreateScriptToolboxAction
+         extends
+            ToolboxAction {
+
+   @Override
+   public void execute() {
+
+      final ScriptEditingPanel panel = new ScriptEditingPanel();
+      SextanteGUI.getGUIFactory().showGenericDialog("Script", panel);
+
+   }
+
+
+   @Override
+   public String getGroup() {
+
+      return Sextante.getText("Tools");
+
+   }
+
+
+   @Override
+   public String getName() {
+
+      return Sextante.getText("CreateNewScript");
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CreateScriptToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/gettables.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/gettables.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/gettables.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class gettables {
+
+   public static String[] invoke(final Interpreter env,
+                                 final CallStack callstack) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final ITable[] tables = SextanteGUI.getInputFactory().getTables();
+      final String[] sNames = new String[tables.length];
+      for (int i = 0; i < tables.length; i++) {
+         sNames[i] = tables[i].getName();
+      }
+
+      return sNames;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/gettables.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/options.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/options.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/options.java	(revision 369)
@@ -0,0 +1,61 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterSelection;
+
+/**
+ * A command to show method values for selection parameters needed to run a geoalgorithm
+ *
+ * @author volaya
+ *
+ */
+public class options {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName) {
+
+      String s;
+      final StringBuffer sb = new StringBuffer();
+
+      final GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlgName);
+
+      if (alg == null) {
+         s = "Algorithm not found!";
+      }
+      else {
+         final ParametersSet ps = alg.getParameters();
+         for (int i = 0; i < ps.getNumberOfParameters(); i++) {
+            final Parameter param = ps.getParameter(i);
+            if (param instanceof ParameterSelection) {
+               try {
+                  final AdditionalInfoSelection ai = (AdditionalInfoSelection) param.getParameterAdditionalInfo();
+                  final String[] values = ai.getValues();
+                  sb.append(param.getParameterName() + "(" + param.getParameterDescription() + ")\n");
+                  for (int j = 0; j < values.length; j++) {
+                     sb.append("\t * " + Integer.toString(j) + " : " + values[j] + "\n");
+                  }
+               }
+               catch (final NullParameterAdditionalInfoException e) {}
+            }
+         }
+
+         s = sb.toString();
+
+         if (s.equals("")) {
+            s = "No selection parameters in this algorithm";
+         }
+      }
+
+      env.println(s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/options.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/autoextent.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/autoextent.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/autoextent.java	(revision 369)
@@ -0,0 +1,31 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.gui.cmd.CommandLineData;
+
+/**
+ * A BeanShell command to activate or deactivate the automatic computation of analysis extents
+ * 
+ * @author volaya
+ * 
+ */
+public class autoextent {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sBoolean) {
+
+      if (sBoolean.trim().equals("true")) {
+         CommandLineData.setAutoExtent(true);
+      }
+      else if (sBoolean.trim().equals("false")) {
+         CommandLineData.setAutoExtent(false);
+      }
+      else {
+         env.println("Wrong parameter: " + sBoolean);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/autoextent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describe.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describe.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describe.java	(revision 369)
@@ -0,0 +1,104 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A BeanShell command to describe a SEXTANTE data object
+ *
+ * @author volaya
+ *
+ */
+public class describe {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sName) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final Object obj = SextanteGUI.getInputFactory().getInputFromName(sName.trim());
+      if (obj == null) {
+         env.println("Invalid object: " + sName.trim());
+      }
+      if (obj instanceof ITable) {
+         env.println(describeTable((ITable) obj));
+      }
+      else if (obj instanceof IRasterLayer) {
+         env.println(describeRasterLayer((IRasterLayer) obj));
+      }
+      else if (obj instanceof IVectorLayer) {
+         env.println(describeVectorLayer((IVectorLayer) obj));
+      }
+
+   }
+
+
+   private static String describeTable(final ITable table) {
+
+      final StringBuffer sb = new StringBuffer();
+
+      final String sFields[] = table.getFieldNames();
+      sb.append("Type: Table\n");
+      sb.append("Number of records: " + Long.toString(table.getRecordCount()) + "\n");
+      sb.append("Table fields: | ");
+      for (int i = 0; i < sFields.length; i++) {
+         sb.append(sFields[i] + " | ");
+      }
+
+      return sb.toString();
+
+   }
+
+
+   private static String describeVectorLayer(final IVectorLayer vect) {
+
+      final StringBuffer sb = new StringBuffer();
+
+      sb.append("Type: Vector layer - ");
+      switch (vect.getShapeType()) {
+         case IVectorLayer.SHAPE_TYPE_LINE:
+            sb.append("Line\n");
+            break;
+         case IVectorLayer.SHAPE_TYPE_POLYGON:
+            sb.append("Polygon\n");
+            break;
+         case IVectorLayer.SHAPE_TYPE_POINT:
+            sb.append("Point\n");
+            break;
+      }
+      sb.append("Number of entities: " + Integer.toString(vect.getShapesCount()) + "\n");
+      sb.append("Table fields: | ");
+      final String[] sFields = vect.getFieldNames();
+      for (int i = 0; i < sFields.length; i++) {
+         sb.append(sFields[i] + " | ");
+      }
+
+      return sb.toString();
+
+   }
+
+
+   private static String describeRasterLayer(final IRasterLayer raster) {
+
+      final StringBuffer sb = new StringBuffer();
+      final AnalysisExtent extent = raster.getLayerGridExtent();
+
+      sb.append("Type: Raster layer \n");
+      sb.append("X min: " + Double.toString(extent.getXMin()) + "\n");
+      sb.append("X max: " + Double.toString(extent.getXMax()) + "\n");
+      sb.append("Y min: " + Double.toString(extent.getYMin()) + "\n");
+      sb.append("Y max: " + Double.toString(extent.getYMax()) + "\n");
+      sb.append("Cellsize X: " + Double.toString(extent.getCellSize()) + "\n");
+      sb.append("Rows: " + Integer.toString(extent.getNY()) + "\n");
+      sb.append("Cols: " + Integer.toString(extent.getNX()));
+
+      return sb.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describe.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getrasterlayers.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getrasterlayers.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getrasterlayers.java	(revision 369)
@@ -0,0 +1,25 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+public class getrasterlayers {
+
+   public static String[] invoke(final Interpreter env,
+                                 final CallStack callstack) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final IRasterLayer[] rasterLayers = SextanteGUI.getInputFactory().getRasterLayers();
+      final String[] sNames = new String[rasterLayers.length];
+      for (int i = 0; i < rasterLayers.length; i++) {
+         sNames[i] = rasterLayers[i].getName();
+      }
+
+      return sNames;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getrasterlayers.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/open.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/open.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/open.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.WrongViewNameException;
+
+/**
+ * A BeanShell command to open a file containing a layer or table
+ * 
+ * @author volaya
+ * 
+ */
+public class open {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sFilename,
+                             final String sName,
+                             final String sViewName) {
+
+      final IDataObject obj = SextanteGUI.getInputFactory().openDataObjectFromFile(sFilename);
+      if (obj == null) {
+         env.println("Could not open file: " + sFilename.trim());
+      }
+      else {
+         obj.setName(sName);
+         SextanteGUI.getInputFactory().addDataObject(obj);
+         try {
+            SextanteGUI.getGUIFactory().addToView(obj, sViewName);
+         }
+         catch (final WrongViewNameException e) {
+            env.println("Wrong view name");
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/open.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getvectorlayers.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getvectorlayers.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getvectorlayers.java	(revision 369)
@@ -0,0 +1,25 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.core.AbstractInputFactory;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class getvectorlayers {
+
+   public static String[] invoke(final Interpreter env,
+                                 final CallStack callstack) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final IVectorLayer[] vectorLayers = SextanteGUI.getInputFactory().getVectorLayers(AbstractInputFactory.SHAPE_TYPE_ANY);
+      final String[] sNames = new String[vectorLayers.length];
+      for (int i = 0; i < vectorLayers.length; i++) {
+         sNames[i] = vectorLayers[i].getName();
+      }
+
+      return sNames;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/getvectorlayers.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/setnodata.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/setnodata.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/setnodata.java	(revision 369)
@@ -0,0 +1,36 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A BeanShell command to set the nodata value of a raster layer
+ *
+ * @author volaya
+ *
+ */
+public class setnodata {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sName,
+                             final double dNoDataValue) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final Object obj = SextanteGUI.getInputFactory().getInputFromName(sName.trim());
+      if (obj == null) {
+         env.println("Invalid object: " + sName.trim());
+      }
+      else if (obj instanceof IRasterLayer) {
+         final IRasterLayer layer = (IRasterLayer) obj;
+         layer.setNoDataValue(dNoDataValue);
+      }
+      else {
+         env.println("Object must be a raster layer");
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/setnodata.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describealg.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describealg.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describealg.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A BeanShell command to describe SEXTANTE algorithms
+ *
+ * @author volaya
+ *
+ */
+public class describealg {
+
+   /**
+    * Describes a geoalgorithm.
+    *
+    * @param env
+    *                the beanshell interpreter
+    * @param callstack
+    *                the call stack
+    * @param sAlgName
+    *                the command-line name of the algorithm
+    */
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName) {
+
+      final GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlgName);
+      if (alg != null) {
+         env.println(alg.getCommandLineHelp());
+      }
+      else {
+         env.println("Algoritmo_no_encontrado");
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/describealg.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/close.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/close.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/close.java	(revision 369)
@@ -0,0 +1,26 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class close {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sName) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final Object obj = SextanteGUI.getInputFactory().getInputFromName(sName.trim());
+      if (obj == null) {
+         env.println("Invalid object: " + sName.trim());
+      }
+      else if (obj instanceof IDataObject) {
+         final IDataObject layer = (IDataObject) obj;
+         SextanteGUI.getInputFactory().close(layer.getName());
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/close.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/algs.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/algs.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/algs.java	(revision 369)
@@ -0,0 +1,67 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A BeanShell command to show all available SEXTANTE algorithms
+ * 
+ * @author volaya
+ * 
+ */
+public class algs {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack) {
+
+      int i;
+
+      final HashMap<String, HashMap<String, GeoAlgorithm>> map = Sextante.getAlgorithms();
+      final Set<String> set = map.keySet();
+      final Iterator<String> iter = set.iterator();
+
+      final ArrayList<ObjectAndDescription> list = new ArrayList<ObjectAndDescription>();
+      while (iter.hasNext()) {
+         final HashMap<String, GeoAlgorithm> map2 = map.get(iter.next());
+         final Set<String> set2 = map2.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final GeoAlgorithm alg = map2.get(iter2.next());
+            list.add(new ObjectAndDescription(alg.getName(), alg.getCommandLineName()));
+         }
+      }
+
+      final ObjectAndDescription[] algs = list.toArray(new ObjectAndDescription[0]);
+      Arrays.sort(algs);
+
+      final StringBuffer sb = new StringBuffer();
+      for (i = 0; i < algs.length; i++) {
+         try {
+            sb.append(getfixedLengthString(algs[i].getDescription()) + ": ");
+            sb.append((String) algs[i].getObject() + "\n");
+         }
+         catch (final Exception e) {}
+      }
+      sb.append("\n" + Integer.toString(algs.length) + " algorithms found");
+
+      env.println(sb.toString());
+
+   }
+
+
+   private static String getfixedLengthString(final String s) {
+
+      final String sResult = s + "--------------------------------------------------------------------";
+
+      return sResult.substring(0, 50);
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/algs.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/extent.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/extent.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/extent.java	(revision 369)
@@ -0,0 +1,119 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import java.awt.geom.Rectangle2D;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.cmd.CommandLineData;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A BeanShell command to change the grid extent used to generate new raster layers from SEXTANTE algorithms
+ * 
+ * @author volaya
+ * 
+ */
+public class extent {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sLayer) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      try {
+         final ILayer layer = (ILayer) SextanteGUI.getInputFactory().getInputFromName(sLayer);
+         if ((layer instanceof I3DRasterLayer) || (layer instanceof IRasterLayer)) {
+            CommandLineData.setAnalysisExtent(new AnalysisExtent(layer));
+         }
+         else {
+            env.println("Wrong layer:" + sLayer.trim());
+         }
+      }
+      catch (final ClassCastException e) {
+         env.println("Wrong layer:" + sLayer.trim());
+      }
+
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sLayer,
+                             final double dCellSize) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      try {
+         final IVectorLayer layer = (IVectorLayer) SextanteGUI.getInputFactory().getInputFromName(sLayer);
+         final AnalysisExtent ge = new AnalysisExtent();
+         ge.setCellSize(dCellSize);
+         final Rectangle2D rect = layer.getFullExtent();
+         ge.setXRange(rect.getMinX(), rect.getMaxX(), true);
+         ge.setYRange(rect.getMinY(), rect.getMaxY(), true);
+         CommandLineData.setAnalysisExtent(ge);
+      }
+      catch (final ClassCastException e) {
+         env.println("Wrong layer:" + sLayer.trim());
+      }
+      catch (final Exception e) {
+         env.println("Could not set analysis extent");
+      }
+
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final double xMin,
+                             final double yMin,
+                             final double xMax,
+                             final double yMax,
+                             final double dCellSize) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      try {
+         final AnalysisExtent ge = new AnalysisExtent();
+         ge.setCellSize(dCellSize);
+         ge.setXRange(xMin, xMax, true);
+         ge.setYRange(yMin, yMax, true);
+         CommandLineData.setAnalysisExtent(ge);
+      }
+      catch (final NumberFormatException e) {
+         env.print("Wrong dimensions");
+      }
+
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final double xMin,
+                             final double yMin,
+                             final double zMin,
+                             final double xMax,
+                             final double yMax,
+                             final double zMax,
+                             final double dCellSize,
+                             final double dCellSizeZ) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      try {
+         final AnalysisExtent ae = new AnalysisExtent();
+         ae.setCellSize(dCellSize);
+         ae.setXRange(xMin, xMax, true);
+         ae.setYRange(yMin, yMax, true);
+         ae.setCellSizeZ(dCellSizeZ);
+         ae.setZRange(zMin, zMax, true);
+         CommandLineData.setAnalysisExtent(ae);
+      }
+      catch (final NumberFormatException e) {
+         env.print("Wrong dimensions");
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/extent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/rename.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/rename.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/rename.java	(revision 369)
@@ -0,0 +1,31 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A BeanShell command to rename a SEXTANTE data object
+ *
+ * @author volaya
+ *
+ */
+public class rename {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sName,
+                             final String sNewName) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final Object obj = SextanteGUI.getInputFactory().getInputFromName(sName.trim());
+      if (obj == null) {
+         env.println("Invalid object: " + sName.trim());
+      } else if (obj instanceof IDataObject) {
+         ((IDataObject) obj).setName(sNewName);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/rename.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/runalg.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/runalg.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/runalg.java	(revision 369)
@@ -0,0 +1,308 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import bsh.CallStack;
+import bsh.EvalError;
+import bsh.Interpreter;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.gui.cmd.Parser;
+import es.unex.sextante.gui.core.GeoAlgorithmExecutors;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.AlgorithmNotFoundException;
+import es.unex.sextante.gui.exceptions.CommandLineException;
+import es.unex.sextante.gui.exceptions.OutputExtentNotSetException;
+import es.unex.sextante.gui.history.History;
+
+/**
+ * A BeanShell command to execute SEXTANTE algorithms
+ * 
+ * @author volaya
+ * 
+ */
+public class runalg {
+
+   /**
+    * BeanShell does not work well with varargs, so this methods are a quick (and dirty) solution for algorithms requiring up to
+    * 10 parameters
+    * 
+    * @throws EvalError
+    * 
+    */
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName) {
+      final String[] sArgs = new String[0];
+      invoke(env, callstack, sAlgName, sArgs);
+
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1) {
+      final Object[] sArgs = { p1 };
+      invoke(env, callstack, sAlgName, sArgs);
+
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2) {
+      final Object[] sArgs = { p1, p2 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3) {
+      final Object[] sArgs = { p1, p2, p3 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4) {
+      final Object[] sArgs = { p1, p2, p3, p4 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7,
+                             final Object p8) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7, p8 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7,
+                             final Object p8,
+                             final Object p9) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7, p8, p9 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7,
+                             final Object p8,
+                             final Object p9,
+                             final Object p10) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7,
+                             final Object p8,
+                             final Object p9,
+                             final Object p10,
+                             final Object p11) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object p1,
+                             final Object p2,
+                             final Object p3,
+                             final Object p4,
+                             final Object p5,
+                             final Object p6,
+                             final Object p7,
+                             final Object p8,
+                             final Object p9,
+                             final Object p10,
+                             final Object p11,
+                             final Object p12) {
+      final Object[] sArgs = { p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12 };
+      invoke(env, callstack, sAlgName, sArgs);
+   }
+
+
+   /**
+    * Runs a geoalgorithm with a set of parameter values.
+    * 
+    * @param env
+    *                the beanshell interpreter
+    * @param callstack
+    *                the call stack
+    * @param sAlgName
+    *                the command-line name of the algorithm
+    * @param args
+    *                the parameter values
+    * @throws EvalError
+    */
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack,
+                             final String sAlgName,
+                             final Object[] args) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final String[] sArgs = new String[args.length];
+      for (int i = 0; i < args.length; i++) {
+         sArgs[i] = args[i].toString();
+      }
+      try {
+         final GeoAlgorithm alg = Parser.getAlgorithm(sAlgName, sArgs);
+         try {
+            final String[] cmd = alg.getAlgorithmAsCommandLineSentences();
+            if (cmd != null) {
+               History.addToHistory(cmd);
+            }
+            boolean bReturn = GeoAlgorithmExecutors.executeForCommandLine(alg, SextanteGUI.getLastCommandOriginParentDialog());
+            if (!bReturn) {
+               Sextante.addWarningToLog("Process canceled!");
+               showError(env, "Process canceled!");
+               return;
+            }
+            else {
+               if (SextanteGUI.getLastCommandOrigin() == SextanteGUI.HISTORY) {
+                  SextanteGUI.getGUIFactory().updateHistory();
+               }
+            }
+         }
+         catch (final GeoAlgorithmExecutionException e) {
+            Sextante.addErrorToLog(e);
+            showError(env, e.getMessage());
+         }
+      }
+      catch (final AlgorithmNotFoundException e) {
+         Sextante.addErrorToLog(e);
+         showError(env, e.getMessage());
+      }
+      catch (final OutputExtentNotSetException e) {
+         Sextante.addErrorToLog(e);
+         showError(env, e.getMessage());
+      }
+      catch (final CommandLineException e) {
+         Sextante.addErrorToLog(e);
+         showError(env, e.getMessage());
+         final GeoAlgorithm alg = Sextante.getAlgorithmFromCommandLineName(sAlgName);
+         if (alg != null) {
+            showError(env, alg.getCommandLineHelp());
+         }
+      }
+
+   }
+
+
+   private static void showError(final Interpreter env,
+                                 final String sMessage) {
+
+      if (SextanteGUI.getLastCommandOrigin() == SextanteGUI.HISTORY) {
+         try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+               public void run() {
+                  JOptionPane.showMessageDialog(null, sMessage, Sextante.getText("Warning"), JOptionPane.ERROR_MESSAGE);
+               }
+            });
+         }
+         catch (final Exception e) {}
+
+      }
+      else {
+         env.println(sMessage);
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/runalg.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/data.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/data.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/data.java	(revision 369)
@@ -0,0 +1,49 @@
+package es.unex.sextante.gui.cmd.bshcommands;
+
+import bsh.CallStack;
+import bsh.Interpreter;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * A BeanShell command to show the available data object with which SEXTANTE could work
+ *
+ * @author volaya
+ *
+ */
+public class data {
+
+   public static void invoke(final Interpreter env,
+                             final CallStack callstack) {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+      final StringBuffer sb = new StringBuffer();
+      final IRasterLayer[] rasterLayers = SextanteGUI.getInputFactory().getRasterLayers();
+      sb.append("RASTER LAYERS\n");
+      sb.append("-----------------\n");
+      for (int i = 0; i < rasterLayers.length; i++) {
+         sb.append(rasterLayers[i].getName() + "\n");
+      }
+      sb.append("\n");
+      sb.append("VECTOR LAYERS\n");
+      sb.append("-----------------\n");
+      final IVectorLayer[] vectorLayers = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+      for (int i = 0; i < vectorLayers.length; i++) {
+         sb.append(vectorLayers[i].getName() + "\n");
+      }
+      sb.append("\n");
+      sb.append("TABLES\n");
+      sb.append("-----------------\n");
+      final ITable[] tables = SextanteGUI.getInputFactory().getTables();
+      for (int i = 0; i < tables.length; i++) {
+         sb.append(tables[i].getName() + "\n");
+      }
+      sb.append("\n");
+      env.println(sb.toString());
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/bshcommands/data.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptsIO.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptsIO.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptsIO.java	(revision 369)
@@ -0,0 +1,53 @@
+
+
+package es.unex.sextante.gui.cmd;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.exceptions.WrongScriptException;
+
+
+public class ScriptsIO {
+
+   private static String[] m_sFiles = new String[0];
+
+
+   public static GeoAlgorithm[] loadScriptsAsAlgorithms(final String sFolder) {
+
+      final ArrayList<GeoAlgorithm> list = new ArrayList<GeoAlgorithm>();
+      final ArrayList<String> fileList = new ArrayList<String>();
+      final File folder = new File(sFolder);
+      final String[] files = folder.list();
+      if (files != null) {
+         for (int i = 0; i < files.length; i++) {
+            if (files[i].endsWith("bsh")) {
+               final ScriptAlgorithm alg = new ScriptAlgorithm();
+               try {
+                  alg.initialize(files[i]);
+                  list.add(alg);
+                  fileList.add(sFolder + File.separator + files[i]);
+               }
+               catch (final WrongScriptException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+         m_sFiles = fileList.toArray(new String[0]);
+         return list.toArray(new GeoAlgorithm[0]);
+      }
+      else {
+         return new GeoAlgorithm[0];
+      }
+
+   }
+
+
+   public static String[] getScriptFiles() {
+
+      return m_sFiles;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptsIO.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CommandLineData.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CommandLineData.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CommandLineData.java	(revision 369)
@@ -0,0 +1,40 @@
+package es.unex.sextante.gui.cmd;
+
+import es.unex.sextante.core.AnalysisExtent;
+
+public class CommandLineData {
+
+   private static boolean        m_bAutoExtent = true;
+   private static AnalysisExtent m_GridExtent  = null;
+
+
+   public static boolean getAutoExtent() {
+
+      return m_bAutoExtent;
+
+   }
+
+
+   public static void setAutoExtent(final boolean b) {
+
+      m_bAutoExtent = b;
+
+   }
+
+
+   public static AnalysisExtent getAnalysisExtent() {
+
+      return m_GridExtent;
+
+   }
+
+
+   public static void setAnalysisExtent(final AnalysisExtent extent) {
+
+      m_bAutoExtent = false;
+      m_GridExtent = extent;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/CommandLineData.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/DeleteScriptAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/DeleteScriptAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/DeleteScriptAction.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gui.cmd;
+
+import java.io.File;
+
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class DeleteScriptAction
+         implements
+            IToolboxRightButtonAction {
+
+   public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) {
+
+      return alg instanceof ScriptAlgorithm;
+
+   }
+
+   public void execute(final GeoAlgorithm alg) {
+
+      int deleteScriptResult = JOptionPane.showConfirmDialog(null, Sextante.getText("are_you_sure_to_delete_the_selected_script"), Sextante.getText("Warning"), JOptionPane.YES_NO_OPTION);
+      if (deleteScriptResult == JOptionPane.YES_OPTION) {
+         final ScriptAlgorithm script = (ScriptAlgorithm) alg;
+         final File file = new File(script.getFilename());
+         file.delete();
+         SextanteGUI.updateAlgorithmProvider(ScriptAlgorithmProvider.class);
+         SextanteGUI.getGUIFactory().updateToolbox();
+      }
+
+   }
+
+   public String getDescription() {
+
+      return Sextante.getText("Delete");
+
+   }
+
+}
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,149 @@
+package es.unex.sextante.gui.cmd;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteScriptsSettings;
+
+public class ScriptAlgorithmProvider
+         implements
+            IAlgorithmProvider {
+
+   private HashMap<String, GeoAlgorithm> m_Algs;
+
+   private final static ImageIcon        SCRIPT_ICON = new ImageIcon(ScriptAlgorithmProvider.class.getClassLoader().getResource(
+                                                              "images/terminal.png"));
+
+
+   public HashMap<String, GeoAlgorithm> getAlgorithms() {
+
+      return m_Algs;
+
+   }
+
+
+   public HashMap<String, Class> getCustomModelerParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public HashMap<String, Class> getCustomParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public ImageIcon getIcon() {
+
+      return SCRIPT_ICON;
+
+   }
+
+
+   public String getName() {
+
+      return Sextante.getText("Scripts");
+
+   }
+
+
+   public void initialize() {
+
+      m_Algs = new HashMap<String, GeoAlgorithm>();
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+      ScriptAlgorithm.resetInterpreter();
+      final GeoAlgorithm[] algs = ScriptsIO.loadScriptsAsAlgorithms(sFolder);
+
+      for (int i = 0; i < algs.length; i++) {
+         m_Algs.put(algs[i].getCommandLineName(), algs[i]);
+      }
+
+   }
+
+
+   public Setting getSettings() {
+
+      return new SextanteScriptsSettings();
+
+   }
+
+
+   public void update() {
+
+      initialize();
+
+   }
+
+
+   public String getAlgorithmHelp(final GeoAlgorithm alg) {
+
+      final String sScriptFilename = ((ScriptAlgorithm) alg).getFilename();
+      String sFilename = sScriptFilename.substring(sScriptFilename.lastIndexOf(File.separator));
+      sFilename = sFilename + ".xml";
+      final String sPath = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+      final String sFullPath = sPath + File.separator + sFilename;
+      return HelpIO.getHelpAsHTMLCode(alg, sFullPath);
+
+   }
+
+
+   public String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                          final boolean bForceCurrentLocale) {
+
+      final String sScriptFilename = ((ScriptAlgorithm) alg).getFilename();
+      String sFilename = sScriptFilename.substring(sScriptFilename.lastIndexOf(File.separator));
+      sFilename = sFilename + ".xml";
+      final String sPath = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+      final String sFullPath = sPath + File.separator + sFilename;
+
+      return sFullPath;
+
+   }
+
+
+   public boolean canEditHelp() {
+
+      return true;
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      final HashMap<NameAndIcon, ArrayList<ToolboxAction>> map = new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+      final NameAndIcon nai = new NameAndIcon(Sextante.getText("Scripts"), SCRIPT_ICON);
+      final ArrayList<ToolboxAction> list = new ArrayList<ToolboxAction>();
+      list.add(new CreateScriptToolboxAction());
+      list.add(new OpenCommandLineInterfaceAction());
+      map.put(nai, list);
+
+      return map;
+
+
+   }
+
+
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+      return new IToolboxRightButtonAction[] { new EditScriptAction(), new DeleteScriptAction() };
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/OpenCommandLineInterfaceAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/OpenCommandLineInterfaceAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/OpenCommandLineInterfaceAction.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.gui.cmd;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+public class OpenCommandLineInterfaceAction
+         extends
+            ToolboxAction {
+
+   @Override
+   public void execute() {
+
+      SextanteGUI.getGUIFactory().showCommandLineDialog();
+
+   }
+
+
+   @Override
+   public String getGroup() {
+
+      return Sextante.getText("Tools");
+
+   }
+
+
+   @Override
+   public String getName() {
+
+      return Sextante.getText("OpenCommandLineInterface");
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/OpenCommandLineInterfaceAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/EditScriptAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/EditScriptAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/EditScriptAction.java	(revision 369)
@@ -0,0 +1,36 @@
+package es.unex.sextante.gui.cmd;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteScriptsSettings;
+import java.io.File;
+
+public class EditScriptAction
+    implements
+    IToolboxRightButtonAction {
+
+    @Override
+    public void execute(final GeoAlgorithm alg) {
+        ScriptEditingPanel panel = new ScriptEditingPanel(SextanteGUI.getSettingParameterValue(
+            SextanteScriptsSettings.SCRIPTS_FOLDER) + File.separator + alg.getName() + ".bsh"
+        );
+        SextanteGUI.getGUIFactory().showGenericDialog("Script", panel);
+    }
+
+    @Override
+    public String getDescription() {
+
+        return Sextante.getText("Edit");
+
+    }
+
+    @Override
+    public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) {
+
+        return alg instanceof ScriptAlgorithm;
+
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/EditScriptAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptEditingPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptEditingPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptEditingPanel.java	(revision 369)
@@ -0,0 +1,212 @@
+package es.unex.sextante.gui.cmd;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteScriptsSettings;
+
+public class ScriptEditingPanel
+         extends
+            JPanel {
+
+   private String      m_sFilename;
+   private JButton     jButtonOpen;
+   private JTextArea   jScriptTextArea;
+   private JScrollPane jScrollPaneTextArea;
+   private JButton     jButtonSave;
+
+
+   public ScriptEditingPanel() {
+
+      super();
+
+      initGUI();
+
+   }
+
+
+   public ScriptEditingPanel(final String sScriptFilename) {
+
+      super();
+
+      m_sFilename = sScriptFilename;
+
+      initGUI();
+
+      openFromFile(new File(sScriptFilename));
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout layout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 70.0, 5.0, 70.0, 5 },
+               { TableLayoutConstants.FILL, 5.0, 25.0, 5.0 } });
+      layout.setHGap(5);
+      layout.setVGap(5);
+
+      this.setLayout(layout);
+
+      this.setPreferredSize(new Dimension(600, 500));
+      this.setSize(new Dimension(600, 500));
+      jScriptTextArea = new JTextArea();
+      jScriptTextArea.setEditable(true);
+      jScriptTextArea.setLineWrap(false);
+      jScrollPaneTextArea = new JScrollPane(jScriptTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
+               ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      this.add(jScrollPaneTextArea, "0,0,4,0");
+      jScriptTextArea.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+      jButtonOpen = new JButton(Sextante.getText("Open"));
+      this.add(jButtonOpen, "1, 2");
+      jButtonOpen.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent e) {
+            open();
+         }
+      });
+
+      jButtonSave = new JButton(Sextante.getText("Save"));
+      this.add(jButtonSave, "3, 2");
+      jButtonSave.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent e) {
+            save();
+         }
+      });
+
+
+   }
+
+
+   protected void save() {
+
+      final JFileChooser fc = new JFileChooser();
+      final GenericFileFilter filter = new GenericFileFilter("bsh", Sextante.getText("BeanShell_script"));
+      fc.setFileFilter(filter);
+      if (m_sFilename != null) {
+    	  File file = null;
+    	  if(m_sFilename.endsWith(".bsh")){
+    		  file = new File(m_sFilename);
+    	  } else {
+    		  file = new File(m_sFilename+".bsh");
+    	  }
+         fc.setSelectedFile(file);
+      }
+      else {
+         final String sFolder = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+         fc.setCurrentDirectory(new File(sFolder));
+      }
+      final int returnVal = fc.showSaveDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final File file = fc.getSelectedFile();
+         m_sFilename = file.getAbsolutePath();
+         if(!m_sFilename.endsWith(".bsh")){
+        	 m_sFilename = m_sFilename+".bsh";
+         }
+         saveToFile();
+         SextanteGUI.updateAlgorithmProvider(ScriptAlgorithmProvider.class);
+         SextanteGUI.getGUIFactory().updateToolbox();
+      }
+
+   }
+
+
+   private void saveToFile() {
+
+      Writer output = null;
+      try {
+         output = new BufferedWriter(new FileWriter(m_sFilename));
+         output.write(jScriptTextArea.getText());
+
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+
+   }
+
+
+   protected void open() {
+
+      final JFileChooser fc = new JFileChooser();
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
+      fc.setFileFilter(new GenericFileFilter("bsh", Sextante.getText("BeanShell_script")));
+      fc.setCurrentDirectory(new File(sFolder));
+      final int returnVal = fc.showOpenDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         final File file = fc.getSelectedFile();
+         openFromFile(file);
+
+      }
+
+
+   }
+
+
+   private void openFromFile(final File file) {
+
+
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(file));
+         final StringBuffer sText = new StringBuffer();
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            sText.append(sLine + "\n");
+         }
+         jScriptTextArea.setText(sText.toString());
+      }
+      catch (final FileNotFoundException e) {}
+      catch (final IOException e) {}
+      finally {
+         try {
+            if (input != null) {
+               input.close();
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/ScriptEditingPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AnalysisExtentPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AnalysisExtentPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AnalysisExtentPanel.java	(revision 369)
@@ -0,0 +1,686 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.geom.Rectangle2D;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.NamedExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+import es.unex.sextante.gui.grass.GrassAlgorithm;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputRasterLayer;
+
+/**
+ * A panel to select a extent to be used for generating output layers from a
+ * given algorithm
+ * 
+ * @author volaya
+ */
+public class AnalysisExtentPanel extends javax.swing.JPanel {
+
+  protected static final int BIG_SIZE = 10000000;
+
+  private JTextField jTextFieldCols;
+
+  private JTextField jTextFieldRows;
+
+  protected JTextField jTextFieldCellSize;
+
+  protected JTextField jTextFieldXMax;
+
+  protected JTextField jTextFieldXMin;
+
+  protected JTextField jTextFieldYMax;
+
+  protected JTextField jTextFieldYMin;
+
+  private JLabel jLabelRowsCols;
+
+  private JLabel jLabelCellSize;
+
+  private JLabel jLabelRangeY;
+
+  private JLabel jLabelRangeX;
+
+  protected JComboBox jComboBoxLayers;
+
+  private JComboBox jComboBoxViews;
+
+  protected JPanel jPanelAnalysisExtentValues;
+
+  private JPanel jPanelAnalysisExtentOptions;
+
+  private JRadioButton jRadioButtonAdjustToInputDataExtent;
+
+  private JRadioButton jRadioButtonViewExtent;
+
+  private JRadioButton jRadioButtonUserDefinedExtent;
+
+  private JRadioButton jRadioButtonExtentFromLayer;
+
+  private ButtonGroup jButtonGroup;
+
+  protected final GeoAlgorithm m_Algorithm;
+
+  protected final ILayer[] m_Layers;
+
+  /**
+   * Creates a new panel
+   * 
+   * @param algorithm the algorithm
+   */
+  public AnalysisExtentPanel(final GeoAlgorithm algorithm) {
+
+    super();
+
+    m_Layers = SextanteGUI.getInputFactory().getLayers();
+    m_Algorithm = algorithm;
+
+    initGUI();
+
+  }
+
+  private void initGUI() {
+
+    final TableLayout jPanelParametersRasterLayout = new TableLayout(
+        new double[][] {
+            { 1.0, TableLayoutConstants.FILL, 1.0 },
+            { 1.0, TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, 1.0 } });
+    jPanelParametersRasterLayout.setHGap(5);
+    jPanelParametersRasterLayout.setVGap(5);
+    this.setLayout(jPanelParametersRasterLayout);
+
+    this.add(getJPanelAnalysisExtentOptions(), "1, 1");
+    this.add(getJPanelAnalysisExtentValues(), "1, 2");
+    if (m_Algorithm.canDefineOutputExtentFromInput()) {
+      getJPanelAnalysisExtentValues().setVisible(false);
+    }
+    else {
+      getJPanelAnalysisExtentValues().setVisible(true);
+    }
+
+  }
+
+  /**
+   * Assigns the selected extent to the algorithm
+   * 
+   * @throws TooLargeGridExtentException if the dimensions of the extent are too
+   *           large (too many cells) and the user should be queried to make
+   *           sure that the input values are correct
+   * @throws WrongAnalysisExtentException if the input values are not correct
+   */
+  public void assignExtent() throws TooLargeGridExtentException,
+      WrongAnalysisExtentException {
+
+    m_Algorithm.setAnalysisExtent((AnalysisExtent) null);
+
+    if (getJRadioButtonAdjustToInputDataExtent().isSelected()) {
+      if (!m_Algorithm.adjustOutputExtent()) {
+        throw new WrongAnalysisExtentException(
+            Sextante.getText("Wrong_or_missing_region"));
+      }
+      else {
+        return;
+      }
+
+    }
+
+    final AnalysisExtent outputExtent = new AnalysisExtent();
+    boolean recalculateForCell = m_Algorithm.getRecalculateForCell();
+    try {
+      outputExtent
+          .setCellSize(Double.parseDouble(jTextFieldCellSize.getText()));
+      outputExtent.setXRange(Double.parseDouble(jTextFieldXMin.getText()),
+          Double.parseDouble(jTextFieldXMax.getText()), recalculateForCell);
+      outputExtent.setYRange(Double.parseDouble(jTextFieldYMin.getText()),
+          Double.parseDouble(jTextFieldYMax.getText()), recalculateForCell);
+      m_Algorithm.setAnalysisExtent(outputExtent);
+    }
+    catch (final NumberFormatException e) {
+      // Sextante.addErrorToLog(e);
+      if (m_Algorithm instanceof GrassAlgorithm) {
+        // GRASS vector output modules can always fall back to a default extent
+        outputExtent.setXRange(0.0, 1.0, true);
+        outputExtent.setYRange(0.0, 1.0, true);
+        m_Algorithm.setAnalysisExtent(outputExtent);
+        if (m_Algorithm.getName().contains("v.in.region")) {
+          // we absolutely need a region for these commands!
+          throw new WrongAnalysisExtentException(
+              Sextante.getText("Wrong_or_missing_region"));
+        }
+        for (int i = 0; i < m_Algorithm.getNumberOfOutputObjects(); i++) {
+          final Output out = m_Algorithm.getOutputObjects().getOutput(i);
+          // Raster import modules also do not need an extent setting
+          if ((out instanceof OutputRasterLayer)
+              && !m_Algorithm.getName().contains("r.in.")) {
+            // But if we have another raster output, then we need an extent!
+            throw new WrongAnalysisExtentException(
+                Sextante.getText("Wrong_or_missing_region"));
+          }
+        }
+      }
+      else {
+        throw new WrongAnalysisExtentException(
+            Sextante.getText("Wrong_or_missing_raster_extent_definition"));
+      }
+    }
+
+    final int numCells = outputExtent.getNX() * outputExtent.getNY();
+    /*
+     * benducke: let's just assume the other knows what (s)he is doing... if
+     * ((numCells > BIG_SIZE) || (Integer.MAX_VALUE / outputExtent.getNY() <
+     * outputExtent.getNX())) { throw new
+     * TooLargeGridExtentException(Sextante.getText
+     * ("The_selected_grid_extent_seems_too_large") + "(" +
+     * Integer.toString(outputExtent.getNX()) + " X " +
+     * Integer.toString(outputExtent.getNY()) + ")\n" +
+     * Sextante.getText("Are_you_sure_you_want_to_use_it?")); }
+     */
+  }
+
+  private ButtonGroup getJButtonGroup() {
+
+    if (jButtonGroup == null) {
+      jButtonGroup = new ButtonGroup();
+    }
+    return jButtonGroup;
+
+  }
+
+  protected JRadioButton getJRadioButtonUserDefinedExtent() {
+
+    if (jRadioButtonUserDefinedExtent == null) {
+      jRadioButtonUserDefinedExtent = new JRadioButton();
+      jRadioButtonUserDefinedExtent.setText(Sextante.getText("User_defined"));
+      jRadioButtonUserDefinedExtent
+          .addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed(final java.awt.event.ActionEvent e) {
+              setTextFieldsEnabled(true);
+              extentHasChanged();
+            }
+          });
+    }
+
+    return jRadioButtonUserDefinedExtent;
+  }
+
+  protected JRadioButton getJRadioButtonAdjustToInputDataExtent() {
+
+    if (jRadioButtonAdjustToInputDataExtent == null) {
+      jRadioButtonAdjustToInputDataExtent = new JRadioButton();
+      jRadioButtonAdjustToInputDataExtent.setText(Sextante
+          .getText("Fit_to_input_layers"));
+      jRadioButtonAdjustToInputDataExtent
+          .addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed(final java.awt.event.ActionEvent e) {
+              getJPanelAnalysisExtentValues().setVisible(false);
+            }
+          });
+    }
+
+    return jRadioButtonAdjustToInputDataExtent;
+  }
+
+  private JRadioButton getJRadioButtonViewExtent() {
+    if (jRadioButtonViewExtent == null) {
+      jRadioButtonViewExtent = new JRadioButton();
+      jRadioButtonViewExtent.setText(Sextante.getText("Use_extent_from_view"));
+      jRadioButtonViewExtent
+          .addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed(final java.awt.event.ActionEvent evt) {
+              try {
+                getJComboBoxViews().setSelectedIndex(
+                    getJComboBoxViews().getSelectedIndex());
+                setTextFieldsEnabled(false);
+              }
+              catch (final Exception e) {}
+            }
+          });
+    }
+    return jRadioButtonViewExtent;
+  }
+
+  JRadioButton getJRadioButtonExtentFromLayer() {
+    if (jRadioButtonExtentFromLayer == null) {
+      jRadioButtonExtentFromLayer = new JRadioButton();
+      jRadioButtonExtentFromLayer.setText(Sextante
+          .getText("Use_extent_from_layer"));
+      jRadioButtonExtentFromLayer
+          .addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed(final java.awt.event.ActionEvent e) {
+              getJComboBoxLayers().setSelectedIndex(
+                  getJComboBoxLayers().getSelectedIndex());
+              setTextFieldsEnabled(false);
+            }
+          });
+    }
+    return jRadioButtonExtentFromLayer;
+  }
+
+  protected JPanel getJPanelAnalysisExtentOptions() {
+    if (jPanelAnalysisExtentOptions == null) {
+      jPanelAnalysisExtentOptions = new JPanel();
+      final TableLayout jPanelRasterExtentOptionsLayout = new TableLayout(
+          new double[][] {
+              { 253.0, TableLayoutConstants.FILL },
+              { TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                  TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM } });
+      jPanelRasterExtentOptionsLayout.setHGap(5);
+      jPanelRasterExtentOptionsLayout.setVGap(5);
+      jPanelAnalysisExtentOptions.setLayout(jPanelRasterExtentOptionsLayout);
+      jPanelAnalysisExtentOptions.setPreferredSize(new java.awt.Dimension(660,
+          200));
+      jPanelAnalysisExtentOptions.setBorder(BorderFactory
+          .createTitledBorder(Sextante.getText("Extent_from")));
+      jPanelAnalysisExtentOptions.add(getJRadioButtonUserDefinedExtent(),
+          "0, 1");
+      jPanelAnalysisExtentOptions.add(getJRadioButtonViewExtent(), "0, 2");
+      jPanelAnalysisExtentOptions.add(getJRadioButtonExtentFromLayer(), "0, 3");
+      getJButtonGroup().add(getJRadioButtonUserDefinedExtent());
+      getJButtonGroup().add(getJRadioButtonViewExtent());
+      getJButtonGroup().add(getJRadioButtonExtentFromLayer());
+      if (m_Algorithm.canDefineOutputExtentFromInput()) {
+        jPanelAnalysisExtentOptions.add(
+            getJRadioButtonAdjustToInputDataExtent(), "0, 0");
+        getJButtonGroup().add(getJRadioButtonAdjustToInputDataExtent());
+        getJRadioButtonAdjustToInputDataExtent().setSelected(true);
+      }
+      else {
+        getJRadioButtonUserDefinedExtent().setSelected(true);
+      }
+      jPanelAnalysisExtentOptions.add(getJComboBoxViews(), "1, 2");
+      jPanelAnalysisExtentOptions.add(getJComboBoxLayers(), "1, 3");
+
+    }
+    return jPanelAnalysisExtentOptions;
+  }
+
+  protected JPanel getJPanelAnalysisExtentValues() {
+
+    if (jPanelAnalysisExtentValues == null) {
+      jPanelAnalysisExtentValues = new JPanel();
+      final TableLayout jPanelRasterExtentValuesLayout = new TableLayout(
+          new double[][] {
+              { 255.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL },
+              { TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                  TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                  TableLayoutConstants.FILL } });
+      jPanelRasterExtentValuesLayout.setHGap(5);
+      jPanelRasterExtentValuesLayout.setVGap(5);
+      jPanelAnalysisExtentValues.setLayout(jPanelRasterExtentValuesLayout);
+      jPanelAnalysisExtentValues.setBorder(BorderFactory
+          .createTitledBorder(Sextante.getText("Extent__values")));
+      jPanelAnalysisExtentValues.setPreferredSize(new java.awt.Dimension(660,
+          145));
+      jPanelAnalysisExtentValues.add(getJLabelRangeX(), "0, 0");
+      jPanelAnalysisExtentValues.add(getJLabelCellSize(), "0, 2");
+      jPanelAnalysisExtentValues.add(getJTextFieldCellSize(), "1, 2");
+      jPanelAnalysisExtentValues.add(getJTextFieldXMin(), "1, 0");
+      jPanelAnalysisExtentValues.add(getJTextFieldXMax(), "2, 0");
+      jPanelAnalysisExtentValues.add(getJTextFieldYMin(), "1, 1");
+      jPanelAnalysisExtentValues.add(getJTextFieldYMax(), "2, 1");
+      jPanelAnalysisExtentValues.add(getJLabelRangeY(), "0, 1");
+      jPanelAnalysisExtentValues.add(getJLabelRowsCols(), "0, 3");
+      jPanelAnalysisExtentValues.add(getJTextFieldRows(), "1, 3");
+      jPanelAnalysisExtentValues.add(getJTextFieldCols(), "2, 3");
+      jPanelAnalysisExtentValues.add(getJButtonExtentFromPoints(), "2,2");
+    }
+    return jPanelAnalysisExtentValues;
+  }
+
+  private JButton getJButtonExtentFromPoints() {
+
+    final JButton button = new JButton("...");
+    button.setSize(new Dimension(30, 30));
+    button.addActionListener(new ActionListener() {
+
+      public void actionPerformed(final ActionEvent arg0) {
+        final ExtentFromSavedPointsDialog dialog = new ExtentFromSavedPointsDialog();
+        dialog.pack();
+        dialog.setVisible(true);
+        final double[] ret = dialog.getPoints();
+        if (ret != null) {
+          getJTextFieldXMin().setText(Double.toString(ret[0]));
+          getJTextFieldYMin().setText(Double.toString(ret[1]));
+          getJTextFieldXMax().setText(Double.toString(ret[2]));
+          getJTextFieldYMax().setText(Double.toString(ret[3]));
+        }
+      }
+    });
+    return button;
+  }
+
+  protected JComboBox getJComboBoxLayers() {
+
+    if (jComboBoxLayers == null) {
+      getJRadioButtonExtentFromLayer().setEnabled(m_Layers.length > 0);
+      final ComboBoxModel jComboBoxLayersModel = new DefaultComboBoxModel(
+          m_Layers);
+      jComboBoxLayers = new JComboBox();
+      jComboBoxLayers.setModel(jComboBoxLayersModel);
+      jComboBoxLayers.setEnabled(m_Layers.length > 0);
+
+      jComboBoxLayers.addActionListener(new java.awt.event.ActionListener() {
+
+        public void actionPerformed(final java.awt.event.ActionEvent evt) {
+          double dCoord;
+          if (getJRadioButtonExtentFromLayer().isSelected()) {
+            try {
+              final ILayer layer = (ILayer) jComboBoxLayers.getSelectedItem();
+              Rectangle2D fullExtent = layer.getFullExtent();
+              dCoord = fullExtent.getMinX();
+              getJTextFieldXMin().setText(new Double(dCoord).toString());
+              dCoord = fullExtent.getMaxX();
+              getJTextFieldXMax().setText(new Double(dCoord).toString());
+              dCoord = fullExtent.getMinY();
+              getJTextFieldYMin().setText(new Double(dCoord).toString());
+              dCoord = fullExtent.getMaxY();
+              getJTextFieldYMax().setText(new Double(dCoord).toString());
+              if (layer instanceof IRasterLayer) {
+                getJTextFieldCellSize().setText(
+                    new Double(((IRasterLayer) layer).getLayerCellSize())
+                        .toString());
+              }
+              extentHasChanged();
+            }
+            catch (final Exception e) {}
+          }
+        }
+      });
+    }
+    return jComboBoxLayers;
+  }
+
+  private JComboBox getJComboBoxViews() {
+
+    if (jComboBoxViews == null) {
+      NamedExtent[] predefinedExtents = SextanteGUI.getInputFactory()
+          .getPredefinedExtents();
+      boolean enabled = predefinedExtents.length > 1 || (predefinedExtents.length == 1 && predefinedExtents[0] != null);
+      getJRadioButtonViewExtent().setEnabled(enabled);
+      final ComboBoxModel jComboBoxViewsModel = new DefaultComboBoxModel(
+          predefinedExtents);
+      jComboBoxViews = new JComboBox();
+      jComboBoxViews.setModel(jComboBoxViewsModel);
+      jComboBoxViews.setEnabled(enabled);
+
+      jComboBoxViews.addActionListener(new java.awt.event.ActionListener() {
+
+        public void actionPerformed(final java.awt.event.ActionEvent evt) {
+          if (getJRadioButtonViewExtent().isSelected()) {
+            try {
+              final NamedExtent ne = (NamedExtent) jComboBoxViews
+                  .getSelectedItem();
+              if (ne != null) {
+                final Rectangle2D extent = ne.getExtent();
+                getJTextFieldXMin().setText(
+                    new Double(extent.getMinX()).toString());
+                getJTextFieldXMax().setText(
+                    new Double(extent.getMaxX()).toString());
+                getJTextFieldYMin().setText(
+                    new Double(extent.getMinY()).toString());
+                getJTextFieldYMax().setText(
+                    new Double(extent.getMaxY()).toString());
+                setTextFieldsEnabled(false);
+                extentHasChanged();
+              }
+            }
+            catch (final Exception e) {
+              Sextante.addErrorToLog(e);
+            }
+          }
+        }
+      });
+    }
+    return jComboBoxViews;
+  }
+
+  protected JLabel getJLabelRangeX() {
+
+    if (jLabelRangeX == null) {
+      jLabelRangeX = new JLabel();
+      jLabelRangeX.setText(Sextante.getText("Range_X"));
+    }
+    return jLabelRangeX;
+
+  }
+
+  protected JTextField getNewJTextField() {
+
+    final JTextField jTextField = new JTextField();
+    jTextField.addFocusListener(new FocusAdapter() {
+
+      @Override
+      public void focusLost(final FocusEvent e) {
+        final JTextField textField = (JTextField) e.getSource();
+        final String content = textField.getText();
+        if (content.length() != 0) {
+          try {
+            final double d = Double.parseDouble(content);
+            extentHasChanged();
+          }
+          catch (final NumberFormatException nfe) {
+            getToolkit().beep();
+            textField.requestFocus();
+          }
+        }
+      }
+    });
+    jTextField.addKeyListener(new KeyAdapter() {
+
+      @Override
+      public void keyTyped(final KeyEvent event) {
+        validateKeyTyping(event);
+      }
+    });
+
+    return jTextField;
+  }
+
+  protected JTextField getJTextFieldXMin() {
+    if (jTextFieldXMin == null) {
+      jTextFieldXMin = getNewJTextField();
+    }
+    return jTextFieldXMin;
+  }
+
+  protected JTextField getJTextFieldXMax() {
+    if (jTextFieldXMax == null) {
+      jTextFieldXMax = getNewJTextField();
+    }
+    return jTextFieldXMax;
+  }
+
+  protected JTextField getJTextFieldYMin() {
+    if (jTextFieldYMin == null) {
+      jTextFieldYMin = getNewJTextField();
+    }
+    return jTextFieldYMin;
+  }
+
+  protected JTextField getJTextFieldYMax() {
+    if (jTextFieldYMax == null) {
+      jTextFieldYMax = getNewJTextField();
+    }
+    return jTextFieldYMax;
+  }
+
+  protected JLabel getJLabelRangeY() {
+    if (jLabelRangeY == null) {
+      jLabelRangeY = new JLabel();
+      jLabelRangeY.setText(Sextante.getText("Range_Y"));
+    }
+    return jLabelRangeY;
+  }
+
+  protected JLabel getJLabelCellSize() {
+    if (jLabelCellSize == null) {
+      jLabelCellSize = new JLabel();
+      jLabelCellSize.setText(Sextante.getText("Cell_size"));
+    }
+    return jLabelCellSize;
+  }
+
+  protected JTextField getJTextFieldCellSize() {
+    if (jTextFieldCellSize == null) {
+      jTextFieldCellSize = new JTextField();
+      jTextFieldCellSize.setText("1");
+      jTextFieldCellSize.addFocusListener(new FocusAdapter() {
+
+        @Override
+        public void focusLost(final FocusEvent e) {
+          final JTextField textField = (JTextField) e.getSource();
+          final String content = textField.getText();
+          if (content.length() != 0) {
+            try {
+              final double d = Double.parseDouble(content);
+              if (d <= 0) {
+                throw new NumberFormatException();
+              }
+              else {
+                extentHasChanged();
+              }
+            }
+            catch (final NumberFormatException nfe) {
+              getToolkit().beep();
+              textField.requestFocus();
+            }
+          }
+
+        }
+      });
+      jTextFieldCellSize.addKeyListener(new KeyAdapter() {
+
+        @Override
+        public void keyTyped(final KeyEvent event) {
+          validateKeyTyping(event);
+        }
+      });
+    }
+    return jTextFieldCellSize;
+  }
+
+  protected JLabel getJLabelRowsCols() {
+    if (jLabelRowsCols == null) {
+      jLabelRowsCols = new JLabel();
+      jLabelRowsCols.setText(Sextante.getText("Number_of_rows-cols"));
+    }
+    return jLabelRowsCols;
+  }
+
+  protected JTextField getJTextFieldRows() {
+    if (jTextFieldRows == null) {
+      jTextFieldRows = new JTextField();
+      jTextFieldRows.setEnabled(false);
+    }
+    return jTextFieldRows;
+  }
+
+  protected JTextField getJTextFieldCols() {
+    if (jTextFieldCols == null) {
+      jTextFieldCols = new JTextField();
+      jTextFieldCols.setEnabled(false);
+    }
+    return jTextFieldCols;
+  }
+
+  private void validateKeyTyping(final KeyEvent event) {
+    String text = ((JTextField) event.getSource()).getText();
+    switch (event.getKeyChar()) {
+      case KeyEvent.VK_ENTER:
+        extentHasChanged();
+        break;
+      default:
+        text += event.getKeyChar();
+        break;
+    }
+  }
+
+  protected void setTextFieldsEnabled(final boolean bEnabled) {
+
+    getJPanelAnalysisExtentValues().setVisible(true);
+    getJTextFieldXMin().setEnabled(bEnabled);
+    getJTextFieldXMax().setEnabled(bEnabled);
+    getJTextFieldYMin().setEnabled(bEnabled);
+    getJTextFieldYMax().setEnabled(bEnabled);
+
+  }
+
+  protected void extentHasChanged() {
+
+    double dRangeX;
+    double dRangeY;
+    double dCellSize;
+    int iRows;
+    int iCols;
+
+    try {
+      dRangeX = Math.abs(Double.parseDouble(getJTextFieldXMax().getText())
+          - Double.parseDouble(getJTextFieldXMin().getText()));
+      dRangeY = Math.abs(Double.parseDouble(getJTextFieldYMax().getText())
+          - Double.parseDouble(getJTextFieldYMin().getText()));
+      dCellSize = Double.parseDouble(getJTextFieldCellSize().getText());
+      iRows = (int) Math.floor(dRangeY / dCellSize);
+      iCols = (int) Math.floor(dRangeX / dCellSize);
+      getJTextFieldRows().setText(Integer.toString(iRows));
+      getJTextFieldCols().setText(Integer.toString(iCols));
+    }
+    catch (final NumberFormatException e) {
+      return;
+    }
+
+  }
+
+  public void setExtent(final AnalysisExtent ge) {
+
+    getJRadioButtonUserDefinedExtent().setSelected(true);
+    setTextFieldsEnabled(true);
+
+    getJTextFieldCellSize().setText(Double.toString(ge.getCellSize()));
+    getJTextFieldXMin().setText(Double.toString(ge.getXMin()));
+    getJTextFieldXMax().setText(Double.toString(ge.getXMax()));
+    getJTextFieldYMin().setText(Double.toString(ge.getYMin()));
+    getJTextFieldYMax().setText(Double.toString(ge.getYMax()));
+    extentHasChanged();
+
+  }
+
+  public void setAutoExtent() {
+
+    getJRadioButtonAdjustToInputDataExtent().setSelected(true);
+    setTextFieldsEnabled(false);
+    getJPanelAnalysisExtentValues().setVisible(false);
+
+  }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AnalysisExtentPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ExtentFromSavedPointsDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ExtentFromSavedPointsDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ExtentFromSavedPointsDialog.java	(revision 369)
@@ -0,0 +1,124 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.NamedPoint;
+import es.unex.sextante.gui.core.SextanteGUI;
+import java.util.List;
+
+
+public class ExtentFromSavedPointsDialog
+         extends
+            JDialog {
+
+   private double[]  m_dPoints;
+   private JButton   jButtonCancel;
+   private JLabel    jLabelPt1;
+   private JComboBox jComboBoxPt2;
+   private JComboBox jComboBoxPt1;
+   private JLabel    jLabelPt2;
+   private JButton   jButtonOK;
+
+
+   public ExtentFromSavedPointsDialog() {
+
+      super((JFrame) null, true);
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 6.0, TableLayout.FILL, TableLayout.FILL, 6.0, TableLayout.FILL, 6.0 },
+               { TableLayout.FILL, TableLayout.MINIMUM, 6.0, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, 6.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      getContentPane().setLayout(thisLayout);
+      {
+         jButtonOK = new JButton();
+         getContentPane().add(jButtonOK, "2, 5");
+         jButtonOK.setText(Sextante.getText("OK"));
+         jButtonOK.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent arg0) {
+               final Point2D pt1 = ((NamedPoint) jComboBoxPt1.getSelectedItem()).getPoint();
+               final Point2D pt2 = ((NamedPoint) jComboBoxPt2.getSelectedItem()).getPoint();
+               m_dPoints = new double[4];
+               m_dPoints[0] = Math.min(pt1.getX(), pt2.getX());
+               m_dPoints[1] = Math.min(pt1.getY(), pt2.getY());
+               m_dPoints[2] = Math.max(pt1.getX(), pt2.getX());
+               m_dPoints[3] = Math.max(pt1.getY(), pt2.getY());
+               setVisible(false);
+               dispose();
+            }
+
+         });
+      }
+      {
+         jButtonCancel = new JButton();
+         getContentPane().add(jButtonCancel, "4, 5");
+         jButtonCancel.setText(Sextante.getText("Cancel"));
+         jButtonCancel.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent arg0) {
+               m_dPoints = null;
+               setVisible(false);
+               dispose();
+            }
+
+         });
+      }
+      {
+         jLabelPt1 = new JLabel();
+         getContentPane().add(jLabelPt1, "1, 1");
+         jLabelPt1.setText("Pt1");
+      }
+      {
+         jLabelPt2 = new JLabel();
+         getContentPane().add(jLabelPt2, "1, 3");
+         jLabelPt2.setText("Pt2");
+      }
+      final List<NamedPoint> coordsList = SextanteGUI.getGUIFactory().getCoordinatesList();
+      final NamedPoint[] pts = coordsList.toArray(new NamedPoint[0]);
+      {
+         final ComboBoxModel jComboBoxPt1Model = new DefaultComboBoxModel(pts);
+         jComboBoxPt1 = new JComboBox();
+         getContentPane().add(jComboBoxPt1, "2, 1, 4, 1");
+         jComboBoxPt1.setModel(jComboBoxPt1Model);
+      }
+      {
+         final ComboBoxModel jComboBoxPt2Model = new DefaultComboBoxModel(pts);
+         jComboBoxPt2 = new JComboBox();
+         getContentPane().add(jComboBoxPt2, "2, 3, 4, 3");
+         jComboBoxPt2.setModel(jComboBoxPt2Model);
+      }
+      {
+         this.setSize(358, 223);
+      }
+
+   }
+
+
+   public double[] getPoints() {
+
+
+      return m_dPoints;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ExtentFromSavedPointsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/LayerComboBoxRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/LayerComboBoxRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/LayerComboBoxRenderer.java	(revision 369)
@@ -0,0 +1,37 @@
+package es.unex.sextante.gui.algorithm;
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+import es.unex.sextante.core.ObjectAndDescription;
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+
+public class LayerComboBoxRenderer implements ListCellRenderer {
+  protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
+
+  public Component getListCellRendererComponent(JList list, Object value, int index,
+      boolean isSelected, boolean cellHasFocus) {
+    
+    JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index,
+        isSelected, cellHasFocus);
+
+    if (value instanceof ObjectAndDescription) {
+        ObjectAndDescription v = (ObjectAndDescription) value;
+        
+        Icon theIcon = v.getIcon();
+        String name = v.getDescription();
+
+        renderer.setIcon(theIcon);
+        renderer.setText(name);
+    }
+    return renderer;
+  }
+}
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TridimensionalAnalysisExtentPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TridimensionalAnalysisExtentPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TridimensionalAnalysisExtentPanel.java	(revision 369)
@@ -0,0 +1,361 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+
+public class TridimensionalAnalysisExtentPanel
+         extends
+            AnalysisExtentPanel {
+
+   private JTextField jTextFieldZMin;
+   private JTextField jTextFieldZMax;
+   private JLabel     jLabelRangeZ;
+   private JLabel     jLabelCellSizeZ;
+   private JLabel     jLabelColsZ;
+   private JTextField jTextFieldColsZ;
+   private JTextField jTextFieldCellSizeZ;
+
+
+   public TridimensionalAnalysisExtentPanel(final GeoAlgorithm algorithm) {
+
+      super(algorithm);
+
+   }
+
+
+   @Override
+   public void assignExtent() throws TooLargeGridExtentException, WrongAnalysisExtentException {
+
+      m_Algorithm.setAnalysisExtent((AnalysisExtent) null);
+
+      if (getJRadioButtonAdjustToInputDataExtent().isSelected()) {
+         if (!m_Algorithm.adjustOutputExtent()) {
+            throw new WrongAnalysisExtentException(Sextante.getText("Wrong_or_missing_region"));
+         }
+         else {
+            return;
+         }
+
+      }
+
+      final AnalysisExtent outputExtent = new AnalysisExtent();
+      try {
+         outputExtent.setCellSize(Double.parseDouble(jTextFieldCellSize.getText()));
+         outputExtent.setCellSizeZ(Double.parseDouble(jTextFieldCellSizeZ.getText()));
+         outputExtent.setXRange(Double.parseDouble(jTextFieldXMin.getText()), Double.parseDouble(jTextFieldXMax.getText()), true);
+         outputExtent.setYRange(Double.parseDouble(jTextFieldYMin.getText()), Double.parseDouble(jTextFieldYMax.getText()), true);
+         outputExtent.setZRange(Double.parseDouble(jTextFieldZMin.getText()), Double.parseDouble(jTextFieldZMax.getText()), true);
+         m_Algorithm.setAnalysisExtent(outputExtent);
+      }
+      catch (final NumberFormatException e) {
+         throw new WrongAnalysisExtentException(Sextante.getText("Wrong_or_missing_raster_extent_definition"));
+      }
+
+      final int numCells = outputExtent.getNX() * outputExtent.getNY();
+      /* benducke: let's just assume the other knows what (s)he is doing...
+      if ((numCells > BIG_SIZE) || (Integer.MAX_VALUE / outputExtent.getNY() < outputExtent.getNX())) {
+         throw new TooLargeGridExtentException(Sextante.getText("The_selected_grid_extent_seems_too_large") + "("
+                                               + Integer.toString(outputExtent.getNX()) + " X "
+                                               + Integer.toString(outputExtent.getNY()) + ")\n"
+                                               + Sextante.getText("Are_you_sure_you_want_to_use_it?"));
+      }
+	  */
+   }
+
+
+   @Override
+   protected JPanel getJPanelAnalysisExtentValues() {
+
+      if (jPanelAnalysisExtentValues == null) {
+         jPanelAnalysisExtentValues = new JPanel();
+         final TableLayout jPanelRasterExtentValuesLayout = new TableLayout(new double[][] {
+                  { 255.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL },
+                  { TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                           TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM, TableLayoutConstants.MINIMUM,
+                           TableLayoutConstants.MINIMUM } });
+         jPanelRasterExtentValuesLayout.setHGap(5);
+         jPanelRasterExtentValuesLayout.setVGap(5);
+         jPanelAnalysisExtentValues.setLayout(jPanelRasterExtentValuesLayout);
+         jPanelAnalysisExtentValues.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Extent__values")));
+         jPanelAnalysisExtentValues.setPreferredSize(new java.awt.Dimension(660, 145));
+         jPanelAnalysisExtentValues.add(getJLabelRangeX(), "0, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMin(), "1, 0");
+         jPanelAnalysisExtentValues.add(getJTextFieldXMax(), "2, 0");
+         jPanelAnalysisExtentValues.add(getJLabelRangeY(), "0, 1");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMin(), "1, 1");
+         jPanelAnalysisExtentValues.add(getJTextFieldYMax(), "2, 1");
+         jPanelAnalysisExtentValues.add(getJLabelCellSize(), "0, 2");
+         jPanelAnalysisExtentValues.add(getJTextFieldCellSize(), "1, 2");
+         jPanelAnalysisExtentValues.add(getJLabelRowsCols(), "0, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldRows(), "1, 3");
+         jPanelAnalysisExtentValues.add(getJTextFieldCols(), "2, 3");
+
+         jPanelAnalysisExtentValues.add(getJLabelRangeZ(), "0, 4");
+         jPanelAnalysisExtentValues.add(getJTextFieldZMin(), "1, 4");
+         jPanelAnalysisExtentValues.add(getJTextFieldZMax(), "2, 4");
+         jPanelAnalysisExtentValues.add(getJLabelCellSizeZ(), "0, 5");
+         jPanelAnalysisExtentValues.add(getJTextFieldCellSizeZ(), "1, 5");
+         jPanelAnalysisExtentValues.add(getJLabelColsZ(), "0, 6");
+         jPanelAnalysisExtentValues.add(getJTextFieldColsZ(), "1, 6");
+      }
+      return jPanelAnalysisExtentValues;
+
+   }
+
+
+   protected JTextField getJTextFieldZMin() {
+      if (jTextFieldZMin == null) {
+         jTextFieldZMin = getNewJTextFieldZ();
+      }
+      return jTextFieldZMin;
+   }
+
+
+   protected JTextField getJTextFieldZMax() {
+      if (jTextFieldZMax == null) {
+         jTextFieldZMax = getNewJTextFieldZ();
+      }
+      return jTextFieldZMax;
+   }
+
+
+   private JTextField getNewJTextFieldZ() {
+
+      final JTextField jTextField = new JTextField();
+      jTextField.addFocusListener(new FocusAdapter() {
+         @Override
+         public void focusLost(final FocusEvent e) {
+            final JTextField textField = (JTextField) e.getSource();
+            final String content = textField.getText();
+            if (content.length() != 0) {
+               try {
+                  final double d = Double.parseDouble(content);
+                  extentZHasChanged();
+               }
+               catch (final NumberFormatException nfe) {
+                  getToolkit().beep();
+                  textField.requestFocus();
+               }
+            }
+         }
+      });
+      jTextField.addKeyListener(new KeyAdapter() {
+         @Override
+         public void keyTyped(final KeyEvent event) {
+            validateKeyTypingZ(event);
+         }
+      });
+
+      return jTextField;
+   }
+
+
+   protected JLabel getJLabelRangeZ() {
+      if (jLabelRangeZ == null) {
+         jLabelRangeZ = new JLabel();
+         jLabelRangeZ.setText(Sextante.getText("Range_Z"));
+      }
+      return jLabelRangeZ;
+   }
+
+
+   protected JLabel getJLabelCellSizeZ() {
+      if (jLabelCellSizeZ == null) {
+         jLabelCellSizeZ = new JLabel();
+         jLabelCellSizeZ.setText(Sextante.getText("Cell_sizeZ"));
+      }
+      return jLabelCellSizeZ;
+   }
+
+
+   protected JTextField getJTextFieldCellSizeZ() {
+
+      if (jTextFieldCellSizeZ == null) {
+         jTextFieldCellSizeZ = new JTextField();
+         jTextFieldCellSizeZ.setText("1");
+         jTextFieldCellSizeZ.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(final FocusEvent e) {
+               final JTextField textField = (JTextField) e.getSource();
+               final String content = textField.getText();
+               if (content.length() != 0) {
+                  try {
+                     final double d = Double.parseDouble(content);
+                     if (d <= 0) {
+                        throw new NumberFormatException();
+                     }
+                     else {
+                        extentZHasChanged();
+                     }
+                  }
+                  catch (final NumberFormatException nfe) {
+                     getToolkit().beep();
+                     textField.requestFocus();
+                  }
+               }
+
+            }
+         });
+         jTextFieldCellSizeZ.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyTyped(final KeyEvent event) {
+               validateKeyTypingZ(event);
+            }
+         });
+      }
+      return jTextFieldCellSizeZ;
+
+   }
+
+
+   private void validateKeyTypingZ(final KeyEvent event) {
+
+      String text = ((JTextField) event.getSource()).getText();
+      switch (event.getKeyChar()) {
+         case KeyEvent.VK_ENTER:
+            extentZHasChanged();
+            break;
+         default:
+            text += event.getKeyChar();
+            break;
+      }
+   }
+
+
+   protected JLabel getJLabelColsZ() {
+      if (jLabelColsZ == null) {
+         jLabelColsZ = new JLabel();
+         jLabelColsZ.setText(Sextante.getText("Number_of_cols_z"));
+      }
+      return jLabelColsZ;
+   }
+
+
+   protected JTextField getJTextFieldColsZ() {
+      if (jTextFieldColsZ == null) {
+         jTextFieldColsZ = new JTextField();
+         jTextFieldColsZ.setEnabled(false);
+      }
+      return jTextFieldColsZ;
+   }
+
+
+   @Override
+   protected void setTextFieldsEnabled(final boolean bEnabled) {
+
+      getJPanelAnalysisExtentValues().setVisible(true);
+      getJTextFieldXMin().setEnabled(bEnabled);
+      getJTextFieldXMax().setEnabled(bEnabled);
+      getJTextFieldYMin().setEnabled(bEnabled);
+      getJTextFieldYMax().setEnabled(bEnabled);
+      //getJTextFieldZMin().setEnabled(bEnabled);
+      //getJTextFieldZMax().setEnabled(bEnabled);
+
+   }
+
+
+   @Override
+   protected JComboBox getJComboBoxLayers() {
+
+      if (jComboBoxLayers == null) {
+         final ComboBoxModel jComboBoxLayersModel = new DefaultComboBoxModel(m_Layers);
+         jComboBoxLayers = new JComboBox();
+         jComboBoxLayers.setModel(jComboBoxLayersModel);
+         jComboBoxLayers.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(final java.awt.event.ActionEvent evt) {
+               double dCoord;
+               if (getJRadioButtonExtentFromLayer().isSelected()) {
+                  try {
+                     final ILayer layer = (ILayer) jComboBoxLayers.getSelectedItem();
+                     dCoord = layer.getFullExtent().getMinX();
+                     getJTextFieldXMin().setText(new Double(dCoord).toString());
+                     dCoord = layer.getFullExtent().getMaxX();
+                     getJTextFieldXMax().setText(new Double(dCoord).toString());
+                     dCoord = layer.getFullExtent().getMinY();
+                     getJTextFieldYMin().setText(new Double(dCoord).toString());
+                     dCoord = layer.getFullExtent().getMaxY();
+                     getJTextFieldYMax().setText(new Double(dCoord).toString());
+                     if (layer instanceof IRasterLayer) {
+                        getJTextFieldCellSize().setText(new Double(((IRasterLayer) layer).getLayerCellSize()).toString());
+                     }
+                     else if (layer instanceof I3DRasterLayer) {
+                        final I3DRasterLayer raster3d = (I3DRasterLayer) layer;
+                        getJTextFieldCellSizeZ().setText(new Double(raster3d.getCellSizeZ()).toString());
+                        dCoord = raster3d.getLayerExtent().getZMin();
+                        getJTextFieldZMin().setText(new Double(dCoord).toString());
+                        dCoord = raster3d.getLayerExtent().getZMax();
+                        getJTextFieldZMax().setText(new Double(dCoord).toString());
+                        extentZHasChanged();
+                     }
+                     extentHasChanged();
+                  }
+                  catch (final Exception e) {}
+               }
+            }
+         });
+      }
+      return jComboBoxLayers;
+   }
+
+
+   private void extentZHasChanged() {
+
+      double dRange;
+      double dCellSize;
+      int iCols;
+
+      try {
+         dRange = Math.abs(Double.parseDouble(getJTextFieldZMax().getText()) - Double.parseDouble(getJTextFieldZMin().getText()));
+         dCellSize = Double.parseDouble(getJTextFieldCellSizeZ().getText());
+         iCols = (int) Math.floor(dRange / dCellSize);
+         getJTextFieldColsZ().setText(Integer.toString(iCols));
+      }
+      catch (final NumberFormatException e) {
+         return;
+      }
+
+   }
+
+
+   @Override
+   public void setExtent(final AnalysisExtent ge) {
+
+      getJRadioButtonUserDefinedExtent().setSelected(true);
+      setTextFieldsEnabled(true);
+
+      getJTextFieldCellSize().setText(Double.toString(ge.getCellSize()));
+      getJTextFieldXMin().setText(Double.toString(ge.getXMin()));
+      getJTextFieldXMax().setText(Double.toString(ge.getXMax()));
+      getJTextFieldYMin().setText(Double.toString(ge.getYMin()));
+      getJTextFieldYMax().setText(Double.toString(ge.getYMax()));
+      extentHasChanged();
+      getJTextFieldCellSizeZ().setText(Double.toString(ge.getCellSizeZ()));
+      getJTextFieldZMin().setText(Double.toString(ge.getZMin()));
+      getJTextFieldZMax().setText(Double.toString(ge.getZMax()));
+      extentZHasChanged();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TridimensionalAnalysisExtentPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionPanel.java	(revision 369)
@@ -0,0 +1,140 @@
+//package es.unex.sextante.gui.algorithm;
+//
+//import info.clearthought.layout.TableLayout;
+//import info.clearthought.layout.TableLayoutConstants;
+//
+//import java.awt.Frame;
+//import java.awt.event.ActionEvent;
+//import java.awt.event.ActionListener;
+//import java.util.ArrayList;
+//
+//import javax.swing.JButton;
+//import javax.swing.JPanel;
+//import javax.swing.JTextField;
+//
+//import es.unex.sextante.core.Sextante;
+//
+///**
+// * A panel with a text field and a button. The text field displays a text representation of a multiple selection. Clicking the
+// * button shows a dialog to perform a multiple selection
+// *
+// * @author volaya
+// *
+// */
+//public class MultipleInputSelectionPanel
+//         extends
+//            JPanel {
+//
+//   private final Object[]   m_Values;
+//   private ArrayList  m_SelectedIndices = new ArrayList();
+//   private JTextField textField;
+//   private JButton    button;
+//
+//
+//   /**
+//    * Creates a new panel
+//    *
+//    * @param values
+//    *                an array of values to select from
+//    */
+//   public MultipleInputSelectionPanel(final Object[] values) {
+//
+//      super();
+//
+//      m_Values = values;
+//
+//      initGUI();
+//
+//   }
+//
+//
+//   private void initGUI() {
+//
+//      button = new JButton("...");
+//      textField = new JTextField(Sextante.getText("0_elements_selected"));
+//      textField.setEditable(false);
+//
+//      button.addActionListener(new ActionListener() {
+//         public void actionPerformed(final ActionEvent evt) {
+//            btnActionPerformed(evt);
+//         }
+//      });
+//
+//      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 }, { TableLayoutConstants.FILL } });
+//      this.setLayout(thisLayout);
+//      this.add(textField, "0,  0");
+//      this.add(button, "1,  0");
+//   }
+//
+//
+//   /**
+//    * Returns a list of all the objects selected using this panel
+//    *
+//    * @return a list of selected objects
+//    */
+//   public ArrayList getSelectedObjects() {
+//
+//      int iIndex;
+//      final ArrayList selected = new ArrayList();
+//
+//      for (int i = 0; i < m_SelectedIndices.size(); i++) {
+//         iIndex = ((Integer) m_SelectedIndices.get(i)).intValue();
+//         selected.add(this.m_Values[iIndex]);
+//      }
+//
+//      return selected;
+//
+//   }
+//
+//
+//   private void btnActionPerformed(final ActionEvent e) {
+//
+//      int iCount;
+//      final StringBuffer sText = new StringBuffer();
+//
+//      final Frame window = new Frame();
+//
+//      final MultipleInputSelectionDialog dialog = new MultipleInputSelectionDialog(window, m_Values, m_SelectedIndices);
+//
+//      dialog.pack();
+//      dialog.setVisible(true);
+//
+//      iCount = m_SelectedIndices.size();
+//      sText.append(Integer.toString(iCount));
+//      if (iCount == 1) {
+//         sText.append(" " + Sextante.getText("element_selected"));
+//      }
+//      else {
+//         sText.append(" " + Sextante.getText("elements_selected"));
+//      }
+//
+//      textField.setText(sText.toString());
+//
+//   }
+//
+//
+//   public Object[] getValues() {
+//
+//      return m_Values;
+//
+//   }
+//
+//
+//   public void setSelectedIndices(final ArrayList selectedIndices) {
+//
+//      m_SelectedIndices = selectedIndices;
+//      final StringBuffer sText = new StringBuffer();
+//      final int iCount = m_SelectedIndices.size();
+//      sText.append(Integer.toString(iCount));
+//      if (iCount == 1) {
+//         sText.append(" " + Sextante.getText("element_selected"));
+//      }
+//      else {
+//         sText.append(" " + Sextante.getText("elements_selected"));
+//      }
+//
+//      textField.setText(sText.toString());
+//
+//   }
+//
+//}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionDialog.java	(revision 369)
@@ -0,0 +1,191 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * A dialog for selecting multiples elements (raster layers, vector layers or tables)
+ *
+ * @author volaya
+ *
+ */
+public class MultipleInputSelectionDialog
+         extends
+            JDialog {
+
+   private final ArrayList    m_SelectedIndices;
+   private final ArrayList    m_SelectedIndicesOrg;
+
+   private JPanel       jPanelMain;
+   private CheckBoxList jList;
+   private JButton      jButtonCancel;
+   private JButton      jButtonOK;
+   private JScrollPane  jScrollPane;
+   private JButton      jButtonSelectAll;
+   private JButton      jButtonDeselectAll;
+
+
+   /**
+    * Creates a new dialog
+    *
+    * @param window
+    *                the parent window
+    * @param values
+    *                an array of possible values
+    * @param selectedIndices
+    *                a list the indices of the values to show as selected when opening this dialog. If the user selects ok, the
+    *                new selection will be stored in this arraylist, clearing the previous selection. If not, it will be left
+    *                unchanged
+    */
+   public MultipleInputSelectionDialog(final Frame window,
+                                       final Object[] values,
+                                       final ArrayList selectedIndices) {
+
+      super(window, "", true);
+
+      this.setResizable(false);
+
+      m_SelectedIndicesOrg = selectedIndices;
+      m_SelectedIndices = (ArrayList) selectedIndices.clone();
+      initGUI(values);
+
+   }
+
+
+   private void initGUI(final Object[] values) {
+
+      int i;
+      int iIndex;
+      final JCheckBox[] checkBox = new JCheckBox[values.length];
+
+      try {
+         this.setTitle(Sextante.getText("Multiple_selection"));
+         for (i = 0; i < values.length; i++) {
+            checkBox[i] = new JCheckBox(values[i].toString());
+         }
+         {
+            jPanelMain = new JPanel();
+            final TableLayout jPanelMainLayout = new TableLayout(new double[][] { { 5, TableLayoutConstants.FILL, 5, TableLayoutConstants.FILL, 5.0 },
+                     { 5, TableLayoutConstants.FILL, 5, 25, 5, 25, 5 } });
+            jPanelMain.setLayout(jPanelMainLayout);
+            getContentPane().add(jPanelMain, BorderLayout.CENTER);
+            jPanelMain.setPreferredSize(new java.awt.Dimension(357, 335));
+            {
+
+               jList = new CheckBoxList();
+               jList.setListData(checkBox);
+               jList.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+               jScrollPane = new JScrollPane();
+               jScrollPane.setViewportView(jList);
+               jPanelMain.add(jScrollPane, "1,1,3,1");
+            }
+            {
+               jButtonOK = new JButton();
+               jPanelMain.add(jButtonOK, "1,5");
+               jButtonOK.setText(Sextante.getText("OK"));
+               jButtonOK.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     btnOKActionPerformed(evt);
+                  }
+               });
+            }
+            {
+               jButtonCancel = new JButton();
+               jPanelMain.add(jButtonCancel, "3,5");
+               jButtonCancel.setText(Sextante.getText("Cancel"));
+               jButtonCancel.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     btnCancelActionPerformed(evt);
+                  }
+               });
+            }
+            {
+               jButtonSelectAll = new JButton();
+               jPanelMain.add(jButtonSelectAll, "1,3");
+               jButtonSelectAll.setText(Sextante.getText("Select_all"));
+               jButtonSelectAll.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     selectAll(true);
+                  }
+               });
+            }
+            {
+               jButtonDeselectAll = new JButton();
+               jPanelMain.add(jButtonDeselectAll, "3,3");
+               jButtonDeselectAll.setText(Sextante.getText("Deselect_all"));
+               jButtonDeselectAll.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     selectAll(false);
+                  }
+               });
+            }
+         }
+         for (i = 0; i < m_SelectedIndices.size(); i++) {
+            iIndex = ((Integer) m_SelectedIndices.get(i)).intValue();
+            checkBox[iIndex].setSelected(true);
+         }
+         {
+            this.setSize(365, 369);
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void selectAll(final boolean bSelect) {
+
+      int i;
+
+      for (i = 0; i < jList.getModel().getSize(); i++) {
+         final JCheckBox checkBox = (JCheckBox) jList.getModel().getElementAt(i);
+         checkBox.setSelected(bSelect);
+      }
+      jList.updateUI();
+
+   }
+
+
+   private void btnOKActionPerformed(final ActionEvent evt) {
+
+      int i;
+      m_SelectedIndicesOrg.clear();
+
+      for (i = 0; i < jList.getModel().getSize(); i++) {
+         final JCheckBox checkBox = (JCheckBox) jList.getModel().getElementAt(i);
+         if (checkBox.isSelected()) {
+            m_SelectedIndicesOrg.add(new Integer(i));
+         }
+      }
+
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private void btnCancelActionPerformed(final ActionEvent evt) {
+
+      dispose();
+      setVisible(false);
+
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/MultipleInputSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldComboBoxRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldComboBoxRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldComboBoxRenderer.java	(revision 369)
@@ -0,0 +1,36 @@
+package es.unex.sextante.gui.algorithm;
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+
+public class FieldComboBoxRenderer implements ListCellRenderer {
+  protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
+
+  @Override
+  public Component getListCellRendererComponent(JList list, Object value, int index,
+      boolean isSelected, boolean cellHasFocus) {
+    
+    JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index,
+        isSelected, cellHasFocus);
+
+    if (value instanceof FieldDescriptionComboBox) {
+        FieldDescriptionComboBox v = (FieldDescriptionComboBox) value;
+        Icon theIcon = new IconFieldComboBoxRenderer(v.getFieldType());
+        String name = v.getDescription() + " ["+v.getFieldType()+"]";
+
+        renderer.setIcon(theIcon);
+        renderer.setText(name);
+    }
+    return renderer;
+  }
+}
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputParameterContainer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputParameterContainer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputParameterContainer.java	(revision 369)
@@ -0,0 +1,52 @@
+package es.unex.sextante.gui.algorithm;
+
+/**
+ * A class representing a output object key and the component used to introduce its value (i.e. its associated filename)
+ *
+ * @author volaya
+ *
+ */
+public class OutputParameterContainer {
+
+   Object m_Container;
+   String m_sParameterName;
+
+
+   public OutputParameterContainer(final String sName,
+                                   final Object container) {
+
+      m_sParameterName = sName;
+      m_Container = container;
+
+   }
+
+
+   public Object getContainer() {
+
+      return m_Container;
+
+   }
+
+
+   public void setContainer(final Object container) {
+
+      m_Container = container;
+
+   }
+
+
+   public String getName() {
+
+      return m_sParameterName;
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sParameterName = sName;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputParameterContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DatabaseOutputChannelSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DatabaseOutputChannelSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DatabaseOutputChannelSelectionPanel.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.gui.algorithm;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.JPanel;
+
+public class DatabaseOutputChannelSelectionPanel
+         extends
+            JPanel {
+
+   public DatabaseOutputChannelSelectionPanel(final String sDescription,
+                                              final ActionListener listener) {
+   // TODO Auto-generated constructor stub
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DatabaseOutputChannelSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconLayerComboBoxRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconLayerComboBoxRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconLayerComboBoxRenderer.java	(revision 369)
@@ -0,0 +1,59 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package es.unex.sextante.gui.algorithm;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+import java.awt.Color;
+import javax.swing.Icon;
+import java.awt.Component;
+import java.awt.Graphics;
+/**
+ *
+ * @author osc
+ */
+public class IconLayerComboBoxRenderer implements Icon {
+  public int layerType;
+  public boolean hasSelection;
+
+  public IconLayerComboBoxRenderer(int layerType, boolean hasSelection) {
+      this.layerType = layerType;
+      this.hasSelection = hasSelection;
+  }
+
+  public int getIconHeight() {
+    return 20;
+  }
+
+  public int getIconWidth() {
+    return 20;
+  }
+
+  public void paintIcon(Component c, Graphics g, int x, int y) {
+//   public static final int SHAPE_TYPE_POINT        = 0;
+//   public static final int SHAPE_TYPE_LINE         = 1;
+//   public static final int SHAPE_TYPE_POLYGON      = 2;
+//   public static final int SHAPE_TYPE_MIXED        = 3;
+//
+//   //Types to create a multilayer in gvSIG. Don't use for anything more
+//   public static final int SHAPE_TYPE_MULTIPOINT   = 4;
+//   public static final int SHAPE_TYPE_MULTILINE    = 5;
+//   public static final int SHAPE_TYPE_MULTIPOLYGON = 6;
+    if (this.hasSelection==true) {
+          g.setColor(Color.YELLOW);
+          g.fillOval(1, 1, 10, 10);
+    }
+    if (this.layerType == IVectorLayer.SHAPE_TYPE_POLYGON) {
+          g.setColor(Color.RED);
+          g.drawRect(2, 2, 10, 10);
+      } else if (this.layerType == IVectorLayer.SHAPE_TYPE_LINE) {
+          g.setColor(Color.RED);
+          g.drawLine(2, 2, 10, 10);
+      } else if (this.layerType == IVectorLayer.SHAPE_TYPE_POINT) {
+          g.setColor(Color.RED);
+          g.drawOval(5, 5, 2, 2);
+      }
+  }
+}
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionPanel.java	(revision 369)
@@ -0,0 +1,245 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+/**
+ * A panel with a text field and a button, which pops-up a file selection dialog and puts the selected file in the text field
+ * 
+ * @author volaya
+ * 
+ */
+public class FileSelectionPanel
+         extends
+            JPanel {
+
+   private JTextField     textField;
+   private JButton        button;
+   private final String[] m_sExtensions;
+   private boolean        m_bFolder   = false;
+   private boolean        m_bOpen     = false;
+   private final String   m_sDescription;
+   private String         m_sSelected = null;
+
+
+   /**
+    * Creates a new file selection panel.
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExts
+    *                a list of permitted file extensions
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    */
+   public FileSelectionPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String[] sExts,
+                             final String sDescription) {
+
+      super();
+
+      m_bFolder = bFolder;
+      m_bOpen = bOpen;
+      m_sExtensions = sExts;
+      m_sDescription = sDescription;
+
+      initGUI();
+
+   }
+
+
+   /**
+    * Creates a new file selection panel. Allows just one extension.
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                a file extension
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    */
+   public FileSelectionPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt,
+                             final String sDescription) {
+
+      this(bFolder, bOpen, new String[] { sExt }, sDescription);
+
+   }
+
+
+   /**
+    * Creates a new file selection panel
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                the permitted file extension
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    * @param sSelection
+    *                the name of the default selected file or folder
+    */
+   public FileSelectionPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt,
+                             final String sDescription,
+                             final String sSelection) {
+
+      this(bFolder, bOpen, new String[] { sExt }, sDescription);
+      m_sSelected = sSelection;
+
+   }
+
+
+   /**
+    * Creates a new file selection panel
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                a file extensions
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    * @param sSelection
+    *                the name of the default selected file or folder
+    */
+   public FileSelectionPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt[],
+                             final String sDescription,
+                             final String sSelection) {
+
+      this(bFolder, bOpen, sExt, sDescription);
+      m_sSelected = sSelection;
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      textField = new JTextField("");
+      textField.setMaximumSize(new java.awt.Dimension(340, 18));
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed();
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(textField, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   /**
+    * Returns the filepath currently shown in the text field
+    * 
+    * @return the filepath currently shown in the text field
+    */
+   public String getFilepath() {
+
+      return textField.getText();
+
+   }
+
+   /**
+    * Returns this panel's JTextField widget.
+    * 
+    * @return the text field widget used to input/store the selected file's path and name
+    */
+   public JTextField getTextField() {
+
+      return (this.textField);
+
+   }
+   
+   
+   /**
+    * Returns this panel's JButton widget.
+    * 
+    * @return the button widget used to pop up the file selector widget
+    */
+   public JButton getButton() {
+
+      return (this.button);
+
+   }   
+
+   
+   private void btnActionPerformed() {
+
+      int returnVal;
+      JFileChooser fc = new JFileChooser();
+      
+      fc.setDialogTitle(m_sDescription);
+
+      if (m_bFolder) {
+         fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+      }
+
+      if (m_sSelected != null) {
+         fc.setSelectedFile(new File(m_sSelected));
+      }
+
+      if ((m_sExtensions != null) && !m_bFolder) {
+         fc.setFileFilter(new GenericFileFilter(m_sExtensions, m_sDescription));
+      }
+
+      if (m_bOpen) {
+         returnVal = fc.showOpenDialog(this.getParent().getParent());
+      }
+      else {
+         returnVal = fc.showSaveDialog(this.getParent().getParent());
+      }
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         textField.setText(fc.getSelectedFile().getAbsolutePath());
+      }
+
+   }
+
+
+   /**
+    * Sets the current filepath to be shown in the text field
+    * 
+    * @param sFilepath
+    *                the new filepath to set
+    */
+   public void setFilepath(final String sFilepath) {
+
+      textField.setText(sFilepath);
+
+   }
+
+
+   @Override
+   public void setToolTipText(final String sText) {
+
+      textField.setToolTipText(sText);
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AlgorithmDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AlgorithmDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AlgorithmDialog.java	(revision 369)
@@ -0,0 +1,465 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.core.IGUIFactory;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.gui.exceptions.OverwrittingNotAllowedException;
+import es.unex.sextante.gui.exceptions.TooLargeGridExtentException;
+import es.unex.sextante.gui.history.DateAndCommand;
+import es.unex.sextante.gui.history.History;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+
+
+/**
+ * A dialog used to introduce all the necessary input for a geoalgorithm (input parameters and raster extent if needed. see
+ * {@link es.unex.sextante.core.GeoAlgorithm#getUserCanDefineAnalysisExtent()}) for a given algorithm
+ * 
+ * @author volaya
+ * 
+ */
+public class AlgorithmDialog
+         extends
+            JDialog {
+
+   protected GeoAlgorithm                  m_Algorithm;
+   protected JTabbedPane                   jTabbedPane1;
+   private JPanel                          jPanelButtons;
+   private JPanel                          jMainPanel;
+   protected JButton                       jButtonCancel;
+   protected JButton                       jButtonOK;
+
+   private int                             m_iDialogReturn;
+
+   protected GeoAlgorithmParametersPanel   jPanelParametersMain = null;
+   private AnalysisExtentPanel             jAnalysisExtentPanel;
+   private JButton                         jButtonHelp;
+   private String[]                        m_PreviousParameters;
+   private String[]                        m_Extents;
+   private JTextField                      jLabelCommand;
+   private JButton                         jButtonPrevious;
+   private JButton                         jButtonNext;
+   private int                             m_iPreviousCommandIndex;
+   private final ArrayList<DateAndCommand> m_sCommand;
+
+
+   /**
+    * Creates a new dialog for a given algorithm.
+    * 
+    * @param algorithm
+    *                the algorithm
+    * @param parent
+    *                the parent dialog
+    * @param panel
+    *                the parameters panel to use. Doesn't have to be initialized using its init(Geoalgorithm) method. This
+    *                constructor will initialize it
+    * @param commands
+    *                a list of DateAndCommand objects to use as previous parameters set. Must include both the "runalg" commands
+    *                and the "extent" ones, in case you want them to be used for algorithms generating new raster layers. If null,
+    *                all suitable commands from history are used
+    */
+   public AlgorithmDialog(final GeoAlgorithm algorithm,
+                          final JDialog parent,
+                          final GeoAlgorithmParametersPanel panel,
+                          final ArrayList<DateAndCommand> commands) {
+
+      super(parent, algorithm.getName(), true);
+
+      setResizable(false);
+
+      m_Algorithm = algorithm;
+      m_sCommand = commands;
+
+      jPanelParametersMain = panel;
+      jPanelParametersMain.init(m_Algorithm);
+
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   /**
+    * Creates a new dialog for a given algorithm. The main frame of the UI is used as the parent component
+    * 
+    * @param algorithm
+    *                the algorithm
+    * @param panel
+    *                the parameters panel to use. Doesn't have to be initialized using its init(Geoalgorithm) method. This
+    *                constructor will initialize it
+    * @param comands
+    *                a list of DateAndCommand objects to use as previous parameters set. Must include both the "runalg" commands
+    *                and the "extent" ones, in case you want them to be used for algorithms generating new raster layers. If null,
+    *                all suitable commands from history are used
+    */
+   public AlgorithmDialog(final GeoAlgorithm algorithm,
+                          final GeoAlgorithmParametersPanel panel,
+                          final ArrayList<DateAndCommand> commands) {
+
+      super(SextanteGUI.getMainFrame(), algorithm.getName(), true);
+
+      setResizable(false);
+
+      m_sCommand = commands;
+      m_Algorithm = algorithm;
+
+      jPanelParametersMain = panel;
+      jPanelParametersMain.init(m_Algorithm);
+
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void initGUI() {
+
+
+      jMainPanel = new JPanel();
+
+      this.add(jMainPanel);
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 10.0, TableLayoutConstants.FILL, 10. },
+               { 1.0, 338.0, 37.0 } });
+      jMainPanel.setLayout(thisLayout);
+      this.setSize(696, 446);
+      {
+         jTabbedPane1 = new JTabbedPane();
+         jMainPanel.add(jTabbedPane1, "1, 1");
+         {
+            jTabbedPane1.addTab(Sextante.getText("Parameters"), null, jPanelParametersMain, null);
+         }
+         {
+            if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+               jTabbedPane1.addTab(Sextante.getText("Raster_output"), null, getAnalysisExtentPanel(), null);
+            }
+         }
+      }
+      {
+         jPanelButtons = new JPanel();
+         final TableLayout jPanelButtonsLayout = new TableLayout(new double[][] {
+                  { 5.0, 45.0, 120.0, 120.0, 45.0, TableLayoutConstants.FILL, 90.0, 90.0, 25.0, 15.0 },
+                  { TableLayoutConstants.FILL, 25.0, TableLayoutConstants.FILL } });
+         jPanelButtonsLayout.setHGap(5);
+         jPanelButtonsLayout.setVGap(5);
+         jPanelButtons.setLayout(jPanelButtonsLayout);
+         jMainPanel.add(jPanelButtons, "1, 2");
+         jPanelButtons.setFocusable(false);
+         {
+            jButtonOK = new JButton();
+            jPanelButtons.add(jButtonOK, "6, 1");
+            jButtonOK.setText(Sextante.getText("OK"));
+            jButtonOK.addActionListener(new java.awt.event.ActionListener() {
+               public void actionPerformed(final java.awt.event.ActionEvent e) {
+                  executeAlgorithm();
+               }
+            });
+         }
+         {
+            jButtonHelp = new JButton();
+            jPanelButtons.add(jButtonHelp, "8, 1");
+            jButtonHelp.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/info.gif")));
+            jButtonHelp.setPreferredSize(new java.awt.Dimension(33, 0));
+            jButtonHelp.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  showHelp();
+               }
+            });
+         }
+         {
+            jButtonCancel = new JButton();
+            jPanelButtons.add(jButtonCancel, "7, 1");
+            jButtonCancel.setText(Sextante.getText("Cancel"));
+            jButtonCancel.addActionListener(new java.awt.event.ActionListener() {
+               public void actionPerformed(final java.awt.event.ActionEvent e) {
+                  m_iDialogReturn = IGUIFactory.CANCEL;
+                  dispose();
+                  setVisible(false);
+               }
+            });
+         }
+
+      }
+
+      retrievePreviouslyUsedParametersFromHistory();
+      if (m_PreviousParameters != null) {
+         try {
+            {
+               jButtonPrevious = new JButton();
+               jPanelButtons.add(jButtonPrevious, "1, 1");
+               jButtonPrevious.setText("<");
+               jButtonPrevious.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     setPreviousSetOfPreviouslyUsedCommand();
+                  }
+               });
+            }
+            {
+               jButtonNext = new JButton();
+               jPanelButtons.add(jButtonNext, "4, 1");
+               jButtonNext.setText(">");
+               jButtonNext.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     setNextSetOfPreviouslyUsedCommand();
+                  }
+               });
+            }
+            {
+               jLabelCommand = new JTextField();
+               jLabelCommand.setFont(new Font("Monospaced", Font.PLAIN, 10));
+               jLabelCommand.setEditable(false);
+               jPanelButtons.add(jLabelCommand, "2, 1, 3, 1");
+            }
+
+            m_iPreviousCommandIndex = m_PreviousParameters.length - 1;
+            setPreviouslyUsedParameters(m_iPreviousCommandIndex);
+         }
+         catch (final Exception e) {
+            // do nothing
+         }
+      }
+
+   }
+
+
+   private void setPreviouslyUsedParameters(final int iIndex) {
+
+      int i;
+      Parameter param;
+      String[] args;
+      String sArg;
+
+      jLabelCommand.setText("[" + Integer.toString(iIndex + 1) + "] " + m_PreviousParameters[iIndex]);
+      args = m_PreviousParameters[iIndex].split("\"");
+
+      for (int j = 0; j < 2; j++) { //twice to handle dependencies
+         final ParametersSet ps = m_Algorithm.getParameters();
+         for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+            param = ps.getParameter(i);
+            sArg = args[i * 2 + 3];
+            jPanelParametersMain.setParameterValue(param.getParameterName(), sArg.trim());
+         }
+         int iOutputIndex = i * 2 + 3;
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         for (i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+            final Output out = ooSet.getOutput(i);
+            if ((out instanceof OutputRasterLayer) || (out instanceof Output3DRasterLayer) || (out instanceof OutputVectorLayer)
+                || (out instanceof OutputTable)) {
+               final String sValue = args[iOutputIndex].trim();
+               jPanelParametersMain.setOutputValue(out.getName(), sValue);
+               iOutputIndex += 2;
+            }
+         }
+      }
+
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         String sExtent = m_Extents[iIndex];
+         if (sExtent != null) {
+            sExtent = sExtent.substring(sExtent.indexOf("(") + 1, sExtent.indexOf(")"));
+            final AnalysisExtent ae = new AnalysisExtent();
+            final String[] sCoords = sExtent.split(",");
+            final double dCellSize = Double.parseDouble(sCoords[6]);
+            final double dCellSizeZ = Double.parseDouble(sCoords[7]);
+            ae.setCellSize(dCellSize);
+            ae.setCellSizeZ(dCellSizeZ);
+            final double xMin = Double.parseDouble(sCoords[0]);
+            final double xMax = Double.parseDouble(sCoords[3]);
+            ae.setXRange(xMin, xMax, true);
+            final double yMin = Double.parseDouble(sCoords[1]);
+            final double yMax = Double.parseDouble(sCoords[4]);
+            ae.setYRange(yMin, yMax, true);
+            final double zMin = Double.parseDouble(sCoords[2]);
+            final double zMax = Double.parseDouble(sCoords[5]);
+            ae.setZRange(zMin, zMax, true);
+            getAnalysisExtentPanel().setExtent(ae);
+         }
+         else {
+            getAnalysisExtentPanel().setAutoExtent();
+         }
+      }
+
+   }
+
+
+   private void retrievePreviouslyUsedParametersFromHistory() {
+
+      ArrayList<DateAndCommand> dac;
+      if (m_sCommand != null) {
+         dac = m_sCommand;
+      }
+      else {
+         dac = History.getHistory();
+      }
+      final ArrayList<String> previousParameters = new ArrayList<String>();
+      final ArrayList<String> extents = new ArrayList<String>();
+      for (int i = 0; i < dac.size(); i++) {
+         String command = dac.get(i).getCommand();
+         if (command.startsWith("runalg(\"" + m_Algorithm.getCommandLineName() + "\"")) {
+            previousParameters.add(command);
+            if (m_Algorithm.getUserCanDefineAnalysisExtent() && (i != 0)) {
+               command = dac.get(i - 1).getCommand();
+               if (command.startsWith("extent")) {
+                  extents.add(command);
+               }
+               else {
+                  extents.add(null);
+               }
+            }
+         }
+      }
+
+      if (previousParameters.size() == 0) {
+         m_PreviousParameters = null;
+         m_Extents = null;
+      }
+      else {
+         m_PreviousParameters = previousParameters.toArray(new String[0]);
+         m_Extents = extents.toArray(new String[0]);
+
+      }
+
+   }
+
+
+   public void setPreviousSetOfPreviouslyUsedCommand() {
+
+      if (m_iPreviousCommandIndex <= 0) {
+         //m_iPreviousCommandIndex = m_PreviousParameters.length - 1;
+      }
+      else {
+         m_iPreviousCommandIndex--;
+         setPreviouslyUsedParameters(m_iPreviousCommandIndex);
+      }
+
+
+   }
+
+
+   public void setNextSetOfPreviouslyUsedCommand() {
+
+      if (m_iPreviousCommandIndex >= m_PreviousParameters.length - 1) {
+         //m_iPreviousCommandIndex = 0;
+      }
+      else {
+         m_iPreviousCommandIndex++;
+         setPreviouslyUsedParameters(m_iPreviousCommandIndex);
+      }
+
+
+   }
+
+
+   protected void showHelp() {
+
+      SextanteGUI.getGUIFactory().showHelpDialog(m_Algorithm);
+
+   }
+
+
+   protected void executeAlgorithm() {
+
+      try {
+         try {
+            assignParameters();
+         }
+         catch (final TooLargeGridExtentException e) {
+            final int iRet = JOptionPane.showConfirmDialog(null, e.getMessage(), Sextante.getText("Warning"),
+                     JOptionPane.YES_NO_OPTION);
+            if (iRet != JOptionPane.YES_OPTION) {
+               this.jTabbedPane1.setSelectedIndex(1);
+               return;
+            }
+         }
+
+         m_iDialogReturn = IGUIFactory.OK;
+
+         dispose();
+         setVisible(false);
+
+      }
+      catch (final WrongInputException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPane1.setSelectedIndex(0);
+      }
+      catch (final WrongAnalysisExtentException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPane1.setSelectedIndex(1);
+      }
+      catch (final OverwrittingNotAllowedException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPane1.setSelectedIndex(0);
+      }
+      catch (final LayerCannotBeOverwrittenException e) {
+         JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+         this.jTabbedPane1.setSelectedIndex(0);
+      }
+
+   }
+
+
+   protected void assignParameters() throws WrongInputException, OverwrittingNotAllowedException,
+                                    LayerCannotBeOverwrittenException, WrongAnalysisExtentException, TooLargeGridExtentException {
+
+      jPanelParametersMain.assignParameters();
+      if (m_Algorithm.getUserCanDefineAnalysisExtent()) {
+         getAnalysisExtentPanel().assignExtent();
+      }
+
+   }
+
+
+   private AnalysisExtentPanel getAnalysisExtentPanel() {
+
+      if (jAnalysisExtentPanel == null) {
+         if (m_Algorithm.is3D()) {
+            jAnalysisExtentPanel = new TridimensionalAnalysisExtentPanel(m_Algorithm);
+         }
+         else {
+            jAnalysisExtentPanel = new AnalysisExtentPanel(m_Algorithm);
+         }
+      }
+      return jAnalysisExtentPanel;
+
+   }
+
+
+   /**
+    * Returns {@link es.unex.sextante.gui.core.IGUIFactory#OK} if the user selected "OK" and the algorithm should be executed
+    * 
+    * @return IGUIFactory.OK if the user selected "OK" and the algorithm should be executed
+    */
+   public int getDialogReturn() {
+
+      return m_iDialogReturn;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AlgorithmDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeneralOptionsChannelSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeneralOptionsChannelSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeneralOptionsChannelSelectionPanel.java	(revision 369)
@@ -0,0 +1,71 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class GeneralOptionsChannelSelectionPanel
+         extends
+            JPanel {
+
+   public static final String   OVERWRITE            = "OVERWRITE";
+   public static final String   SAVE_TO_TEMP_FILE    = "SET_TEMP_FILE";
+   public static final String   DO_NOT_CREATE_OUTPUT = "DO_NOT_CREATE_OUTPUT";
+
+   private final ActionListener m_Listener;
+   private JButton              jButtonSetTempFile;
+   private JButton              jButtonSetOverwrite;
+   private JButton              jButtonDoNotCreate;
+   private final Output         m_Output;
+
+
+   public GeneralOptionsChannelSelectionPanel(final Output output,
+                                              final ActionListener listener) {
+
+      super();
+
+      m_Listener = listener;
+      m_Output = output;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      this.setLayout(new TableLayout(new double[][] { { 50, TableLayout.FILL, 50 },
+               { 50, TableLayout.MINIMUM, 50, TableLayout.MINIMUM, 50, TableLayout.MINIMUM, TableLayout.FILL } }));
+
+      //this.setLayout(new FlowLayout());
+
+
+      if (m_Output instanceof OutputVectorLayer) {
+         if (((OutputVectorLayer) m_Output).canOverwrite()) {
+            jButtonSetOverwrite = new JButton(Sextante.getText("Overwrite"));
+            jButtonSetOverwrite.addActionListener(m_Listener);
+            jButtonSetOverwrite.setActionCommand(OVERWRITE);
+            this.add("1,5", jButtonSetOverwrite);
+         }
+      }
+      jButtonSetTempFile = new JButton(Sextante.getText("Save_to_temp_file"));
+      jButtonSetTempFile.addActionListener(m_Listener);
+      jButtonSetTempFile.setActionCommand(SAVE_TO_TEMP_FILE);
+      this.add("1,1", jButtonSetTempFile);
+
+      jButtonDoNotCreate = new JButton(Sextante.getText("Do_not_create_output"));
+      jButtonDoNotCreate.addActionListener(m_Listener);
+      jButtonDoNotCreate.setActionCommand(DO_NOT_CREATE_OUTPUT);
+      this.add("1,3", jButtonDoNotCreate);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeneralOptionsChannelSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureVectorLayer.java	(revision 369)
@@ -0,0 +1,211 @@
+package es.unex.sextante.gui.algorithm.iterative;
+
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.dataObjects.AbstractVectorLayer;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.IVectorLayerFilter;
+import es.unex.sextante.outputs.IOutputChannel;
+
+public class SingleFeatureVectorLayer
+         extends
+            AbstractVectorLayer {
+
+
+   private String         m_sName;
+   private Object[]       m_Record;
+   private Geometry       m_Geometry;
+   private final String[] m_sFields;
+   private final Object   m_CRS;
+   private IVectorLayer   m_OriginalLayer;
+   private final int      m_iShapeType;
+   private int      	  m_ID;
+
+
+   public SingleFeatureVectorLayer(final IVectorLayer layer) {
+
+      m_sFields = layer.getFieldNames();
+      m_CRS = layer.getCRS();
+      m_OriginalLayer = layer;
+      m_sName = layer.getName();
+      m_iShapeType = layer.getShapeType();
+
+   }
+
+
+   public void setFeature(final Geometry geometry,
+                          final Object[] record) {
+
+      m_Geometry = geometry;
+      m_Record = record;
+
+   }
+
+
+   public void addFeature(final Geometry geometry,
+                          final Object[] attributes) {}
+
+
+   public int getFieldCount() {
+
+      return m_Record.length;
+
+   }
+
+
+   public String getFieldName(final int iIndex) {
+
+      return m_sFields[iIndex];
+
+   }
+
+
+   public Class getFieldType(final int iIndex) {
+
+      return m_Record[iIndex].getClass();
+   }
+
+
+   public int getShapeType() {
+
+      return m_iShapeType;
+
+   }
+
+
+   public IFeatureIterator iterator() {
+
+      return new SingleFeatureIterator(m_Geometry, m_Record);
+
+   }
+
+
+   public Object getCRS() {
+
+      return m_CRS;
+
+   }
+
+
+   @Override
+   public Rectangle2D getFullExtent() {
+
+      final Envelope env = m_Geometry.getEnvelopeInternal();
+      return new Rectangle2D.Double(env.getMinX(), env.getMinY(), env.getWidth(), env.getHeight());
+
+   }
+
+
+   public void close() {}
+
+
+   public IOutputChannel getOutputChannel() {
+
+      return null;
+
+   }
+
+
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+   public void open() {}
+
+
+   public void postProcess() throws Exception {}
+
+
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   /*
+    * Sets an internal ID. Useful for keeping external algorithm
+    * providers such as GRASS informed which feature is being
+    * processed by an iterative processor.
+    * Use range 1..n.
+    */
+   public void setID (final int ID) {
+
+	      m_ID = ID;
+
+   }
+
+
+   public int getID () {
+
+	      return ( m_ID );
+
+  }
+
+
+   public IVectorLayer getOriginalLayer() {
+
+      return m_OriginalLayer;
+
+   }
+
+
+   @Override
+   public void addFilter(final IVectorLayerFilter filter) {}
+
+
+   @Override
+   public void removeFilters() {}
+
+
+   @Override
+   public Object getBaseDataObject() {
+
+      return null;
+
+   }
+
+
+   public void free() {
+
+      m_OriginalLayer = null;
+
+   }
+
+
+   public boolean canBeEdited() {
+
+      return false;
+
+   }
+
+
+    /* (non-Javadoc)
+     * @see es.unex.sextante.dataObjects.IVectorLayer#getSubType()
+     */
+    @Override
+    public int getSubType() throws BaseException {
+        return m_OriginalLayer.getSubType();
+    }
+
+    @Override
+    public String getContextName() {
+        return null;
+    }
+
+    @Override
+    public boolean hasSelection() {
+        return false;
+    }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmMonitorableTask.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmMonitorableTask.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmMonitorableTask.java	(revision 369)
@@ -0,0 +1,217 @@
+package es.unex.sextante.gui.algorithm.iterative;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableModel;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+import es.unex.sextante.gui.additionalResults.AdditionalResults;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputNumericalValue;
+
+/**
+ * A task to execute an algorithm iteratively over all the features of a vector layer
+ * 
+ * @author volaya
+ * 
+ */
+public class IterativeAlgorithmMonitorableTask
+         implements
+            Runnable {
+
+   private String                                           m_sErrorMessage;
+   private final GeoAlgorithm                               m_Algorithm;
+   private ITaskMonitor                                     m_ProgressMonitor = null;
+   private final String                                     m_sParameterToIterateOver;
+   private final SingleFeatureVectorLayer                   m_SFVL;
+   private final IFeatureIterator                           m_Iterator;
+   private final int                                        m_iShapesCount;
+   private String                                           m_sLayerName;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   /**
+    * Creates a new task
+    * 
+    * @param algorithm
+    *                the algorithm to execute
+    * @param parent
+    *                the dialog from which it has been called, to be used as parent for the monitor dialog
+    * @param sParameterToIterateOver
+    *                the name of the parameter to iterate over
+    * @throws WrongParameterIDException
+    * @throws NullParameterValueException
+    * @throws WrongParameterTypeException
+    */
+   public IterativeAlgorithmMonitorableTask(final GeoAlgorithm algorithm,
+                                            final JDialog parent,
+                                            final String sParameterToIterateOver) throws GeoAlgorithmExecutionException {
+
+      try {
+         m_Algorithm = algorithm;
+         m_NumericalOutputs = new ArrayList<ArrayList<OutputNumericalValue>>();
+         m_sParameterToIterateOver = sParameterToIterateOver;
+         m_ProgressMonitor = SextanteGUI.getOutputFactory().getTaskMonitor(algorithm.getName(),
+                  algorithm.isDeterminatedProcess(), parent);
+         final IVectorLayer layer = m_Algorithm.getParameters().getParameter(m_sParameterToIterateOver).getParameterValueAsVectorLayer();
+         m_Iterator = layer.iterator();
+         m_iShapesCount = layer.getShapesCount();
+         m_SFVL = new SingleFeatureVectorLayer(layer);
+         m_Algorithm.getParameters().getParameter(m_sParameterToIterateOver).setParameterValue(m_SFVL);
+         m_sLayerName = layer.getName();
+      }
+      catch (final Exception e) {
+         if (m_ProgressMonitor != null) {
+            m_ProgressMonitor.close();
+         }
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+
+   /**
+    * Runs the batch process
+    */
+   public void run() {
+
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      final HashMap<String, String> filenames = new HashMap<String, String>();
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output output = ooset.getOutput(i);
+         final IOutputChannel channel = output.getOutputChannel();
+         if (channel != null) {
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               filenames.put(output.getName(), foc.getFilename());
+            }
+            else {
+               m_sErrorMessage = Sextante.getText("Unsupported output channel:") + channel.toString();
+               JOptionPane.showMessageDialog(null, m_sErrorMessage, Sextante.getText("Error"), JOptionPane.ERROR_MESSAGE);
+            }
+         }
+
+      }
+
+      int iIteration = 1;
+
+      while (m_Iterator.hasNext()) {
+         try {
+            final IFeature feature = m_Iterator.next();
+            m_SFVL.setFeature(feature.getGeometry(), feature.getRecord().getValues());
+            m_SFVL.setName(m_sLayerName + "[" + Integer.toString(iIteration) + "]");
+            m_SFVL.setID(iIteration);
+            final Set<String> names = filenames.keySet();
+            for (final Iterator iter = names.iterator(); iter.hasNext();) {
+               final String sName = (String) iter.next();
+               String sFilename = filenames.get(sName);
+               if (sFilename == null) {
+                  ooset.getOutput(sName).setOutputChannel(new FileOutputChannel(null));
+               }
+               else {
+                  sFilename = sFilename + "_" + Integer.toString(iIteration);
+                  ooset.getOutput(sName).setOutputChannel(new FileOutputChannel(sFilename));
+               }
+            }
+
+            m_ProgressMonitor.setDescriptionPrefix("[" + Integer.toString(iIteration) + "/" + Integer.toString(m_iShapesCount)
+                                                   + "] ");
+
+            IterativeAlgorithmSingleUnit unit;
+            final GeoAlgorithm alg = m_Algorithm.getNewInstance();
+            unit = new IterativeAlgorithmSingleUnit(alg, m_ProgressMonitor, Integer.toString(iIteration), m_NumericalOutputs);
+
+            final ExecutorService pool = Executors.newFixedThreadPool(2);
+            final Future<Boolean> future = pool.submit(unit);
+            Boolean success = null;
+            success = future.get();
+            if (!success.booleanValue() || m_ProgressMonitor.isCanceled()) {
+               break;
+            }
+            iIteration++;
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+            m_sErrorMessage = e.getMessage();
+            break;
+         }
+      }
+
+      m_ProgressMonitor.close();
+
+      if (m_sErrorMessage != null) {
+         JOptionPane.showMessageDialog(null, m_sErrorMessage, Sextante.getText("Error"), JOptionPane.ERROR_MESSAGE);
+      }
+
+      final JScrollPane table = createNumericalOutputsTable();
+
+      SextanteGUI.getInputFactory().clearDataObjects();
+      SextanteGUI.getInputFactory().createDataObjects();
+
+      if (table != null) {
+         AdditionalResults.addComponent(new ObjectAndDescription(m_Algorithm.getName() + "[" + m_sLayerName + "]", table));
+      }
+
+   }
+
+
+   private JScrollPane createNumericalOutputsTable() {
+
+      if (m_NumericalOutputs.size() == 0) {
+         return null;
+      }
+
+      final JScrollPane jScrollPane = new JScrollPane();
+      final JTable jTable = new JTable();
+      jScrollPane.setViewportView(jTable);
+
+
+      final int iRecordsCount = m_NumericalOutputs.size();
+      final int iFieldsCount = m_NumericalOutputs.get(0).size();
+      final String[] fields = new String[iFieldsCount];
+      for (int i = 0; i < fields.length; i++) {
+         fields[i] = m_NumericalOutputs.get(0).get(i).getDescription();
+      }
+
+      final String[][] data = new String[iRecordsCount][fields.length];
+
+      for (int i = 0; i < iRecordsCount; i++) {
+         for (int j = 0; j < iFieldsCount; j++) {
+            data[i][j] = m_NumericalOutputs.get(i).get(j).getOutputObject().toString();
+         }
+      }
+
+      final DefaultTableModel model = new DefaultTableModel();
+      model.setDataVector(data, fields);
+      jTable.setModel(model);
+      jTable.setEnabled(false);
+
+      return jScrollPane;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmMonitorableTask.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmSingleUnit.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmSingleUnit.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmSingleUnit.java	(revision 369)
@@ -0,0 +1,132 @@
+package es.unex.sextante.gui.algorithm.iterative;
+
+import java.util.ArrayList;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ProcessTask;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputNumericalValue;
+
+/**
+ * A task representing a single algorithm execution as a part of a batch process. The process is comprised of several single units
+ * like the one represented by this class
+ * 
+ * @author volaya
+ * 
+ */
+public class IterativeAlgorithmSingleUnit
+         implements
+            Callable<Boolean> {
+
+   private final GeoAlgorithm                               m_Algorithm;
+   private StringBuffer                                     m_sLog;
+   private final ITaskMonitor                               m_TaskMonitor;
+   private final String                                     m_sUnitName;
+   private final ArrayList<ArrayList<OutputNumericalValue>> m_NumericalOutputs;
+
+
+   /**
+    * 
+    * @param alg
+    *                the algorithm to execute
+    * @param monitor
+    *                the task monitor to use
+    * @param sUnitName
+    *                the name of the unit to be executed
+    * @param numericalOutputs
+    *                an array list to collect numerical outputs produced by the algorithm
+    */
+   public IterativeAlgorithmSingleUnit(final GeoAlgorithm alg,
+                                       final ITaskMonitor monitor,
+                                       final String sUnitName,
+                                       final ArrayList<ArrayList<OutputNumericalValue>> numericalOutputs) {
+
+      m_Algorithm = alg;
+      m_TaskMonitor = monitor;
+      m_sUnitName = sUnitName;
+      m_NumericalOutputs = numericalOutputs;
+
+   }
+
+
+   /**
+    * Executes the algorithm
+    * 
+    * @return true if the algorithm was not canceled
+    * @throws GeoAlgorithmExecutionException
+    */
+   public Boolean call() throws GeoAlgorithmExecutionException {
+
+      final ExecutorService pool = Executors.newFixedThreadPool(1);
+      final Future<Boolean> p = pool.submit(new ProcessTask(m_Algorithm, SextanteGUI.getOutputFactory(), m_TaskMonitor));
+      try {
+         final Boolean success = p.get();
+         if ((success != null) && success.booleanValue()) {
+            changeOutputDescriptions();
+            collectIndividualNumericalOutputs();
+            final Runnable postProcess = SextanteGUI.getPostProcessTask(m_Algorithm, false);
+            if (postProcess != null) {
+               postProcess.run();
+            }
+            return true;
+         }
+         else {
+            return false;
+         }
+
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+   }
+
+
+   private void collectIndividualNumericalOutputs() {
+
+      final ArrayList<OutputNumericalValue> numericalOutputs = new ArrayList<OutputNumericalValue>();
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output out = ooset.getOutput(i);
+         if (out instanceof OutputNumericalValue) {
+            numericalOutputs.add((OutputNumericalValue) out);
+         }
+      }
+
+      m_NumericalOutputs.add(numericalOutputs);
+
+   }
+
+
+   private void changeOutputDescriptions() {
+
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output out = ooset.getOutput(i);
+         if (!(out instanceof OutputNumericalValue)) {
+            out.setDescription(out.getDescription() + " <" + m_sUnitName + ">");
+         }
+      }
+
+   }
+
+
+   /**
+    * Returns a string with information about the executed process
+    * 
+    * @return a string with information about the executed process
+    */
+   public String getLog() {
+
+      return m_sLog.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/IterativeAlgorithmSingleUnit.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureIterator.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureIterator.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureIterator.java	(revision 369)
@@ -0,0 +1,63 @@
+package es.unex.sextante.gui.algorithm.iterative;
+
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.dataObjects.FeatureImpl;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+
+public class SingleFeatureIterator
+         implements
+            IFeatureIterator {
+
+
+   private final Geometry m_Geometry;
+   private final Object[] m_Record;
+   private boolean        m_bHasNext;
+
+
+   public SingleFeatureIterator(final Geometry geometry,
+                                final Object[] record) {
+
+      m_Geometry = geometry;
+      m_Record = record;
+      m_bHasNext = true;
+
+   }
+
+
+   public void close() {}
+
+
+   public int getFeatureCount() {
+
+      return 1;
+
+   }
+
+
+   public boolean hasNext() {
+
+      return m_bHasNext;
+   }
+
+
+   public IFeature next() {
+
+      m_bHasNext = false;
+      return new FeatureImpl(m_Geometry, m_Record);
+
+   }
+
+
+   public Rectangle2D getExtent() {
+
+      final Envelope envelope = m_Geometry.getEnvelopeInternal();
+      return new Rectangle2D.Double(envelope.getMinX(), envelope.getMinY(), envelope.getWidth(), envelope.getHeight());
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/iterative/SingleFeatureIterator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconFieldComboBoxRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconFieldComboBoxRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/IconFieldComboBoxRenderer.java	(revision 369)
@@ -0,0 +1,45 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package es.unex.sextante.gui.algorithm;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+import java.awt.Color;
+import javax.swing.Icon;
+import java.awt.Component;
+import java.awt.Graphics;
+/**
+ *
+ * @author osc
+ */
+public class IconFieldComboBoxRenderer implements Icon {
+  public String fieldType;
+
+  public IconFieldComboBoxRenderer(String fieldType) {
+      this.fieldType = fieldType;
+  }
+
+  @Override
+  public int getIconHeight() {
+    return 20;
+  }
+
+  @Override
+  public int getIconWidth() {
+    return 20;
+  }
+
+  @Override
+  public void paintIcon(Component c, Graphics g, int x, int y) {
+    if (false) {
+          g.setColor(Color.BLUE);
+          g.drawRect(2, 2, 10, 10);
+      } else {
+          g.setColor(Color.BLUE);
+          g.drawOval(5, 5, 4, 4);
+          g.drawRect(2, 2, 10, 10);
+      }
+  }
+}
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TableFilterPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TableFilterPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TableFilterPanel.java	(revision 369)
@@ -0,0 +1,165 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import org.gvsig.expressionevaluator.Expression;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
+import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
+import org.gvsig.expressionevaluator.swing.JExpressionBuilder;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.fmap.dal.swing.DataSwingManager;
+import org.gvsig.fmap.dal.swing.expressionevaluator.FeatureStoreElement;
+
+/**
+ * A panel with a text field and a button, which pops-up a filter dialog
+ *
+ * @author omartinez
+ *
+ */
+public class TableFilterPanel
+        extends
+        JPanel {
+
+    private JTextField textField;
+    private JButton button;
+    private FeatureStore m_Store = null;
+    private ExpressionPickerController expressionControler;
+    private FeatureStoreElement element;
+
+    /**
+     * Creates a new file selection panel.
+     *
+     * @param bFolder true if the selection must be a folder instead of a file
+     * @param bOpen true to show a open file dialog. False to show a save file
+     * one
+     * @param sExts a list of permitted file extensions
+     * @param sDescription a description of the panel to show in the file dialog
+     */
+    public TableFilterPanel(FeatureStore m_Store) {
+
+        super();
+
+        initGUI();
+
+        this.setStore(m_Store);
+
+    }
+
+    public TableFilterPanel() {
+
+        super();
+
+        initGUI();
+
+    }
+
+    private void initGUI() {
+
+        button = new JButton("");
+        textField = new JTextField("");
+        textField.setMaximumSize(new java.awt.Dimension(340, 18));
+
+        final TableLayout thisLayout = new TableLayout(new double[][]{{TableLayoutConstants.FILL, 25.0},
+        {TableLayoutConstants.FILL}});
+        this.setLayout(thisLayout);
+        this.add(textField, "0,  0");
+        this.add(button, "1,  0");
+        ExpressionEvaluatorSwingManager swingManager = ExpressionEvaluatorSwingLocator.getManager();
+        this.expressionControler = swingManager.createExpressionPickerController(textField, button);
+//        this.element = (FeatureStoreElement) swingManager.createElement(
+//                DataSwingManager.FEATURE_STORE_EXPRESSION_ELEMENT,
+//                this.expressionControler,
+//                null);
+        this.element = DALSwingLocator.getSwingManager().createFeatureStoreElement(this.m_Store);
+        
+        if (element != null) {
+            this.expressionControler.addElement(element);
+        }
+    }
+
+    /**
+     * Returns the filepath currently shown in the text field
+     *
+     * @return the filepath currently shown in the text field
+     */
+    public Expression getExpression() {
+
+//        return textField.getText();
+        return this.expressionControler.get();
+
+    }
+
+    /**
+     * Returns this panel's JTextField widget.
+     *
+     * @return the text field widget used to input/store the selected file's
+     * path and name
+     */
+    public JTextField getTextField() {
+
+        return (this.textField);
+
+    }
+
+    /**
+     * Returns this panel's JButton widget.
+     *
+     * @return the button widget used to pop up the file selector widget
+     */
+    public JButton getButton() {
+
+        return (this.button);
+
+    }
+
+    public void setStore(FeatureStore store) {
+        this.m_Store = store;
+        this.element.setFeatureStore(store);
+
+        if (store != null) {
+            Feature sampleFeature = null;
+            try {
+                sampleFeature = store.getFeatureSelection().first();
+                if (sampleFeature == null) {
+                    sampleFeature = store.first();
+                }
+            } catch (DataException ex) {
+            }
+            if (sampleFeature != null) {
+                FeatureSymbolTable featureSymbolTable = DALLocator.getDataManager().createFeatureSymbolTable();
+                featureSymbolTable.setFeature(sampleFeature);
+                this.expressionControler.setPreviewSymbolTable(featureSymbolTable.createParent());
+            }
+        }
+
+    }
+
+    public void setPhrase(final String sText) {
+
+        textField.setText(sText);
+
+    }
+
+    public String getPhrase() {
+
+        return textField.getText();
+
+    }
+
+    @Override
+    public void setToolTipText(final String sText) {
+
+        textField.setToolTipText(sText);
+
+    }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/TableFilterPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileOutputChannelSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileOutputChannelSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileOutputChannelSelectionPanel.java	(revision 369)
@@ -0,0 +1,50 @@
+package es.unex.sextante.gui.algorithm;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionListener;
+
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+
+public class FileOutputChannelSelectionPanel
+         extends
+            JPanel {
+
+   private final ActionListener m_Listener;
+   private final String         m_sDescription;
+   private final String[]       m_sExtensions;
+   private JFileChooser         m_Chooser;
+
+
+   public FileOutputChannelSelectionPanel(final String sDescription,
+                                          final String[] sExtensions,
+                                          final ActionListener listener) {
+
+      m_sDescription = sDescription;
+      m_sExtensions = sExtensions;
+      m_Listener = listener;
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      this.setLayout(new BorderLayout());
+      m_Chooser = new JFileChooser();
+      m_Chooser.setDialogType(JFileChooser.SAVE_DIALOG);
+      m_Chooser.setFileFilter(new GenericFileFilter(m_sExtensions, m_sDescription));
+      m_Chooser.addActionListener(m_Listener);
+      this.add(m_Chooser);
+
+   }
+
+
+   public String getSelectedFile() {
+
+      return m_Chooser.getSelectedFile().getAbsolutePath();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileOutputChannelSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionDialog.java	(revision 369)
@@ -0,0 +1,134 @@
+package es.unex.sextante.gui.algorithm;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JDialog;
+import javax.swing.JTabbedPane;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class OutputChannelSelectionDialog
+         extends
+            JDialog
+         implements
+            ActionListener {
+
+   public static final int                     TYPE_RASTER   = 0;
+   public static final int                     TYPE_VECTOR   = 1;
+   public static final int                     TYPE_TABLE    = 2;
+   public static final int                     TYPE_RASTER3D = 3;
+
+   private String                              m_sOutputChannel;
+   private GeneralOptionsChannelSelectionPanel m_GeneralOptionsChannelSelectionPanel;
+   private FileOutputChannelSelectionPanel     m_FileOutputChannelSelectionPanel;
+   //private DatabaseOutputChannelSelectionPanel m_DatabaseOutputChannelSelectionPanel;
+   private final Output                        m_Output;
+
+
+   public OutputChannelSelectionDialog(final Output out) {
+
+      super(SextanteGUI.getMainFrame(), true);
+
+      m_Output = out;
+
+      initGUI();
+
+      this.pack();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void initGUI() {
+
+      this.setResizable(false);
+      this.setPreferredSize(new Dimension(500, 400));
+      this.getContentPane().setLayout(new BorderLayout());
+
+      final JTabbedPane tabbedPane = new JTabbedPane();
+
+      m_GeneralOptionsChannelSelectionPanel = new GeneralOptionsChannelSelectionPanel(m_Output, this);
+
+      String[] sExt;
+      String sDesc;
+      int iType;
+      if (m_Output instanceof OutputRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().getRasterLayerOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("Raster_layers"));
+         iType = TYPE_RASTER;
+      }
+      else if (m_Output instanceof Output3DRasterLayer) {
+         sExt = SextanteGUI.getOutputFactory().get3DRasterLayerOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("3D_Raster_layers"));
+         iType = TYPE_RASTER3D;
+      }
+      else if (m_Output instanceof OutputVectorLayer) {
+         sExt = SextanteGUI.getOutputFactory().getVectorLayerOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("Vector_layer"));
+         iType = TYPE_VECTOR;
+      }
+      else {
+         sExt = SextanteGUI.getOutputFactory().getTableOutputExtensions();
+         sDesc = Sextante.getText(Sextante.getText("Tables"));
+         iType = TYPE_TABLE;
+      }
+      m_FileOutputChannelSelectionPanel = new FileOutputChannelSelectionPanel(sDesc, sExt, this);
+      tabbedPane.addTab(Sextante.getText("File"), m_FileOutputChannelSelectionPanel);
+
+      tabbedPane.addTab(Sextante.getText("General"), m_GeneralOptionsChannelSelectionPanel);      
+      
+      //if (iType == TYPE_VECTOR) {
+         //m_DatabaseOutputChannelSelectionPanel = new DatabaseOutputChannelSelectionPanel(sDesc, this);
+         //tabbedPane.addTab(Sextante.getText("Database"), m_DatabaseOutputChannelSelectionPanel);
+      //}
+
+      this.getContentPane().add(tabbedPane);
+
+   }
+
+
+   public String getOutputChannelString() {
+
+      return m_sOutputChannel;
+
+   }
+
+
+   public void actionPerformed(final ActionEvent action) {
+
+      if (action.getActionCommand().equals("CancelSelection")) {
+         m_sOutputChannel = null;
+         this.setVisible(false);
+         this.dispose();
+      }
+      else if (action.getActionCommand().equals("ApproveSelection")) {
+         m_sOutputChannel = m_FileOutputChannelSelectionPanel.getSelectedFile();
+         this.setVisible(false);
+         this.dispose();
+      }
+      else if (action.getActionCommand().equals(GeneralOptionsChannelSelectionPanel.OVERWRITE)) {
+         m_sOutputChannel = Sextante.getText("[Overwrite]");
+         this.setVisible(false);
+         this.dispose();
+      }
+      else if (action.getActionCommand().equals(GeneralOptionsChannelSelectionPanel.SAVE_TO_TEMP_FILE)) {
+         m_sOutputChannel = Sextante.getText("[Save_to_temporary_file]");
+         this.setVisible(false);
+         this.dispose();
+      }
+      else if (action.getActionCommand().equals(GeneralOptionsChannelSelectionPanel.DO_NOT_CREATE_OUTPUT)) {
+         m_sOutputChannel = Sextante.getText("[Do_not_create_output]");
+         this.setVisible(false);
+         this.dispose();
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionPanel.java	(revision 369)
@@ -0,0 +1,166 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import jsh.shell.Utils;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongOutputChannelDataException;
+import es.unex.sextante.outputs.DatabaseOutputChannel;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.NullOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+import es.unex.sextante.parameters.Parameter;
+
+/**
+ * A panel with a text field and a button, which pops-up a dialog to select an output channel
+ * 
+ * @author volaya
+ * 
+ */
+public class OutputChannelSelectionPanel
+         extends
+            JPanel {
+
+   private JTextField          textField;
+   private JButton             button;
+   private final Output        m_Output;
+   private final ParametersSet m_ParametersSet;
+
+
+   /**
+    * Creates a new output channel selection panel
+    * 
+    * @param out
+    *                the output represented by this panel
+    * 
+    */
+   public OutputChannelSelectionPanel(final Output out,
+                                      final ParametersSet paramSet) {
+
+      super();
+
+      m_Output = out;
+      m_ParametersSet = paramSet;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      textField = new JTextField(Sextante.getText("[Save_to_temporary_file]"));
+      textField.setMaximumSize(new java.awt.Dimension(340, 18));
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            showDialog();
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(textField, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   /**
+    * Returns the current output channel
+    * 
+    * @return the current output channel
+    * @throws WrongOutputChannelDataException
+    *                 if the channel could not be created
+    */
+   public IOutputChannel getOutputChannel() throws WrongOutputChannelDataException {
+
+      final String s = textField.getText();
+      if (s.equals(Sextante.getText("[Save_to_temporary_file]")) || s.trim().equals("")) {
+         return new FileOutputChannel(Utils.constructPath(null));
+      }
+      if (s.equals(Sextante.getText("[Overwrite]"))) {
+         try {
+            final Parameter param = m_ParametersSet.getParameter(((OutputVectorLayer) m_Output).getInputLayerToOverwrite());
+            final IVectorLayer layer = param.getParameterValueAsVectorLayer();
+            return new OverwriteOutputChannel(layer);
+         }
+         catch (final Exception e) {
+            throw new WrongOutputChannelDataException();
+         }
+      }
+      if (s.equals(Sextante.getText("[Do_not_create_output]"))) {
+         return new NullOutputChannel();
+      }
+
+      IOutputChannel channel;
+      channel = DatabaseOutputChannel.getFromString(s);
+
+      if (channel == null) {
+         channel = new FileOutputChannel(Utils.constructPath(s));
+      }
+
+      return channel;
+
+   }
+
+
+   private void showDialog() {
+
+      final OutputChannelSelectionDialog dialog = new OutputChannelSelectionDialog(m_Output);
+      dialog.pack();
+      dialog.setVisible(true);
+
+      final String ret = dialog.getOutputChannelString();
+      if (ret != null) {
+         textField.setText(ret);
+      }
+
+   }
+
+
+   @Override
+   public void setToolTipText(final String sText) {
+
+      textField.setToolTipText(sText);
+
+   }
+
+
+   public void setText(String sValue) {
+
+      if (sValue.equals("#")) {
+         textField.setText(Sextante.getText("[Save_to_temporary_file]"));
+      }
+      else if (sValue.equals("$")) {
+         textField.setText(Sextante.getText("[Overwrite]"));
+      }
+      else if (sValue.equals("!")) {
+         textField.setText(Sextante.getText("[Do_not_create_output]"));
+      }
+      else {
+         String sNewValue = sValue.replace("\\\\", "\\");
+         while (!sNewValue.equals(sValue)) {
+            sValue = sNewValue;
+            sNewValue = sValue.replace("\\\\", "\\");
+         }
+         textField.setText(sNewValue);
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/OutputChannelSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/PointSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/PointSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/PointSelectionPanel.java	(revision 369)
@@ -0,0 +1,122 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.NamedPoint;
+import es.unex.sextante.gui.core.SextanteGUI;
+import java.util.List;
+
+/**
+ * A panel with two text fields, to introduce point coordinates. It also features a button to access pre-stored coordinates
+ * 
+ * @author volaya
+ * 
+ */
+public class PointSelectionPanel
+         extends
+            JPanel {
+
+   private JTextField textFieldX;
+   private JButton    jButton;
+   private JTextField textFieldY;
+   private JLabel     labelX;
+   private JLabel     labelY;
+
+
+   PointSelectionPanel() {
+
+      super();
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      textFieldX = new JTextField("0");
+      textFieldY = new JTextField("0");
+      labelX = new JLabel(" X:");
+      labelY = new JLabel(" Y:");
+      jButton = new JButton();
+      jButton.setText("...");
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 25.0, TableLayoutConstants.FILL, 25.0, TableLayoutConstants.FILL, 5.0, 25.0, 5.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(128, 22));
+      this.add(labelX, "0,  0");
+      this.add(textFieldX, "1,  0");
+      this.add(labelY, "2,  0");
+      this.add(textFieldY, "3,  0");
+      this.add(jButton, "5, 0");
+      jButton.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            showPointSelector();
+         }
+      });
+
+   }
+
+
+   protected void showPointSelector() {
+
+      final List<NamedPoint> coordsList = SextanteGUI.getGUIFactory().getCoordinatesList();
+      if (!coordsList.isEmpty()) {
+         final NamedPoint[] pts = coordsList.toArray(new NamedPoint[0]);
+         final NamedPoint pt = (NamedPoint) JOptionPane.showInputDialog(this, Sextante.getText("Select_coordinates"),
+                  Sextante.getText("Coordinates"), JOptionPane.PLAIN_MESSAGE, null, pts, null);
+         if (pt != null) {
+            textFieldX.setText(Double.toString(pt.getPoint().getX()));
+            textFieldY.setText(Double.toString(pt.getPoint().getY()));
+         }
+      }
+
+   }
+
+
+   /**
+    * Returns the selected point
+    * 
+    * @return the point introduced using this panel
+    */
+   public Point2D getPoint() {
+
+      try {
+         final Point2D pt = new Point2D.Double(Double.parseDouble(textFieldX.getText()), Double.parseDouble(textFieldY.getText()));
+         return pt;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+
+   /**
+    * Sets the current point
+    * 
+    * @param point
+    *                the new point to set
+    */
+   public void setPoint(final Point2D point) {
+
+      textFieldX.setText(Double.toString(Math.floor(point.getX() * 10000.) / 10000.));
+      textFieldY.setText(Double.toString(Math.floor(point.getY() * 10000.) / 10000.));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/PointSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldDescriptionComboBox.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldDescriptionComboBox.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldDescriptionComboBox.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.gui.algorithm;
+
+public class FieldDescriptionComboBox
+         implements
+            Comparable {
+
+   private String m_sDescription;
+   private Class m_Object;
+
+   public FieldDescriptionComboBox(final String sDescription,
+                               final Class object) {
+
+      m_sDescription = sDescription;
+      m_Object = object;
+
+   }
+
+
+   public Object getObject() {
+
+      return m_Object;
+
+   }
+
+
+   public void setObject(final Class object) {
+
+      m_Object = object;
+
+   }
+
+
+   public String getDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public void setDescription(final String sDescription) {
+
+      m_sDescription = sDescription;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return getDescription();
+
+   }
+
+
+   @Override
+   public int compareTo(final Object arg0) {
+
+      return getDescription().compareTo(((FieldDescriptionComboBox) arg0).getDescription());
+
+   }
+
+
+   @Override
+   public boolean equals(final Object ob) {
+
+      if (ob == null) {
+         return false;
+      }
+
+      try {
+         final FieldDescriptionComboBox oad = (FieldDescriptionComboBox) ob;
+         boolean bObjsEqual;
+         boolean bDescsEqual;
+         if (oad.getObject() == null) {
+            bObjsEqual = m_Object == null;
+         }
+         else {
+            bObjsEqual = oad.getObject().equals(m_Object);
+         }
+         if (oad.getDescription() == null) {
+            bDescsEqual = m_sDescription == null;
+         }
+         else {
+            bDescsEqual = oad.getDescription().equals(m_sDescription);
+         }
+         return bObjsEqual && bDescsEqual;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+    public String getFieldType() {
+        return this.m_Object.getSimpleName();
+    }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FieldDescriptionComboBox.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GenericFileFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GenericFileFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GenericFileFilter.java	(revision 369)
@@ -0,0 +1,105 @@
+package es.unex.sextante.gui.algorithm;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+
+/**
+ * Filtro de fichero generico para los JFileChooser
+ * 
+ * @author Fernando Gonzalez Cortes
+ */
+public class GenericFileFilter
+         extends
+            FileFilter {
+   private String[]     extensiones = new String[1];
+   private final String description;
+   private boolean      dirs        = true;
+
+
+   /**
+    * Crea un nuevo GenericFileFilter.
+    * 
+    * @param ext
+    *                DOCUMENT ME!
+    * @param desc
+    *                DOCUMENT ME!
+    */
+   public GenericFileFilter(final String[] ext,
+                            final String desc) {
+      extensiones = ext;
+      description = desc;
+   }
+
+
+   /**
+    * Crea un nuevo GenericFileFilter.
+    * 
+    * @param ext
+    *                DOCUMENT ME!
+    * @param desc
+    *                DOCUMENT ME!
+    */
+   public GenericFileFilter(final String ext,
+                            final String desc) {
+      extensiones[0] = ext;
+      description = desc;
+   }
+
+
+   /**
+    * Crea un nuevo GenericFileFilter.
+    * 
+    * @param ext
+    *                DOCUMENT ME!
+    * @param desc
+    *                DOCUMENT ME!
+    * @param dirs
+    *                DOCUMENT ME!
+    */
+   public GenericFileFilter(final String ext,
+                            final String desc,
+                            final boolean dirs) {
+      extensiones[0] = ext;
+      description = desc;
+      this.dirs = dirs;
+   }
+
+
+   /**
+    * @see javax.swing.filechooser.FileFilter#accept(java.io.File)
+    */
+   @Override
+   public boolean accept(final File f) {
+      if (f.isDirectory()) {
+         if (dirs) {
+            return true;
+         }
+         else {
+            return false;
+         }
+      }
+      if (extensiones[0] == null) {
+         return true;
+      }
+      boolean endsWith = false;
+      for (final String element : extensiones) {
+         if (f.getName().toUpperCase().endsWith(element.toUpperCase())) {
+            endsWith = true;
+         }
+      }
+
+      return endsWith;
+
+   }
+
+
+   /**
+    * @see javax.swing.filechooser.FileFilter#getDescription()
+    */
+   @Override
+   public String getDescription() {
+      return description;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GenericFileFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/CheckBoxList.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/CheckBoxList.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/CheckBoxList.java	(revision 369)
@@ -0,0 +1,68 @@
+package es.unex.sextante.gui.algorithm;
+
+import java.awt.Component;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.JCheckBox;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+import javax.swing.ListSelectionModel;
+import javax.swing.border.Border;
+import javax.swing.border.EmptyBorder;
+
+/**
+ * A list with checkboxes
+ * 
+ * @author volaya
+ * 
+ */
+public class CheckBoxList
+         extends
+            JList {
+   protected static final Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
+
+
+   /**
+    * Creates a new checkbox list
+    */
+   public CheckBoxList() {
+      setCellRenderer(new CellRenderer());
+
+      addMouseListener(new MouseAdapter() {
+         @Override
+         public void mousePressed(final MouseEvent e) {
+            final int index = locationToIndex(e.getPoint());
+
+            if (index != -1) {
+               final JCheckBox checkbox = (JCheckBox) getModel().getElementAt(index);
+               checkbox.setSelected(!checkbox.isSelected());
+               repaint();
+            }
+         }
+      });
+
+      setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+
+   }
+
+   protected class CellRenderer
+            implements
+               ListCellRenderer {
+      public Component getListCellRendererComponent(final JList list,
+                                                    final Object value,
+                                                    final int index,
+                                                    final boolean isSelected,
+                                                    final boolean cellHasFocus) {
+         final JCheckBox checkbox = (JCheckBox) value;
+         checkbox.setBackground(getBackground());
+         checkbox.setForeground(getForeground());
+         checkbox.setEnabled(isEnabled());
+         checkbox.setFont(getFont());
+         checkbox.setFocusPainted(false);
+         checkbox.setBorderPainted(true);
+         checkbox.setBorder(noFocusBorder);
+         return checkbox;
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/CheckBoxList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ParameterContainer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ParameterContainer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ParameterContainer.java	(revision 369)
@@ -0,0 +1,62 @@
+package es.unex.sextante.gui.algorithm;
+
+import javax.swing.JComponent;
+
+import es.unex.sextante.parameters.Parameter;
+
+/**
+ * A class representing a parameter key and the component used to introduce its value
+ *
+ * @author volaya
+ *
+ */
+public class ParameterContainer {
+
+   JComponent m_Container;
+   Parameter  m_Parameter;
+
+
+   public ParameterContainer(final Parameter parameter,
+                             final JComponent container) {
+
+      m_Parameter = parameter;
+      m_Container = container;
+
+   }
+
+
+   public JComponent getContainer() {
+
+      return m_Container;
+
+   }
+
+
+   public void setContainer(final JComponent container) {
+
+      m_Container = container;
+
+   }
+
+
+   public String getName() {
+
+      return m_Parameter.getParameterName();
+
+   }
+
+
+   public String getType() {
+
+      return m_Parameter.getParameterTypeName();
+
+   }
+
+
+   public Parameter getParameter() {
+
+      return m_Parameter;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/ParameterContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeoAlgorithmParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeoAlgorithmParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeoAlgorithmParametersPanel.java	(revision 369)
@@ -0,0 +1,66 @@
+package es.unex.sextante.gui.algorithm;
+
+import javax.swing.JPanel;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.gui.exceptions.OverwrittingNotAllowedException;
+
+/**
+ * An abstract class to extend by all parameter panels that take parameter values from the user for a geoalgorithm. If your
+ * geoalgorithm needs a more elaborated panel than the default one, extend this class naming the derived class with the name of
+ * the algorithm and adding the suffix "ParametersPanel".
+ * 
+ * For instance, for an algorithm named RasterOperationAlgorithm, you should create a class named RasterOperationParametersPanel.
+ * SEXTANTE will look for that class and if it cannot find it, it will use the default parameters panel instead.
+ * 
+ */
+
+public abstract class GeoAlgorithmParametersPanel
+         extends
+            JPanel {
+
+   /**
+    * Inits the panel with the needs of a given algorithm
+    * 
+    * @param algorithm
+    *                the geoalgorithm
+    */
+   public abstract void init(GeoAlgorithm algorithm);
+
+
+   /**
+    * Assigns the parameters entered by the user to the algorithm
+    * 
+    */
+   public abstract void assignParameters() throws WrongInputException, OverwrittingNotAllowedException,
+                                          LayerCannotBeOverwrittenException;
+
+
+   /**
+    * Sets the value of a parameter in the panel, if possible. This should be called to set predefined values or values previously
+    * used, so it is easier for the user to fill the required fields.
+    * 
+    * @param sParameterName
+    *                The name of the parameter to set
+    * @param sValue
+    *                the value to set, expressed as the corresponding command line argument
+    */
+   public abstract void setParameterValue(String sParameterName,
+                                          String sValue);
+
+
+   /**
+    * Sets the value of an output object in the panel, if possible. This should be called to set predefined values or values
+    * previously used, so it is easier for the user to fill the required fields.
+    * 
+    * @param sOutputName
+    *                The name of the output object to set
+    * @param sValue
+    *                the value to set, expressed as the corresponding command line argument
+    */
+   public abstract void setOutputValue(String sOutputName,
+                                       String sValue);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/GeoAlgorithmParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionComboPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionComboPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionComboPanel.java	(revision 369)
@@ -0,0 +1,245 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JComboBox;
+
+/**
+ * A panel with a combo box and a button, which pops-up a file selection dialog and puts the selected file in the combo box's active item.
+ * 
+ * @author volaya
+ * 
+ */
+public class FileSelectionComboPanel
+         extends
+            JPanel {
+
+   private JComboBox      comboBox;
+   private JButton        button;
+   private final String[] m_sExtensions;
+   private boolean        m_bFolder   = false;
+   private boolean        m_bOpen     = false;
+   private final String   m_sDescription;
+   private String         m_sSelected = null;
+
+
+   /**
+    * Creates a new file selection panel.
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExts
+    *                a list of permitted file extensions
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    */
+   public FileSelectionComboPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String[] sExts,
+                             final String sDescription) {
+
+      super();
+
+      m_bFolder = bFolder;
+      m_bOpen = bOpen;
+      m_sExtensions = sExts;
+      m_sDescription = sDescription;
+
+      initGUI();
+
+   }
+
+
+   /**
+    * Creates a new file selection panel. Allows just one extension.
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                a file extension
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    */
+   public FileSelectionComboPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt,
+                             final String sDescription) {
+
+      this(bFolder, bOpen, new String[] { sExt }, sDescription);
+
+   }
+
+
+   /**
+    * Creates a new file selection panel
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                the permitted file extension
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    * @param sSelection
+    *                the name of the default selected file or folder
+    */
+   public FileSelectionComboPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt,
+                             final String sDescription,
+                             final String sSelection) {
+
+      this(bFolder, bOpen, new String[] { sExt }, sDescription);
+      m_sSelected = sSelection;
+
+   }
+
+
+   /**
+    * Creates a new file selection panel
+    * 
+    * @param bFolder
+    *                true if the selection must be a folder instead of a file
+    * @param bOpen
+    *                true to show a open file dialog. False to show a save file one
+    * @param sExt
+    *                a file extensions
+    * @param sDescription
+    *                a description of the panel to show in the file dialog
+    * @param sSelection
+    *                the name of the default selected file or folder
+    */
+   public FileSelectionComboPanel(final boolean bFolder,
+                             final boolean bOpen,
+                             final String sExt[],
+                             final String sDescription,
+                             final String sSelection) {
+
+      this(bFolder, bOpen, sExt, sDescription);
+      m_sSelected = sSelection;
+
+   }
+
+
+   private void initGUI() {
+
+      button = new JButton("...");
+
+      comboBox = new JComboBox();
+      comboBox.setMaximumSize(new java.awt.Dimension(340, 18));
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed();
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(comboBox, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   /**
+    * Returns the filepath currently shown in the text field
+    * 
+    * @return the filepath currently shown in the text field
+    */
+   public String getFilepath() {
+
+	  return (String) comboBox.getSelectedItem();
+
+   }
+
+   /**
+    * Returns this panel's JTextField widget.
+    * 
+    * @return the text field widget used to input/store the selected file's path and name
+    */
+   public JComboBox getComboBox() {
+
+      return (this.comboBox);
+
+   }
+   
+   
+   /**
+    * Returns this panel's JButton widget.
+    * 
+    * @return the button widget used to pop up the file selector widget
+    */
+   public JButton getButton() {
+
+      return (this.button);
+
+   }   
+
+   
+   private void btnActionPerformed() {
+
+      int returnVal;
+      JFileChooser fc = new JFileChooser();
+      
+      fc.setDialogTitle(m_sDescription);
+
+      if (m_bFolder) {
+         fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+      }
+
+      if (m_sSelected != null) {
+         fc.setSelectedFile(new File(m_sSelected));
+      }
+
+      if ((m_sExtensions != null) && !m_bFolder) {
+         fc.setFileFilter(new GenericFileFilter(m_sExtensions, m_sDescription));
+      }
+
+      if (m_bOpen) {
+         returnVal = fc.showOpenDialog(this.getParent().getParent());
+      }
+      else {
+         returnVal = fc.showSaveDialog(this.getParent().getParent());
+      }
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+    	  comboBox.setSelectedItem(fc.getSelectedFile().getAbsolutePath());
+      }
+
+   }
+
+
+   /**
+    * Sets the current filepath to be shown in the text field
+    * 
+    * @param sFilepath
+    *                the new filepath to set
+    */
+   public void setFilepath(final String sFilepath) {
+
+	   comboBox.setSelectedItem(sFilepath);
+
+   }
+
+
+   @Override
+   public void setToolTipText(final String sText) {
+
+      comboBox.setToolTipText(sText);
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FileSelectionComboPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTablePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTablePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTablePanel.java	(revision 369)
@@ -0,0 +1,127 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.parameters.FixedTableModel;
+
+/**
+ * A panel with a text field and a button. The text field shows a text representation of a fixed table. Clicking on the button
+ * shows a dialog to fill the data of the fixed table
+ *
+ * @author volaya
+ *
+ */
+public class FixedTablePanel
+         extends
+            JPanel {
+
+   private FixedTableModel m_FixedTableModel;
+   private JTextField      textField;
+   private JButton         button;
+
+
+   /**
+    * Creates a new fixed table panel
+    *
+    * @param sColumnNames
+    *                the names of the columns in the table
+    * @param iNumRows
+    *                the number of rows
+    * @param bIsNumberOfRowsFixed
+    *                true if the number of rows cannot be modified
+    */
+   public FixedTablePanel(final String[] sColumnNames,
+                          final int iNumRows,
+                          final boolean bIsNumberOfRowsFixed) {
+
+      super();
+
+      m_FixedTableModel = new FixedTableModel(sColumnNames, iNumRows, bIsNumberOfRowsFixed);
+
+      InitGUI();
+
+   }
+
+
+   private void InitGUI() {
+
+      button = new JButton("...");
+
+      final StringBuffer sText = new StringBuffer(Sextante.getText("Fixed_table") + " (");
+      sText.append(m_FixedTableModel.getDimensionsAsString());
+      sText.append(")");
+      textField = new JTextField(sText.toString());
+      textField.setEditable(false);
+
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed(evt);
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 }, { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(textField, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   /**
+    * Gets the table model defined using this panel
+    *
+    * @return the fixed table model
+    */
+   public FixedTableModel getTableModel() {
+
+      return m_FixedTableModel;
+
+   }
+
+
+   /**
+    * Sets the table model
+    *
+    * @param model
+    *                the model to set
+    */
+   public void setTableModel(final FixedTableModel model) {
+
+      m_FixedTableModel = model;
+
+      final StringBuffer sText = new StringBuffer(Sextante.getText("Fixed_table") + " (");
+      sText.append(m_FixedTableModel.getDimensionsAsString());
+      sText.append(")");
+
+      textField.setText(sText.toString());
+
+   }
+
+
+   private void btnActionPerformed(final ActionEvent e) {
+
+      final StringBuffer sText = new StringBuffer(Sextante.getText("Fixed_table") + " (");
+
+      final FixedTableDialog dialog = new FixedTableDialog(SextanteGUI.getMainFrame(), m_FixedTableModel);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      sText.append(m_FixedTableModel.getDimensionsAsString());
+      sText.append(")");
+
+      textField.setText(sText.toString());
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTablePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTableDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTableDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTableDialog.java	(revision 369)
@@ -0,0 +1,388 @@
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSeparator;
+import javax.swing.JTable;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.parameters.FixedTableModel;
+
+/**
+ * A dialog to fill a fixed table for a ParameterFixedTable
+ * 
+ * @author volaya
+ * 
+ */
+public class FixedTableDialog
+         extends
+            javax.swing.JDialog {
+
+   private final FixedTableModel m_TableModel;
+   private final FixedTableModel m_TableModelOrg;
+   private JPanel                jPanelMain;
+   private JPanel                jPanelAddRemoveRows;
+   private JSeparator            jSeparator;
+   private JScrollPane           jScrollPane;
+   private JButton               jButtonCancel;
+   private JButton               jButtonOK;
+   private JButton               jButtonRemoveRow;
+   private JButton               jButtonAddRow;
+   private JTable                jTable;
+   private boolean               m_bAccepted;
+   private JPanel                jPanelOpenSave;
+   private JButton               jButtonOpen;
+   private JButton               jButtonSave;
+
+
+   /**
+    * Creates a new dialog
+    * 
+    * @param window
+    *                the parent window
+    * @param tableModel
+    *                the table model of the parameter
+    */
+   public FixedTableDialog(final Frame window,
+                           final FixedTableModel tableModel) {
+
+
+      super(window, "", true);
+
+      this.setResizable(false);
+
+      m_TableModelOrg = tableModel;
+      m_TableModel = FixedTableModel.newInstance(tableModel);
+
+      initGUI();
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            this.setTitle(Sextante.getText("Fixed_table"));
+            {
+               jPanelMain = new JPanel();
+               getContentPane().add(jPanelMain, BorderLayout.CENTER);
+               final TableLayout jPanelMainLayout = new TableLayout(
+                        new double[][] {
+                                 { 3.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                          TableLayoutConstants.FILL, 3.0 },
+                                 { 3.0, 75.0, TableLayoutConstants.FILL, 75.0, 5.0, 30.0, 3.0 } });
+               jPanelMainLayout.setHGap(5);
+               jPanelMainLayout.setVGap(5);
+               jPanelMain.setLayout(jPanelMainLayout);
+               jPanelMain.setPreferredSize(new java.awt.Dimension(564, 322));
+               {
+                  jScrollPane = new JScrollPane();
+                  jPanelMain.add(jScrollPane, "1, 1, 3, 3");
+                  jScrollPane.setPreferredSize(new java.awt.Dimension(432, 256));
+                  {
+                     jTable = new JTable();
+                     jScrollPane.setViewportView(jTable);
+                     jTable.setModel(m_TableModel);
+                  }
+               }
+               {
+                  jPanelOpenSave = new JPanel();
+                  jPanelMain.add(jPanelOpenSave, "4, 3");
+                  final TableLayout jPanelAddOpenSaveLayout = new TableLayout(new double[][] {
+                           { TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM },
+                           { TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                    TableLayoutConstants.MINIMUM } });
+                  jPanelAddOpenSaveLayout.setHGap(5);
+                  jPanelAddOpenSaveLayout.setVGap(5);
+                  jPanelOpenSave.setLayout(jPanelAddOpenSaveLayout);
+                  jPanelOpenSave.setPreferredSize(new java.awt.Dimension(116, 56));
+               }
+               {
+                  jPanelAddRemoveRows = new JPanel();
+                  final TableLayout jPanelAddRemoveRowsLayout = new TableLayout(new double[][] {
+                           { TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM },
+                           { TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                    TableLayoutConstants.MINIMUM } });
+                  jPanelAddRemoveRowsLayout.setHGap(5);
+                  jPanelAddRemoveRowsLayout.setVGap(5);
+                  jPanelAddRemoveRows.setLayout(jPanelAddRemoveRowsLayout);
+                  jPanelMain.add(jPanelAddRemoveRows, "4, 1");
+                  jPanelAddRemoveRows.setPreferredSize(new java.awt.Dimension(116, 56));
+               }
+               {
+                  jButtonRemoveRow = new JButton();
+                  jPanelAddRemoveRows.add(jButtonRemoveRow, "1, 2");
+                  jButtonRemoveRow.setText(Sextante.getText("Delete_row"));
+                  jButtonRemoveRow.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        removeRow();
+                     }
+                  });
+                  if (m_TableModel.isNumberOfRowsFixed()) {
+                     jButtonRemoveRow.setEnabled(false);
+                     jButtonRemoveRow.setSize(100, 22);//
+                  }
+               }
+               {
+                  jButtonAddRow = new JButton();
+                  jPanelAddRemoveRows.add(jButtonAddRow, "1, 1");
+                  jButtonAddRow.setText(Sextante.getText("Add_row"));
+                  jButtonAddRow.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        addRow();
+                     }
+                  });
+                  if (m_TableModel.isNumberOfRowsFixed()) {
+                     jButtonAddRow.setEnabled(false);
+                     jButtonAddRow.setSize(100, 22);
+                  }
+               }
+
+               {
+                  jButtonOpen = new JButton();
+                  jPanelOpenSave.add(jButtonOpen, "1, 2");
+                  jButtonOpen.setText(Sextante.getText("Open"));
+                  jButtonOpen.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        open();
+                     }
+                  });
+               }
+               {
+                  jButtonSave = new JButton();
+                  jPanelOpenSave.add(jButtonSave, "1, 1");
+                  jButtonSave.setText(Sextante.getText("Save"));
+                  jButtonSave.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        save();
+                     }
+                  });
+               }
+               {
+                  jSeparator = new JSeparator();
+                  jPanelMain.add(jSeparator, "1, 4, 4, 4");
+                  jSeparator.setPreferredSize(new java.awt.Dimension(565, 20));
+               }
+               {
+                  jButtonOK = new JButton();
+                  jPanelMain.add(jButtonOK, "3, 5");
+                  jButtonOK.setText(Sextante.getText("OK"));
+                  jButtonOK.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnOKActionPerformed();
+                     }
+                  });
+               }
+               {
+                  jButtonCancel = new JButton();
+                  jPanelMain.add(jButtonCancel, "4, 5");
+                  jButtonCancel.setText(Sextante.getText("Cancel"));
+                  jButtonCancel.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnCancelActionPerformed();
+                     }
+                  });
+               }
+            }
+         }
+         this.setSize(580, 350);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void save() {
+
+      final JFileChooser fc = new JFileChooser();
+      final GenericFileFilter filter = new GenericFileFilter("csv", "Comma-Separated Values");
+
+      fc.setFileFilter(filter);
+      final int returnVal = fc.showSaveDialog(this);
+
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+         File file = fc.getSelectedFile();
+         if(!file.getAbsolutePath().endsWith(".csv")) {
+        	 file = new File(file.getAbsoluteFile() + ".csv");
+         }
+         Writer output = null;
+         try {
+            output = new BufferedWriter(new FileWriter(file));
+            final int iRows = m_TableModel.getRowCount();
+            final int iCols = m_TableModel.getColumnCount();
+            for (int iRow = 0; iRow < iRows; iRow++) {
+               for (int iCol = 0; iCol < iCols; iCol++) {
+                  final String s = m_TableModel.getValueAt(iRow, iCol).toString();
+                  output.write(s);
+                  if (iCol < (iCols - 1)) {
+                     output.write("|");
+                  }
+               }
+               output.write("\n");
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void open() {
+
+      try {
+         final JFileChooser fc = new JFileChooser();
+         final GenericFileFilter filter = new GenericFileFilter("csv", "Comma-Separated Values");
+
+         fc.setFileFilter(filter);
+         final int returnVal = fc.showOpenDialog(this);
+
+         if (returnVal == JFileChooser.APPROVE_OPTION) {
+            final File file = fc.getSelectedFile();
+            BufferedReader input = null;
+
+            final int iRows = m_TableModel.getRowCount();
+
+            input = new BufferedReader(new FileReader(file));
+            String sLine = null;
+            int i = 1;
+            while ((sLine = input.readLine()) != null) {
+               if ((i > iRows) && !m_TableModel.isNumberOfRowsFixed()) {
+                  m_TableModel.addRow();
+               }
+               processLine(sLine, m_TableModel, i - 1);
+               i++;
+            }
+            input.close();
+         }
+      }
+      catch (final Exception e) {
+         JOptionPane.showMessageDialog(this, Sextante.getText("Could_not_open_selected_file"), Sextante.getText("Error"),
+                  JOptionPane.ERROR_MESSAGE);
+      }
+
+
+   }
+
+
+   private void processLine(final String line,
+                            final FixedTableModel table,
+                            final int iRow) {
+
+      try {
+         final String[] tokens = line.split("\\|");
+         for (int i = 0; i < tokens.length; i++) {
+            table.setValueAt(tokens[i], iRow, i);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   private void btnOKActionPerformed() {
+
+      if (checkData()) {
+         m_TableModelOrg.setAttributes(m_TableModel.getColumnNames(), m_TableModel.getData(), m_TableModel.isNumberOfRowsFixed());
+
+         m_bAccepted = true;
+         dispose();
+         setVisible(false);
+      }
+      else {
+         JOptionPane.showMessageDialog(this, Sextante.getText("Wrong_values_in_table"), Sextante.getText("Error"),
+                  JOptionPane.ERROR_MESSAGE);
+      }
+
+   }
+
+
+   private boolean checkData() {
+
+      try {
+         for (int i = 0; i < m_TableModel.getData().length; i++) {
+            final ArrayList list = m_TableModel.getData()[i];
+            for (int j = 0; j < list.size(); j++) {
+               if (list.get(j).toString().isEmpty()) { //just check that every cell contains something
+                  return false;
+               }
+            }
+         }
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+   }
+
+
+   private void btnCancelActionPerformed() {
+
+      m_bAccepted = false;
+      dispose();
+      setVisible(false);
+
+
+   }
+
+
+   private void addRow() {
+
+      m_TableModel.addRow();
+
+   }
+
+
+   private void removeRow() {
+
+      int iRow;
+
+      iRow = jTable.getSelectedRow();
+      if (iRow != -1) {
+         m_TableModel.removeRow(iRow);
+      }
+
+   }
+
+
+   /**
+    * Returns true if the user accepted the introduced data.
+    * 
+    * @return true if the user accepted the introduced data.
+    */
+   public boolean accepted() {
+
+      return m_bAccepted;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/FixedTableDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DefaultParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DefaultParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DefaultParametersPanel.java	(revision 369)
@@ -0,0 +1,2097 @@
+
+
+package es.unex.sextante.gui.algorithm;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.swing.BorderFactory;
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.ScrollPaneConstants;
+
+import org.japura.gui.Anchor;
+import org.japura.gui.BatchSelection;
+import org.japura.gui.CheckComboBox;
+import org.japura.gui.EmbeddedComponent;
+import org.japura.gui.model.ListCheckModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableFilter;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.exceptions.WrongOutputChannelDataException;
+import es.unex.sextante.exceptions.WrongOutputIDException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.gui.grass.GrassAlgorithm;
+import es.unex.sextante.gui.help.HelpElement;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterTableFilter;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import javax.swing.ImageIcon;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.icontheme.IconTheme;
+
+/**
+ * A panel to introduce parameters for a geoalgorithm, created automatically based on the parameters needed by that geoalgorithm
+ * If no additional panel is provided for an algorithm, SEXTANTE will use this panel as the default one.
+ *
+ * @author volaya
+ *
+ */
+public class DefaultParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   protected static int   CELL_HEIGHT                = 18;
+   protected static int   COLUMN_WIDTH               = 250;
+
+   protected int          m_iCurrentRow              = 0;
+   protected JScrollPane  jScrollPanelParameters;
+   protected JPanel       jPanelParameters;
+   protected ArrayList    m_ParameterContainer       = new ArrayList();
+   protected ArrayList    m_ComboBox                 = new ArrayList();
+   protected GeoAlgorithm m_Algorithm;
+   protected ArrayList    m_OutputParameterContainer = new ArrayList();
+   protected HashMap      m_HelpElements;
+
+
+   /**
+    * Constructor.
+    */
+   public DefaultParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm alg) {
+
+      m_Algorithm = alg;
+
+      try {
+         final ArrayList list = HelpIO.open(SextanteGUI.getAlgorithmHelpFilename(alg, false));
+
+         if (list != null) {
+            m_HelpElements = HelpIO.createMap(list);
+         }
+         else {
+            m_HelpElements = new HashMap();
+         }
+      }
+      catch (final Exception e) {
+         m_HelpElements = new HashMap();
+      }
+
+      initGUI();
+
+   }
+
+
+   protected void initGUI() {
+
+      m_ComboBox = new ArrayList();
+
+      {
+         jScrollPanelParameters = new JScrollPane();
+         jPanelParameters = new JPanel();
+
+         int guiRows = 0;
+
+         final JPanel jInputs = new JPanel();
+         final JPanel jOptions = new JPanel();
+         final JPanel jOutputs = new JPanel();
+
+         final double[][] inputs_matrix = getInputsTableLayoutMatrix();
+         if (inputs_matrix[1].length > 1) {
+            final TableLayout jInputsLayout = new TableLayout(inputs_matrix);
+            jInputsLayout.setHGap(5);
+            jInputsLayout.setVGap(5);
+            jInputs.setLayout(jInputsLayout);
+
+            jInputs.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Inputs")));
+
+            jPanelParameters.add(jInputs, BorderLayout.NORTH);
+            guiRows += inputs_matrix[1].length;
+
+         }
+
+         final double[][] options_matrix = getOptionsTableLayoutMatrix();
+         if (options_matrix[1].length > 1) {
+            final TableLayout jOptionsLayout = new TableLayout(options_matrix);
+            jOptionsLayout.setHGap(5);
+            jOptionsLayout.setVGap(5);
+            jOptions.setLayout(jOptionsLayout);
+
+            jOptions.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Options")));
+
+            jPanelParameters.add(jOptions, BorderLayout.CENTER);
+            guiRows += options_matrix[1].length;
+         }
+
+         final double[][] outputs_matrix = getOutputsTableLayoutMatrix();
+         if (outputs_matrix[1].length > 1) {
+
+            final TableLayout jOutputsLayout = new TableLayout(getOutputsTableLayoutMatrix());
+            jOutputsLayout.setHGap(5);
+            jOutputsLayout.setVGap(5);
+            jOutputs.setLayout(jOutputsLayout);
+
+            jOutputs.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Outputs")));
+
+            jPanelParameters.add(jOutputs, BorderLayout.SOUTH);
+            guiRows += outputs_matrix[1].length;
+         }
+
+         if (m_Algorithm.requiresRasterLayers() || m_Algorithm.requiresMultipleRasterLayers()
+             || m_Algorithm.requiresMultipleRasterBands()) {
+            addRasterLayers(jInputs);
+         }
+         if (m_Algorithm.requires3DRasterLayers()) {
+            add3DRasterLayers(jInputs);
+         }
+         if (m_Algorithm.requiresVectorLayers() || m_Algorithm.requiresMultipleVectorLayers()) {
+            addVectorLayers(jInputs);
+         }
+         if (m_Algorithm.requiresTables() || m_Algorithm.requiresMultipleTables()) {
+            addTables(jInputs);
+         }
+         if (m_Algorithm.requiresNonDataObjects()) {
+            addNonDataObjects(jOptions);
+         }
+         if (m_Algorithm.generatesLayersOrTables()) {
+            addOutputObjects(jOutputs);
+         }
+
+         final int gui_height = (int) (CELL_HEIGHT * guiRows * 1.5);
+         jPanelParameters.setPreferredSize(new Dimension(660, gui_height));
+         jScrollPanelParameters.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jScrollPanelParameters.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
+         jScrollPanelParameters.setPreferredSize(new java.awt.Dimension(680, 300));
+         jScrollPanelParameters.setViewportView(jPanelParameters);
+         this.add(jScrollPanelParameters);
+
+         for (int i = 0; i < m_ParameterContainer.size(); i++) {
+            final ParameterContainer pc = (ParameterContainer) m_ParameterContainer.get(i);
+            final HelpElement help = (HelpElement) m_HelpElements.get(pc.getParameter().getParameterName());
+            if (m_Algorithm instanceof GrassAlgorithm) {
+               if (pc.getParameter().getParameterTooltip() != null) {
+                  pc.getContainer().setToolTipText(pc.getParameter().getParameterTooltip());
+               }
+            }
+            if (help != null) {
+               pc.getContainer().setToolTipText("<html>" + help.getTextAsFormattedHTML() + "</html>");
+            }
+         }
+
+      }
+   }
+
+
+   protected void addOutputObjects(final JPanel pane) {
+
+      String sDescription;
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+
+      m_iCurrentRow = 0;
+
+      for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+         final Output out = ooset.getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+             || (out instanceof Output3DRasterLayer)) {
+            sDescription = out.getDescription() + "[" + out.getTypeDescription() + "]";
+            addTitleLabel(pane, sDescription, m_iCurrentRow, false);
+            final OutputChannelSelectionPanel panel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+            final HelpElement help = (HelpElement) m_HelpElements.get(out.getName());
+            if (help != null) {
+               panel.setToolTipText("<html>" + help.getTextAsFormattedHTML() + "</html>");
+            }
+            pane.add(panel, getStringTableCoords(2, m_iCurrentRow));
+
+            m_iCurrentRow++;
+            m_OutputParameterContainer.add(new OutputParameterContainer(out.getName(), panel));
+         }
+      }
+
+   }
+
+
+   protected void addRasterLayers(final JPanel pane) {
+
+      int i, j;
+      boolean bAddNotSetField = false;
+      final ArrayList childComboBoxIndex = new ArrayList();
+      Parameter parameter;
+      Parameter subParameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+      String sParameterName;
+
+      addTitleLabel(pane, Sextante.getText("Raster_layers"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterRasterLayer) {
+            //check for bands that depend on this raster layer
+            sParameterName = parameter.getParameterName();
+            childComboBoxIndex.clear();
+            for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+               subParameter = parameters.getParameter(j);
+               if (subParameter instanceof ParameterBand) {
+                  try {
+                     if (((AdditionalInfoBand) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                              sParameterName)) {
+                        m_iCurrentRow++;
+                        addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                        comboBox = getBandSelectionComboBox();
+                        childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+                        m_ComboBox.add(comboBox);
+                        pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+                        m_ParameterContainer.add(new ParameterContainer(subParameter, comboBox));
+                     }
+                  }
+                  catch (final NullParameterAdditionalInfoException e) {
+                     Sextante.addErrorToLog(e);
+                  }
+               }
+            }
+            try {
+               if (((AdditionalInfoRasterLayer) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bAddNotSetField = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+               else {
+                  bAddNotSetField = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"),
+                           m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = getRasterLayerSelectionComboBox(childComboBoxIndex, bAddNotSetField);
+            if (bAddNotSetField) {
+               comboBox.setSelectedIndex(0);
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - childComboBoxIndex.size()));
+            m_iCurrentRow++;
+            m_ParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if ((additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND)) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+   }
+
+
+   protected void add3DRasterLayers(final JPanel pane) {
+
+      int i;
+      boolean bAddNotSetField = false;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+
+      addTitleLabel(pane, Sextante.getText("3DRaster_layers"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof Parameter3DRasterLayer) {
+            try {
+               if (((AdditionalInfoRasterLayer) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bAddNotSetField = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+               }
+               else {
+                  bAddNotSetField = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"), m_iCurrentRow, false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = get3DRasterLayerSelectionComboBox(bAddNotSetField);
+            if (bAddNotSetField) {
+               comboBox.setSelectedIndex(0);
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+            m_iCurrentRow++;
+            m_ParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+      }
+   }
+
+
+   protected void addVectorLayers(final JPanel pane) {
+
+      boolean bAddNotSetField = false;
+      int i, j;
+      String sParameterName;
+      final ArrayList childComboBoxIndex = new ArrayList();
+
+      Parameter parameter;
+      Parameter subParameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+
+      addTitleLabel(pane, Sextante.getText("Vector_layer"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+      
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         //int tableFiltersApplied = 0;
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterVectorLayer) {
+            try {
+               int[] shapeTypes = ((AdditionalInfoVectorLayer) parameter.getParameterAdditionalInfo()).getShapeTypes();
+               //check for table fields that depend on this vector layer
+               sParameterName = parameter.getParameterName();
+               childComboBoxIndex.clear();
+
+               for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+                  subParameter = parameters.getParameter(j);
+                  if (subParameter instanceof ParameterTableField) {
+                     try {
+                        if (((AdditionalInfoTableField) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                                 sParameterName)) {
+                           m_iCurrentRow++;
+                           addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                           comboBox = getVectorLayerFieldSelectionComboBox(shapeTypes);
+                           childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+                           m_ComboBox.add(comboBox);
+                           pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+                           m_ParameterContainer.add(new ParameterContainer(subParameter, comboBox));
+                        }
+                     }
+                     catch (final NullParameterAdditionalInfoException e) {
+                        Sextante.addErrorToLog(e);
+                     }
+                  } else if (subParameter instanceof ParameterTableFilter) {
+                     if (((AdditionalInfoTableFilter) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                                 sParameterName)) {
+                        addTableFilter(pane, (ParameterVectorLayer) parameter, (ParameterTableFilter) subParameter, shapeTypes, childComboBoxIndex);
+                        //tableFiltersApplied++;
+                     }
+                  }
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e1) {
+               e1.printStackTrace();
+            }
+            // add vector layer
+            try {
+                AdditionalInfoVectorLayer parameterAdditionalInfo = (AdditionalInfoVectorLayer) parameter.getParameterAdditionalInfo();
+//               iShapeType = parameterAdditionalInfo.getShapeType();
+               int[] shapeTypes = parameterAdditionalInfo.getShapeTypes();
+
+               if (((AdditionalInfoVectorLayer) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bAddNotSetField = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - childComboBoxIndex.size(), false); //- tableFiltersApplied
+               }
+               else {
+                  bAddNotSetField = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"),
+                           m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+               comboBox = getVectorLayerSelectionComboBox(shapeTypes, childComboBoxIndex, bAddNotSetField);
+               if (bAddNotSetField) {
+                  comboBox.setSelectedIndex(0);
+               }
+               pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - childComboBoxIndex.size())); // -tableFilerApplied
+               m_iCurrentRow++;
+               m_ParameterContainer.add(new ParameterContainer(parameter, comboBox));
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if ((additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+   }
+
+
+   protected void addTables(final JPanel pane) {
+
+      boolean bAddNotSetField = false;
+      int i, j;
+      String sParameterName;
+      final ArrayList childComboBoxIndex = new ArrayList();
+      Parameter parameter;
+      Parameter subParameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+
+      addTitleLabel(pane, Sextante.getText("Tables"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterTable) {
+            //check for table fields that depend on this table
+            //int[] tableTypes = ((AdditionalInfoTable) parameter.getParameterAdditionalInfo()); //.getShapeTypes();
+
+            sParameterName = parameter.getParameterName();
+            childComboBoxIndex.clear();
+            for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+               subParameter = parameters.getParameter(j);
+               if (subParameter instanceof ParameterTableField) {
+                  try {
+                     if (((AdditionalInfoTableField) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                              sParameterName)) {
+                        m_iCurrentRow++;
+                        addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                        comboBox = getTableFieldSelectionComboBox();
+                        childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+                        m_ComboBox.add(comboBox);
+                        pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+                        m_ParameterContainer.add(new ParameterContainer(subParameter, comboBox));
+                     }
+                  }
+                  catch (final NullParameterAdditionalInfoException e) {
+                     Sextante.addErrorToLog(e);
+                  }
+               } else if (subParameter instanceof ParameterTableFilter) {
+                   try {
+                       if (((AdditionalInfoTableFilter) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                               sParameterName)) {
+                           Object shapeTypes = null;
+                           addTableFilter(pane, (ParameterTable) parameter, (ParameterTableFilter) subParameter, childComboBoxIndex);
+                           //tableFiltersApplied++;
+                       }
+                   } catch (NullParameterAdditionalInfoException ex) {
+                       Sextante.addErrorToLog(ex);
+                   }
+              }
+            }
+            // add table
+            try {
+               if (((AdditionalInfoTable) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bAddNotSetField = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+               else {
+                  bAddNotSetField = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"),
+                           m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = getTableSelectionComboBox(childComboBoxIndex, bAddNotSetField);
+            if (bAddNotSetField) {
+               comboBox.setSelectedIndex(comboBox.getItemCount() - 1);
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - childComboBoxIndex.size()));
+            m_iCurrentRow++;
+            m_ParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_TABLE) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   protected void addNonDataObjects(final JPanel pane) {
+
+      int i;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+
+      m_iCurrentRow = 0;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterNumericalValue) {
+            addNumericalTextField(pane, (ParameterNumericalValue) parameter);
+         }
+         else if (parameter instanceof ParameterString) {
+            addStringTextField(pane, (ParameterString) parameter);
+         }
+         else if (parameter instanceof ParameterSelection) {
+            addSelection(pane, (ParameterSelection) parameter);
+         }
+         else if (parameter instanceof ParameterFixedTable) {
+            addFixedTable(pane, (ParameterFixedTable) parameter);
+         }
+         else if (parameter instanceof ParameterPoint) {
+            addPoint(pane, (ParameterPoint) parameter);
+         }
+         else if (parameter instanceof ParameterBoolean) {
+            addCheckBox(pane, (ParameterBoolean) parameter);
+         }
+         else if (parameter instanceof ParameterFilepath) {
+            addFilepath(pane, (ParameterFilepath) parameter);
+         }
+      }
+   }
+
+
+   protected void addMultipleInput(final JPanel pane,
+                                   final ParameterMultipleInput parameter) {
+
+      Object[] objs;
+
+      try {
+         final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+         switch (additionalInfo.getDataType()) {
+            case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+               objs = SextanteGUI.getInputFactory().getRasterLayers();
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+               //objs = getVectorLayersAsObjectAndDescription(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+               objs = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON);
+               //objs = getVectorLayersAsObjectAndDescription(AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON);
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+               objs = SextanteGUI.getInputFactory().getTables();
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+               objs = SextanteGUI.getInputFactory().getBands();
+               break;
+            default:
+               return;
+         }
+
+         String sDescription = parameter.getParameterDescription();
+         if (!additionalInfo.getIsMandatory()) {
+            sDescription = sDescription + Sextante.getText("[optional]");
+         }
+
+         addTitleLabel(pane, sDescription, m_iCurrentRow, false);
+
+         final CheckComboBox ccb = new CheckComboBox();
+         ccb.setTextFor(CheckComboBox.NONE, Sextante.getText("no_elements_selected"));
+         ccb.setTextFor(CheckComboBox.MULTIPLE, Sextante.getText("multiple_elements_selected"));
+         final ListCheckModel model = ccb.getModel();
+         for (final Object obj : objs) {
+            
+            model.addElement(obj);
+         }
+         //
+         //ccb.setRenderer(renderer);
+         final BatchSelection bs = new BatchSelection.CheckBox();
+         final EmbeddedComponent comp = new EmbeddedComponent(bs, Anchor.NORTH);
+         ccb.setEmbeddedComponent(comp);
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(ccb, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, ccb));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void addFixedTable(final JPanel pane,
+                                final ParameterFixedTable parameter) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iRows;
+      String[] sCols;
+
+      try {
+         final AdditionalInfoFixedTable additionalInfo = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+
+         iRows = additionalInfo.getRowsCount();
+         sCols = additionalInfo.getCols();
+         bIsNumberOfRowsFixed = additionalInfo.isNumberOfRowsFixed();
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         final FixedTablePanel fixedTablePanel = new FixedTablePanel(sCols, iRows, bIsNumberOfRowsFixed);
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(fixedTablePanel, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, fixedTablePanel));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   protected void addFilepath(final JPanel pane,
+                              final ParameterFilepath parameter) {
+
+      try {
+         final AdditionalInfoFilepath additionalInfo = (AdditionalInfoFilepath) parameter.getParameterAdditionalInfo();
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         String sExtension = "*.*";
+         final String[] sExtensions = additionalInfo.getExtensions();
+         if (sExtensions != null) {
+            final StringBuffer sb = new StringBuffer();
+            for (int i = 0; i < sExtensions.length; i++) {
+               sb.append(sExtensions[i]);
+               if (i < sExtensions.length - 1) {
+                  sb.append(",");
+               }
+            }
+            sExtension = sb.toString();
+         }
+         final FileSelectionPanel fileSelectionPanel = new FileSelectionPanel(additionalInfo.isFolder(),
+                  additionalInfo.isOpenDialog(), additionalInfo.getExtensions(), Sextante.getText("Files") + " " + sExtension);
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(fileSelectionPanel, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, fileSelectionPanel));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+   protected void addTableFilter(final JPanel pane,
+                              final ParameterTable parameter,
+                              final ParameterTableFilter subParameter,
+                              ArrayList childComboBoxIndex) {
+
+       try {
+           final AdditionalInfoTable additionalInfo = (AdditionalInfoTable) parameter.getParameterAdditionalInfo();
+           m_iCurrentRow++;
+           addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+       } catch (final NullParameterAdditionalInfoException e) {
+           Sextante.addErrorToLog(e);
+       }
+       TableFilterPanel tableFilterPanel;
+       //          IVectorLayer ivlayer = parameter.getParameterValueAsVectorLayer();
+       List<ITable> tables = getTables();
+       if (tables.size() > 0) {
+           ITable table = tables.get(0);
+           FeatureStore store = table.getFeatureStore();
+           tableFilterPanel = new TableFilterPanel(store);
+       } else {
+           tableFilterPanel = new TableFilterPanel();
+       }
+       childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+       pane.add(tableFilterPanel, getStringTableCoords(2, m_iCurrentRow));
+       m_ComboBox.add(tableFilterPanel);
+       m_ParameterContainer.add(new ParameterContainer(subParameter, tableFilterPanel));
+
+   }
+   
+   protected void addTableFilter(final JPanel pane,
+                              final ParameterVectorLayer parameter,
+                              final ParameterTableFilter subParameter,
+                              int[] shapeTypes,
+                              ArrayList childComboBoxIndex) {
+
+       try {
+           final AdditionalInfoVectorLayer additionalInfo = (AdditionalInfoVectorLayer) parameter.getParameterAdditionalInfo();
+           m_iCurrentRow++;
+           addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+       } catch (final NullParameterAdditionalInfoException e) {
+           Sextante.addErrorToLog(e);
+       }
+       TableFilterPanel tableFilterPanel;
+       //          IVectorLayer ivlayer = parameter.getParameterValueAsVectorLayer();
+       List<IVectorLayer> layers = getVectorLayers(shapeTypes);
+       if (layers.size() > 0) {
+           IVectorLayer ivlayer = layers.get(0);
+           FeatureStore store = ivlayer.getFeatureStore();
+           tableFilterPanel = new TableFilterPanel(store);
+       } else {
+           tableFilterPanel = new TableFilterPanel();
+       }
+       childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+       pane.add(tableFilterPanel, getStringTableCoords(2, m_iCurrentRow));
+       m_ComboBox.add(tableFilterPanel);
+       m_ParameterContainer.add(new ParameterContainer(subParameter, tableFilterPanel));
+
+   }
+   
+   protected void addPoint(final JPanel pane,
+                           final ParameterPoint parameter) {
+
+      addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+      final PointSelectionPanel pointSelectionPanel = new PointSelectionPanel();
+      
+      addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+      pane.add(pointSelectionPanel, getStringTableCoords(2, m_iCurrentRow));
+      m_ParameterContainer.add(new ParameterContainer(parameter, pointSelectionPanel));
+      m_iCurrentRow++;
+
+   }
+
+
+   protected void addSelection(final JPanel pane,
+                               final ParameterSelection parameter) {
+
+      try {
+         final JComboBox comboBox = new JComboBox();
+         final String[] sValues = ((AdditionalInfoSelection) parameter.getParameterAdditionalInfo()).getValues();
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(sValues);
+         comboBox.setModel(defaultModel);
+         comboBox.setSelectedIndex(0);
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+         pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+         m_iCurrentRow++;
+         m_ParameterContainer.add(new ParameterContainer(parameter, comboBox));
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   protected void addNumericalTextField(final JPanel pane,
+                                        final ParameterNumericalValue parameter) {
+
+      final JTextField textField = new JTextField();
+      final double dMinValue, dMaxValue;
+      final int iType;
+
+      try {
+         final AdditionalInfoNumericalValue additionalInfo = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+         dMinValue = additionalInfo.getMinValue();
+         dMaxValue = additionalInfo.getMaxValue();
+         iType = additionalInfo.getType();
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         if (iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE) {
+            textField.setText(Double.toString(additionalInfo.getDefaultValue()));
+         }
+         else {
+            textField.setText(Integer.toString((int) additionalInfo.getDefaultValue()));
+         }
+         textField.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(final FocusEvent e) {
+               final JTextField textField = (JTextField) e.getSource();
+               final String content = textField.getText();
+               if (content.length() != 0) {
+                  try {
+                     if (iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE) {
+                        final double d = Double.parseDouble(content);
+                        if (d > dMaxValue) {
+                           textField.setText(Double.toString(dMaxValue));
+                        }
+                        if (d < dMinValue) {
+                           textField.setText(Double.toString(dMinValue));
+                        }
+                     }
+                     else {
+                        final int i = (int) Double.parseDouble(content);
+                        if (i > dMaxValue) {
+                           textField.setText(Integer.toString((int) dMaxValue));
+                        }
+                        if (i < dMinValue) {
+                           textField.setText(Integer.toString((int) dMinValue));
+                        }
+                        textField.setText(Integer.toString(i));
+                     }
+                  }
+                  catch (final NumberFormatException nfe) {
+                     getToolkit().beep();
+                     textField.requestFocus();
+                  }
+               }
+            }
+         });
+
+         pane.add(textField, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, textField));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   protected void addStringTextField(final JPanel pane,
+                                     final ParameterString parameter) {
+
+      try {
+         final AdditionalInfoString ai = (AdditionalInfoString) parameter.getParameterAdditionalInfo();
+         final JTextField textField = new JTextField(ai.getDefaultString());
+         ToolsSwingLocator.getToolsSwingManager().setDefaultPopupMenu(textField);
+         
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(textField, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, textField));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   protected void addCheckBox(final JPanel pane,
+                              final ParameterBoolean parameter) {
+
+      final JCheckBox checkBox = new JCheckBox();
+      try {
+         final AdditionalInfoBoolean ai = (AdditionalInfoBoolean) parameter.getParameterAdditionalInfo();
+         checkBox.setSelected(ai.getDefaultValue());
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+         pane.add(checkBox, getStringTableCoords(2, m_iCurrentRow));
+         m_ParameterContainer.add(new ParameterContainer(parameter, checkBox));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+
+   }
+
+
+   protected void addTitleLabel(final JPanel pane,
+                                final String sText,
+                                final int iRow,
+                                final boolean isSectionTitleLabel) {
+
+      JLabel label;
+      label = new JLabel();
+      label.setText(sText);
+      label.setPreferredSize(new java.awt.Dimension(COLUMN_WIDTH, CELL_HEIGHT));
+
+      if (isSectionTitleLabel) {
+         label.setFont(new java.awt.Font("Tahoma", 1, 11));
+         label.setForeground(java.awt.Color.BLUE);
+      }
+
+      pane.add(label, getStringTableCoords(1, iRow));
+
+   }
+
+
+   protected String getStringTableCoords(final int iCol,
+                                         final int iRow) {
+
+      final StringBuffer sCellCoords = new StringBuffer();
+
+      sCellCoords.append(Integer.toString(iCol));
+      sCellCoords.append(",");
+      sCellCoords.append(Integer.toString(iRow));
+
+      return sCellCoords.toString();
+
+   }
+
+
+   protected double[][] getInputsTableLayoutMatrix() {
+
+      int iRows = 1;
+
+      if (m_Algorithm.requiresRasterLayers() || m_Algorithm.requiresMultipleRasterLayers()
+          || m_Algorithm.requiresMultipleRasterBands()) {
+         //Adds 1 for label
+         iRows += 1;
+         iRows += m_Algorithm.getNumberOfRasterLayers(true);
+         final int tf_num = m_Algorithm.getNumberOfBandsParameters();
+         if (tf_num > 0) {
+            iRows += tf_num;
+         }
+      }
+      if (m_Algorithm.requiresVectorLayers() || m_Algorithm.requiresMultipleVectorLayers()) {
+         //Adds 1 for label
+         iRows += 1;
+         iRows += m_Algorithm.getNumberOfVectorLayers(true);
+         final int tf_num = m_Algorithm.getNumberOfTableFieldsParameters();
+         if (tf_num > 0) {
+            iRows += tf_num;
+         }
+         final int tfilter_num = m_Algorithm.getNumberOfTableFilterParameters();
+         if (tfilter_num > 0) {
+            iRows += tfilter_num;
+         }
+      }
+      if (m_Algorithm.requiresTables() || m_Algorithm.requiresMultipleTables()) {
+         //Adds 1 for label
+         iRows += 1;
+         iRows += m_Algorithm.getNumberOfTables();
+         final int tf_num = m_Algorithm.getNumberOfTableFieldsParameters();
+         if (tf_num > 0) {
+            iRows += tf_num;
+         }
+      }
+      if (m_Algorithm.requires3DRasterLayers()) {
+         //Adds 1 for label
+         iRows += 1;
+         iRows += m_Algorithm.getParameters().getNumberOf3DRasterLayers();
+      }
+
+      return getTableMatrixSize(iRows);
+
+   }
+
+
+   protected double[][] getOptionsTableLayoutMatrix() {
+
+      int iRows = 1;
+
+      if (m_Algorithm.requiresNonDataObjects()) {
+         iRows += m_Algorithm.getNumberOfNoDataParameters();
+      }
+
+      return getTableMatrixSize(iRows);
+
+   }
+
+
+   protected double[][] getOutputsTableLayoutMatrix() {
+
+      int iRows = 0;
+
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      final int iOutput = ooSet.getOutputDataObjectsCount();
+      iRows += iOutput;
+
+      if (m_Algorithm.generatesLayersOrTables()) {
+         iRows += 1;
+      }
+
+      return getTableMatrixSize(iRows);
+
+   }
+
+
+   protected double[][] getTableMatrixSize(final int iRows) {
+
+      final double iSizeColumns[] = { 10, TableLayoutConstants.FILL, 360, 10 };
+      final double iSizeRows[] = new double[iRows];
+
+      for (int i = 0; i < (iRows - 1); i++) {
+         iSizeRows[i] = CELL_HEIGHT;
+      }
+      if (iRows > 0) {
+         // Last row is smaller on the interface
+         iSizeRows[iRows - 1] = 5;
+      }
+
+      final double iSize[][] = new double[2][];
+      iSize[0] = iSizeColumns;
+      iSize[1] = iSizeRows;
+
+      return iSize;
+
+   }
+
+
+   protected JComboBox getRasterLayerSelectionComboBox(final ArrayList childComboBoxes,
+                                                       final boolean bAddNotSetField) {
+
+      int i;
+
+      final Integer[] childsArray = new Integer[childComboBoxes.size()];
+      for (i = 0; i < childsArray.length; i++) {
+         childsArray[i] = (Integer) childComboBoxes.get(i);
+      }
+
+      final IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      IconTheme tm = ToolsSwingLocator.getIconThemeManager().getCurrent();
+      for (i = 0; i < layers.length; i++) {
+         ImageIcon rasterIcon = tm.get("layer-type-raster");
+         IRasterLayer layer = layers[i];
+         String viewName = layer.getContextName();
+         String description;
+         if (viewName!=null) {
+            description =  layer.getName() + " [" + viewName + "]";
+         } else {
+            description = layer.getName();
+         }
+          
+         oad[i] = new ObjectAndDescription(description, layer, rasterIcon);
+      }
+
+      final JComboBox cb = new JComboBox(oad);
+      LayerComboBoxRenderer renderer = new LayerComboBoxRenderer();
+      cb.setRenderer(renderer);
+
+      if (bAddNotSetField) {
+         final DefaultComboBoxModel model = (DefaultComboBoxModel) cb.getModel();
+         model.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+
+      cb.addItemListener(new java.awt.event.ItemListener() {
+         public void itemStateChanged(final java.awt.event.ItemEvent e) {
+            int i;
+            int iIndex;
+            String sNames[] = null;
+            DefaultComboBoxModel defaultModel;
+            for (i = 0; i < childsArray.length; i++) {
+               iIndex = (childsArray[i]).intValue();
+               final ObjectAndDescription ob = (ObjectAndDescription) cb.getSelectedItem();
+               final IRasterLayer layer = (IRasterLayer) ob.getObject();
+               if (layer != null) {
+                  sNames = getBandNames(layer);
+                  if (sNames != null) {
+                     defaultModel = new DefaultComboBoxModel(sNames);
+                     ((JComboBox) m_ComboBox.get(iIndex)).setModel(defaultModel);
+                  }
+               }
+            }
+         }
+      });
+
+      return cb;
+
+   }
+
+
+   protected JComboBox get3DRasterLayerSelectionComboBox(final boolean bAddNotSetField) {
+
+      int i;
+
+      final I3DRasterLayer[] layers = SextanteGUI.getInputFactory().get3DRasterLayers();
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      for (i = 0; i < layers.length; i++) {
+         oad[i] = new ObjectAndDescription(layers[i].getName(), layers[i]);
+      }
+
+      final JComboBox cb = new JComboBox(oad);
+
+      if (bAddNotSetField) {
+         final DefaultComboBoxModel model = (DefaultComboBoxModel) cb.getModel();
+         model.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+
+      return cb;
+
+   }
+   
+protected ObjectAndDescription[] getVectorLayersAsObjectAndDescription(int shapeTypes) {
+    int[] shapeTypesList = new int[1];
+    shapeTypesList[0] = shapeTypes;
+    return getVectorLayersAsObjectAndDescription(shapeTypesList);
+}
+
+protected ObjectAndDescription[] getVectorLayersAsObjectAndDescription(int[] shapeTypes) {
+    final List<IVectorLayer> layers = getVectorLayers(shapeTypes);
+    final ObjectAndDescription[] oad = new ObjectAndDescription[layers.size()];
+    int i = 0;
+    for (IVectorLayer layer : layers) {
+        String viewName = layer.getContextName();
+        String description;
+        String moreinfo = null;
+
+        if (layer.hasSelection()) {
+            moreinfo = " [" + layer.getShapesCount() + " selected]";
+        }
+        if (viewName != null && moreinfo == null) {
+            description = layer.getName() + " [" + viewName + "]";
+        } else if (viewName != null && moreinfo != null) {
+            description = layer.getName() + " [" + viewName + "]" + moreinfo;
+        } else {
+            description = layer.getName();
+        }
+        IconTheme tm = ToolsSwingLocator.getIconThemeManager().getCurrent();
+        ImageIcon layerIcon = null;
+        if (layer.hasSelection()) {
+            switch (layer.getShapeType()) {
+                case IVectorLayer.SHAPE_TYPE_POINT:
+                    layerIcon = tm.get("layer-type-point-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTIPOINT:
+                    layerIcon = tm.get("layer-type-multipoint-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_LINE:
+                    layerIcon = tm.get("layer-type-line-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTILINE:
+                    layerIcon = tm.get("layer-type-multiline-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_POLYGON:
+                    layerIcon = tm.get("layer-type-polygon-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTIPOLYGON:
+                    layerIcon = tm.get("layer-type-multipolygon-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MIXED:
+                    layerIcon = tm.get("layer-type-mix-sel");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_WRONG:
+                    layerIcon = tm.get("layer-type-wrong");
+                    break;  
+            }
+        } else if (!layer.hasSelection()) {
+            switch (layer.getShapeType()) {
+                case IVectorLayer.SHAPE_TYPE_POINT:
+                    layerIcon = tm.get("layer-type-point");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTIPOINT:
+                    layerIcon = tm.get("layer-type-multipoint");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_LINE:
+                    layerIcon = tm.get("layer-type-line");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTILINE:
+                    layerIcon = tm.get("layer-type-multiline");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_POLYGON:
+                    layerIcon = tm.get("layer-type-polygon");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MULTIPOLYGON:
+                    layerIcon = tm.get("layer-type-multipolygon");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_MIXED:
+                    layerIcon = tm.get("layer-type-mix");
+                    break;
+                case IVectorLayer.SHAPE_TYPE_WRONG:
+                    layerIcon = tm.get("layer-type-wrong");
+                    break;
+            }
+        }
+
+        oad[i] = new ObjectAndDescription(description, layers.get(i), layerIcon);
+        i++;
+    }
+    return oad;
+}
+
+   protected JComboBox getVectorLayerSelectionComboBox(final int iShapeType,
+                                                       final ArrayList childComboBoxes,
+                                                       final boolean bAddNotSetField) {
+
+      int i;
+
+      final Integer[] childsArray = new Integer[childComboBoxes.size()];
+      for (i = 0; i < childsArray.length; i++) {
+         childsArray[i] = (Integer) childComboBoxes.get(i);
+      }
+
+      ObjectAndDescription[] oad = getVectorLayersAsObjectAndDescription(iShapeType);
+      final JComboBox cb = new JComboBox(oad);
+
+      if (bAddNotSetField) {
+         final DefaultComboBoxModel model = (DefaultComboBoxModel) cb.getModel();
+         model.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+
+      cb.addItemListener(new java.awt.event.ItemListener() {
+         @Override
+         public void itemStateChanged(final java.awt.event.ItemEvent e) {
+            int i;
+            int iIndex;
+            DefaultComboBoxModel defaultModel;
+            for (i = 0; i < childsArray.length; i++) {
+               iIndex = (childsArray[i]);
+               final ObjectAndDescription ob = (ObjectAndDescription) cb.getSelectedItem();
+               final IVectorLayer layer = (IVectorLayer) ob.getObject();
+               if (layer != null) {
+                  Object item = m_ComboBox.get(iIndex);
+                  if (item instanceof JComboBox) {
+                    FieldDescriptionComboBox[] sNames = getVectorLayerFieldRendererComboBox(layer);
+                    if (sNames != null) {
+                        defaultModel = new DefaultComboBoxModel(sNames);
+                        JComboBox cmb = (JComboBox) item;
+                        cmb.setModel(defaultModel);
+                    }
+                  }
+                  if (item instanceof TableFilterPanel) {
+                    TableFilterPanel pane = (TableFilterPanel) item;
+                    pane.setStore(layer.getFeatureStore());
+                  }
+               }
+            }
+         }
+      });
+
+      return cb;
+
+   }
+
+    protected JComboBox<ObjectAndDescription> getVectorLayerSelectionComboBox(int[] shapeTypes, final List childComboBoxes,
+        final boolean bAddNotSetField) {
+
+        int i;
+
+        final Integer[] childsArray = new Integer[childComboBoxes.size()];
+        for (i = 0; i < childsArray.length; i++) {
+            childsArray[i] = (Integer) childComboBoxes.get(i);
+        }
+
+       ObjectAndDescription[] oad = getVectorLayersAsObjectAndDescription(shapeTypes);
+        final JComboBox cb = new JComboBox(oad);
+        LayerComboBoxRenderer renderer = new LayerComboBoxRenderer();
+        cb.setRenderer(renderer);
+
+        if (bAddNotSetField) {
+            final DefaultComboBoxModel model = (DefaultComboBoxModel) cb.getModel();
+            model.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+        }
+
+        cb.addItemListener(new java.awt.event.ItemListener() {
+
+            @Override
+            public void itemStateChanged(final java.awt.event.ItemEvent e) {
+                int i;
+                int iIndex;
+                DefaultComboBoxModel defaultModel;
+                for (i = 0; i < childsArray.length; i++) {
+                    iIndex = (childsArray[i]);
+                    final ObjectAndDescription ob = (ObjectAndDescription) cb.getSelectedItem();
+                    final IVectorLayer layer = (IVectorLayer) ob.getObject();
+                    if (layer != null) {
+                        Object item = m_ComboBox.get(iIndex);
+                        if (item instanceof JComboBox) {
+                            FieldDescriptionComboBox[] sNames = getVectorLayerFieldRendererComboBox(layer);
+                            if (sNames != null) {
+                                defaultModel = new DefaultComboBoxModel(sNames);
+                                JComboBox cmb = (JComboBox) item;
+                                cmb.setModel(defaultModel);
+                            }
+                        }
+                        if (item instanceof TableFilterPanel) {
+                            TableFilterPanel pane = (TableFilterPanel) item;
+                            pane.setStore(layer.getFeatureStore());
+                        }
+                    }
+                }
+            }
+        });
+
+        return cb;
+
+    }
+
+    /**
+     * @param shapeTypes
+     * @return
+     */
+    private List<ITable> getTables() {
+        List<ITable> tables = new ArrayList<ITable>();
+        ITable[] allTables = SextanteGUI.getInputFactory().getTables();
+        for (int k = 0; k < allTables.length; k++) {
+            tables.add(allTables[k]);
+        };
+
+        return tables;
+    }
+
+    /**
+     * @param shapeTypes
+     * @return
+     */
+    private List<IVectorLayer> getVectorLayers(int[] shapeTypes) {
+        List<IVectorLayer> layers = new ArrayList<IVectorLayer>();
+        for (int j = 0; j < shapeTypes.length; j++) {
+            IVectorLayer[] layersPerType = SextanteGUI.getInputFactory().getVectorLayers(shapeTypes[j]);
+            for (int k = 0; k < layersPerType.length; k++) {
+                layers.add(layersPerType[k]);
+            };
+        }
+        return layers;
+    }
+
+   protected JComboBox getTableSelectionComboBox(final ArrayList childComboBoxes,
+                                                 final boolean bAddNotSetField) {
+
+      int i;
+      final JComboBox comboBox = new JComboBox();
+
+      final Integer[] childsArray = new Integer[childComboBoxes.size()];
+      for (i = 0; i < childsArray.length; i++) {
+         childsArray[i] = (Integer) childComboBoxes.get(i);
+      }
+
+      final ITable[] tables = SextanteGUI.getInputFactory().getTables();
+      final ObjectAndDescription[] oad = new ObjectAndDescription[tables.length];
+      for (i = 0; i < tables.length; i++) {
+         oad[i] = new ObjectAndDescription(tables[i].getName(), tables[i]);
+      }
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(oad);
+      comboBox.setModel(defaultModel);
+
+      if (bAddNotSetField) {
+         defaultModel.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+
+      comboBox.addItemListener(new java.awt.event.ItemListener() {
+         public void itemStateChanged(final java.awt.event.ItemEvent e) {
+            int i;
+            int iIndex;
+            String sNames[] = null;
+            DefaultComboBoxModel defaultModel;
+            for (i = 0; i < childsArray.length; i++) {
+               iIndex = (childsArray[i]).intValue();
+               final ObjectAndDescription ob = (ObjectAndDescription) comboBox.getSelectedItem();
+               final ITable table = (ITable) ob.getObject();
+                 if (table != null) {
+                     Object item = m_ComboBox.get(iIndex);
+                     if (item instanceof JComboBox) {
+                         sNames = getTableFieldNames(table);
+                         if (sNames != null) {
+                             defaultModel = new DefaultComboBoxModel(sNames);
+                             ((JComboBox) item).setModel(defaultModel);
+                         }
+                     }
+                     if (item instanceof TableFilterPanel) {
+                         TableFilterPanel pane = (TableFilterPanel) item;
+                         pane.setStore(table.getFeatureStore());
+
+                     }
+                 }
+             }
+         }
+      });
+
+      return comboBox;
+
+   }
+
+
+   protected JComboBox getTableFieldSelectionComboBox() {
+
+      final ITable[] tables = SextanteGUI.getInputFactory().getTables();
+
+      if (tables.length > 0) {
+         final JComboBox comboBox = new JComboBox();
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getTableFieldNames(tables[0]));
+         comboBox.setModel(defaultModel);
+         return comboBox;
+      }
+      else {
+         return new JComboBox();
+      }
+
+   }
+
+
+   protected JComboBox getBandSelectionComboBox() {
+
+      final IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+
+      if (layers.length > 0) {
+         final JComboBox comboBox = new JComboBox();
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getBandNames(layers[0]));
+         comboBox.setModel(defaultModel);
+         return comboBox;
+      }
+      else {
+         return new JComboBox();
+      }
+
+   }
+
+
+   protected JComboBox getVectorLayerFieldSelectionComboBox(final int iShapeType) {
+
+      final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(iShapeType);
+
+      if (layers.length > 0) {
+         final JComboBox comboBox = new JComboBox();
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getVectorLayerFieldNames(layers[0]));
+         comboBox.setModel(defaultModel);
+         return comboBox;
+      }
+      else {
+         return new JComboBox();
+      }
+
+   }
+
+   protected FieldDescriptionComboBox[] getVectorLayerFieldRendererComboBox(IVectorLayer layer) {
+               final FieldDescriptionComboBox[] oad = new FieldDescriptionComboBox[layer.getFieldNames().length];
+          for (int i = 0; i < layer.getFieldNames().length; i++) {
+             String fieldName = layer.getFieldName(i);
+             Class fieldClass = layer.getFieldType(i);
+             oad[i]=new FieldDescriptionComboBox(fieldName, fieldClass);
+          }
+          return oad;
+   }
+   protected JComboBox getVectorLayerFieldSelectionComboBox(final int[] shapeTypes) {
+
+      List<IVectorLayer> layers = getVectorLayers(shapeTypes);
+
+      if (layers.size() > 0) {
+         final JComboBox comboBox = new JComboBox();
+         IVectorLayer layer = layers.get(0);
+         //final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getVectorLayerFieldNames(layers.get(0)));
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getVectorLayerFieldRendererComboBox(layer));
+         FieldComboBoxRenderer renderer = new FieldComboBoxRenderer();
+         comboBox.setRenderer(renderer);
+         comboBox.setModel(defaultModel);
+         return comboBox;
+      }
+      else {
+         return new JComboBox();
+      }
+
+   }
+
+   protected String[] getTableFieldNames(final ITable table) {
+
+      return table.getFieldNames();
+
+   }
+
+
+   protected String[] getVectorLayerFieldNames(final IVectorLayer vectorLayer) {
+
+      return vectorLayer.getFieldNames();
+
+   }
+
+
+   protected String[] getBandNames(final IRasterLayer layer) {
+
+      int j;
+      int iBands;
+      String[] bands = null;
+
+      iBands = layer.getBandsCount();
+      bands = new String[iBands];
+      for (j = 0; j < iBands; j++) {
+         bands[j] = Integer.toString(j + 1);
+      }
+
+      return bands;
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+      boolean bAssigningOK = true;
+      int i;
+      ParameterContainer parameterContainer;
+      String sType;
+
+      for (i = 0; i < m_ParameterContainer.size(); i++) {
+         parameterContainer = (ParameterContainer) m_ParameterContainer.get(i);
+         sType = parameterContainer.getType();
+         if (sType.equals("Table")) {
+            bAssigningOK = assignInputTable(parameterContainer);
+         }
+         else if (sType.equals("Vector Layer") || sType.equals("Raster Layer") || sType.equals("3D Raster Layer")) {
+            bAssigningOK = assignInputLayer(parameterContainer);
+         }
+         else if (sType.equals("Numerical Value")) {
+            bAssigningOK = assignInputNumericalValue(parameterContainer);
+         }
+         else if (sType.equals("String")) {
+            bAssigningOK = assignInputString(parameterContainer);
+         }
+         else if (sType.equals("Boolean")) {
+            bAssigningOK = assignInputBoolean(parameterContainer);
+         }
+         else if (sType.equals("Fixed Table")) {
+            bAssigningOK = assignInputFixedTable(parameterContainer);
+         }
+         else if (sType.equals("Multiple Input")) {
+            bAssigningOK = assignInputMultipleInput(parameterContainer);
+         }
+         else if (sType.equals("Point")) {
+            bAssigningOK = assignInputPoint(parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Filepath")) {
+            bAssigningOK = assignInputFilepath(parameterContainer);
+         }
+         else if (sType.equals("Table Field") || sType.equals("Selection") || sType.equals("Band")) {
+            bAssigningOK = assignInputSelection(parameterContainer);
+         } 
+         else if (sType.equals("Table Filter")) {
+            bAssigningOK = assignInputTableFilter(parameterContainer);
+         }
+
+         if (!bAssigningOK) {
+            throw new WrongInputException();
+         }
+
+      }
+
+      final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+      for (i = 0; i < m_OutputParameterContainer.size(); i++) {
+         final OutputParameterContainer opc = (OutputParameterContainer) m_OutputParameterContainer.get(i);
+         Output out;
+
+         try {
+            out = ooset.getOutput(opc.getName());
+         }
+         catch (final WrongOutputIDException e) {
+            throw new WrongInputException();
+         }
+
+         final OutputChannelSelectionPanel ocsp = (OutputChannelSelectionPanel) opc.getContainer();
+         IOutputChannel channel;
+         try {
+            channel = ocsp.getOutputChannel();
+         }
+         catch (final WrongOutputChannelDataException e) {
+            throw new WrongInputException();
+         }
+
+         if (channel instanceof OverwriteOutputChannel) {
+            final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+            if (!ooc.getLayer().canBeEdited()) {
+               throw new LayerCannotBeOverwrittenException();
+            }
+         }
+         out.setOutputChannel(channel);
+         //TODO Check that output channels do not match with input layers
+
+      }
+
+
+   }
+
+
+   protected boolean assignInputTable(final ParameterContainer parameterContainer) {
+
+      boolean bReturn = true;
+
+      try {
+         final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getSelectedItem();
+         bReturn = parameter.setParameterValue(oad.getObject());
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputLayer(final ParameterContainer parameterContainer) {
+
+      boolean bReturn = true;
+
+      try {
+          final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+          final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+          final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getSelectedItem();
+          bReturn = parameter.setParameterValue(oad.getObject());
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputMultipleInput(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         //final MultipleInputSelectionPanel panel = (MultipleInputSelectionPanel) parameterContainer.getContainer();
+         final CheckComboBox ccb = (CheckComboBox) parameterContainer.getContainer();
+         final ParameterMultipleInput parameter = (ParameterMultipleInput) m_Algorithm.getParameters().getParameter(
+                  parameterContainer.getName());
+         final List<Object> list = ccb.getModel().getCheckeds();
+         //final ArrayList list = panel.getSelectedObjects();
+         final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+         final boolean bMandatory = ai.getIsMandatory();
+         if (bMandatory && (list.size() == 0)) {
+            return false;
+         }
+         bReturn = parameter.setParameterValue(list);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputSelection(final ParameterContainer parameterContainer) {
+
+      int iIndex;
+      boolean bReturn = true;
+
+      try {
+         final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         iIndex = comboBox.getSelectedIndex();
+         bReturn = parameter.setParameterValue(new Integer(iIndex));
+         
+         if (parameter instanceof ParameterTableField) {
+             parameter.setParameterValue(comboBox.getSelectedItem().toString());
+         }
+
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputNumericalValue(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final JTextField txtField = (JTextField) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(new Double(Double.parseDouble(txtField.getText())));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputFixedTable(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final FixedTablePanel panel = (FixedTablePanel) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(panel.getTableModel());
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputString(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final JTextField txtField = (JTextField) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(txtField.getText());
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputFilepath(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final FileSelectionPanel fileSelectionPanel = (FileSelectionPanel) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(fileSelectionPanel.getFilepath());
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+   protected boolean assignInputTableFilter(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final TableFilterPanel fileSelectionPanel = (TableFilterPanel) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(fileSelectionPanel.getExpression());
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+   
+   protected boolean assignInputPoint(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final PointSelectionPanel pointSelectionPanel = (PointSelectionPanel) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(pointSelectionPanel.getPoint());
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   protected boolean assignInputBoolean(final ParameterContainer parameterContainer) {
+
+      boolean bReturn;
+
+      try {
+         final JCheckBox checkBox = (JCheckBox) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         bReturn = parameter.setParameterValue(new Boolean(checkBox.isSelected()));
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return bReturn;
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String sOutputName,
+                              final String sValue) {
+
+      for (int i = 0; i < m_OutputParameterContainer.size(); i++) {
+         final OutputParameterContainer container = (OutputParameterContainer) m_OutputParameterContainer.get(i);
+         if (sOutputName.equals(container.getName())) {
+            final OutputChannelSelectionPanel ocsp = (OutputChannelSelectionPanel) container.getContainer();
+            ocsp.setText(sValue);
+         }
+      }
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String sParameterName,
+                                 final String sValue) {
+
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      Parameter param;
+      try {
+         param = parameters.getParameter(sParameterName);
+      }
+      catch (final WrongParameterIDException e1) {
+         return;
+      }
+      Object container = null;
+      for (int i = 0; i < m_ParameterContainer.size(); i++) {
+         final ParameterContainer pc = (ParameterContainer) m_ParameterContainer.get(i);
+         if (pc.getName().equals(sParameterName)) {
+            container = pc.getContainer();
+            break;
+         }
+      }
+
+      if (container == null) {
+         return;
+      }
+
+      try {
+         if (param instanceof ParameterDataObject) {
+            if (container instanceof JComboBox) {
+                final JComboBox cb = (JComboBox) container;
+                final ComboBoxModel model = cb.getModel();
+                for (int i = 0; i < model.getSize(); i++) {
+                   final ObjectAndDescription oad = (ObjectAndDescription) model.getElementAt(i);
+                   if (oad.getDescription().equals(sValue)) {
+                      cb.setSelectedIndex(i);
+                      break;
+                   }
+                }
+            } else if (container instanceof TableFilterPanel) {
+                TableFilterPanel cb = (TableFilterPanel) container;
+                cb.setPhrase(cb.getPhrase());
+            }
+         }
+         else if ((param instanceof ParameterNumericalValue) || (param instanceof ParameterString)) {
+            if (!sValue.equals("#")) {
+               final JTextField tf = (JTextField) container;
+               tf.setText(sValue);
+            }
+         }
+         else if (param instanceof ParameterFilepath) {
+            final FileSelectionPanel fsp = (FileSelectionPanel) container;
+            fsp.setFilepath(sValue);
+         }
+         else if (param instanceof ParameterFixedTable) {
+            this.setFixedTableValue(param, (FixedTablePanel) container, sValue);
+         }
+         else if (param instanceof ParameterBoolean) {
+            if (!sValue.equals("#")) {
+               final JCheckBox cb = (JCheckBox) container;
+               boolean bValue;
+               if (sValue.equals("true")) {
+                  bValue = true;
+               }
+               else {
+                  bValue = false;
+               }
+               cb.setSelected(bValue);
+
+            }
+         }
+         else if (param instanceof ParameterSelection) {
+            if (!sValue.equals("#")) {
+               final int iIndex = Integer.parseInt(sValue);
+               final AdditionalInfoSelection ai = (AdditionalInfoSelection) param.getParameterAdditionalInfo();
+               if ((iIndex >= 0) && (iIndex < ai.getValues().length)) {
+                  final JComboBox cb = (JComboBox) container;
+                  cb.setSelectedIndex(iIndex);
+               }
+            }
+         }
+         else if (param instanceof ParameterMultipleInput) {
+
+            final ArrayList selectedIndices = new ArrayList();
+            final String[] sObjects = sValue.split(",");
+            //final MultipleInputSelectionPanel msp = (MultipleInputSelectionPanel) container;
+            final CheckComboBox ccb = (CheckComboBox) container;
+            final Object[] objs = new Object[ccb.getModel().getSize()];
+            for (int j = 0; j < objs.length; j++) {
+               objs[j] = ccb.getModel().getElementAt(j);
+            }
+            for (int j = 0; j < objs.length; j++) {
+               for (int i = 0; i < sObjects.length; i++) {
+                  if (objs[j] instanceof IDataObject) {
+                     final IDataObject ido = (IDataObject) objs[j];
+                     if (ido.getName().equals(sObjects[i].trim())) {
+                        ccb.getModel().addCheck(objs[j]);
+                        //selectedIndices.add(new Integer(j));
+                        break;
+                     }
+                  }
+                  else if (objs[j] instanceof RasterLayerAndBand) {
+                     try {
+                        final RasterLayerAndBand rlab = (RasterLayerAndBand) objs[j];
+                        if (rlab.getRasterLayer().getName().equals(sObjects[i].trim())) {
+                           if (Integer.parseInt(sObjects[i + 1].trim()) - 1 == rlab.getBand()) {
+                              ccb.getModel().addCheck(objs[j]);
+                              //selectedIndices.add(new Integer(j));
+                              break;
+                           }
+                        }
+                     }
+                     catch (final Exception e) {
+                     }
+
+                  }
+               }
+            }
+            //msp.setSelectedIndices(selectedIndices);
+         }
+         else if (param instanceof ParameterPoint) {
+            final StringTokenizer st = new StringTokenizer(sValue, ",");
+            if (st.countTokens() == 2) {
+               final double x = Double.parseDouble(st.nextToken());
+               final double y = Double.parseDouble(st.nextToken());
+               final PointSelectionPanel psp = (PointSelectionPanel) container;
+               psp.setPoint(new Point2D.Double(x, y));
+            }
+         }
+         else if ((param instanceof ParameterTableField) || (param instanceof ParameterBand)) {
+            final JComboBox cb = (JComboBox) container;
+            try {
+               cb.setSelectedIndex(Integer.parseInt(sValue));
+            }
+            catch (final Exception e) {
+            }
+         }
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      } catch (final NumberFormatException e) {
+          Sextante.addErrorToLog(e);
+       }
+
+   }
+
+
+   protected void setFixedTableValue(final Parameter param,
+                                     final FixedTablePanel container,
+                                     final String sValue) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iCols, iRows;
+      int iCol, iRow;
+      int iToken = 0;
+      FixedTableModel tableModel;
+      final StringTokenizer st = new StringTokenizer(sValue, ",");
+      String sToken;
+      AdditionalInfoFixedTable ai;
+      try {
+         ai = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+         iCols = ai.getColsCount();
+         final int iTokens = st.countTokens();
+         iRows = (st.countTokens() / iCols);
+         bIsNumberOfRowsFixed = ai.isNumberOfRowsFixed();
+         tableModel = new FixedTableModel(ai.getCols(), iRows, bIsNumberOfRowsFixed);
+
+         if (bIsNumberOfRowsFixed) {
+            if (iRows != ai.getRowsCount()) {
+               return;
+            }
+         }
+         else {
+            if (st.countTokens() % iCols != 0) {
+               return;
+            }
+         }
+
+         while (st.hasMoreTokens()) {
+            iRow = (int) Math.floor(iToken / (double) iCols);
+            iCol = iToken % iCols;
+            sToken = st.nextToken().trim();
+            tableModel.setValueAt(sToken, iRow, iCol);
+            iToken++;
+         }
+
+         container.setTableModel(tableModel);
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/DefaultParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupConfiguration.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupConfiguration.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupConfiguration.java	(revision 369)
@@ -0,0 +1,64 @@
+package es.unex.sextante.gui.toolbox;
+
+public class AlgorithmGroupConfiguration {
+
+   private String  m_sGroup;
+   private String  m_sSubgroup;
+   private boolean m_bShow;
+
+
+   public String getGroup() {
+      return m_sGroup;
+   }
+
+
+   public void setGroup(final String group) {
+      m_sGroup = group;
+   }
+
+
+   public String getSubgroup() {
+      return m_sSubgroup;
+   }
+
+
+   public void setSubgroup(final String subgroup) {
+      m_sSubgroup = subgroup;
+   }
+
+
+   public boolean isShow() {
+      return m_bShow;
+   }
+
+
+   public void setShow(final boolean show) {
+      m_bShow = show;
+   }
+
+
+   @Override
+   public String toString() {
+
+      return new Boolean(m_bShow).toString() + "|" + m_sGroup + "|" + m_sSubgroup;
+
+   }
+
+
+   public static AlgorithmGroupConfiguration fromString(final String s) {
+
+      try {
+         final AlgorithmGroupConfiguration conf = new AlgorithmGroupConfiguration();
+         final String[] sTokens = s.split("\\|");
+         conf.m_bShow = Boolean.parseBoolean(sTokens[0]);
+         conf.m_sGroup = sTokens[1];
+         conf.m_sSubgroup = sTokens[2];
+         return conf;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupConfiguration.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmTreeCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmTreeCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmTreeCellRenderer.java	(revision 369)
@@ -0,0 +1,173 @@
+package es.unex.sextante.gui.toolbox;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeCellRenderer;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.gui.core.HasIcon;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+
+public class AlgorithmTreeCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+
+   public AlgorithmTreeCellRenderer() {
+
+      setOpaque(false);
+      setBackground(null);
+
+   }
+
+
+    protected Icon getCustomIcon(final Object value) {
+
+        final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+        final HashMap<NameAndIcon, ArrayList<ToolboxAction>> allActions = SextanteGUI.getToolboxActions();
+
+        final Object obj = ((DefaultMutableTreeNode) value).getUserObject();
+
+        if (obj instanceof HasIcon) {
+            return ((HasIcon) obj).getIcon();
+        }
+        if (obj instanceof GeoAlgorithm) {
+            return SextanteGUI.getAlgorithmIcon((GeoAlgorithm) obj);
+        }
+//        if (obj instanceof NameAndIcon) {
+//            return ((NameAndIcon) obj).getIcon();
+//        }
+        if (obj instanceof ToolboxAction) {
+            final Set<NameAndIcon> set = allActions.keySet();
+            final Iterator<NameAndIcon> iter = set.iterator();
+            while (iter.hasNext()) {
+                final NameAndIcon nai = iter.next();
+                final ArrayList<ToolboxAction> actions = allActions.get(nai);
+                for (int i = 0; i < actions.size(); i++) {
+                    if (obj.getClass().equals(actions.get(i).getClass())) {
+                        return nai.getIcon();
+                    }
+                }
+            }
+            return null;
+        }
+
+        for (int i = 0; i < providers.size(); i++) {
+            if (value.toString().equals(providers.get(i).getName())) {
+                return providers.get(i).getIcon();
+            }
+        }
+        if (value.toString().equals("SEXTANTE")) {
+            return SextanteGUI.SEXTANTE_ICON;
+        }
+        return null;
+
+    }
+
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean sel,
+                                                 final boolean expanded,
+                                                 boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      String sName;
+
+      setFont(tree.getFont());
+      this.setIcon(getCustomIcon(value));
+
+      sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+
+      setEnabled(tree.isEnabled());
+      setText(sName);
+      try {
+         if (!leaf) {
+            // Check if the children algorithms are active
+            boolean activeAlg = false;
+            final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+            for (int i = 0; !activeAlg && (i < tree.getModel().getChildCount(value)); i++) {
+               final DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) tree.getModel().getChild(value, i);
+               final Object childValue = childNode.getUserObject();
+               if (childValue instanceof GeoAlgorithm) {
+                  final GeoAlgorithm alg = (GeoAlgorithm) childValue;
+                  if (alg.meetsDataRequirements(objs)) {
+                     activeAlg = true;
+                  }
+               }
+               else if (childValue instanceof ToolboxAction) {
+                  final ToolboxAction ita = (ToolboxAction) childValue;
+                  activeAlg = ita.isActive();
+               }
+               else {
+                  activeAlg = true; //is a top level node. Should be black
+               }
+            }
+
+            // Check if selected
+            setFont(AlgorithmsPanel.TREE_FONT);
+            if (sel) {
+               setForeground(Color.blue);
+            }
+            else {
+               setFont(AlgorithmsPanel.TREE_FONT);
+               if (!activeAlg) {
+                  setForeground(Color.gray);
+               }
+               else {
+                  setForeground(Color.black);
+               }
+            }
+
+         }
+         else {
+            boolean activeAlg = false;
+            final Object obj = ((DefaultMutableTreeNode) value).getUserObject();
+            if (obj instanceof ToolboxAction) {
+               final ToolboxAction ita = (ToolboxAction) obj;
+               activeAlg = ita.isActive();
+            }
+            else {//geoalgorithm
+               final GeoAlgorithm alg = (GeoAlgorithm) obj;
+               final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+               activeAlg = alg.meetsDataRequirements(objs);
+            }
+
+            if (sel) {
+               setForeground(Color.blue);
+            }
+            else {
+               if (!activeAlg) {
+                  setForeground(Color.gray);
+               }
+               else {
+                  setForeground(Color.black);
+               }
+            }
+         }
+      }
+      catch (final ClassCastException e) {
+         setForeground(Color.black);
+      }
+
+      return this;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmTreeCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/IToolboxDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/IToolboxDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/IToolboxDialog.java	(revision 369)
@@ -0,0 +1,21 @@
+
+
+package es.unex.sextante.gui.toolbox;
+
+import javax.swing.JDialog;
+
+
+/**
+ * An interface for dialogs containing the SEXTANTE toolbox
+ * 
+ * @author volaya
+ * 
+ */
+public interface IToolboxDialog {
+
+   public void setAlgorithmsCount(int iCount);
+
+
+   public JDialog getDialog();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/IToolboxDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/OutputRenderingSettingsDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/OutputRenderingSettingsDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/OutputRenderingSettingsDialog.java	(revision 369)
@@ -0,0 +1,159 @@
+
+
+package es.unex.sextante.gui.toolbox;
+
+import info.clearthought.layout.TableLayout;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class OutputRenderingSettingsDialog
+         extends
+            JDialog {
+
+   private HashMap<String, Object> m_Settings  = new HashMap<String, Object>();
+   private final JLabel            jLabel[]    = new JLabel[10];
+   private JButton                 jButtonCancel;
+   private JButton                 jButtonOK;
+   private final JComboBox         jComboBox[] = new JComboBox[10];
+   private final GeoAlgorithm      m_Alg;
+
+
+   public OutputRenderingSettingsDialog(final GeoAlgorithm alg) {
+
+      m_Alg = alg;
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   public HashMap<String, Object> getSettings() {
+
+      return m_Settings;
+
+   }
+
+
+   private void initGUI() {
+      try {
+         final TableLayout thisLayout = new TableLayout(new double[][] {
+                  { 6.0, TableLayout.FILL, TableLayout.FILL, 10.0, TableLayout.FILL, TableLayout.FILL, 6.0 },
+                  { 6.0, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM,
+                           TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM,
+                           TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, 6.0 } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         getContentPane().setLayout(thisLayout);
+
+         int iRow = 1;
+         final OutputObjectsSet outputs = m_Alg.getOutputObjects();
+         for (int i = 0; i < outputs.getOutputObjectsCount(); i++) {
+            final Output out = outputs.getOutput(i);
+            if (out instanceof OutputRasterLayer) {
+               jLabel[iRow - 1] = new JLabel(out.getDescription());
+               getContentPane().add(jLabel[iRow - 1], "1," + Integer.toString(iRow) + ",2," + Integer.toString(iRow));
+               final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(SextanteGUI.getInputFactory().getRasterLayers());
+               jComboBox[iRow - 1] = new JComboBox();
+               getContentPane().add(jComboBox[iRow - 1], "4," + Integer.toString(iRow) + ",5," + Integer.toString(iRow));
+               jComboBox[iRow - 1].setModel(jComboBoxModel);
+               iRow++;
+            }
+            if (out instanceof OutputVectorLayer) {
+               jLabel[iRow - 1] = new JLabel(out.getDescription());
+               getContentPane().add(jLabel[iRow - 1], "1," + Integer.toString(iRow) + ",2," + Integer.toString(iRow));
+               final int type = ((OutputVectorLayer) out).getShapeType();
+               final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(getVectorLayers(type));
+               jComboBox[iRow - 1] = new JComboBox();
+               getContentPane().add(jComboBox[iRow - 1], "4," + Integer.toString(iRow) + ",5," + Integer.toString(iRow));
+               jComboBox[iRow - 1].setModel(jComboBoxModel);
+               iRow++;
+            }
+         }
+         {
+            jButtonOK = new JButton();
+            getContentPane().add(jButtonOK, "4, 12");
+            jButtonOK.setText("OK");
+            jButtonOK.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  createSettings();
+                  dispose();
+                  setVisible(false);
+               }
+            });
+         }
+         {
+            jButtonCancel = new JButton();
+            getContentPane().add(jButtonCancel, "5, 12");
+            jButtonCancel.setText("Cancel");
+            jButtonCancel.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+                  m_Settings = null;
+                  dispose();
+                  setVisible(false);
+               }
+            });
+         }
+         {
+            this.setSize(504, 218);
+         }
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+   }
+
+
+   private Object[] getVectorLayers(final int type) {
+
+      //TODO:use type!!
+      if (type != OutputVectorLayer.SHAPE_TYPE_UNDEFINED) {
+         return SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+      }
+      return SextanteGUI.getInputFactory().getVectorLayers(type);
+   }
+
+
+   protected void createSettings() {
+
+      int iCombo = 0;
+      final OutputObjectsSet outputs = m_Alg.getOutputObjects();
+      for (int i = 0; i < outputs.getOutputObjectsCount(); i++) {
+         final Output out = outputs.getOutput(i);
+         if (out instanceof OutputRasterLayer) {
+            final Object layer = jComboBox[iCombo].getSelectedItem();
+            if (layer != null) {
+               m_Settings.put(out.getName(), SextanteGUI.getDataRenderer().getRenderingDataFromLayer((ILayer) layer));
+               iCombo++;
+            }
+         }
+         if (out instanceof OutputVectorLayer) {
+            final Object layer = jComboBox[iCombo].getSelectedItem();
+            if (layer != null) {
+               m_Settings.put(out.getName(), SextanteGUI.getDataRenderer().getRenderingDataFromLayer((ILayer) layer));
+               iCombo++;
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/OutputRenderingSettingsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TransparentScrollPane.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TransparentScrollPane.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TransparentScrollPane.java	(revision 369)
@@ -0,0 +1,78 @@
+package es.unex.sextante.gui.toolbox;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.JScrollPane;
+import javax.swing.JViewport;
+
+public class TransparentScrollPane
+         extends
+            JScrollPane {
+
+   ImageIcon image = null;
+
+
+   public TransparentScrollPane(final Component view,
+                                final int vsbPolicy,
+                                final int hsbPolicy) {
+
+      super(view, vsbPolicy, hsbPolicy);
+      if (view instanceof JComponent) {
+         ((JComponent) view).setOpaque(false);
+      }
+
+      this.setOpaque(false);
+      this.getViewport().setOpaque(false);
+
+   }
+
+
+   public TransparentScrollPane(final Component view) {
+
+      this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);
+
+   }
+
+
+   public TransparentScrollPane(final int vsbPolicy,
+                                final int hsbPolicy) {
+
+      this(null, vsbPolicy, hsbPolicy);
+
+   }
+
+
+   public TransparentScrollPane() {
+
+      this(null, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);
+   }
+
+
+   @Override
+   public void paintComponent(final Graphics g) {
+
+      g.setColor(Color.white);
+      g.fillRect(0, 0, this.getWidth(), this.getHeight());
+
+      if (image != null) {
+         final int h = image.getIconHeight();
+         final int w = image.getIconWidth();
+         g.drawImage(image.getImage(), getWidth() - w, getHeight() - h, null, null);
+         getViewport().setScrollMode(JViewport.BLIT_SCROLL_MODE);
+      }
+      super.paintComponent(g);
+
+   }
+
+
+   public void setBackgroundImage(final ImageIcon image) {
+
+      this.image = image;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TransparentScrollPane.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxDialog.java	(revision 369)
@@ -0,0 +1,90 @@
+
+
+package es.unex.sextante.gui.toolbox;
+
+import java.awt.Frame;
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+import javax.swing.JDialog;
+
+import es.unex.sextante.core.Sextante;
+
+
+/**
+ * A dialog to show a toolbox
+ *
+ * @author volaya
+ *
+ */
+public class ToolboxDialog
+         extends
+            JDialog
+         implements
+            IToolboxDialog {
+
+   private ToolboxPanel m_Panel;
+
+
+   /**
+    * Constructor
+    *
+    * @param parent
+    *                the parent frame
+    */
+   public ToolboxDialog(final Frame parent) {
+
+      super(parent, Sextante.getText("Toolbox"), true);
+      this.setLocationRelativeTo(null);
+
+      initialize();
+
+   }
+
+
+   public void initialize() {
+
+      ImageIcon img;
+      final URL res = getClass().getClassLoader().getResource("images/sextante_toolbox.gif");
+      if (res != null) {
+         img = new ImageIcon(res);
+      }
+      else {
+         img = null;
+      }
+
+      m_Panel = new ToolboxPanel(this, null, img);
+      this.setContentPane(m_Panel);
+
+      m_Panel.fillTreesWithAllAlgorithms();
+
+   }
+
+
+   /**
+    * Returns the toolbox panel contained in this dialog
+    *
+    * @return the toolbox panel contained in this dialog
+    */
+   public ToolboxPanel getToolboxPanel() {
+
+      return m_Panel;
+
+   }
+
+
+   public void setAlgorithmsCount(final int iCount) {
+
+      setTitle(Sextante.getText("Toolbox")+ ". " +  Integer.toString(iCount) + " " + Sextante.getText("Algorithms"));
+
+   }
+
+
+   public JDialog getDialog() {
+
+      return this;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxPanel.java	(revision 369)
@@ -0,0 +1,145 @@
+package es.unex.sextante.gui.toolbox;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+import javax.swing.JPanel;
+
+import es.unex.sextante.core.IGeoAlgorithmFilter;
+
+/**
+ * A panel containing a list of algorithms and a text box to filter that list
+ * 
+ * @author volaya
+ * 
+ */
+public class ToolboxPanel
+         extends
+            JPanel {
+
+   private AlgorithmsPanel           algoritmhsPanel;
+   private TextSearchPanel           jTextSearchPanel;
+   private final IToolboxDialog      m_Parent;
+   private int                       m_iCount;
+   private final IGeoAlgorithmFilter m_Filter;
+   private final ImageIcon           m_BackgroundImage;
+
+
+   /**
+    * Constructor
+    * 
+    * @param parent
+    *                the parent toolbox dialog
+    * @param filter
+    *                the filter to apply to the list of all available algorithms to configure this toolbox panel
+    * @param img
+    *                the background image for the algorithm panel. If null, will use the default one
+    */
+   public ToolboxPanel(final IToolboxDialog parent,
+                       final IGeoAlgorithmFilter filter,
+                       ImageIcon img) {
+
+      if (img == null) {
+         final URL res = getClass().getClassLoader().getResource("images/sextante_toolbox.gif");
+         if (res != null) {
+            img = new ImageIcon(res);
+         }
+         else {
+            img = null;
+         }
+      }
+
+      m_Parent = parent;
+      m_Filter = filter;
+      m_BackgroundImage = img;
+      initialize();
+
+   }
+
+
+   /**
+    * Creates the interface and populates the list of algorithms
+    */
+   public void initialize() {
+
+      this.setSize(new java.awt.Dimension(400, 500));
+      {
+
+         final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL },
+                  { TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         this.setLayout(thisLayout);
+
+         algoritmhsPanel = createAlgorithmsPanel(m_BackgroundImage, m_Filter, m_Parent);
+         this.add(algoritmhsPanel, "0, 0");
+
+         jTextSearchPanel = new TextSearchPanel(this, m_Parent.getDialog());
+         this.add(jTextSearchPanel, "0, 1");
+
+      }
+
+      fillTreesWithAllAlgorithms();
+
+   }
+
+
+   protected AlgorithmsPanel createAlgorithmsPanel(final ImageIcon img,
+                                                   final IGeoAlgorithmFilter filter,
+                                                   final IToolboxDialog parent) {
+
+      return new AlgorithmsPanel(parent, filter, img);
+   }
+
+
+   private void collapseAll() {
+
+      algoritmhsPanel.collapseAll();
+
+   }
+
+
+   /**
+    * fills the tree of algorithms with all the available ones, not aplying any filter
+    */
+   public void fillTreesWithAllAlgorithms() {
+
+      fillTreesWithSelectedAlgorithms(null, false);
+
+      collapseAll();
+
+   }
+
+
+   /**
+    * fills the tree of algorithms with all the algorithms containing a given string in their help file
+    * 
+    * @param string
+    *                the string to search
+    * @param bIncludeHelpFiles
+    *                true if it should search in help files. if false, it will only search in algorithm names
+    */
+   public void fillTreesWithSelectedAlgorithms(final String string,
+                                               final boolean bIncludeHelpFile) {
+
+      m_iCount = algoritmhsPanel.fillTree(string, bIncludeHelpFile);
+
+   }
+
+
+   /**
+    * Returns the number of algorithms currently in the panel
+    * 
+    * @return the number of algorithms in the panel
+    */
+   public int getAlgorithmsCount() {
+
+      return m_iCount;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/ToolboxPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupsOrganizer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupsOrganizer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupsOrganizer.java	(revision 369)
@@ -0,0 +1,133 @@
+package es.unex.sextante.gui.toolbox;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AlgorithmGroupsOrganizer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AlgorithmGroupsOrganizer.class);
+
+   private static HashMap<String, AlgorithmGroupConfiguration> m_Map = null;
+
+    private static void readConfigFile() {
+
+        BufferedReader input = null;
+        String fname = "(unknow)";
+        try {
+            fname = getConfigFile();
+            input = new BufferedReader(new FileReader(fname));
+            String sLine = null;
+            while ((sLine = input.readLine()) != null) {
+                final String[] sTokens = sLine.split("@");
+                String sName = "(unknow)";
+                try {
+                    sName = sTokens[0];
+                    final AlgorithmGroupConfiguration conf = AlgorithmGroupConfiguration.fromString(sTokens[1]);
+                    if (conf != null) {
+                        getGrouppingMap().put(sName, conf);
+                    }
+                } catch (final Exception e) {
+                    LOG.warn("Can't read configuration of '"+sName+"'.", e);
+                }
+            }
+        } catch (final Exception e) {
+            LOG.warn("Can't read config file '"+fname+"'.",e);
+        } finally {
+            try {
+                if (input != null) {
+                    input.close();
+                }
+            } catch (final IOException e) {
+                Sextante.addErrorToLog(e);
+            }
+        }
+
+    }
+
+
+   public static void saveSettings() {
+
+      Writer output = null;
+      try {
+         output = new BufferedWriter(new FileWriter(getConfigFile()));
+         final Set<String> set = getGrouppingMap().keySet();
+         final Iterator<String> iter = set.iterator();
+         while (iter.hasNext()) {
+            final String sKey = iter.next();
+            final AlgorithmGroupConfiguration conf = getGrouppingMap().get(sKey);
+            output.write(sKey + "@" + conf.toString() + "\n");
+         }
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   public static HashMap<String, AlgorithmGroupConfiguration> getGrouppingMap() {
+      if( m_Map == null ) { 
+        m_Map = new HashMap<String, AlgorithmGroupConfiguration>();
+        readConfigFile();
+      }
+      return m_Map;
+
+   }
+
+
+   private static String getConfigFile() {
+
+//      String sPath = System.getProperty("user.home") + File.separator + "sextante";
+      String sPath = SextanteGUI.getSextanteHomePath();
+      
+      sPath = sPath + File.separator + "sextante_alg_groups.settings";
+
+      return sPath;
+
+   }
+
+
+   public static void setConfiguration(final HashMap<String, AlgorithmGroupConfiguration> map) {
+      m_Map = map;
+   }
+
+
+   public static AlgorithmGroupConfiguration getGroupConfiguration(final GeoAlgorithm alg) {
+
+
+      return getGrouppingMap().get(alg.getCommandLineName());
+
+   }
+
+
+   public static void restore() {
+
+      getGrouppingMap().clear();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmGroupsOrganizer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmsPanel.java	(revision 369)
@@ -0,0 +1,763 @@
+
+
+package es.unex.sextante.gui.toolbox;
+
+import java.awt.BorderLayout;
+import java.awt.Cursor;
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.ImageIcon;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JTree;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.IGeoAlgorithmFilter;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.core.GeoAlgorithmExecutors;
+import es.unex.sextante.gui.core.IGUIFactory;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.history.History;
+import es.unex.sextante.gui.settings.SextanteGeneralSettings;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.identitymanagement.SimpleIdentity;
+import org.gvsig.tools.identitymanagement.SimpleIdentityManager;
+import org.gvsig.tools.identitymanagement.UnauthorizedException;
+
+
+/**
+ * A panel showing the list of available algorithms, from which they can be executed
+ * 
+ * @author volaya
+ * 
+ */
+public class AlgorithmsPanel
+         extends
+            JPanel {
+   private static final int       EXECUTE_ITERATIVE_MENU_COUNT = 20;
+   public static final String ACCESS_GEOPROCESS_AUTHORIZATION = "access-geoprocess";
+
+   public static Font             TREE_FONT                    = new Font("Tahoma", Font.BOLD, 11);
+
+   protected JTree                jTree;
+   private TransparentScrollPane  jScrollPane;
+   private JMenuItem              menuItemExecute;
+   private JMenuItem              menuItemExecuteAsBatch;
+   private JMenuItem              menuItemExecuteAsBatchFromGIS;
+   private JMenuItem              menuItemExecuteIterative[];
+   private JMenuItem              menuItemShowHelp;
+   private JCheckBoxMenuItem      menuItemShowOnlyActive;
+   private JPopupMenu             popupMenu;
+   private TreePath               m_Path;
+   private GeoAlgorithm           m_Alg;
+   protected final IToolboxDialog m_ParentDialog;
+   protected IGeoAlgorithmFilter  m_Filter;
+   private final ImageIcon        m_BackgroundImg;
+   protected String               m_sLastSearchString          = "";
+   private int                    m_iExecuteIterativeMenuCount;
+
+   protected boolean              m_bLastSearchIncludedHelpFiles;
+
+   private ToolboxAction          m_Action;
+
+   private JMenuItem[]            menuItemToolboxAction;
+
+   private JMenuItem              menuItemSetOutputRendering;
+
+
+   /**
+    * Constructor
+    * 
+    * @param parentDialog
+    *                the parent dialog. It will be the parent dialog of parameters dialog opened from this panel
+    * @param filter
+    *                the filter to apply to the list of all available algorithms
+    */
+   public AlgorithmsPanel(final IToolboxDialog parentDialog,
+                          final IGeoAlgorithmFilter filter,
+                          final ImageIcon img) {
+
+      m_BackgroundImg = img;
+      m_ParentDialog = parentDialog;
+      m_Filter = filter;
+
+      if (m_Filter == null) {
+         m_Filter = new IGeoAlgorithmFilter() {
+            public boolean accept(final GeoAlgorithm alg) {
+               if (SextanteGUI.getShowOnlyActiveAlgorithms()) {
+                  final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+                  return alg.meetsDataRequirements(objs);
+               }
+               else {
+                  return true;
+               }
+            }
+         };
+      }
+
+      init();
+
+   }
+
+
+   private void updateSelectedAlgorithm() {
+
+      m_Alg = null;
+      m_Action = null;
+
+      if (m_Path != null) {
+         menuItemExecuteAsBatch.setVisible(false);
+         menuItemExecuteAsBatchFromGIS.setVisible(false);
+         menuItemExecute.setVisible(false);
+         menuItemShowHelp.setVisible(false);
+         for (int i = 0; i < menuItemExecuteIterative.length; i++) {
+            menuItemExecuteIterative[i].setVisible(false);
+         }
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+         if (!(node.getUserObject() instanceof GeoAlgorithm)) {
+            if ((node.getUserObject() instanceof ToolboxAction)) {
+               m_Action = (ToolboxAction) node.getUserObject();
+            }
+            return;
+         }
+         m_Alg = ((GeoAlgorithm) node.getUserObject());
+         menuItemExecuteAsBatch.setVisible(true);
+         menuItemShowHelp.setVisible(true);
+         menuItemExecute.setVisible(true);
+         final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+         menuItemExecuteAsBatchFromGIS.setVisible(true);
+         final boolean bMeets = m_Alg.meetsDataRequirements(objs);
+         menuItemExecuteAsBatchFromGIS.setEnabled(bMeets);
+         menuItemExecute.setEnabled(bMeets);
+
+         final IToolboxRightButtonAction[] actions = SextanteGUI.getToolboxRightButtonActions();
+         for (int i = 0; i < menuItemToolboxAction.length; i++) {
+            menuItemToolboxAction[i].setVisible(actions[i].canBeExecutedOnAlgorithm(m_Alg));
+         }
+
+         if (bMeets && m_Alg.requiresIndividualVectorLayers()) {
+            m_iExecuteIterativeMenuCount = 0;
+            final int iParams = m_Alg.getParameters().getNumberOfParameters();
+            for (int i = 0; i < iParams; i++) {
+               final Parameter param = m_Alg.getParameters().getParameter(i);
+               if (param instanceof ParameterVectorLayer) {
+                  final ParameterVectorLayer pvl = (ParameterVectorLayer) param;
+                  boolean bMandatory;
+                  try {
+                     bMandatory = ((AdditionalInfoVectorLayer) pvl.getParameterAdditionalInfo()).getIsMandatory();
+                     if (bMandatory) {
+                        menuItemExecuteIterative[m_iExecuteIterativeMenuCount].setText(Sextante.getText("Run_iterative") + " ("
+                                                                                       + param.getParameterDescription() + ")");
+                        menuItemExecuteIterative[m_iExecuteIterativeMenuCount].setVisible(true);
+                        m_iExecuteIterativeMenuCount++;
+                     }
+                  }
+                  catch (final NullParameterAdditionalInfoException e) {
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void init() {
+
+      m_iExecuteIterativeMenuCount = 0;
+      this.setPreferredSize(new java.awt.Dimension(350, 380));
+      this.setSize(new java.awt.Dimension(350, 380));
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+      jTree = new JTree();
+      jTree.setOpaque(false);
+      jTree.setCellRenderer(new AlgorithmTreeCellRenderer());
+      final MouseListener ml = new MouseAdapter() {
+         @Override
+         public void mousePressed(MouseEvent e) {
+            m_Alg = null;
+            m_Action = null;
+            menuItemExecute.setVisible(false);
+            menuItemExecuteAsBatch.setVisible(false);
+            for (int i = 0; i < EXECUTE_ITERATIVE_MENU_COUNT; i++) {
+               menuItemExecuteIterative[i].setVisible(false);
+            }
+            for (int j = 0; j < menuItemToolboxAction.length; j++) {
+               menuItemToolboxAction[j].setVisible(false);
+            }
+            menuItemExecuteAsBatchFromGIS.setVisible(false);
+            menuItemShowHelp.setVisible(false);
+            m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+            updateSelectedAlgorithm();
+
+            // Create again DataObjects here to get feature selections changes (if there are)
+            SextanteGUI.getInputFactory().createDataObjects();
+
+            if (e.getButton() == MouseEvent.BUTTON1) {
+               if (e.getClickCount() == 2) {
+                  executeSelectedAlgorithm();
+               }
+            }
+            else if (e.getButton() == MouseEvent.BUTTON3) {
+               showPopupMenu(e);
+            }
+         }
+      };
+      jTree.addMouseListener(ml);
+      jTree.addKeyListener(new KeyListener() {
+         public void keyPressed(final KeyEvent e) {
+         }
+
+
+         public void keyReleased(final KeyEvent e) {
+         }
+
+
+         public void keyTyped(final KeyEvent e) {
+            if (e.getKeyChar() == KeyEvent.VK_ENTER) {
+               executeSelectedAlgorithm();
+            }
+
+            if (e.getKeyChar() == KeyEvent.VK_SPACE) {
+               showPopupMenu(e);
+            }
+         }
+      });
+
+      jTree.addTreeSelectionListener(new TreeSelectionListener() {
+
+         public void valueChanged(final TreeSelectionEvent e) {
+            m_Path = e.getPath();
+            updateSelectedAlgorithm();
+         }
+
+      });
+
+      jScrollPane = new TransparentScrollPane(jTree);
+      jScrollPane.setSize(new java.awt.Dimension(350, 380));
+      if (m_BackgroundImg != null) {
+         jScrollPane.setBackgroundImage(m_BackgroundImg);
+      }
+      this.add(jScrollPane, BorderLayout.CENTER);
+
+      popupMenu = new JPopupMenu("Menu");
+
+      menuItemExecute = new JMenuItem(Sextante.getText("Run"));
+      menuItemExecute.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            executeSelectedAlgorithm();
+         }
+      });
+      popupMenu.add(menuItemExecute);
+
+      menuItemExecuteIterative = new JMenuItem[EXECUTE_ITERATIVE_MENU_COUNT];
+      for (int i = 0; i < menuItemExecuteIterative.length; i++) {
+         final int iParameter = i;
+         menuItemExecuteIterative[i] = new JMenuItem();
+         menuItemExecuteIterative[i].addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               executeSelectedAlgorithmIteratively(iParameter);
+            }
+         });
+         popupMenu.add(menuItemExecuteIterative[i]);
+      }
+
+      final IToolboxRightButtonAction[] actions = SextanteGUI.getToolboxRightButtonActions();
+      menuItemToolboxAction = new JMenuItem[actions.length];
+      for (int i = 0; i < actions.length; i++) {
+         final IToolboxRightButtonAction action = actions[i];
+         menuItemToolboxAction[i] = new JMenuItem();
+         menuItemToolboxAction[i].setText(action.getDescription());
+         menuItemToolboxAction[i].addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               action.execute(m_Alg);
+            }
+         });
+         popupMenu.add(menuItemToolboxAction[i]);
+      }
+
+
+      menuItemExecuteAsBatch = new JMenuItem(Sextante.getText("Execute_as_batch_process"));
+      menuItemExecuteAsBatch.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            executeAsBatch();
+         }
+      });
+      popupMenu.add(menuItemExecuteAsBatch);
+
+      menuItemExecuteAsBatchFromGIS = new JMenuItem(Sextante.getText("Execute_as_batch_process__using_layers_from_GIS_app"));
+      menuItemExecuteAsBatchFromGIS.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            executeAsBatchInGIS();
+         }
+      });
+      popupMenu.add(menuItemExecuteAsBatchFromGIS);
+      popupMenu.addSeparator();
+
+      menuItemSetOutputRendering = new JMenuItem(Sextante.getText("set_output_rendering"));
+      menuItemSetOutputRendering.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            setOutputRendering();
+         }
+      });
+      popupMenu.add(menuItemSetOutputRendering);
+      popupMenu.addSeparator();
+
+      final JMenuItem menuItemExpand = new JMenuItem(Sextante.getText("Expand_all"));
+      menuItemExpand.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            expandAll();
+         }
+      });
+      popupMenu.add(menuItemExpand);
+
+      final JMenuItem menuItemCollapse = new JMenuItem(Sextante.getText("Collapse_all"));
+      menuItemCollapse.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            collapseAll();
+         }
+      });
+      popupMenu.add(menuItemCollapse);
+
+      menuItemShowOnlyActive = new JCheckBoxMenuItem(Sextante.getText("Show_active_only"));
+      menuItemShowOnlyActive.addItemListener(new ItemListener() {
+         public void itemStateChanged(final ItemEvent e) {
+            SextanteGUI.setShowOnlyActiveAlgorithms(e.getStateChange() == ItemEvent.SELECTED);
+            fillTree(m_sLastSearchString, m_bLastSearchIncludedHelpFiles);
+            collapseAll();
+         }
+      });
+      menuItemShowOnlyActive.setSelected(SextanteGUI.getShowOnlyActiveAlgorithms());
+      popupMenu.add(menuItemShowOnlyActive);
+
+      popupMenu.addSeparator();
+
+      menuItemShowHelp = new JMenuItem(Sextante.getText("Show_help"));
+      menuItemShowHelp.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            showHelp();
+         }
+      });
+      popupMenu.add(menuItemShowHelp);
+
+   }
+
+
+   protected void setOutputRendering() {
+
+      if (m_Alg != null) {
+         final OutputRenderingSettingsDialog dialog = new OutputRenderingSettingsDialog(m_Alg);
+         dialog.setVisible(true);
+         final HashMap<String, Object> set = dialog.getSettings();
+         if (set != null) {
+            SextanteGUI.getDataRenderer().setRenderingForAlgorithm(m_Alg.getCommandLineName(), set);
+            SextanteGUI.getDataRenderer().save();
+         }
+      }
+
+   }
+
+
+   protected void showHelp() {
+
+      if (m_Alg != null) {
+         SextanteGUI.getGUIFactory().showHelpDialog(m_Alg);
+      }
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      jTree.setSelectionPath(m_Path);
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   protected void showPopupMenu(final KeyEvent e) {
+
+      jTree.setSelectionPath(m_Path);
+      final Rectangle pathBounds = jTree.getPathBounds(m_Path);
+      popupMenu.show(e.getComponent(), pathBounds.x, pathBounds.y);
+
+   }
+
+
+   /**
+    * Collapses the tree of algorithms
+    */
+   public void collapseAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      final TreePath path = new TreePath(root);
+      expandAll(jTree, path, false);
+      jTree.expandPath(path);
+      final int iChildCount = root.getChildCount();
+      for (int i = 0; i < iChildCount; i++) {
+         final TreeNode node = root.getChildAt(i);
+         final TreePath subpath = path.pathByAddingChild(node);
+         jTree.expandPath(subpath);
+      }
+
+   }
+
+
+   /**
+    * Expands the tree of algorithms
+    */
+   public void expandAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      expandAll(jTree, new TreePath(root), true);
+
+   }
+
+
+   private void expandAll(final JTree tree,
+                          final TreePath parent,
+                          final boolean expand) {
+
+      final TreeNode node = (TreeNode) parent.getLastPathComponent();
+      if (node.getChildCount() >= 0) {
+         for (final Enumeration e = node.children(); e.hasMoreElements();) {
+            final TreeNode n = (TreeNode) e.nextElement();
+            final TreePath path = parent.pathByAddingChild(n);
+            expandAll(tree, path, expand);
+         }
+      }
+
+      if (expand) {
+         tree.expandPath(parent);
+      }
+      else {
+         tree.collapsePath(parent);
+      }
+
+   }
+
+
+   protected void executeAsBatch() {
+
+      if (m_Alg != null) {
+         SextanteGUI.getGUIFactory().showBatchProcessingDialog(m_Alg, m_ParentDialog.getDialog());
+      }
+
+   }
+
+
+   protected void executeAsBatchInGIS() {
+
+      if (m_Alg != null) {
+         SextanteGUI.getGUIFactory().showBatchProcessingFromGISDialog(m_Alg, m_ParentDialog.getDialog());
+      }
+
+   }
+
+
+   protected void executeSelectedAlgorithm() {
+
+      try {
+         if (m_Alg != null) {
+            final GeoAlgorithm alg = m_Alg.getNewInstance();
+            final int iRet = SextanteGUI.getGUIFactory().showAlgorithmDialog(alg, m_ParentDialog.getDialog(), null);
+            if (iRet == IGUIFactory.OK) {
+               final String[] cmd = alg.getAlgorithmAsCommandLineSentences();
+               if (cmd != null) {
+                  History.addToHistory(cmd);
+               }
+               GeoAlgorithmExecutors.execute(alg, m_ParentDialog.getDialog());
+               updateListOfMostRecentAlgorithms();
+            }
+         }
+         else if (m_Action != null) {
+            m_Action.execute();
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void updateListOfMostRecentAlgorithms() {
+
+      final boolean bShowMostRecent = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.SHOW_MOST_RECENT)).booleanValue();
+      if (bShowMostRecent) {
+         final GeoAlgorithm[] recent = History.getRecentlyUsedAlgs();
+         final DefaultMutableTreeNode recentNode = new DefaultMutableTreeNode(Sextante.getText("RecentAlgorithms"));
+         for (int i = 0; i < recent.length; i++) {
+            final DefaultMutableTreeNode node = new DefaultMutableTreeNode(recent[i]);
+            recentNode.add(node);
+         }
+         final DefaultMutableTreeNode mainNode = (DefaultMutableTreeNode) new TreePath(jTree.getModel().getRoot()).getLastPathComponent();
+         mainNode.remove(0);
+         mainNode.insert(recentNode, 0);
+      }
+
+   }
+
+
+   protected void executeSelectedAlgorithmIteratively(final int iParameterToIterateOver) {
+
+      try {
+         if (m_Alg != null) {
+            final GeoAlgorithm alg = m_Alg.getNewInstance();
+            final int iRet = SextanteGUI.getGUIFactory().showAlgorithmDialog(alg, m_ParentDialog.getDialog(), null);
+            if (iRet == IGUIFactory.OK) {
+               final ParametersSet params = m_Alg.getParameters();
+               final int iParamCount = params.getNumberOfParameters();
+               int iVectorLayers = 0;
+               for (int i = 0; i < iParamCount; i++) {
+                  final Parameter param = m_Alg.getParameters().getParameter(i);
+                  if (param instanceof ParameterVectorLayer) {
+                     if (iVectorLayers == iParameterToIterateOver) {
+                        GeoAlgorithmExecutors.executeIterative(alg, m_ParentDialog.getDialog(), param.getParameterName());
+                        break;
+                     }
+                     iVectorLayers++;
+                  }
+               }
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public GeoAlgorithm getSelectedAlgorithm() {
+
+      return m_Alg;
+
+   }
+
+
+   /**
+    * Fills the tree with the algorithms that match a search criteria
+    * 
+    * @param sSearchString
+    *                The search string to look for in the algorithms context help
+    * @param bSearchInFiles
+    *                true if it should search in help files. if false, it will only search in algorithm names
+    * @return the number of algorithms that match the given criteria
+    */
+   public int fillTree(final String sSearchString,
+                       final boolean bSearchInHelpFiles) {
+
+      m_sLastSearchString = sSearchString;
+      m_bLastSearchIncludedHelpFiles = bSearchInHelpFiles;
+
+      SimpleIdentity user = ToolsLocator.getIdentityManager().getCurrentIdentity();
+
+      int iCount = 0;
+      String sGroup, sSubgroup;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Algorithms"));
+      final HashMap<Object, HashMap<String, HashMap<String, DefaultMutableTreeNode>>> groups = new HashMap<Object, HashMap<String, HashMap<String, DefaultMutableTreeNode>>>();
+
+      setCursor(new Cursor(Cursor.WAIT_CURSOR));
+      SimpleIdentityManager identityManager = ToolsLocator.getIdentityManager();
+
+      //algorithms
+      final HashMap<String, HashMap<String, GeoAlgorithm>> algs = Sextante.getAlgorithms();
+      final Set<String> groupKeys = algs.keySet();
+      final Iterator<String> groupIter = groupKeys.iterator();
+      while (groupIter.hasNext()) {
+         final String groupKey = groupIter.next();
+         final HashMap<String, GeoAlgorithm> groupAlgs = algs.get(groupKey);
+         final Set keys = groupAlgs.keySet();
+         final Iterator iter = keys.iterator();
+         while (iter.hasNext()) {
+            final GeoAlgorithm alg = groupAlgs.get(iter.next());
+            if( ! identityManager.getCurrentIdentity().isAuthorized(ACCESS_GEOPROCESS_AUTHORIZATION, alg, alg.getCommandLineName()) ) {
+                continue;
+            }            
+            if (m_Filter.accept(alg)) {
+               if (bSearchInHelpFiles) {
+                  if (!HelpIO.containsStringInHelpFile(alg, sSearchString)) {
+                     continue;
+                  }
+               }
+               else {
+                  if ((sSearchString != null) && !alg.getName().toLowerCase().contains(sSearchString)) {
+                     continue;
+                  }
+               }
+               iCount++;
+               final AlgorithmGroupConfiguration conf = AlgorithmGroupsOrganizer.getGroupConfiguration(alg);
+               if (conf != null) {
+                  if (!conf.isShow()) {
+                     continue;
+                  }
+                  sGroup = conf.getGroup();
+                  sSubgroup = conf.getSubgroup();
+               }
+               else {
+                  sGroup = groupKey;
+                  sSubgroup = alg.getGroup();
+               }
+               HashMap<String, HashMap<String, DefaultMutableTreeNode>> group = groups.get(sGroup);
+               if (group == null) {
+                  group = new HashMap<String, HashMap<String, DefaultMutableTreeNode>>();
+                  groups.put(sGroup, group);
+               }
+               HashMap<String, DefaultMutableTreeNode> subgroup = group.get(sSubgroup);
+               if (subgroup == null) {
+                  subgroup = new HashMap<String, DefaultMutableTreeNode>();
+                  group.put(sSubgroup, subgroup);
+               }
+               subgroup.put(alg.getName(), new DefaultMutableTreeNode(alg));
+            }
+         }
+      }
+
+      //toolbox actions
+      final HashMap<NameAndIcon, ArrayList<ToolboxAction>> allActions = SextanteGUI.getToolboxActions();
+      final Set<NameAndIcon> actionsKeys = allActions.keySet();
+      final Iterator<NameAndIcon> actionsIter = actionsKeys.iterator();
+      while (actionsIter.hasNext()) {
+         final NameAndIcon nai = actionsIter.next();
+         final ArrayList<ToolboxAction> actions = allActions.get(nai);
+         for (int i = 0; i < actions.size(); i++) {
+            final ToolboxAction ita = actions.get(i);
+            System.out.println(ita.getName());
+            if( !user.isAuthorized(ACCESS_GEOPROCESS_AUTHORIZATION, ita, ita.getName()) ) {
+                continue;
+            }
+            if ((sSearchString != null) && !ita.getName().toLowerCase().contains(sSearchString)) {
+               continue;
+            }
+            iCount++;
+            sSubgroup = ita.getGroup();
+            HashMap<String, HashMap<String, DefaultMutableTreeNode>> group = groups.get(nai.getName());
+            if (group == null) {
+               group = groups.get(nai);
+            }
+            if (group == null) {
+               group = new HashMap<String, HashMap<String, DefaultMutableTreeNode>>();
+               groups.put(nai, group);
+            }
+            HashMap<String, DefaultMutableTreeNode> subgroup = group.get(sSubgroup);
+            if (subgroup == null) {
+               subgroup = new HashMap<String, DefaultMutableTreeNode>();
+               group.put(sSubgroup, subgroup);
+            }
+            subgroup.put(ita.getName(), new DefaultMutableTreeNode(ita));
+
+         }
+      }
+
+
+      final Set<Object> set = groups.keySet();
+      final Iterator<Object> iter = set.iterator();
+      while (iter.hasNext()) {
+         final Object key = iter.next();
+         final DefaultMutableTreeNode node = new DefaultMutableTreeNode(key);
+         addNodeInSortedOrder(mainNode, node);
+         final HashMap<String, HashMap<String, DefaultMutableTreeNode>> g = groups.get(key);
+         final Set<String> set2 = g.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final String sKey2 = iter2.next();
+            final DefaultMutableTreeNode node2 = new DefaultMutableTreeNode(sKey2);
+            addNodeInSortedOrder(node, node2);
+            final HashMap<String, DefaultMutableTreeNode> g2 = g.get(sKey2);
+            final Set<String> set3 = g2.keySet();
+            final Iterator<String> iter3 = set3.iterator();
+            while (iter3.hasNext()) {
+               final String sKey3 = iter3.next();
+               final DefaultMutableTreeNode node3 = g2.get(sKey3);
+               addNodeInSortedOrder(node2, node3);
+            }
+         }
+      }
+
+      final boolean bShowMostRecent = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.SHOW_MOST_RECENT)).booleanValue();
+      if (bShowMostRecent) {
+         final GeoAlgorithm[] recent = History.getRecentlyUsedAlgs();
+         final DefaultMutableTreeNode recentNode = new DefaultMutableTreeNode(Sextante.getText("RecentAlgorithms"));
+         for (int i = 0; i < recent.length; i++) {
+            final DefaultMutableTreeNode node = new DefaultMutableTreeNode(recent[i]);
+            recentNode.add(node);
+         }
+         mainNode.insert(recentNode, 0);
+      }
+
+      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+      if (sSearchString != null) {
+         expandAll();
+      }
+
+      m_ParentDialog.setAlgorithmsCount(iCount);
+
+      return iCount;
+
+   }
+
+
+   private void addNodeInSortedOrder(final DefaultMutableTreeNode parent,
+                                     final DefaultMutableTreeNode child) {
+
+      final int n = parent.getChildCount();
+      if (n == 0) {
+         parent.add(child);
+         return;
+      }
+      final Collator collator = Collator.getInstance();
+      collator.setStrength(Collator.PRIMARY);
+      DefaultMutableTreeNode node = null;
+      for (int i = 0; i < n; i++) {
+         node = (DefaultMutableTreeNode) parent.getChildAt(i);
+         try {
+            if (collator.compare(node.toString(), child.toString()) > 0) {
+               parent.insert(child, i);
+               return;
+            }
+         }
+         catch (final Exception e) {
+         }
+      }
+      parent.add(child);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/AlgorithmsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TextSearchPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TextSearchPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TextSearchPanel.java	(revision 369)
@@ -0,0 +1,205 @@
+package es.unex.sextante.gui.toolbox;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+/**
+ * A panel with a text box to enter search strings, which filters the list of algorithms in the toolbox
+ * 
+ * @author volaya
+ * 
+ */
+public class TextSearchPanel
+         extends
+            JPanel {
+
+   private final ToolboxPanel m_Panel;
+   private JButton            jButtonSearch;
+   private JTextField         jTextField;
+   private JButton            jButtonHelp;
+   private JButton            jButtonSettings;
+   private final JDialog      m_Parent;
+
+
+   /**
+    * Constructor
+    * 
+    * @param panel
+    *                The toolbox panel
+    * @param parent
+    *                the parent dialog
+    */
+   public TextSearchPanel(final ToolboxPanel panel,
+                          final JDialog parent) {
+
+      m_Panel = panel;
+      m_Parent = parent;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] {
+                     { 7.0, TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, 10.0, TableLayoutConstants.MINIMUM,
+                              TableLayoutConstants.MINIMUM, 7.0 },
+                     { TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            {
+               jButtonHelp = new JButton();
+               this.add(jButtonHelp, "4, 1");
+               jButtonHelp.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/info.gif")));
+               jButtonHelp.setPreferredSize(new java.awt.Dimension(20, 20));
+               jButtonHelp.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     showHelp();
+                  }
+               });
+               jButtonSettings = new JButton();
+               this.add(jButtonSettings, "5, 1");
+               jButtonSettings.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/config.png")));
+               jButtonSettings.setPreferredSize(new java.awt.Dimension(20, 20));
+               jButtonSettings.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     showSettings(evt);
+                  }
+               });
+            }
+            {
+               jTextField = new JTextField();
+               this.add(jTextField, "2, 1");
+               jTextField.addKeyListener(new KeyAdapter() {
+                  @Override
+                  public void keyTyped(final KeyEvent event) {
+                     processKeyPresssed(event);
+                  }
+               });
+            }
+            {
+               jButtonSearch = new JButton();
+               this.add(jButtonSearch, "1, 1");
+               jButtonSearch.setText(Sextante.getText("Search"));
+               jButtonSearch.setPreferredSize(new java.awt.Dimension(66, 20));
+               jButtonSearch.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     final String sString = escape(jTextField.getText().trim().toLowerCase());
+                     searchString(sString, true);
+                  }
+               });
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void processKeyPresssed(final KeyEvent event) {
+
+      String sString;
+      switch (event.getKeyChar()) {
+         case KeyEvent.VK_ENTER:
+            sString = escape(jTextField.getText().trim().toLowerCase());
+            searchString(sString, true);
+            break;
+         default:
+            sString = jTextField.getText() + event.getKeyChar();
+            sString = escape(sString.trim().toLowerCase());
+            searchString(sString, false);
+            break;
+      }
+
+   }
+
+
+   protected void showSettings(final ActionEvent evt) {
+
+      SextanteGUI.getGUIFactory().showSettingsDialog(m_Panel, m_Parent);
+
+   }
+
+
+   protected void showHelp() {
+
+      SextanteGUI.getGUIFactory().showHelpDialog("toolbox");
+
+   }
+
+
+   protected void searchString(final String sString,
+                               final boolean bSearchInHelpFiles) {
+
+      if (sString.equals("")) {
+         m_Panel.fillTreesWithAllAlgorithms();
+      }
+      else {
+         m_Panel.fillTreesWithSelectedAlgorithms(sString, bSearchInHelpFiles);
+      }
+
+   }
+
+
+   /////////////methods adapted from Apache Jakarta Library////////////////
+   private StringWriter createStringWriter(final String str) {
+      return new StringWriter((int) (str.length() + (str.length() * 0.1)));
+   }
+
+
+   private String escape(final String str) {
+      final StringWriter stringWriter = createStringWriter(str);
+      try {
+         this.escape(stringWriter, str);
+      }
+      catch (final IOException e) {
+         // This should never happen because ALL the StringWriter methods called by #escape(Writer, String) do not
+         // throw IOExceptions.
+         //throw new UnhandledException(e);
+      }
+      return stringWriter.toString();
+   }
+
+
+   public void escape(final Writer writer,
+                      final String str) throws IOException {
+
+      final int len = str.length();
+      for (int i = 0; i < len; i++) {
+         final char c = str.charAt(i);
+         if (c > 0x7F) {
+            writer.write("&#");
+            writer.write(Integer.toString(c, 10));
+            writer.write(';');
+         }
+         else {
+            writer.write(c);
+         }
+      }
+   }
+   //////////////////////////////////////////////////////////////////////
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TextSearchPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmsPanel.java	(revision 369)
@@ -0,0 +1,624 @@
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.text.Collator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.IGUIFactory;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.history.History;
+import es.unex.sextante.gui.settings.SextanteGeneralSettings;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupConfiguration;
+import es.unex.sextante.gui.toolbox.AlgorithmGroupsOrganizer;
+import es.unex.sextante.modeler.elements.ModelElement3DRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementPoint;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementTable;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+
+public class AlgorithmsPanel
+         extends
+            JPanel {
+
+   private int                m_iAlgorithm = 0;
+   private final HashMap      m_DataObjects;
+   private ModelAlgorithm     m_Algorithm;
+   private JTree              jTree;
+   private JScrollPane        jScrollPane;
+   private JButton            jButtonSearch;
+   private JTextField         jTextFieldSearch;
+   private final ModelerPanel m_ModelerPanel;
+   private final JDialog      m_Parent;
+
+
+   public AlgorithmsPanel(final ModelerPanel modelerPanel,
+                          final JDialog parent) {
+
+      super();
+
+      m_DataObjects = modelerPanel.getDataObjects();
+      m_ModelerPanel = modelerPanel;
+      m_Parent = parent;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { 3.0, TableLayoutConstants.FILL, 65.0, 3.0 },
+               { TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM, 3.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      jTree = new JTree();
+      jTree.setCellRenderer(new AlgorithmCellRenderer(this));
+      final MouseListener ml = new MouseAdapter() {
+         @Override
+         public void mousePressed(MouseEvent e) {
+            TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+            if (e.getClickCount() == 2) {
+               addSelectedProcess(path);
+            }
+         }
+      };
+      jTree.addMouseListener(ml);
+
+      fillTree(null, false);
+      jScrollPane = new JScrollPane(jTree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
+               ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      jScrollPane.setPreferredSize(new java.awt.Dimension(200, 294));
+      this.add(jScrollPane, "0, 0, 3, 0");
+      this.add(getJTextFieldSearch(), "1, 1");
+      this.add(getJButtonSearch(), "2, 1");
+
+   }
+
+
+   public void fillTree(final String sSearchString,
+                        final boolean bSearchInHelpFiles) {
+
+      String sGroup, sSubgroup;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Algorithms"));
+      final HashMap<String, HashMap<String, HashMap<String, DefaultMutableTreeNode>>> groups = new HashMap<String, HashMap<String, HashMap<String, DefaultMutableTreeNode>>>();
+
+      final HashMap<String, HashMap<String, GeoAlgorithm>> algs = Sextante.getAlgorithms();
+      final Set<String> groupKeys = algs.keySet();
+      final Iterator<String> groupIter = groupKeys.iterator();
+      while (groupIter.hasNext()) {
+         final String groupKey = groupIter.next();
+         final HashMap<String, GeoAlgorithm> groupAlgs = algs.get(groupKey);
+         final Set keys = groupAlgs.keySet();
+         final Iterator iter = keys.iterator();
+         while (iter.hasNext()) {
+            final GeoAlgorithm alg = groupAlgs.get(iter.next());
+            if (alg.isSuitableForModelling()) {
+               if (bSearchInHelpFiles) {
+                  if (!HelpIO.containsStringInHelpFile(alg, sSearchString)) {
+                     continue;
+                  }
+               }
+               else {
+                  if ((sSearchString != null) && !alg.getName().toLowerCase().contains(sSearchString)) {
+                     continue;
+                  }
+               }
+               final AlgorithmGroupConfiguration conf = AlgorithmGroupsOrganizer.getGroupConfiguration(alg);
+               if (conf != null) {
+                  if (!conf.isShow()) {
+                     continue;
+                  }
+                  sGroup = conf.getGroup();
+                  sSubgroup = conf.getSubgroup();
+               }
+               else {
+                  sGroup = groupKey;
+                  sSubgroup = alg.getGroup();
+               }
+               HashMap<String, HashMap<String, DefaultMutableTreeNode>> group = groups.get(sGroup);
+               if (group == null) {
+                  group = new HashMap<String, HashMap<String, DefaultMutableTreeNode>>();
+                  groups.put(sGroup, group);
+               }
+               HashMap<String, DefaultMutableTreeNode> subgroup = group.get(sSubgroup);
+               if (subgroup == null) {
+                  subgroup = new HashMap<String, DefaultMutableTreeNode>();
+                  group.put(sSubgroup, subgroup);
+               }
+               subgroup.put(alg.getName(), new DefaultMutableTreeNode(alg));
+            }
+         }
+      }
+
+      final Set<String> set = groups.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sKey = iter.next();
+         final DefaultMutableTreeNode node = new DefaultMutableTreeNode(sKey);
+         addNodeInSortedOrder(mainNode, node);
+         final HashMap<String, HashMap<String, DefaultMutableTreeNode>> g = groups.get(sKey);
+         final Set<String> set2 = g.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final String sKey2 = iter2.next();
+            final DefaultMutableTreeNode node2 = new DefaultMutableTreeNode(sKey2);
+            addNodeInSortedOrder(node, node2);
+            final HashMap<String, DefaultMutableTreeNode> g2 = g.get(sKey2);
+            final Set<String> set3 = g2.keySet();
+            final Iterator<String> iter3 = set3.iterator();
+            while (iter3.hasNext()) {
+               final String sKey3 = iter3.next();
+               final DefaultMutableTreeNode node3 = g2.get(sKey3);
+               addNodeInSortedOrder(node2, node3);
+            }
+         }
+      }
+
+      final boolean bShowMostRecent = new Boolean(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.SHOW_MOST_RECENT)).booleanValue();
+      if (bShowMostRecent) {
+         final GeoAlgorithm[] recent = History.getRecentlyUsedAlgs();
+         final DefaultMutableTreeNode recentNode = new DefaultMutableTreeNode(Sextante.getText("RecentAlgorithms"));
+         for (int i = 0; i < recent.length; i++) {
+            final DefaultMutableTreeNode node = new DefaultMutableTreeNode(recent[i]);
+            recentNode.add(node);
+         }
+         mainNode.insert(recentNode, 0);
+      }
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+      collapseAll();
+
+   }
+   
+   
+   public JTree getTree () {
+	   return (jTree);
+   }
+
+
+   private void addNodeInSortedOrder(final DefaultMutableTreeNode parent,
+                                     final DefaultMutableTreeNode child) {
+
+      final int n = parent.getChildCount();
+      if (n == 0) {
+         parent.add(child);
+         return;
+      }
+      final Collator collator = Collator.getInstance();
+      collator.setStrength(Collator.PRIMARY);
+      DefaultMutableTreeNode node = null;
+      for (int i = 0; i < n; i++) {
+         node = (DefaultMutableTreeNode) parent.getChildAt(i);
+         try {
+            if (collator.compare(node.toString(), child.toString()) > 0) {
+               parent.insert(child, i);
+               return;
+            }
+         }
+         catch (final Exception e) {}
+      }
+      parent.add(child);
+
+   }
+
+
+   public void setAlgorithm(final ModelAlgorithm alg) {
+
+      m_Algorithm = alg;
+
+   }
+
+
+   private void addSelectedProcess(final TreePath path) {
+
+      if (path == null) {
+         return;
+      }
+
+      try {
+    	  final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+    	  if ( node.getUserObject() instanceof java.lang.String == false ) {
+    		  final GeoAlgorithm alg = (GeoAlgorithm) node.getUserObject();
+    		  if (isAlgorithmEnabled(alg)) {
+    			  final String sName = getValidName();
+    			  final String sDescription = Sextante.getText("Algorithm") + " " + Integer.toString(m_iAlgorithm) + ": " + alg.getName();
+
+    			  final int iRet = SextanteGUI.getGUIFactory().showAlgorithmDialogForModeler(alg, sName, sDescription, m_Algorithm,
+    					  m_DataObjects, m_Parent);
+    			  if (iRet == IGUIFactory.OK) {
+    				  m_iAlgorithm++;
+    				  m_ModelerPanel.setHasChanged(true);
+    				  m_ModelerPanel.getGraph().storeCoords();
+    				  m_ModelerPanel.getGraph().addAlgorithm(sName);
+    				  m_ModelerPanel.updatePanel(true);
+    			  }
+    		  }
+    	  } else {
+    		  return;
+    	  }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public boolean isAlgorithmEnabled(final GeoAlgorithm alg) {
+
+	   boolean bRequiresRasterLayers = alg.requiresRasterLayers();
+	   boolean bRequires3DRasterLayers = alg.requires3DRasterLayers();
+	   boolean bRequiresVectorLayers = alg.requiresVectorLayers();
+	   boolean bRequiresTables = alg.requiresTables();;
+	   boolean bRequiresPoints = alg.requiresPoints();
+	   boolean bRequiresPointLayers = alg.requiresPointVectorLayers();
+	   boolean bRequiresLineLayers = alg.requiresLineVectorLayers();
+	   boolean bRequiresPolygonLayers = alg.requiresPolygonVectorLayers();
+
+	   boolean bTableRequirementsMet = !bRequiresTables;
+	   boolean bRasterRequirementsMet = !bRequiresRasterLayers;
+	   boolean b3DRasterRequirementsMet = !bRequires3DRasterLayers;
+	   boolean bVectorRequirementsMet = !bRequiresVectorLayers;
+	   boolean bPointRequirementsMet = !bRequiresPoints;
+	   boolean bPolygonLayerRequirementsMet = !bRequiresPolygonLayers;
+	   boolean bLineLayerRequirementsMet = !bRequiresLineLayers;
+	   boolean bPointLayerRequirementsMet = !bRequiresPointLayers;
+	   boolean bAllRequirementsMet;
+
+	   final Set set = m_DataObjects.keySet();
+	   final Iterator iter = set.iterator();
+	   String sKey;
+	   Class dataClass;
+	   ObjectAndDescription oad;
+
+	   bAllRequirementsMet = bRasterRequirementsMet && b3DRasterRequirementsMet && bVectorRequirementsMet && bTableRequirementsMet
+	   && bPointRequirementsMet && bPolygonLayerRequirementsMet && bLineLayerRequirementsMet
+	   && bPointLayerRequirementsMet;
+
+	   while (iter.hasNext() && !bAllRequirementsMet) {
+		   sKey = (String) iter.next();
+		   oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+		   if ( oad.getObject() != null ) {
+			   dataClass = oad.getObject().getClass();
+			   if (dataClass == ModelElementRasterLayer.class) {
+				   if (isParameterMandatory(sKey)) {
+					   bRasterRequirementsMet = true;
+				   }
+			   }
+			   if (dataClass == ModelElement3DRasterLayer.class) {
+				   if (isParameterMandatory(sKey)) {
+					   b3DRasterRequirementsMet = true;
+				   }
+			   }
+			   if (dataClass == ModelElementPoint.class) {
+				   bPointRequirementsMet = true;
+			   }
+			   if (dataClass == ModelElementVectorLayer.class) {
+				   if (isParameterMandatory(sKey)) {
+					   final ModelElementVectorLayer mevl = (ModelElementVectorLayer) oad.getObject();
+					   bVectorRequirementsMet = true;
+					   switch (mevl.getShapeType()) {
+					   case ModelElementVectorLayer.SHAPE_TYPE_LINE:
+						   bLineLayerRequirementsMet = true;
+						   break;
+					   case ModelElementVectorLayer.SHAPE_TYPE_POINT:
+						   bPointLayerRequirementsMet = true;
+						   break;
+					   case ModelElementVectorLayer.SHAPE_TYPE_POLYGON:
+						   bPolygonLayerRequirementsMet = true;
+						   break;
+					   case ModelElementVectorLayer.SHAPE_TYPE_UNDEFINED:
+					   default:
+					   }
+				   }
+			   }
+			   else if (dataClass == ModelElementTable.class) {
+				   if (isParameterMandatory(sKey)) {
+					   bTableRequirementsMet = true;
+				   }
+			   }
+
+			   bAllRequirementsMet = bRasterRequirementsMet && bVectorRequirementsMet && bTableRequirementsMet && bPointRequirementsMet
+			   && bPolygonLayerRequirementsMet && bLineLayerRequirementsMet && bPointLayerRequirementsMet;
+		   } else {
+			   System.out.println ("SEXTANTE: AlgorithmsPanel.java: isAlgorithmEnabled(): Got NULL object.");
+			   bAllRequirementsMet = false;
+		   }
+	   }
+
+	   return bAllRequirementsMet;
+
+   }
+
+
+   private boolean isParameterMandatory(final String sKey) {
+
+      final ParametersSet ps = m_Algorithm.getParameters();
+      Parameter param;
+      try {
+         param = ps.getParameter(sKey);
+      }
+      catch (final WrongParameterIDException e) {
+         return true;
+      }
+
+      if (param != null) {
+         if (param instanceof ParameterDataObject) {
+            AdditionalInfoDataObject additionalInfo;
+            try {
+               additionalInfo = (AdditionalInfoDataObject) ((ParameterDataObject) param).getParameterAdditionalInfo();
+               return additionalInfo.getIsMandatory();
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               return false;
+            }
+
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            AdditionalInfoMultipleInput additionalInfo;
+            try {
+               additionalInfo = (AdditionalInfoMultipleInput) ((ParameterMultipleInput) param).getParameterAdditionalInfo();
+               return additionalInfo.getIsMandatory();
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               return false;
+            }
+         }
+         else {
+            return true;
+         }
+      }
+      else {
+         return true;
+      }
+
+
+   }
+
+
+   public String getValidName() {
+
+      boolean bFound;
+      int i = 0;
+      String sName;
+
+      do {
+         sName = "PROC" + Integer.toString(i);
+         if (m_Algorithm.getAlgorithmKeys().contains(sName)) {
+            i++;
+            bFound = false;
+         }
+         else {
+            bFound = true;
+         }
+
+      }
+      while (!bFound);
+
+      return sName;
+
+   }
+
+
+   public void addSelectedProcess() {
+
+      addSelectedProcess(jTree.getSelectionPath());
+
+   }
+
+
+   public void setAlgorithmCount(final int iCount) {
+
+      m_iAlgorithm = iCount;
+
+   }
+
+
+   private JTextField getJTextFieldSearch() {
+
+      if (jTextFieldSearch == null) {
+         jTextFieldSearch = new JTextField();
+         jTextFieldSearch.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyTyped(final KeyEvent event) {
+               processKeyPresssed(event);
+            }
+         });
+      }
+      return jTextFieldSearch;
+
+   }
+
+
+   protected void processKeyPresssed(final KeyEvent event) {
+
+      String sString;
+      switch (event.getKeyChar()) {
+         case KeyEvent.VK_ENTER:
+            sString = escape(jTextFieldSearch.getText().trim().toLowerCase());
+            searchString(sString, true);
+            break;
+         default:
+            sString = jTextFieldSearch.getText() + event.getKeyChar();
+            sString = escape(sString.trim().toLowerCase());
+            searchString(sString, false);
+            break;
+      }
+
+   }
+
+
+   private JButton getJButtonSearch() {
+      if (jButtonSearch == null) {
+         jButtonSearch = new JButton();
+         jButtonSearch.setText(Sextante.getText("Search"));
+         jButtonSearch.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               final String sString = escape(jTextFieldSearch.getText().trim().toLowerCase());
+               searchString(sString, true);
+            }
+         });
+      }
+      return jButtonSearch;
+   }
+
+
+   /*private void search() {
+
+      final String sSearchString = escape(jTextFieldSearch.getText().trim().toLowerCase());
+
+      fillTree(sSearchString);
+
+      collapseAll();
+
+   }*/
+
+
+   protected void searchString(final String sString,
+                               final boolean bSearchInHelpFiles) {
+
+      fillTree(sString, bSearchInHelpFiles);
+
+      if ((sString == null) || sString.trim().equals("")) {
+         collapseAll();
+      }
+      else {
+         expandAll();
+      }
+
+   }
+
+
+   /**
+    * Collapses the tree of algorithms
+    */
+   public void collapseAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      final TreePath path = new TreePath(root);
+      expandAll(jTree, path, false);
+      jTree.expandPath(path);
+      final int iChildCount = root.getChildCount();
+      for (int i = 0; i < iChildCount; i++) {
+         final TreeNode node = root.getChildAt(i);
+         final TreePath subpath = path.pathByAddingChild(node);
+         jTree.expandPath(subpath);
+      }
+
+   }
+
+
+   /**
+    * Expands the tree of algorithms
+    */
+   public void expandAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      expandAll(jTree, new TreePath(root), true);
+
+   }
+
+
+   private void expandAll(final JTree tree,
+                          final TreePath parent,
+                          final boolean expand) {
+
+      final TreeNode node = (TreeNode) parent.getLastPathComponent();
+      if (node.getChildCount() >= 0) {
+         for (final Enumeration e = node.children(); e.hasMoreElements();) {
+            final TreeNode n = (TreeNode) e.nextElement();
+            final TreePath path = parent.pathByAddingChild(n);
+            expandAll(tree, path, expand);
+         }
+      }
+
+      if (expand) {
+         tree.expandPath(parent);
+      }
+      else {
+         tree.collapsePath(parent);
+      }
+
+   }
+
+
+   /////////////methods adapted from Apache Jakarta Library////////////////
+   private StringWriter createStringWriter(final String str) {
+      return new StringWriter((int) (str.length() + (str.length() * 0.1)));
+   }
+
+
+   private String escape(final String str) {
+      final StringWriter stringWriter = createStringWriter(str);
+      try {
+         this.escape(stringWriter, str);
+      }
+      catch (final IOException e) {
+         // This should never happen because ALL the StringWriter methods called by #escape(Writer, String) do not
+         // throw IOExceptions.
+         //throw new UnhandledException(e);
+      }
+      return stringWriter.toString();
+   }
+
+
+   private void escape(final Writer writer,
+                       final String str) throws IOException {
+
+      final int len = str.length();
+      for (int i = 0; i < len; i++) {
+         final char c = str.charAt(i);
+         if (c > 0x7F) {
+            writer.write("&#");
+            writer.write(Integer.toString(c, 10));
+            writer.write(';');
+         }
+         else {
+            writer.write(c);
+         }
+      }
+   }
+   //////////////////////////////////////////////////////////////////////
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CreateModelToolboxAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CreateModelToolboxAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CreateModelToolboxAction.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gui.modeler;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+public class CreateModelToolboxAction
+         extends
+            ToolboxAction {
+
+   @Override
+   public void execute() {
+
+      SextanteGUI.getGUIFactory().showModelerDialog();
+
+   }
+
+
+   @Override
+   public String getGroup() {
+
+      return Sextante.getText("Tools");
+   }
+
+
+   @Override
+   public String getName() {
+
+      return Sextante.getText("CreateNewModel");
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CreateModelToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/FixedTableSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/FixedTableSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/FixedTableSelectionPanel.java	(revision 369)
@@ -0,0 +1,187 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.algorithm.FixedTableDialog;
+import es.unex.sextante.modeler.elements.ModelElementFixedTable;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterFixedTable;
+
+
+public class FixedTableSelectionPanel
+         extends
+            JPanel {
+
+   private FixedTableModel              m_FixedTableModel;
+   private JComboBox                    jComboBox;
+   private JButton                      button;
+   private final ObjectAndDescription[] m_Tables;
+   private final HashMap                m_DataObjects;
+   private final ModelAlgorithm         m_Algorithm;
+
+
+   public FixedTableSelectionPanel(final AdditionalInfoFixedTable addInfo,
+                                   final ObjectAndDescription[] tables,
+                                   final HashMap dataObjects,
+                                   final ModelAlgorithm algorithm) {
+
+      super();
+
+      m_Tables = tables;
+      m_DataObjects = dataObjects;
+      m_FixedTableModel = new FixedTableModel(addInfo.getCols(), addInfo.getRowsCount(), addInfo.isNumberOfRowsFixed());
+      m_Algorithm = algorithm;
+
+      initGUI(tables);
+
+   }
+
+
+   private void initGUI(final ObjectAndDescription[] tables) {
+
+      button = new JButton("...");
+
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed(evt);
+         }
+      });
+
+      jComboBox = new JComboBox(getValidTables());
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(jComboBox, "0,  0");
+      this.add(button, "1,  0");
+
+   }
+
+
+   private ObjectAndDescription[] getValidTables() {
+
+      int i;
+      boolean bValid;
+      final ArrayList array = new ArrayList();
+      String sKey;
+      String sDescription;
+      ObjectAndDescription[] validTables;
+      Object obj;
+      ParametersSet ps;
+      Parameter param;
+      AdditionalInfoFixedTable addInfo;
+
+      for (i = 0; i < m_Tables.length; i++) {
+         sKey = (String) m_Tables[i].getObject();
+         sDescription = m_Tables[i].getDescription();
+         obj = ((ObjectAndDescription) m_DataObjects.get(sKey)).getObject();
+         if ((obj != null) && (obj instanceof ModelElementFixedTable)) {
+            final ModelElementFixedTable meft = (ModelElementFixedTable) obj;
+            ps = m_Algorithm.getParameters();
+            try {
+               param = ps.getParameter(sKey);
+               if (param instanceof ParameterFixedTable) {
+                  addInfo = (AdditionalInfoFixedTable) ((ParameterFixedTable) param).getParameterAdditionalInfo();
+                  bValid = (m_FixedTableModel.getColumnCount() == meft.getColsCount());
+                  if (m_FixedTableModel.isNumberOfRowsFixed()) {
+                     bValid = bValid && (m_FixedTableModel.getRowCount() == addInfo.getRowsCount());
+                  }
+                  if (bValid) {
+                     array.add(new ObjectAndDescription(sDescription, sKey));
+                  }
+               }
+            }
+            catch (final WrongParameterIDException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+      final StringBuffer sText = new StringBuffer(Sextante.getText("Fixed_table") + "(");
+      sText.append(m_FixedTableModel.getDimensionsAsString());
+      sText.append(")");
+
+      validTables = new ObjectAndDescription[array.size() + 1];
+      validTables[0] = new ObjectAndDescription(sText.toString(), null);
+
+      for (i = 0; i < array.size(); i++) {
+         validTables[i + 1] = (ObjectAndDescription) array.get(i);
+      }
+
+      return validTables;
+
+   }
+
+
+   public FixedTableModel getTableModel() {
+
+      return m_FixedTableModel;
+
+   }
+
+
+   private void btnActionPerformed(final ActionEvent e) {
+
+      final Frame window = new Frame();
+
+      final FixedTableDialog dialog = new FixedTableDialog(window, m_FixedTableModel);
+      dialog.pack();
+      dialog.setVisible(true);
+
+      if (dialog.accepted()) {
+         jComboBox.setSelectedIndex(0);
+      }
+
+   }
+
+
+   public String getTableKey() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBox.getSelectedItem();
+      final String sKey = (String) oad.getObject();
+      return sKey;
+
+   }
+
+
+   public void setTable(final Object ob) {
+
+      if (ob instanceof FixedTableModel) {
+         m_FixedTableModel = (FixedTableModel) ob;
+      }
+      else if (ob instanceof String) {
+         final String sKey = (String) ob;
+         for (int i = 1; i < jComboBox.getModel().getSize(); i++) { //1, because the first one is the user-defined table (=null)
+            final ObjectAndDescription oad = (ObjectAndDescription) jComboBox.getModel().getElementAt(i);
+            if (oad.getObject().equals(sKey)) {
+               jComboBox.setSelectedIndex(i);
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/FixedTableSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/GeoAlgorithmModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/GeoAlgorithmModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/GeoAlgorithmModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,251 @@
+package es.unex.sextante.gui.modeler;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JPanel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementTable;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterDataObject;
+
+/**
+ * An abstract class to extend by all parameter panels that take parameter values from the user for a geoalgorithm to be added to
+ * a model
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class GeoAlgorithmModelerParametersPanel
+         extends
+            JPanel {
+
+   protected HashMap        m_DataObjects;
+   protected GeoAlgorithm   m_Algorithm;
+   protected String         m_sAlgorithmName;
+   protected String         m_sAlgorithmDescription;
+   protected ModelAlgorithm m_GlobalAlgorithm;
+   protected int            m_iInnerParameter;
+
+
+   /**
+    * inits the panel
+    * 
+    * @param panel
+    *                the algorithm dialog that contains this panel
+    */
+   public void init(final AlgorithmDialog panel) {
+
+      m_Algorithm = panel.getAlgorithm();
+      m_GlobalAlgorithm = panel.getModelAlgorithm();
+      m_DataObjects = panel.getDataObjects();
+      m_sAlgorithmName = panel.getAlgorithmName();
+      m_sAlgorithmDescription = panel.getAlgorithmDescription();
+      m_iInnerParameter = 0;
+
+      initGUI();
+
+   }
+
+
+   /**
+    * Constructs the GUI
+    */
+   protected abstract void initGUI();
+
+
+   /**
+    * adds the algorithm to the model
+    * 
+    * @return true if the parameters entered by the user are correct and sufficient
+    */
+   public abstract boolean assignParameters(HashMap map);
+
+
+   protected Object getParameterValue(final Parameter param) {
+
+      final String sKey = m_GlobalAlgorithm.getInputAsignment(param.getParameterName(), m_Algorithm);
+      return m_DataObjects.get(sKey);
+
+   }
+
+
+   protected ObjectAndDescription[] getElementsOfClass(final Class classOfInput,
+                                                       final boolean bIncludeOptionalInputs) {
+
+      return getElementsOfClassAOrB(classOfInput,null,bIncludeOptionalInputs);
+
+   }
+
+
+   protected ObjectAndDescription[] getElementsOfClassAOrB(final Class classOfInputA, Class classOfInputB,
+		   final boolean bIncludeOptionalInputs) {
+
+	   String sKey;
+	   ObjectAndDescription oad;
+	   final ArrayList objects = new ArrayList();
+	   Parameter param;
+	   AdditionalInfoDataObject additionalInfo;
+	   final ParametersSet ps = m_GlobalAlgorithm.getParameters();
+	   final Set set = m_DataObjects.keySet();
+	   final Iterator iter = set.iterator();
+	   if ( classOfInputB == null )
+		   classOfInputB = classOfInputA; 
+	   while (iter.hasNext()) {
+		   sKey = (String) iter.next();
+		   oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+		   if ( oad.getObject() == null ) {
+			   System.out.println ("SEXTANTE: GeoAlgorithmsModeler.java: getElementsOfClass(): Got NULL object.");
+		   }
+		   else if (  	oad.getObject().getClass().equals(classOfInputA) || 
+				   		oad.getObject().getClass().equals(classOfInputB)) {
+			   try {
+				   param = ps.getParameter(sKey);
+				   if (param instanceof ParameterDataObject) {
+					   additionalInfo = (AdditionalInfoDataObject) ((ParameterDataObject) param).getParameterAdditionalInfo();
+					   if (bIncludeOptionalInputs || additionalInfo.getIsMandatory()) {
+						   if (!isParameterProducedByThisProcess(sKey) && !dependsOnThisProcess(sKey)) {
+							   objects.add(new ObjectAndDescription(oad.getDescription(), sKey));
+						   }
+					   }
+				   }
+				   else {
+					   if (!isParameterProducedByThisProcess(sKey) && !dependsOnThisProcess(sKey)) {
+						   objects.add(new ObjectAndDescription(oad.getDescription(), sKey));
+					   }
+				   }
+
+			   }
+			   catch (final WrongParameterIDException e) {
+				   if (!isParameterProducedByThisProcess(sKey) && !dependsOnThisProcess(sKey)) {
+					   objects.add(new ObjectAndDescription(oad.getDescription(), sKey));
+				   }
+			   }
+			   catch (final NullParameterAdditionalInfoException e) {
+				   Sextante.addErrorToLog(e);
+			   }
+		   }
+	   }
+
+	   final ObjectAndDescription[] ret = new ObjectAndDescription[objects.size()];
+	   for (int i = 0; i < objects.size(); i++) {
+		   ret[i] = (ObjectAndDescription) objects.get(i);
+	   }
+
+	   Arrays.sort(ret);
+
+	   return ret;
+
+   }   
+   
+   
+   private boolean dependsOnThisProcess(final String sKey) {
+
+      int i;
+      final ArrayList algorithmKeys = m_GlobalAlgorithm.getAlgorithmKeys();
+      String sAlgKey;
+
+      final Object obj = getObjectFromKey(sKey);
+
+      if (obj == null) {
+         return false;
+      }
+      else {
+         if (obj instanceof GeoAlgorithm) {
+            final HashMap assignments = m_GlobalAlgorithm.getInputAssignments(sKey);
+            final Set set = assignments.keySet();
+            final Iterator iter = set.iterator();
+            String sAssignmentKey;
+            String sAssignment;
+            while (iter.hasNext()) {
+               sAssignmentKey = (String) iter.next();
+               sAssignment = (String) assignments.get(sAssignmentKey);
+               if (dependsOnThisProcess(sAssignment)) {
+                  return true;
+               }
+            }
+         }
+         else if (obj instanceof ObjectAndDescription) {
+            final Class clazz = ((ObjectAndDescription) obj).getObject().getClass();
+            if (clazz.equals(ModelElementRasterLayer.class) || clazz.equals(ModelElementVectorLayer.class)
+                || clazz.equals(ModelElementTable.class)) {
+               if (isProducedBy(sKey, m_sAlgorithmName)) {
+                  return true;
+               }
+               for (i = 0; i < algorithmKeys.size(); i++) {
+                  sAlgKey = (String) algorithmKeys.get(i);
+                  if (isProducedBy(sKey, sAlgKey)) {
+                     if (dependsOnThisProcess(sAlgKey)) {
+                        return true;
+                     }
+                  }
+
+               }
+            }
+            //T**********
+         }
+      }
+
+      return false;
+
+   }
+
+
+   public Object getObjectFromKey(final String sObjectKey) {
+
+      int i;
+      String sKey;
+      final Object obj = m_DataObjects.get(sObjectKey);
+
+      if (obj != null) {
+         return obj;
+      }
+
+      final ArrayList algKeys = m_GlobalAlgorithm.getAlgorithmKeys();
+
+      for (i = 0; i < algKeys.size(); i++) {
+         sKey = (String) algKeys.get(i);
+         if (sKey.equals(sObjectKey)) {
+            return m_GlobalAlgorithm.getAlgorithm(sKey);
+         }
+      }
+
+      return null;
+
+   }
+
+
+   private boolean isParameterProducedByThisProcess(final String sKey) {
+
+      return sKey.endsWith(m_sAlgorithmName);
+
+   }
+
+
+   private boolean isProducedBy(final String sParamKey,
+                                final String sProccesKey) {
+
+      return sParamKey.endsWith(sProccesKey);
+
+   }
+
+
+   protected String getInnerParameterKey() {
+
+      return ("INNERPARAM" + Integer.toString(m_iInnerParameter++) + m_sAlgorithmName);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/GeoAlgorithmModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettingsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettingsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettingsPanel.java	(revision 369)
@@ -0,0 +1,94 @@
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+
+public class OutputLayerSettingsPanel
+         extends
+            JPanel {
+
+   private JCheckBox  jCheckBoxAdd;
+   private JTextField jTextFieldName;
+
+
+   public OutputLayerSettingsPanel() {
+
+      super();
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] {
+                     { TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL},
+                     { TableLayoutConstants.MINIMUM } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(271, 48));
+            {
+               jCheckBoxAdd = new JCheckBox(Sextante.getText("Keep_as_final_result"));
+               jCheckBoxAdd.addItemListener(new ItemListener() {
+                  public void itemStateChanged(final ItemEvent e) {
+                     jTextFieldName.setEnabled(jCheckBoxAdd.isSelected());
+                  }
+               });
+               this.add(jCheckBoxAdd, "0, 0");
+            }
+            {
+               jTextFieldName = new JTextField();
+               jTextFieldName.setEnabled(false);
+               this.add(jTextFieldName, "1, 0");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   public void setKeepAsFinalResult(final boolean bKeep) {
+
+      jCheckBoxAdd.setSelected(bKeep);
+
+   }
+
+
+   public boolean getKeepAsFinalResult() {
+
+      return this.jCheckBoxAdd.isSelected();
+
+   }
+
+
+   @Override
+   public void setName(final String sName) {
+
+      jTextFieldName.setText(sName);
+
+   }
+
+
+   @Override
+   public String getName() {
+
+      return jTextFieldName.getText();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithmIO.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithmIO.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithmIO.java	(revision 369)
@@ -0,0 +1,668 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.exceptions.ModelIOException;
+import es.unex.sextante.modeler.elements.ModelElement3DRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementFactory;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementTable;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+
+
+public class ModelAlgorithmIO {
+
+   private static String       encoding                 = "ISO-8859-1";
+   private static final String MODEL                    = "model";
+   private static final String NAME                     = "name";
+   private static final String GROUP                    = "group";
+   private static final String CLASS                    = "class";
+   private static final String MODEL_FILE               = "model_file";
+   private static final String WPS_URL                  = "wps_url";
+   private static final String WPS_PROCESS_IDENTIFIER   = "wps_process_id";
+   private static final String GRASS_PROCESS_IDENTIFIER = "grass_process_id";
+   private static final String DESCRIPTION              = "description";
+   private static final String RED              		= "red";
+   private static final String GREEN              		= "green";
+   private static final String BLUE              		= "blue";
+   private static final String ALPHA              		= "alpha";
+   private static final String ALGORITHM                = "algorithm";
+   private static final String DATA_OBJECT              = "data_object";
+   private static final String ASSIGNMENT               = "assignment";
+   private static final String ASSIGNEDTO               = "assigned_to";
+   private static final String KEY                      = "key";
+   private static final String VALUE                    = "value";
+   private static final String INPUT                    = "input";
+   private static final String COORDS                   = "coords";
+   private static final String OUTPUT                   = "output";
+   private static final String ALG_CMD_LINE_NAME        = "alg_cmd_line_name";
+
+
+   public static boolean saveAsJava(final ModelAlgorithm alg,
+                                    final File file) {
+
+      try {
+         final FileWriter writer = new FileWriter(file);
+         final BufferedWriter out = new BufferedWriter(writer);
+         out.write(ModelCodeCreator.getJavaCode(alg));
+         out.close();
+         writer.close();
+         return true;
+      }
+      catch (final IOException e) {
+         e.printStackTrace();
+         return false;
+      }
+
+   }
+
+
+   public static boolean save(final ModelerPanel panel,
+                              final File file) {
+
+      int i;
+      Writer writer = null;
+      final ModelAlgorithm modelAlg = panel.getAlgorithm();
+
+      try {
+         writer = new FileWriter(file);
+         final KXmlSerializer serializer = new KXmlSerializer();
+         serializer.setOutput(writer);
+         serializer.startDocument(encoding, new Boolean(true));
+         serializer.text("\n\t");
+         serializer.startTag(null, MODEL);
+         serializer.attribute(null, NAME, modelAlg.getName());
+         serializer.attribute(null, GROUP, modelAlg.getGroup());
+
+         final ArrayList algKeys = modelAlg.getAlgorithmKeys();
+         final ArrayList algs = modelAlg.getAlgorithms();
+         final ParametersSet ps = modelAlg.getParameters();
+         final HashMap dao = panel.getDataObjects();
+         final ArrayList assignmentsArray = modelAlg.getInputAssignments();
+
+         //Algorithms
+         for (i = 0; i < algs.size(); i++) {
+            final GeoAlgorithm alg = (GeoAlgorithm) algs.get(i);
+            serializer.text("\n");
+            serializer.text("\t\t");
+            serializer.startTag(null, ALGORITHM);
+            String sKey = (String) algKeys.get(i);
+            serializer.attribute(null, KEY, sKey);
+            serializer.attribute(null, ALG_CMD_LINE_NAME, alg.getCommandLineName());
+            serializer.attribute(null, DESCRIPTION, alg.getDescription());
+            serializer.attribute(null, RED, Integer.toString(alg.getColorR()));
+            serializer.attribute(null, GREEN, Integer.toString(alg.getColorG()));
+            serializer.attribute(null, BLUE, Integer.toString(alg.getColorB()));
+            serializer.attribute(null, ALPHA, Integer.toString(alg.getColorAlpha()));
+            serializer.attribute(null, COORDS, getCoordsAsString(panel.getModelGraphPanel().getCoords(), sKey));
+            final HashMap assignments = (HashMap) assignmentsArray.get(i);
+            final Set set = assignments.keySet();
+            final Iterator iter = set.iterator();
+            while (iter.hasNext()) {
+               sKey = (String) iter.next();
+               serializer.text("\n");
+               serializer.text("\t\t\t");
+               serializer.startTag(null, ASSIGNMENT);
+               serializer.attribute(null, KEY, sKey);
+               String sAssignment = (String) assignments.get(sKey);
+               if (sAssignment == null) {
+                  sAssignment = "null";
+               }
+               serializer.attribute(null, ASSIGNEDTO, sAssignment);
+               serializer.endTag(null, ASSIGNMENT);
+            }
+            serializer.text("\n");
+            serializer.text("\t\t");
+            serializer.endTag(null, ALGORITHM);
+         }
+
+         //Parameters
+         final int iCount = ps.getNumberOfParameters();
+         for (i = 0; i < iCount; i++) {
+            final String sKey = ps.getParameter(i).getParameterName();
+            final String sCoords = getCoordsAsString(panel.getModelGraphPanel().getCoords(), sKey);
+            ps.getParameter(i).serialize(serializer, sCoords);
+         }
+
+         //data objects
+         final Set set = dao.keySet();
+         final Iterator iter = set.iterator();
+         while (iter.hasNext()) {
+            final String sKey = (String) iter.next();
+            if (sKey.indexOf("INPUT") != 0) {
+               final ObjectAndDescription oad = (ObjectAndDescription) dao.get(sKey);
+               serializer.text("\n");
+               serializer.text("\t\t");
+               serializer.startTag(null, DATA_OBJECT);
+               serializer.attribute(null, KEY, sKey);
+               final String sValue = getValueAsString(oad.getObject());
+               serializer.attribute(null, VALUE, sValue);
+               serializer.attribute(null, DESCRIPTION, oad.getDescription());
+               serializer.endTag(null, DATA_OBJECT);
+            }
+         }
+
+         //Outputs
+         final OutputObjectsSet ooSet = modelAlg.getOutputObjects();
+         for (int j = 0; j < ooSet.getOutputObjectsCount(); j++) {
+            final Output out = ooSet.getOutput(j);
+            serializer.text("\n");
+            serializer.text("\t\t");
+            serializer.startTag(null, OUTPUT);
+            serializer.attribute(null, KEY, out.getName());
+            serializer.attribute(null, CLASS, out.getClass().toString());
+            serializer.attribute(null, DESCRIPTION, out.getDescription());
+            serializer.endTag(null, OUTPUT);
+         }
+
+         serializer.text("\n");
+         serializer.text("\t");
+         serializer.endTag(null, MODEL);
+         serializer.text("\n");
+         writer.close();
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      try {
+         writer.close();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      return true;
+
+   }
+
+
+   private static String getCoordsAsString(final HashMap coords,
+                                           final String sKey) {
+
+      final Rectangle2D rect = (Rectangle2D) coords.get(sKey);
+
+      if (rect == null) {
+         return "null";
+      }
+      else {
+         final StringBuffer sb = new StringBuffer("");
+         sb.append(Integer.toString((int) rect.getMinX()));
+         sb.append(",");
+         sb.append(Integer.toString((int) rect.getMinY()));
+         sb.append(",");
+         sb.append(Integer.toString((int) rect.getWidth()));
+         sb.append(",");
+         sb.append(Integer.toString((int) rect.getHeight()));
+         return sb.toString();
+      }
+
+   }
+
+
+   private static String getValueAsString(final Object ob) {
+
+      if (ob.getClass().equals(ArrayList.class)) {
+         final ArrayList array = (ArrayList) ob;
+         final StringBuffer s = new StringBuffer();
+         for (int i = 0; i < array.size(); i++) {
+            s.append((String) array.get(i));
+            if (i < array.size() - 1) {
+               s.append(",");
+            }
+         }
+         return s.toString();
+      }
+      /*if (ob instanceof IModelElement){
+      	return ob.getClass().toString();
+      }*/
+      else {
+         return ob.toString();
+      }
+   }
+
+
+   public static ModelAlgorithm open(final File file,
+                                     final HashMap dao,
+                                     final ArrayList inputKeys,
+                                     final HashMap coords) {
+
+      final ModelAlgorithm model = new ModelAlgorithm();
+      final KXmlParser parser = new KXmlParser();
+      final ParametersSet ps = model.getParameters();
+      GeoAlgorithm alg = null;
+      String sAlgName = null;
+      String sAlgDescription = null;
+      String sAlgRed = null;
+      String sAlgGreen = null;
+      String sAlgBlue = null;
+      String sAlgAlpha = null;
+      String sInputRed = null;
+      String sInputGreen = null;
+      String sInputBlue = null;
+      String sInputAlpha = null;      
+      final OutputObjectsSet ooSet = model.getOutputObjects();
+
+      model.setFilename(file.getAbsolutePath());
+
+      try {
+
+         parser.setInput(new FileInputStream(file), encoding);
+
+         int tag = parser.nextTag();
+         boolean bOut = false;
+         String sColorRed = null;
+         String sColorGreen = null;
+         String sColorBlue = null;
+         String sColorAlpha = null;         
+
+         if (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
+            while ((tag != XmlPullParser.END_DOCUMENT) && !bOut) {
+               switch (tag) {
+                  case XmlPullParser.START_TAG:
+                     if (parser.getName().compareTo(MODEL) == 0) {
+                        final String sName = parser.getAttributeValue("", NAME);
+                        model.setName(sName);
+                        final String sGroup = parser.getAttributeValue("", GROUP);
+                        model.setGroup(sGroup);
+                     }
+                     else if (parser.getName().compareTo(ALGORITHM) == 0) {                    	
+                        alg = getAlgorithm(parser.getAttributeValue("", ALG_CMD_LINE_NAME));                        
+                        sAlgName = parser.getAttributeValue("", KEY);
+                        final String sCoords = parser.getAttributeValue("", COORDS);
+                        if (alg == null) {
+                           throw new ModelIOException();
+                        }
+                        sAlgDescription = parser.getAttributeValue("", DESCRIPTION);
+                        if ( sAlgDescription != null ) {
+                        	alg.setDescription(sAlgDescription);
+                        } else {
+                        	alg.setDescription(alg.getName());
+                        }
+                        sAlgRed = parser.getAttributeValue("", RED);
+                        if ( sAlgRed != null ) {
+                        	alg.setColorR(Integer.parseInt(sAlgRed));
+                        }
+                        sAlgGreen = parser.getAttributeValue("", GREEN);
+                        if ( sAlgGreen != null ) {
+                        	alg.setColorG(Integer.parseInt(sAlgGreen));
+                        }
+                        sAlgBlue = parser.getAttributeValue("", BLUE);
+                        if ( sAlgBlue != null ) {
+                        	alg.setColorB(Integer.parseInt(sAlgBlue));
+                        }
+                        sAlgAlpha = parser.getAttributeValue("", ALPHA);
+                        if ( sAlgAlpha != null ) {
+                        	alg.setColorAlpha(Integer.parseInt(sAlgAlpha));
+                        }                        
+                        model.addAlgorithm(alg, sAlgName);
+                        if (!sCoords.equals("null")) {
+                           coords.put(sAlgName, getCoordsFromString(sCoords));
+                        }                        
+                     }
+                     else if (parser.getName().compareTo(DATA_OBJECT) == 0) {                    	 
+                        final String sKey = parser.getAttributeValue("", KEY);
+                        final String sValue = parser.getAttributeValue("", VALUE);
+                        final String sDescription = parser.getAttributeValue("", DESCRIPTION);
+                        addDataObject(sKey, sValue, sDescription, dao);
+                     }
+                     else if (parser.getName().compareTo(OUTPUT) == 0) {
+
+                        final String sKey = parser.getAttributeValue("", KEY);
+                        final String sValue = parser.getAttributeValue("", CLASS);
+                        final String sDescription = parser.getAttributeValue("", DESCRIPTION);
+                        addOutputObject(sKey, sValue, sDescription, ooSet, dao);
+                     }
+                     else if (parser.getName().compareTo(INPUT) == 0) {
+                        final String sCoords = parser.getAttributeValue("", COORDS);
+                        Rectangle2D rect = null;
+                        if (!sCoords.equals("null")) {
+                           rect = getCoordsFromString(sCoords);
+                        }
+                        sColorRed = parser.getAttributeValue("", RED);
+                        sColorGreen = parser.getAttributeValue("", GREEN);
+                        sColorBlue = parser.getAttributeValue("", BLUE);
+                        sColorAlpha = parser.getAttributeValue("", ALPHA);
+                        final Parameter param = Parameter.deserialize(parser);                        
+                        if (param == null) {
+                           return null;
+                        }
+                        if ( sColorRed != null )
+                        	param.setColorR(Integer.parseInt(sColorRed));
+                        if ( sColorGreen != null )
+                        	param.setColorG(Integer.parseInt(sColorGreen));
+                        if ( sColorBlue != null )
+                        	param.setColorB(Integer.parseInt(sColorBlue));
+                        if ( sColorAlpha != null )
+                        	param.setColorAlpha(Integer.parseInt(sColorAlpha));
+                        ps.addParameter(param);
+                        inputKeys.add(param.getParameterName());
+                        final ObjectAndDescription oad = new ObjectAndDescription(param.getParameterDescription(),
+                                 ModelElementFactory.getParameterAsModelElement(param));
+                        dao.put(param.getParameterName(), oad);
+                        if (rect != null) {
+                           coords.put(param.getParameterName(), getCoordsFromString(sCoords));
+                        }
+                     }
+                     else if (parser.getName().compareTo(ASSIGNMENT) == 0) {
+                        final String sKey = parser.getAttributeValue("", KEY);
+                        String sAssignment = parser.getAttributeValue("", ASSIGNEDTO);
+                        if (sAssignment.equals("null")) {
+                           sAssignment = null;
+                        }
+                        //System.out.println ("model.addInputAssignment("+ sKey +"," + sAssignment +").\n");
+                        model.addInputAsignment(sKey, sAssignment, sAlgName);
+                     }
+                     break;
+                  case XmlPullParser.END_TAG:
+                     if (parser.getName().compareTo(MODEL) == 0) {
+                        bOut = true;
+                     }
+                     break;
+                  case XmlPullParser.TEXT:
+                     break;
+               }
+               if (!bOut) {
+                  tag = parser.next();
+               }
+            }
+         }
+
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+         Sextante.addErrorToLog(e);
+         return null;
+
+      }
+
+      return model;
+
+   }
+
+
+   private static void addOutputObject(final String sKey,
+                                       final String sValue,
+                                       final String sDescription,
+                                       final OutputObjectsSet ooSet,
+                                       final HashMap dao) {
+
+      Output out = null;
+      if (sValue.equals(OutputRasterLayer.class.toString())) {
+         out = new OutputRasterLayer();
+      }
+      else if (sValue.equals(Output3DRasterLayer.class.toString())) {
+         out = new Output3DRasterLayer();
+      }
+      else if (sValue.equals(OutputVectorLayer.class.toString())) {
+         out = new OutputVectorLayer();
+         final ObjectAndDescription oad = (ObjectAndDescription) dao.get(sKey);
+         if (oad != null) {
+            final ModelElementVectorLayer mevl = (ModelElementVectorLayer) oad.getObject();
+            ((OutputVectorLayer) out).setShapeType(mevl.getShapeType());
+         }
+      }
+      else if (sValue.equals(OutputTable.class.toString())) {
+         out = new OutputTable();
+      }
+      else {
+         return;
+      }
+
+      out.setDescription(sDescription);
+      out.setName(sKey);
+      ooSet.add(out);
+
+   }
+
+
+   public static ModelAlgorithm open(final File file,
+                                     final ModelerPanel panel) {
+
+      ModelAlgorithm model;
+      final HashMap dao = panel.getDataObjects();
+      final ArrayList inputKeys = panel.getInputKeys();
+      final HashMap coords = panel.getModelGraphPanel().getCoords();
+
+      panel.getModelGraphPanel().resetCoords();
+
+      model = open(file, dao, inputKeys, coords);
+
+      panel.getModelGraphPanel().setAlgorithm(model);
+
+      return model;
+
+   }
+
+
+   private static Rectangle2D getCoordsFromString(final String sCoords) {
+
+      final Rectangle2D rect = new Rectangle2D.Double();
+
+      final String[] coords = sCoords.split("\\,");
+      rect.setRect(Double.parseDouble(coords[0]), Double.parseDouble(coords[1]), Double.parseDouble(coords[2]),
+               Double.parseDouble(coords[3]));
+
+      return rect;
+
+   }
+
+
+   private static void addDataObject(final String sKey,
+                                     final String sValue,
+                                     final String sDescription,
+                                     final HashMap dao) {
+
+      if (sKey.indexOf("INNERPARAM") == 0) {
+         if (sDescription.equals("Numerical Value")) {
+            if (sValue.indexOf(".") != -1) {
+               dao.put(sKey, new ObjectAndDescription(sDescription, new Double(Double.parseDouble(sValue))));
+            }
+            else {
+               dao.put(sKey, new ObjectAndDescription(sDescription, new Integer(Integer.parseInt(sValue))));
+            }
+         }
+         if (sDescription.equals("String") || sDescription.equals("Field") || sDescription.equals("Filepath") ) {            
+        	 dao.put(sKey, new ObjectAndDescription(sDescription, sValue));
+        	 //System.out.println ("*** PUTTING: sKey=" + sKey + ", SDescr.=" + sDescription + ", sValue='" + sValue +"'.\n");
+         }
+         else if (sDescription.equals("Selection") || sDescription.equals("Band")) {
+            dao.put(sKey, new ObjectAndDescription(sDescription, new Integer(Integer.parseInt(sValue))));
+         }
+         else if (sDescription.equals("Multiple Input")) {
+            final ArrayList array = new ArrayList();
+            final String[] sElements = sValue.split("\\,");
+            for (int i = 0; i < sElements.length; i++) {
+               array.add(sElements[i]);
+            }
+            dao.put(sKey, new ObjectAndDescription(sDescription, array));
+         }
+         else if (sDescription.equals("Fixed Table")) {
+            final String sRows[] = sValue.split("\\,");
+            final int iRows = sRows.length;
+            String[] data = sRows[0].split("\\|");
+            final int iCols = data.length;
+            final String sColNames[] = new String[iCols];
+            for (int i = 0; i < iCols; i++) {
+               sColNames[i] = Integer.toString(i + 1);
+            }
+            final FixedTableModel ftm = new FixedTableModel(sColNames, iRows, false);
+
+            for (int i = 0; i < iRows; i++) {
+               String sRow = sRows[i].replaceAll("\\[", "");
+               sRow = sRow.replaceAll("\\]", "");
+               data = sRow.split("\\|");
+               for (int j = 0; j < iCols; j++) {
+                  ftm.setValueAt(data[j], i, j);
+               }
+            }
+            dao.put(sKey, new ObjectAndDescription(sDescription, ftm));
+         }
+         else if (sDescription.equals("Point")) {
+            final String[] sCoords = sValue.split("\\,");
+            final double x = Double.parseDouble(sCoords[0]);
+            final double y = Double.parseDouble(sCoords[1]);
+            dao.put(sKey, new ObjectAndDescription(sDescription, new Point2D.Double(x, y)));
+         }
+         else if (sDescription.equals("Boolean")) {
+            dao.put(sKey, new ObjectAndDescription(sDescription, new Boolean(sValue.equals("true"))));
+         }
+
+      }
+      else if (sKey.indexOf("INPUT") == 0) {
+         //ignore this
+      }
+      else {
+         final String[] sTokens = sValue.split(",");
+         if (sTokens[0].equals(ModelElementRasterLayer.class.toString())) {
+            final ModelElementRasterLayer merl = new ModelElementRasterLayer();
+            merl.setNumberOfBands(Integer.parseInt(sTokens[1]));
+            dao.put(sKey, new ObjectAndDescription(sDescription, merl));
+         }
+         else if (sTokens[0].equals(ModelElementTable.class.toString())) {
+            dao.put(sKey, new ObjectAndDescription(sDescription, new ModelElementTable()));
+         }
+         else if (sTokens[0].equals(ModelElement3DRasterLayer.class.toString())) {
+            dao.put(sKey, new ObjectAndDescription(sDescription, new ModelElement3DRasterLayer()));
+         }
+         else if (sTokens[0].equals(ModelElementNumericalValue.class.toString())) {
+            dao.put(sKey, new ObjectAndDescription(sDescription, new ModelElementNumericalValue()));
+         }
+         else if (sTokens[0].equals(ModelElementVectorLayer.class.toString())) {
+            final ModelElementVectorLayer mevl = new ModelElementVectorLayer();
+            mevl.setShapeType(Integer.parseInt(sTokens[1]));
+            dao.put(sKey, new ObjectAndDescription(sDescription, mevl));
+         }
+      }
+
+   }
+
+
+   private static GeoAlgorithm getAlgorithm(final String sAlgorithmCommandLineName) {
+
+      try {    	 
+         return Sextante.getAlgorithmFromCommandLineName(sAlgorithmCommandLineName).getNewInstance();         
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+
+   public static GeoAlgorithm loadModelAsAlgorithm(final String sFilename) {
+
+      final File file = new File(sFilename);
+      try {
+         if (file.getName().endsWith("model")) {
+            final ArrayList inputKeys = new ArrayList();
+            final HashMap dao = new HashMap();
+            final HashMap coords = new HashMap();
+            final ModelAlgorithm alg = open(file, dao, inputKeys, coords);
+            if (alg != null) {
+               alg.getInputs().clear();
+               final Set set = dao.keySet();
+               final Iterator iter = set.iterator();
+               while (iter.hasNext()) {
+                  final String sKey = (String) iter.next();
+                  final ObjectAndDescription oad = (ObjectAndDescription) dao.get(sKey);
+                  alg.getInputs().put(sKey, oad.getObject());
+               }
+            }
+            return alg;
+         }
+         else {
+            return null;
+         }
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+
+   public static GeoAlgorithm[] loadModelsAsAlgorithms(final String modelsFolder) {
+
+      int i;
+      File folder;
+      String[] contents = null;
+      final ArrayList algsArray = new ArrayList();
+
+      try {
+         folder = new File(modelsFolder);
+         contents = folder.list();
+      }
+      catch (final Exception e) {
+         return new GeoAlgorithm[0];
+      }
+
+      if (contents != null) {
+         for (i = 0; i < contents.length; i++) {
+            final File file = new File(folder, contents[i]);
+            try {
+               if (file.getName().endsWith("model")) {
+                  final ArrayList inputKeys = new ArrayList();
+                  final HashMap dao = new HashMap();
+                  final HashMap coords = new HashMap();
+                  final ModelAlgorithm alg = open(file, dao, inputKeys, coords);
+                  if (alg != null) {
+                     alg.getInputs().clear();
+                     final Set set = dao.keySet();
+                     final Iterator iter = set.iterator();
+                     while (iter.hasNext()) {
+                        final String sKey = (String) iter.next();
+                        final ObjectAndDescription oad = (ObjectAndDescription) dao.get(sKey);
+                        alg.getInputs().put(sKey, oad.getObject());
+                     }
+                     algsArray.add(alg);
+                  }
+               }
+            }
+            catch (final Exception e) {
+            };
+         }
+
+         final GeoAlgorithm[] algs = new GeoAlgorithm[algsArray.size()];
+         for (i = 0; i < algsArray.size(); i++) {
+            algs[i] = (GeoAlgorithm) algsArray.get(i);
+         }
+
+         return algs;
+      }
+      else {
+         return new GeoAlgorithm[0];
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithmIO.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DefaultModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DefaultModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DefaultModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,1892 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.KeyEvent;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.ScrollPaneConstants;
+
+import org.japura.gui.Anchor;
+import org.japura.gui.BatchSelection;
+import org.japura.gui.CheckComboBox;
+import org.japura.gui.EmbeddedComponent;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo3DRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+import es.unex.sextante.gui.algorithm.FileSelectionComboPanel;
+import es.unex.sextante.gui.algorithm.ParameterContainer;
+import es.unex.sextante.modeler.elements.ModelElement3DRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementBand;
+import es.unex.sextante.modeler.elements.ModelElementBoolean;
+import es.unex.sextante.modeler.elements.ModelElementFilepath;
+import es.unex.sextante.modeler.elements.ModelElementFixedTable;
+import es.unex.sextante.modeler.elements.ModelElementInputArray;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementPoint;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementSelection;
+import es.unex.sextante.modeler.elements.ModelElementString;
+import es.unex.sextante.modeler.elements.ModelElementTable;
+import es.unex.sextante.modeler.elements.ModelElementTableField;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+public class DefaultModelerParametersPanel
+         extends
+            GeoAlgorithmModelerParametersPanel {
+
+   public static int        CELL_HEIGHT                          = 18;
+   private static int       COLUMN_WIDTH                         = 250;
+   private static final int MAX_BANDS                            = 10;
+
+   protected int            m_iCurrentRow                        = 0;
+   private JScrollPane      jScrollPanelParameters;
+   private JPanel           jPanelParameters;
+   protected final ArrayList  m_InputParameterContainer            = new ArrayList();
+   protected final ArrayList  m_OutputParameterDefinitionContainer = new ArrayList();
+   private ArrayList        m_ComboBox                           = new ArrayList();
+
+
+   public DefaultModelerParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      m_ComboBox = new ArrayList();
+
+      jScrollPanelParameters = new JScrollPane();
+      this.add(jScrollPanelParameters);
+      jScrollPanelParameters.setPreferredSize(new java.awt.Dimension(650, 300));
+      jScrollPanelParameters.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+      jScrollPanelParameters.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
+      {
+         jPanelParameters = new JPanel();
+         final TableLayout jPanelParametersLayout = new TableLayout(getTableLayoutMatrix());
+         jPanelParametersLayout.setHGap(5);
+         jPanelParametersLayout.setVGap(5);
+         jPanelParameters.setLayout(jPanelParametersLayout);
+         jScrollPanelParameters.setViewportView(jPanelParameters);
+         jPanelParameters.setSize(new java.awt.Dimension(630, 300));
+         {
+            if (m_Algorithm.requiresRasterLayers() || m_Algorithm.requiresMultipleRasterLayers()
+                || m_Algorithm.requiresMultipleRasterBands()) {
+               addRasterLayers(jPanelParameters);
+            }
+            if (m_Algorithm.requires3DRasterLayers()) {
+               add3DRasterLayers(jPanelParameters);
+            }
+            if (m_Algorithm.requiresVectorLayers() || m_Algorithm.requiresMultipleVectorLayers()) {
+               addVectorLayers(jPanelParameters);
+            }
+            if (m_Algorithm.requiresTables() || m_Algorithm.requiresMultipleTables()) {
+               addTables(jPanelParameters);
+            }
+            if (m_Algorithm.requiresNonDataObjects()) {
+               addNonDataObjects(jPanelParameters);
+            }
+            if (m_Algorithm.generatesLayersOrTables()) {
+               addOutputObjects(jPanelParameters);
+            }
+         }
+      }
+   }
+
+
+   protected void addOutputObjects(final JPanel pane) {
+
+      try {
+         String sKey;
+         String sDescription;
+         final OutputObjectsSet ooset = m_Algorithm.getOutputObjects();
+         final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+
+         addTitleLabel(pane, Sextante.getText("Output_objects"), m_iCurrentRow, true);
+         m_iCurrentRow++;
+
+         for (int i = 0; i < ooset.getOutputObjectsCount(); i++) {
+            Output out = ooset.getOutput(i);
+            if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+                || (out instanceof Output3DRasterLayer)) {
+               final OutputLayerSettingsPanel olsp = new OutputLayerSettingsPanel();
+               sDescription = out.getDescription();
+               sKey = out.getName();
+               addTitleLabel(pane, sDescription + "[" + out.getTypeDescription() + "]", m_iCurrentRow, false);
+               if (!oosetGlobal.containsKey(sKey + this.m_sAlgorithmName)) {
+                  sDescription = "\"" + sDescription + "\" " + Sextante.getText("from") + " " + m_sAlgorithmDescription;
+                  olsp.setKeepAsFinalResult(false);
+               }
+               else {
+                  out = oosetGlobal.getOutput(sKey + this.m_sAlgorithmName);
+                  sDescription = out.getDescription();
+                  olsp.setKeepAsFinalResult(true);
+               }
+               olsp.setName(sDescription);
+
+               pane.add(olsp, getStringTableCoords(2, m_iCurrentRow));
+               m_iCurrentRow++;
+               m_OutputParameterDefinitionContainer.add(new OutputParameterContainer(sKey, olsp));
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+
+   }
+
+
+   private void addRasterLayers(final JPanel pane) {
+
+      int i, j;
+      final ArrayList childComboBoxIndex = new ArrayList();
+      boolean bIsOptional = false;
+      Parameter parameter;
+      Parameter subParameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+      String sParameterName;
+
+      addTitleLabel(pane, Sextante.getText("Raster_layers"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterRasterLayer) {
+            childComboBoxIndex.clear();
+            //check for bands that depend on this raster layer
+            sParameterName = parameter.getParameterName();
+            for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+               subParameter = parameters.getParameter(j);
+               if (subParameter instanceof ParameterBand) {
+                  try {
+                     if (((AdditionalInfoBand) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                              sParameterName)) {
+                        m_iCurrentRow++;
+                        addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                        comboBox = getBandSelectionComboBox();
+                        childComboBoxIndex.add(new Integer(m_ComboBox.size()));
+                        m_ComboBox.add(comboBox);
+                        pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+                        m_InputParameterContainer.add(new ParameterContainer(subParameter, comboBox));
+                        final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(subParameter));
+                        if (oad != null) {
+                           final Object value = oad.getObject();
+                           if (value instanceof Integer) {
+                              final int iValue = ((Integer) value).intValue();
+                              comboBox.setSelectedIndex(comboBox.getItemCount() - 250 + iValue);
+                           }
+                           else if (value instanceof String) {
+                              final String sDesc = ((ObjectAndDescription) m_DataObjects.get(value)).getDescription();
+                              comboBox.setSelectedItem(sDesc);
+                           }
+                        }
+                     }
+                  }
+                  catch (final Exception e) {
+                     Sextante.addErrorToLog(e);
+                  }
+               }
+            }
+            try {
+               if (((AdditionalInfoRasterLayer) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bIsOptional = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+               else {
+                  bIsOptional = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"),
+                           m_iCurrentRow - childComboBoxIndex.size(), false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = getRasterLayerSelectionComboBox(childComboBoxIndex, bIsOptional);
+
+            if (bIsOptional) {
+               comboBox.setSelectedIndex(0);
+            }
+            final String sKey = m_GlobalAlgorithm.getInputAsignment(sParameterName, m_Algorithm);
+            if (sKey != null) {
+               for (int k = 0; k < comboBox.getModel().getSize(); k++) {
+                  final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getModel().getElementAt(k);
+                  final Object ob = oad.getObject();
+                  if (ob != null) {
+                     if (oad.getObject().equals(sKey)) {
+                        comboBox.setSelectedIndex(k);
+                        break;
+                     }
+                  }
+               }
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - childComboBoxIndex.size()));
+            m_iCurrentRow++;
+            m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if ((additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND)) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+   }
+
+
+   private void add3DRasterLayers(final JPanel pane) {
+
+      int i;
+      final ArrayList childComboBoxIndex = new ArrayList();
+      boolean bIsOptional = false;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+      String sParameterName;
+
+      addTitleLabel(pane, Sextante.getText("3D_Raster_layers"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         sParameterName = parameter.getParameterName();
+         if (parameter instanceof Parameter3DRasterLayer) {
+            try {
+               if (((AdditionalInfo3DRasterLayer) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bIsOptional = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+               }
+               else {
+                  bIsOptional = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"), m_iCurrentRow, false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = getRasterLayerSelectionComboBox(childComboBoxIndex, bIsOptional);
+
+            if (bIsOptional) {
+               comboBox.setSelectedIndex(0);
+            }
+            final String sKey = m_GlobalAlgorithm.getInputAsignment(sParameterName, m_Algorithm);
+            if (sKey != null) {
+               for (int k = 0; k < comboBox.getModel().getSize(); k++) {
+                  final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getModel().getElementAt(k);
+                  final Object ob = oad.getObject();
+                  if (ob != null) {
+                     if (oad.getObject().equals(sKey)) {
+                        comboBox.setSelectedIndex(k);
+                        break;
+                     }
+                  }
+               }
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+            m_iCurrentRow++;
+            m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+      }
+   }
+
+
+   private void addVectorLayers(final JPanel pane) {
+
+      boolean bAddNotSetField = false;
+      int i, j;
+      int iChildFields = 0;
+      String sParameterName;
+      Parameter parameter;
+      Parameter subParameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+      JComboBox childComboBox;
+
+      addTitleLabel(pane, Sextante.getText("Vector_layer"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterVectorLayer) {
+            iChildFields = 0;
+            //check for table fields that depend on this vector layer
+            sParameterName = parameter.getParameterName();
+            for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+               subParameter = parameters.getParameter(j);
+               if (subParameter instanceof ParameterTableField) {
+                  try {
+                     if (((AdditionalInfoTableField) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                              sParameterName)) {
+                        m_iCurrentRow++;
+                        iChildFields++;
+                        addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                        childComboBox = getVectorLayerFieldSelectionTextField();
+                        final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(subParameter));
+                        if (oad != null) {
+                           final Object value = oad.getObject();
+                           if (value instanceof Integer) {
+                              final int iValue = ((Integer) value).intValue();
+                              childComboBox.setSelectedIndex(iValue);
+                           }
+                           else if (value instanceof String) {
+                              final JTextField textField = (JTextField) childComboBox.getEditor().getEditorComponent();
+                              textField.setText((String) value);
+                           }
+                        }
+                        pane.add(childComboBox, getStringTableCoords(2, m_iCurrentRow));
+                        m_InputParameterContainer.add(new ParameterContainer(subParameter, childComboBox));
+                     }
+                  }
+                  catch (final NullParameterAdditionalInfoException e) {
+                     Sextante.addErrorToLog(e);
+                  }
+               }
+            }
+            try {
+               final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) parameter.getParameterAdditionalInfo();
+               if (ai.getIsMandatory()) {
+                  bAddNotSetField = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - iChildFields, false);
+               }
+               else {
+                  bAddNotSetField = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"), m_iCurrentRow
+                                                                                                            - iChildFields, false);
+               }
+               comboBox = getVectorLayerSelectionComboBox(bAddNotSetField, ai.getShapeType());
+               if (bAddNotSetField) {
+                  comboBox.setSelectedIndex(0);
+               }
+               final String sKey = m_GlobalAlgorithm.getInputAsignment(sParameterName, m_Algorithm);
+               if (sKey != null) {
+                  for (int k = 0; k < comboBox.getModel().getSize(); k++) {
+                     final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getModel().getElementAt(k);
+                     final Object ob = oad.getObject();
+                     if (ob != null) {
+                        if (oad.getObject().equals(sKey)) {
+                           comboBox.setSelectedIndex(k);
+                           break;
+                        }
+                     }
+                  }
+               }
+               pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - iChildFields));
+               m_iCurrentRow++;
+               m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if ((additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON)
+                   || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+   }
+
+
+   private void addTables(final JPanel pane) {
+
+      boolean bIsOptional = false;
+      int i, j;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+      JComboBox comboBox;
+      int iChildFields = 0;
+      String sParameterName;
+      Parameter subParameter;
+      JComboBox childComboBox;
+
+      addTitleLabel(pane, Sextante.getText("Tables"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         if (parameter instanceof ParameterTable) {
+            iChildFields = 0;
+            sParameterName = parameter.getParameterName();
+            for (j = 0; j < m_Algorithm.getNumberOfParameters(); j++) {
+               subParameter = parameters.getParameter(j);
+               if (subParameter instanceof ParameterTableField) {
+                  try {
+                     if (((AdditionalInfoTableField) subParameter.getParameterAdditionalInfo()).getParentParameterName().equals(
+                              sParameterName)) {
+                        m_iCurrentRow++;
+                        iChildFields++;
+                        addTitleLabel(pane, "      " + subParameter.getParameterDescription(), m_iCurrentRow, false);
+                        childComboBox = getTableFieldSelectionTextField();
+                        final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(subParameter));
+                        if (oad != null) {
+                           final Object value = oad.getObject();
+                           if (value instanceof Integer) {
+                              final int iValue = ((Integer) value).intValue();
+                              childComboBox.setSelectedIndex(iValue);
+                           }
+                           else if (value instanceof String) {
+                              final JTextField textField = (JTextField) childComboBox.getEditor().getEditorComponent();
+                              textField.setText((String) value);
+                           }
+                        }
+                        pane.add(childComboBox, getStringTableCoords(2, m_iCurrentRow));
+                        m_InputParameterContainer.add(new ParameterContainer(subParameter, childComboBox));
+                     }
+                  }
+                  catch (final NullParameterAdditionalInfoException e) {
+                     Sextante.addErrorToLog(e);
+                  }
+               }
+            }
+            // add table
+            try {
+               if (((AdditionalInfoTable) parameter.getParameterAdditionalInfo()).getIsMandatory()) {
+                  bIsOptional = false;
+                  addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow - iChildFields, false);
+               }
+               else {
+                  bIsOptional = true;
+                  addTitleLabel(pane, parameter.getParameterDescription() + Sextante.getText("[optional]"), m_iCurrentRow
+                                                                                                            - iChildFields, false);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+            comboBox = getTableSelectionComboBox(bIsOptional);
+            if (bIsOptional) {
+               comboBox.setSelectedIndex(0);
+            }
+            final String sKey = m_GlobalAlgorithm.getInputAsignment(sParameterName, m_Algorithm);
+            if (sKey != null) {
+               for (int k = 0; k < comboBox.getModel().getSize(); k++) {
+                  final ObjectAndDescription oad = (ObjectAndDescription) comboBox.getModel().getElementAt(k);
+                  final Object ob = oad.getObject();
+                  if (ob != null) {
+                     if (oad.getObject().equals(sKey)) {
+                        comboBox.setSelectedIndex(k);
+                        break;
+                     }
+                  }
+               }
+            }
+            pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow - iChildFields));
+            m_iCurrentRow++;
+            m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         }
+         else if (parameter instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+               if (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_TABLE) {
+                  addMultipleInput(pane, (ParameterMultipleInput) parameter);
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   private void addNonDataObjects(final JPanel pane) {
+
+      int i;
+      Parameter parameter;
+      final ParametersSet parameters = m_Algorithm.getParameters();
+
+      addTitleLabel(pane, Sextante.getText("Options"), m_iCurrentRow, true);
+      m_iCurrentRow++;
+
+      for (i = 0; i < m_Algorithm.getNumberOfParameters(); i++) {
+         parameter = parameters.getParameter(i);
+         //System.out.println ("*** PROCESSING PARAM: " + parameter.getParameterName() + ".\n");
+         if (parameter instanceof ParameterNumericalValue) {
+            addNumericalTextField(pane, (ParameterNumericalValue) parameter);
+         }
+         else if (parameter instanceof ParameterString) {
+            addStringTextField(pane, (ParameterString) parameter);
+         }
+         else if (parameter instanceof ParameterSelection) {
+            addSelection(pane, (ParameterSelection) parameter);
+         }
+         else if (parameter instanceof ParameterFixedTable) {
+            addFixedTable(pane, (ParameterFixedTable) parameter);
+         }
+         else if (parameter instanceof ParameterPoint) {
+            addPoint(pane, (ParameterPoint) parameter);
+         }
+         else if (parameter instanceof ParameterBoolean) {
+            addCheckBox(pane, (ParameterBoolean) parameter);
+         }
+         else if (parameter instanceof ParameterFilepath) {
+            addFilepath(pane, (ParameterFilepath) parameter);
+         }
+
+      }
+   }
+
+
+   private void addMultipleInput(final JPanel pane,
+                                 final ParameterMultipleInput parameter) {
+
+      int i;
+      int iDataTypes[];
+      String sKey;
+      ObjectAndDescription[] objects;
+      ObjectAndDescription[] allObjects;
+      ObjectAndDescription[] arrays;
+      final ArrayList validArrays = new ArrayList();
+      Parameter param;
+      AdditionalInfoMultipleInput ainfo;
+
+      try {
+         final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo();
+
+         switch (additionalInfo.getDataType()) {
+            case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+               objects = getElementsOfClass(ModelElementRasterLayer.class, true);
+               iDataTypes = new int[] { AdditionalInfoMultipleInput.DATA_TYPE_RASTER };
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D:
+                objects = getElementsOfClass(ModelElement3DRasterLayer.class, true);
+                iDataTypes = new int[] { AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D };
+                break;               
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+            case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+               objects = getElementsOfClass(ModelElementVectorLayer.class, true);
+               iDataTypes = new int[] { additionalInfo.getDataType() };
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+               objects = getElementsOfClass(ModelElementTable.class, true);
+               iDataTypes = new int[] { AdditionalInfoMultipleInput.DATA_TYPE_TABLE };
+               break;
+            case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+               objects = getElementsOfClass(ModelElementRasterLayer.class, true);
+               //               final ArrayList<ObjectAndDescription> list = new ArrayList<ObjectAndDescription>();
+               //               for (int j = 0; j < layers.length; j++) {
+               //                  final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(layers[j].getObject());
+               //                  final ModelElementRasterLayer merl = (ModelElementRasterLayer) oad.getObject();
+               //                  int iBands = merl.getNumberOfBands();
+               //                  if (iBands == ModelElementRasterLayer.NUMBER_OF_BANDS_UNDEFINED) {
+               //                     iBands = MAX_BANDS;
+               //                  }
+               //                  for (int iBand = 0; iBand < iBands; iBand++) {
+               //                     String sName;
+               //                     if ((iBands == MAX_BANDS) && (iBand != 0)) {
+               //                        sName = layers[j].getDescription() + " Band " + Integer.toString(iBand + 1) + "["
+               //                                + Sextante.getText("unchecked") + "]";
+               //
+               //                     }
+               //                     else {
+               //                        sName = layers[j].getDescription() + " Band " + Integer.toString(iBand + 1);
+               //                     }
+               //                     list.add(new ObjectAndDescription(sName, layers[j].getObject() + "BAND" + Integer.toString(iBand)));
+               //                  }
+               //               }
+               //               objects = list.toArray(new ObjectAndDescription[0]);
+               iDataTypes = new int[] { AdditionalInfoMultipleInput.DATA_TYPE_RASTER, AdditionalInfoMultipleInput.DATA_TYPE_BAND };
+               break;
+            default:
+               return;
+         }
+
+         arrays = getElementsOfClass(ModelElementInputArray.class, true);
+
+         final ParametersSet ps = m_GlobalAlgorithm.getParameters();
+         for (i = 0; i < arrays.length; i++) {
+            sKey = (String) arrays[i].getObject();
+            try {
+               param = ps.getParameter(sKey);
+               ainfo = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+               for (final int element : iDataTypes) {
+                  if (ainfo.getDataType() == element) {
+                     validArrays.add(arrays[i]);
+                     break;
+                  }
+               }
+            }
+            catch (final WrongParameterIDException e) {
+               Sextante.addErrorToLog(e);
+            }
+
+         }
+
+         allObjects = new ObjectAndDescription[validArrays.size() + objects.length];
+         for (i = 0; i < objects.length; i++) {
+            allObjects[i] = objects[i];
+         }
+         for (i = 0; i < validArrays.size(); i++) {
+            allObjects[i + objects.length] = (ObjectAndDescription) validArrays.get(i);
+         }
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         //final MultipleInputSelectionPanel multipleInputPanel = new MultipleInputSelectionPanel(allObjects);
+         final CheckComboBox ccb = new CheckComboBox();
+         ccb.setTextFor(CheckComboBox.NONE, Sextante.getText("no_elements_selected"));
+         ccb.setTextFor(CheckComboBox.MULTIPLE, Sextante.getText("multiple_elements_selected"));
+
+         final BatchSelection bs = new BatchSelection.CheckBox();
+         final EmbeddedComponent comp = new EmbeddedComponent(bs, Anchor.NORTH);
+         ccb.setEmbeddedComponent(comp);
+
+         for (int j = 0; j < allObjects.length; j++) {
+            ccb.getModel().addElement(allObjects[j]);
+         }
+         final ObjectAndDescription oad = (ObjectAndDescription) getParameterValue(parameter);
+         if (oad != null) {
+            final ArrayList list = (ArrayList) oad.getObject();
+            for (int j = 0; j < list.size(); j++) {
+               for (int k = 0; k < allObjects.length; k++) {
+                  if (allObjects[k].getObject().equals(list.get(j))) {
+                     ccb.getModel().addCheck(allObjects[k]);
+                  }
+               }
+            }
+            //multipleInputPanel.setSelectedObjects((ArrayList) oad.getObject());
+         }
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(ccb, getStringTableCoords(2, m_iCurrentRow));
+         m_InputParameterContainer.add(new ParameterContainer(parameter, ccb));
+         m_iCurrentRow++;
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void addFixedTable(final JPanel pane,
+                              final ParameterFixedTable parameter) {
+
+      boolean bIsNumberOfRowsFixed;
+      int iRows;
+      String[] sCols;
+
+      try {
+         final AdditionalInfoFixedTable additionalInfo = (AdditionalInfoFixedTable) parameter.getParameterAdditionalInfo();
+
+         iRows = additionalInfo.getRowsCount();
+         sCols = additionalInfo.getCols();
+         bIsNumberOfRowsFixed = additionalInfo.isNumberOfRowsFixed();
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         final ObjectAndDescription[] tables = getElementsOfClass(ModelElementFixedTable.class, true);
+         final AdditionalInfoFixedTable addInfo = new AdditionalInfoFixedTable(sCols, iRows, bIsNumberOfRowsFixed);
+         final FixedTableSelectionPanel fixedTablePanel = new FixedTableSelectionPanel(addInfo, tables, this.m_DataObjects,
+                  this.m_GlobalAlgorithm);
+         final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+         if (oad != null) {
+            if (oad.getObject() instanceof FixedTableModel) {
+               fixedTablePanel.setTable(oad.getObject());
+            }
+            else {
+               fixedTablePanel.setTable(sKey);
+            }
+         }
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         pane.add(fixedTablePanel, getStringTableCoords(2, m_iCurrentRow));
+         m_InputParameterContainer.add(new ParameterContainer(parameter, fixedTablePanel));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void addPoint(final JPanel pane,
+                         final ParameterPoint parameter) {
+
+      String sKey;
+      ObjectAndDescription oad;
+
+      final JComboBox comboBox = new JComboBox();
+      final ObjectAndDescription values[] = getElementsOfClass(ModelElementPoint.class, true);
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(values);
+      sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+      if (sKey != null) {
+         for (int k = 0; k < comboBox.getModel().getSize(); k++) {
+            oad = (ObjectAndDescription) comboBox.getModel().getElementAt(k);
+            if (oad.getObject().equals(sKey)) {
+               comboBox.setSelectedIndex(k);
+               break;
+            }
+         }
+      }
+      comboBox.setModel(defaultModel);
+      addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+      pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+      m_iCurrentRow++;
+      m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+
+   }
+
+
+   private void addSelection(final JPanel pane,
+                             final ParameterSelection parameter) {
+
+      int i;
+
+      try {
+         final JComboBox comboBox = new JComboBox();
+         final String[] sValues = ((AdditionalInfoSelection) parameter.getParameterAdditionalInfo()).getValues();
+         final ObjectAndDescription values[] = getElementsOfClass(ModelElementSelection.class, true);
+         final String sValuesForCombo[] = new String[sValues.length + values.length];
+         for (i = 0; i < sValues.length; i++) {
+            sValuesForCombo[i] = sValues[i];
+         }
+         for (i = 0; i < values.length; i++) {
+            sValuesForCombo[i + sValues.length] = values[i].getDescription();
+         }
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(sValuesForCombo);
+         comboBox.setModel(defaultModel);
+         comboBox.setSelectedIndex(0);
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+         pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+         final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+         if (oad != null) {
+            if (oad.getObject() instanceof Integer) {
+               final int iValue = ((Integer) oad.getObject()).intValue();
+               comboBox.setSelectedIndex(iValue);
+            }
+            else {
+               for (i = 0; i < values.length; i++) {
+                  if (values[i].getObject().equals(sKey)) {
+                     comboBox.setSelectedIndex(sValues.length + i);
+                     break;
+                  }
+               }
+            }
+         }
+         m_iCurrentRow++;
+         m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void addNumericalTextField(final JPanel pane,
+                                      final ParameterNumericalValue parameter) {
+
+      JComboBox comboBox;
+      JTextField textField;
+
+      final int iType;
+
+      try {
+         final AdditionalInfoNumericalValue additionalInfo = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+         iType = additionalInfo.getType();
+
+         addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+         comboBox = new JComboBox();
+         final ObjectAndDescription values[] = getElementsOfClass(ModelElementNumericalValue.class, true);
+         final ComboBoxModel jComboBoxNumericalInputModel = new DefaultComboBoxModel(values);
+         comboBox.setModel(jComboBoxNumericalInputModel);
+         comboBox.setSelectedIndex(-1);
+         comboBox.setEditable(true);
+
+         textField = (JTextField) comboBox.getEditor().getEditorComponent();
+
+         if (iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE) {
+            textField.setText(Double.toString(additionalInfo.getDefaultValue()));
+         }
+         else {
+            textField.setText(Integer.toString((int) additionalInfo.getDefaultValue()));
+         }
+
+         final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+         if (oad != null) {
+            if (oad.getObject() instanceof Number) {
+               final double dValue = ((Number) oad.getObject()).doubleValue();
+               textField.setText(Double.toString(dValue));
+            }
+            else {
+               for (int i = 0; i < values.length; i++) {
+                  if (values[i].getObject().equals(sKey)) {
+                     comboBox.setSelectedIndex(i);
+                     comboBox.updateUI();
+                     break;
+                  }
+               }
+            }
+         }
+         pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+         m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+         m_iCurrentRow++;
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   protected void validateKeyTyping(final KeyEvent event) {
+
+      final JTextField textField = (JTextField) event.getSource();
+      final String text = textField.getText() + event.getKeyChar();
+      try {
+         Double.parseDouble(text);
+         textField.setText(text);
+      }
+      catch (final NumberFormatException e) {
+      }
+
+   }
+
+
+   private void addStringTextField(final JPanel pane,
+                                   final ParameterString parameter) {
+
+      JComboBox comboBox;
+
+      addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+      comboBox = new JComboBox();
+      
+      final ObjectAndDescription values[] = //we allow both strings and numbers as inputs to string fields
+    	  getElementsOfClassAOrB(	ModelElementString.class, 
+    			  					ModelElementNumericalValue.class, true);
+      //final ObjectAndDescription values[] = getElementsOfClass(ModelElementString.class, true);
+      
+      final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(values);
+      comboBox.setModel(jComboBoxModel);
+      comboBox.setSelectedIndex(-1);
+      comboBox.setEditable(true);
+      final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+      final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+      if (oad != null) {
+         if (oad.getObject() instanceof String) {
+            final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+            textField.setText((String) oad.getObject());
+         }
+         else {
+            for (int i = 0; i < values.length; i++) {
+               if (values[i].getObject().equals(sKey)) {
+                  comboBox.setSelectedIndex(i);
+                  comboBox.updateUI();
+                  break;
+               }
+            }
+         }
+      }
+      pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+      m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+      m_iCurrentRow++;
+
+
+   }
+
+   
+   private void addFilepath(final JPanel pane, final ParameterFilepath parameter) {
+
+	   addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+
+	   final ObjectAndDescription values[] = getElementsOfClass(ModelElementFilepath.class, true);
+
+	   try {
+		   final AdditionalInfoFilepath additionalInfo = (AdditionalInfoFilepath) parameter.getParameterAdditionalInfo();		   
+
+		   String sExtension = "*.*";
+		   final String[] sExtensions = additionalInfo.getExtensions();
+		   if (sExtensions != null) {
+			   final StringBuffer sb = new StringBuffer();
+			   for (int i = 0; i < sExtensions.length; i++) {
+				   sb.append(sExtensions[i]);
+				   if (i < sExtensions.length - 1) {
+					   sb.append(",");
+				   }
+			   }
+			   sExtension = sb.toString();
+		   }
+
+		   final FileSelectionComboPanel fileSelectionPanel = new FileSelectionComboPanel(additionalInfo.isFolder(),
+				   additionalInfo.isOpenDialog(), additionalInfo.getExtensions(), Sextante.getText("Files") + " " + sExtension);
+
+		   final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(values);
+		   fileSelectionPanel.getComboBox().setModel(jComboBoxModel);
+		   fileSelectionPanel.getComboBox().setSelectedIndex(-1);
+		   fileSelectionPanel.getComboBox().setEditable(true);
+
+		   final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+		   final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+		   if (oad != null) {
+			   if (oad.getObject() instanceof String) {
+				   final JTextField textField = (JTextField) fileSelectionPanel.getComboBox().getEditor().getEditorComponent();
+				   textField.setText((String) oad.getObject());
+			   }
+			   else {
+				   for (int i = 0; i < values.length; i++) {
+					   if (values[i].getObject().equals(sKey)) {
+						   fileSelectionPanel.getComboBox().setSelectedIndex(i);
+						   fileSelectionPanel.getComboBox().updateUI();
+						   break;
+					   }
+				   }
+			   }
+		   }
+		   pane.add(fileSelectionPanel, getStringTableCoords(2, m_iCurrentRow));
+		   m_InputParameterContainer.add(new ParameterContainer(parameter, fileSelectionPanel.getComboBox()));
+		   m_iCurrentRow++;
+	   }
+	   catch (final NullParameterAdditionalInfoException e) {
+		   Sextante.addErrorToLog(e);
+	   }
+
+   }
+   
+
+   private void addCheckBox(final JPanel pane,
+                            final ParameterBoolean parameter) {
+
+      int i;
+
+      final JComboBox comboBox = new JComboBox();
+      final ObjectAndDescription values[] = getElementsOfClass(ModelElementBoolean.class, true);
+      final String sValuesForCombo[] = new String[2 + values.length];
+      sValuesForCombo[0] = Sextante.getText("Yes");
+      sValuesForCombo[1] = Sextante.getText("No");
+      for (i = 0; i < values.length; i++) {
+         sValuesForCombo[i + 2] = values[i].getDescription();
+      }
+
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(sValuesForCombo);
+      comboBox.setModel(defaultModel);
+      AdditionalInfoBoolean ai;
+      try {
+         ai = (AdditionalInfoBoolean) parameter.getParameterAdditionalInfo();
+         if (ai.getDefaultValue()) {
+            comboBox.setSelectedIndex(0);
+         }
+         else {
+            comboBox.setSelectedIndex(1);
+         }
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         comboBox.setSelectedIndex(0);
+      }
+
+      addTitleLabel(pane, parameter.getParameterDescription(), m_iCurrentRow, false);
+      final String sKey = m_GlobalAlgorithm.getInputAsignment(parameter.getParameterName(), m_Algorithm);
+      final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+      if (oad != null) {
+         if (oad.getObject() instanceof Boolean) {
+            final Boolean b = (Boolean) oad.getObject();
+            if (b.booleanValue()) {
+               comboBox.setSelectedIndex(0);
+
+            }
+            else {
+               comboBox.setSelectedIndex(1);
+            }
+            comboBox.updateUI();
+         }
+         else {
+            for (i = 0; i < values.length; i++) {
+               if (values[i].getObject().equals(sKey)) {
+                  comboBox.setSelectedIndex(i + 2);
+                  break;
+               }
+            }
+         }
+      }
+      pane.add(comboBox, getStringTableCoords(2, m_iCurrentRow));
+      m_iCurrentRow++;
+      m_InputParameterContainer.add(new ParameterContainer(parameter, comboBox));
+
+   }
+
+
+   protected void addTitleLabel(final JPanel pane,
+                                final String sText,
+                                final int iRow,
+                                final boolean isSectionTitleLabel) {
+
+      JLabel label;
+      label = new JLabel();
+      label.setText(sText);
+      label.setPreferredSize(new java.awt.Dimension(COLUMN_WIDTH, CELL_HEIGHT));
+
+      if (isSectionTitleLabel) {
+         label.setFont(new java.awt.Font("Tahoma", 1, 11));
+      }
+
+      pane.add(label, getStringTableCoords(1, iRow));
+
+   }
+
+
+   protected String getStringTableCoords(final int iCol,
+                                         final int iRow) {
+
+      final StringBuffer sCellCoords = new StringBuffer();
+
+      sCellCoords.append(Integer.toString(iCol));
+      sCellCoords.append(",");
+      sCellCoords.append(Integer.toString(iRow));
+
+      return sCellCoords.toString();
+
+   }
+
+
+   protected double[][] getTableLayoutMatrix() {
+
+      int i;
+      int iRows = 0;
+
+      final double iSizeColumns[] = { 10, TableLayoutConstants.FILL, 360, 10 };
+
+      iRows += m_Algorithm.getNumberOfParameters();
+
+      if (m_Algorithm.requiresRasterLayers() || m_Algorithm.requiresMultipleRasterLayers()
+          || m_Algorithm.requiresMultipleRasterBands()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresVectorLayers() || m_Algorithm.requiresMultipleVectorLayers()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresTables() || m_Algorithm.requiresMultipleTables()) {
+         iRows++;
+      }
+      if (m_Algorithm.requires3DRasterLayers()) {
+         iRows++;
+      }
+      if (m_Algorithm.requiresNonDataObjects()) {
+         iRows++;
+      }
+
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      final int iOutput = ooSet.getOutputObjectsCount();
+
+      if (iOutput != 0) {
+         iRows += (iOutput + 1);
+      }
+
+      final double iSizeRows[] = new double[iRows];
+      for (i = 0; i < iRows - iOutput; i++) {
+         iSizeRows[i] = CELL_HEIGHT;
+      }
+      for (i = iRows - iOutput; i < iRows; i++) {
+         iSizeRows[i] = CELL_HEIGHT * 2.5;
+      }
+
+      final double iSize[][] = new double[2][];
+      iSize[0] = iSizeColumns;
+      iSize[1] = iSizeRows;
+
+      return iSize;
+
+   }
+
+
+   private JComboBox getRasterLayerSelectionComboBox(final ArrayList childComboBoxes,
+                                                     final boolean bIsOptional) {
+
+      final JComboBox comboBox = new JComboBox();
+      final ObjectAndDescription[] sObjects = getElementsOfClass(ModelElementRasterLayer.class, bIsOptional);
+
+      final Integer[] childsArray = new Integer[childComboBoxes.size()];
+      for (int i = 0; i < childsArray.length; i++) {
+         childsArray[i] = (Integer) childComboBoxes.get(i);
+      }
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(sObjects);
+      if (bIsOptional) {
+         defaultModel.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+      comboBox.setModel(defaultModel);
+
+      comboBox.addItemListener(new java.awt.event.ItemListener() {
+         public void itemStateChanged(final java.awt.event.ItemEvent e) {
+            int i;
+            int iIndex;
+            String sNames[] = null;
+            DefaultComboBoxModel defaultModel;
+            final ObjectAndDescription ob = (ObjectAndDescription) comboBox.getSelectedItem();
+            final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(ob.getObject());
+            if (oad != null) {
+               final int iBands = ((ModelElementRasterLayer) oad.getObject()).getNumberOfBands();
+               for (i = 0; i < childsArray.length; i++) {
+                  iIndex = (childsArray[i]).intValue();
+                  sNames = getBandNames(iBands);
+                  if (sNames != null) {
+                     defaultModel = new DefaultComboBoxModel(sNames);
+                     ((JComboBox) m_ComboBox.get(iIndex)).setModel(defaultModel);
+                  }
+               }
+            }
+         }
+      });
+
+
+      return comboBox;
+
+   }
+
+
+   private JComboBox getVectorLayerSelectionComboBox(final boolean bIsOptional,
+                                                     final int iShapeType) {
+
+      final JComboBox comboBox = new JComboBox();
+      final ObjectAndDescription[] allLayers = getElementsOfClass(ModelElementVectorLayer.class, bIsOptional);
+
+      final ArrayList list = new ArrayList();
+
+      for (final ObjectAndDescription element : allLayers) {
+         final String sKey = (String) element.getObject();
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+         final ModelElementVectorLayer mevl = (ModelElementVectorLayer) oad.getObject();
+         if ((mevl.getShapeType() == iShapeType) || (mevl.getShapeType() == ModelElementVectorLayer.SHAPE_TYPE_UNDEFINED)
+             || (iShapeType == AdditionalInfoVectorLayer.SHAPE_TYPE_ANY)) {
+            list.add(element);
+         }
+      }
+
+      final ObjectAndDescription[] layers = new ObjectAndDescription[list.size()];
+      for (int i = 0; i < list.size(); i++) {
+         layers[i] = (ObjectAndDescription) list.get(i);
+      }
+
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(layers);
+      if (bIsOptional) {
+         defaultModel.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+      comboBox.setModel(defaultModel);
+
+      return comboBox;
+
+   }
+
+
+   private JComboBox getTableFieldSelectionTextField() {
+
+      JComboBox comboBox;
+
+      comboBox = new JComboBox();
+      ParameterTableField param;
+      Parameter parentParam;
+      final ObjectAndDescription oadArray[] = getElementsOfClass(ModelElementTableField.class, true);
+      ObjectAndDescription oad;
+      ObjectAndDescription values[];
+      String sKey;
+      final ArrayList valuesArrayList = new ArrayList();
+      for (final ObjectAndDescription element : oadArray) {
+         try {
+            oad = element;
+            sKey = (String) oad.getObject();
+            param = (ParameterTableField) m_GlobalAlgorithm.getParameters().getParameter(sKey);
+            AdditionalInfoTableField ai;
+            ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+            sKey = ai.getParentParameterName();
+            parentParam = m_GlobalAlgorithm.getParameters().getParameter(sKey);
+            if (parentParam != null /*&&
+                                                                                                                                                                                                                                                                                                                                					parentParam.getClass().equals(ParameterTable.class)*/) {
+               valuesArrayList.add(oad);
+            }
+         }
+         catch (final NullParameterAdditionalInfoException e) {
+            Sextante.addErrorToLog(e);
+         }
+         catch (final WrongParameterIDException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+      values = new ObjectAndDescription[valuesArrayList.size()];
+      for (int i = 0; i < valuesArrayList.size(); i++) {
+         values[i] = (ObjectAndDescription) valuesArrayList.get(i);
+      }
+      final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(values);
+      comboBox.setModel(jComboBoxModel);
+      comboBox.setEditable(true);
+
+      return comboBox;
+
+   }
+
+
+   private JComboBox getVectorLayerFieldSelectionTextField() {
+
+      JComboBox comboBox;
+
+      comboBox = new JComboBox();
+      ParameterTableField param;
+      Parameter parentParam;
+      final ObjectAndDescription oadArray[] = getElementsOfClass(ModelElementTableField.class, true);
+      ObjectAndDescription oad;
+      ObjectAndDescription values[];
+      String sKey;
+      final ArrayList valuesArrayList = new ArrayList();
+      for (final ObjectAndDescription element : oadArray) {
+         try {
+            oad = element;
+            sKey = (String) oad.getObject();
+            param = (ParameterTableField) m_GlobalAlgorithm.getParameters().getParameter(sKey);
+            AdditionalInfoTableField ai;
+            ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+            sKey = ai.getParentParameterName();
+            parentParam = m_GlobalAlgorithm.getParameters().getParameter(sKey);
+            if (parentParam != null) {
+               valuesArrayList.add(oad);
+            }
+         }
+         catch (final NullParameterAdditionalInfoException e) {
+            Sextante.addErrorToLog(e);
+         }
+         catch (final WrongParameterIDException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+      values = new ObjectAndDescription[valuesArrayList.size()];
+      for (int i = 0; i < valuesArrayList.size(); i++) {
+         values[i] = (ObjectAndDescription) valuesArrayList.get(i);
+      }
+      final ComboBoxModel jComboBoxModel = new DefaultComboBoxModel(values);
+      comboBox.setModel(jComboBoxModel);
+      comboBox.setSelectedIndex(-1);
+      comboBox.setEditable(true);
+
+      return comboBox;
+
+   }
+
+
+   private JComboBox getBandSelectionComboBox() {
+
+      final ObjectAndDescription layers[] = getElementsOfClass(ModelElementRasterLayer.class, true);
+
+      final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(layers[0].getObject());
+      final int iBands = ((ModelElementRasterLayer) oad.getObject()).getNumberOfBands();
+
+      if (layers.length > 0) {
+         final JComboBox comboBox = new JComboBox();
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(getBandNames(iBands));
+         comboBox.setModel(defaultModel);
+         return comboBox;
+      }
+      else {
+         return new JComboBox();
+      }
+
+   }
+
+
+   private String[] getBandNames(int iBands) {
+
+      int i;
+      final ObjectAndDescription values[] = getElementsOfClass(ModelElementBand.class, true);
+
+      if (iBands == ModelElementRasterLayer.NUMBER_OF_BANDS_UNDEFINED) {
+         iBands = MAX_BANDS;
+      }
+
+      final String sValues[] = new String[values.length + iBands];
+      for (i = 0; i < values.length; i++) {
+         sValues[i] = values[i].getDescription();
+      }
+      for (i = 0; i < iBands; i++) {
+         if ((iBands == MAX_BANDS) && (i != 0)) {
+            sValues[i + values.length] = Integer.toString(i + 1) + "[" + Sextante.getText("unchecked") + "]";
+         }
+         else {
+            sValues[i + values.length] = Integer.toString(i + 1);
+         }
+      }
+
+      return sValues;
+
+   }
+
+
+   private JComboBox getTableSelectionComboBox(final boolean bIsOptional) {
+
+      final JComboBox comboBox = new JComboBox();
+      final ObjectAndDescription[] sObjects = getElementsOfClass(ModelElementTable.class, bIsOptional);
+
+      final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(sObjects);
+      if (bIsOptional) {
+         defaultModel.insertElementAt(new ObjectAndDescription(Sextante.getText("[Not_selected]"), null), 0);
+      }
+      comboBox.setModel(defaultModel);
+
+      return comboBox;
+
+   }
+
+
+   @Override
+   public boolean assignParameters(final HashMap map) {
+
+      boolean bAssigningOK = true;
+      int i;
+      ParameterContainer parameterContainer;
+
+      for (i = 0; i < m_InputParameterContainer.size(); i++) {
+         parameterContainer = (ParameterContainer) m_InputParameterContainer.get(i);
+         if (parameterContainer.getType().equals("Table") || parameterContainer.getType().equals("Vector Layer")
+             || parameterContainer.getType().equals("Raster Layer") || parameterContainer.getType().equals("Point")) {
+            makeDataObjectAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Multiple Input")) {
+            makeMultipleInputAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Numerical Value")) {
+            bAssigningOK = makeNumericalValueAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("String")) {
+            bAssigningOK = makeStringAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Boolean")) {
+            bAssigningOK = makeBooleanAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Fixed Table")) {
+            bAssigningOK = makeFixedTableAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Filepath")) {
+            bAssigningOK = makeFilepathAssignment(map,parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Band")) {
+            bAssigningOK = makeRasterBandAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Table Field")) {
+            bAssigningOK = makeTableFieldAssignment(map, parameterContainer);
+         }
+         else if (parameterContainer.getType().equals("Selection")) {
+            bAssigningOK = makeSelectionAssignment(map, parameterContainer);
+         }
+
+         if (!bAssigningOK) {
+            return false;
+         }
+      }
+
+      /* set output objects */
+      final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+      final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+      for (i = 0; i < m_OutputParameterDefinitionContainer.size(); i++) {
+         final OutputParameterContainer opc = (OutputParameterContainer) m_OutputParameterDefinitionContainer.get(i);
+         final OutputLayerSettingsPanel olsp = (OutputLayerSettingsPanel) opc.getContainer();
+         final String sName = opc.getName() + this.m_sAlgorithmName;
+         if (olsp.getKeepAsFinalResult()) {
+            try {
+               final Output out = ooset.getOutput(opc.getName());
+               final Output outToAdd = out.getClass().newInstance();
+               outToAdd.setName(sName);
+               outToAdd.setDescription(olsp.getName());
+               oosetGlobal.add(outToAdd);
+            }
+            catch (final Exception e) {
+            }
+         }
+         else {
+            oosetGlobal.remove(sName);
+         }
+      }
+
+      return true;
+
+   }
+
+
+   protected void makeDataObjectAssignment(final HashMap map,
+                                         final ParameterContainer pc) {
+
+      Parameter parameter;
+      JComboBox container;
+      String sKey;
+      String sAssignment;
+      ObjectAndDescription oad;
+      parameter = pc.getParameter();
+      container = (JComboBox) pc.getContainer();
+      sKey = parameter.getParameterName();
+      oad = (ObjectAndDescription) container.getSelectedItem();
+      sAssignment = (String) oad.getObject();
+      map.put(sKey, sAssignment);
+
+   }
+
+
+   protected boolean makeMultipleInputAssignment(final HashMap map,
+                                               final ParameterContainer pc) {
+
+      int i;
+      boolean bMandatory;
+      boolean bContainsOnlyOptionalObjects = true;
+      Parameter parameter;
+      String sKey, sArrayKey;
+      Object object;
+      List selectedObjects;
+      final ArrayList array = new ArrayList();
+      //      MultipleInputSelectionPanel panel;
+      //
+      //      panel = (MultipleInputSelectionPanel) pc.getContainer();
+
+      final CheckComboBox ccb = (CheckComboBox) pc.getContainer();
+
+      //selectedObjects = panel.getSelectedObjects();
+      selectedObjects = ccb.getModel().getCheckeds();
+      for (i = 0; i < selectedObjects.size(); i++) {
+
+         try {
+            final ObjectAndDescription oad = (ObjectAndDescription) selectedObjects.get(i);
+            array.add(oad.getObject());
+            object = this.m_GlobalAlgorithm.getParameters().getParameter((String) oad.getObject());
+            if (object instanceof ParameterDataObject) {
+               parameter = (ParameterDataObject) object;
+               bMandatory = ((AdditionalInfoDataObject) parameter.getParameterAdditionalInfo()).getIsMandatory();
+               if (bMandatory) {
+                  bContainsOnlyOptionalObjects = false;
+               }
+            }
+            else if (object instanceof ParameterMultipleInput) {
+               parameter = (ParameterMultipleInput) object;
+               bMandatory = ((AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo()).getIsMandatory();
+               if (bMandatory) {
+                  bContainsOnlyOptionalObjects = false;
+               }
+            }
+         }
+         catch (final WrongParameterIDException e) {
+            bContainsOnlyOptionalObjects = false;
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+            return false;
+         }
+
+      }
+
+      parameter = pc.getParameter();
+      try {
+         bMandatory = ((AdditionalInfoMultipleInput) parameter.getParameterAdditionalInfo()).getIsMandatory();
+         if (bMandatory && bContainsOnlyOptionalObjects) {
+            return false;
+         }
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+      sKey = parameter.getParameterName();
+      sArrayKey = getInnerParameterKey();
+      map.put(sKey, sArrayKey);
+      m_DataObjects.put(sArrayKey, new ObjectAndDescription("Multiple Input", array));
+
+      return true;
+
+   }
+
+
+   protected boolean makeTableFieldAssignment(final HashMap map,
+                                            final ParameterContainer parameterContainer) {
+
+      ObjectAndDescription oad;
+      Parameter parameter = null;
+      String sKey = null, sInnerKey;
+      String sAssignment;
+
+      final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+      final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+
+      try {
+         parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         sKey = parameter.getParameterName();
+         final Object selItem = comboBox.getSelectedItem();
+         oad = (ObjectAndDescription) selItem;
+         sAssignment = (String) oad.getObject();
+         map.put(sKey, sAssignment);
+         return true;
+      }
+      catch (final ClassCastException e) {
+         sInnerKey = getInnerParameterKey();
+         map.put(sKey, sInnerKey);
+         m_DataObjects.put(sInnerKey, new ObjectAndDescription("Field", textField.getText()));
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   protected boolean makeSelectionAssignment(final HashMap map,
+                                           final ParameterContainer parameterContainer) {
+
+      int iIndex;
+      int iMaxIndex;
+      String sAssignment;
+      String sKey, sInnerKey;
+      Integer selection;
+
+      try {
+         final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+         final ParameterSelection parameter = (ParameterSelection) m_Algorithm.getParameters().getParameter(
+                  parameterContainer.getName());
+         final AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+         iMaxIndex = ai.getValues().length;
+         iIndex = comboBox.getSelectedIndex();
+         sKey = parameter.getParameterName();
+         if (iIndex >= iMaxIndex) {
+            final ObjectAndDescription values[] = getElementsOfClass(ModelElementSelection.class, true);
+            sAssignment = (String) values[iIndex - iMaxIndex].getObject();
+            map.put(sKey, sAssignment);
+            return true;
+         }
+         else {
+            sInnerKey = getInnerParameterKey();
+            map.put(sKey, sInnerKey);
+            selection = new Integer(iIndex);
+            m_DataObjects.put(sInnerKey, new ObjectAndDescription("Selection", selection));
+            return true;
+         }
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      return false;
+
+
+   }
+
+
+   protected boolean makeRasterBandAssignment(final HashMap map,
+                                            final ParameterContainer parameterContainer) {
+
+      int iIndex;
+      int iMaxIndex;
+      String sAssignment;
+      String sKey, sInnerKey;
+      Integer selection;
+
+      try {
+         final ParameterBand parameter = (ParameterBand) m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+         iMaxIndex = comboBox.getModel().getSize() - MAX_BANDS;
+         iIndex = comboBox.getSelectedIndex();
+         sKey = parameter.getParameterName();
+         if (iIndex < iMaxIndex) {
+            final ObjectAndDescription values[] = getElementsOfClass(ModelElementBand.class, true);
+            sAssignment = (String) values[iIndex].getObject();
+            map.put(sKey, sAssignment);
+            return true;
+         }
+         else {
+            sInnerKey = getInnerParameterKey();
+            map.put(sKey, sInnerKey);
+            selection = new Integer(iIndex - iMaxIndex);
+            m_DataObjects.put(sInnerKey, new ObjectAndDescription("Band", selection));
+            return true;
+         }
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      return false;
+
+   }
+
+
+   private boolean makeNumericalValueAssignment(final HashMap map,
+                                                final ParameterContainer parameterContainer) {
+
+      double dValue;
+      ObjectAndDescription oad;
+      Parameter parameter = null;
+      String sKey = null, sInnerKey;
+      Double value;
+      String sAssignment;
+
+      final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+      final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+      final String sValue = textField.getText();
+
+      try {
+         parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) parameter.getParameterAdditionalInfo();
+         final double dMin = ai.getMinValue();
+         final double dMax = ai.getMaxValue();
+         sKey = parameter.getParameterName();
+         final Object ob = comboBox.getSelectedItem();
+         if (ob instanceof ObjectAndDescription) {
+            oad = (ObjectAndDescription) ob;
+            sAssignment = (String) oad.getObject();
+            map.put(sKey, sAssignment);
+            return true;
+         }
+         else {
+            try {
+               dValue = Double.parseDouble(sValue);
+               if ((dValue < dMin) || (dValue > dMax)) {
+                  return false;
+               }
+               sInnerKey = getInnerParameterKey();
+               map.put(sKey, sInnerKey);
+               value = new Double(dValue);
+               m_DataObjects.put(sInnerKey, new ObjectAndDescription("Numerical Value", value));
+               return true;
+            }
+            catch (final NumberFormatException e) {
+               return false;
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   protected boolean makeFixedTableAssignment(final HashMap map,
+                                            final ParameterContainer parameterContainer) {
+
+      String sKey, sInnerKey;
+      String sAssignment;
+      FixedTableModel table;
+
+      try {
+
+         final FixedTableSelectionPanel panel = (FixedTableSelectionPanel) parameterContainer.getContainer();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         sKey = parameter.getParameterName();
+         sAssignment = panel.getTableKey();
+         if (sAssignment == null) {
+            table = panel.getTableModel();
+            sInnerKey = getInnerParameterKey();
+            map.put(sKey, sInnerKey);
+            m_DataObjects.put(sInnerKey, new ObjectAndDescription("Fixed Table", table));
+         }
+         else {
+            map.put(sKey, sAssignment);
+         }
+
+         return true;
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+   }
+
+
+   protected boolean makeStringAssignment(final HashMap map,
+                                        final ParameterContainer parameterContainer) {
+
+      ObjectAndDescription oad;
+      Parameter parameter = null;
+      String sKey = null, sInnerKey;
+      String sAssignment;
+
+      final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+      final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+
+      try {
+         parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         sKey = parameter.getParameterName();
+         final Object selItem = comboBox.getSelectedItem();
+         oad = (ObjectAndDescription) selItem;
+         sAssignment = (String) oad.getObject();
+         map.put(sKey, sAssignment);
+         return true;
+      }
+      catch (final Exception e) { //whatever it is: we can save it as a (empty) string
+         sInnerKey = getInnerParameterKey();
+         map.put(sKey, sInnerKey);
+         m_DataObjects.put(sInnerKey, new ObjectAndDescription("String", textField.getText()));
+         return true;
+      }
+   }
+
+
+   protected boolean makeFilepathAssignment(final HashMap map, final ParameterContainer parameterContainer) {
+
+	  ObjectAndDescription oad;
+	  Parameter parameter = null;
+      boolean bReturn;
+      String sKey = null, sInnerKey;
+      String sAssignment;
+     
+      final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+      final JTextField textField = (JTextField) comboBox.getEditor().getEditorComponent();
+      
+      try {
+          parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+          sKey = parameter.getParameterName();
+          final Object selItem = comboBox.getSelectedItem();
+          oad = (ObjectAndDescription) selItem;
+          sAssignment = (String) oad.getObject();
+          map.put(sKey, sAssignment);
+          return true;
+       }
+       catch (final Exception e) { //whatever it is: we can save it as a (empty) string
+          sInnerKey = getInnerParameterKey();
+          map.put(sKey, sInnerKey);
+          m_DataObjects.put(sInnerKey, new ObjectAndDescription("String", textField.getText()));
+          return true;
+       }      
+      /*
+      try {
+         final FileSelectionPanel fileSelectionPanel = (FileSelectionPanel) parameterContainer.getContainer();
+         final String sPath = fileSelectionPanel.getFilepath();
+         final Parameter parameter = m_Algorithm.getParameters().getParameter(parameterContainer.getName());
+         sKey = parameter.getParameterName();
+         sInnerKey = getInnerParameterKey();
+         map.put(sKey, sInnerKey);
+         //System.out.println ("*** makeFilePathAssignment: sInnerKey=" + sInnerKey + ", sPath=" + sPath + ".\n");
+         m_DataObjects.put(sInnerKey, new ObjectAndDescription("Filepath", sPath));
+         if ( sPath == null )
+        	 return ( false );
+         if ( sPath.length() < 1 )
+        	 return ( false );         
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+      return (true);
+      */
+      
+   }
+
+
+   protected boolean makeBooleanAssignment(final HashMap map,
+                                         final ParameterContainer parameterContainer) {
+
+      int iIndex;
+      Boolean bool;
+      String sKey, sInnerKey;
+      String sAssignment;
+
+      try {
+         final JComboBox comboBox = (JComboBox) parameterContainer.getContainer();
+         final ParameterBoolean parameter = (ParameterBoolean) m_Algorithm.getParameters().getParameter(
+                  parameterContainer.getName());
+         iIndex = comboBox.getSelectedIndex();
+         sKey = parameter.getParameterName();
+         if (iIndex >= 2) {
+            final ObjectAndDescription values[] = getElementsOfClass(ModelElementBoolean.class, true);
+            sAssignment = (String) values[iIndex - 2].getObject();
+            map.put(sKey, sAssignment);
+            return true;
+         }
+         else {
+            sInnerKey = getInnerParameterKey();
+            map.put(sKey, sInnerKey);
+            bool = new Boolean(iIndex == 0);
+            m_DataObjects.put(sInnerKey, new ObjectAndDescription("Boolean", bool));
+            return true;
+         }
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DefaultModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionPanel.java	(revision 369)
@@ -0,0 +1,121 @@
+//package es.unex.sextante.gui.modeler;
+//
+//import info.clearthought.layout.TableLayout;
+//import info.clearthought.layout.TableLayoutConstants;
+//
+//import java.awt.Frame;
+//import java.awt.event.ActionEvent;
+//import java.awt.event.ActionListener;
+//import java.util.ArrayList;
+//
+//import javax.swing.JButton;
+//import javax.swing.JPanel;
+//import javax.swing.JTextField;
+//
+//import es.unex.sextante.core.Sextante;
+//
+//public class MultipleInputSelectionPanel
+//         extends
+//            JPanel {
+//
+//   private Object[]   m_Objects;
+//   private ArrayList  m_SelectedObjects = new ArrayList();
+//   private JTextField textField;
+//   private JButton    button;
+//
+//
+//   public MultipleInputSelectionPanel(final Object[] objects) {
+//
+//      super();
+//
+//      m_Objects = objects;
+//
+//      InitGUI();
+//
+//   }
+//
+//
+//   private void InitGUI() {
+//
+//      button = new JButton("...");
+//      textField = new JTextField(Sextante.getText("0_elements_selected"));
+//      textField.setEditable(false);
+//
+//      button.addActionListener(new ActionListener() {
+//         public void actionPerformed(final ActionEvent evt) {
+//            btnActionPerformed(evt);
+//         }
+//      });
+//
+//      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 }, { TableLayoutConstants.FILL } });
+//      this.setLayout(thisLayout);
+//      this.add(textField, "0,  0");
+//      this.add(button, "1,  0");
+//   }
+//
+//
+//   public ArrayList getSelectedObjects() {
+//
+//      return m_SelectedObjects;
+//
+//   }
+//
+//
+//   public void setSelectedObjects(final ArrayList selObjects) {
+//
+//      m_SelectedObjects = selObjects;
+//      setFieldText();
+//
+//   }
+//
+//
+//   public void setObjects(final Object[] objects) {
+//
+//      m_Objects = objects;
+//
+//   }
+//
+//
+//   public void clearSelection() {
+//
+//      m_SelectedObjects.clear();
+//      textField.setText(Sextante.getText("0_elements_selected"));
+//
+//   }
+//
+//
+//   private void btnActionPerformed(final ActionEvent e) {
+//
+//      final Frame window = new Frame();
+//
+//      final MultipleInputSelectionDialog dialog = new MultipleInputSelectionDialog(window, m_Objects, m_SelectedObjects);
+//
+//      dialog.pack();
+//      dialog.setVisible(true);
+//
+//      setFieldText();
+//
+//
+//   }
+//
+//
+//   private void setFieldText() {
+//
+//
+//      int iCount;
+//      final StringBuffer sText = new StringBuffer();
+//
+//      iCount = m_SelectedObjects.size();
+//      sText.append(Integer.toString(iCount));
+//      if (iCount == 1) {
+//         sText.append(" " + Sextante.getText("element_selected"));
+//      }
+//      else {
+//         sText.append(" " + Sextante.getText("elements_selected"));
+//      }
+//
+//      textField.setText(sText.toString());
+//
+//   }
+//
+//}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionDialog.java	(revision 369)
@@ -0,0 +1,201 @@
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.CheckBoxList;
+
+/**
+ * A dialog for selecting multiples elements (raster layers, vector layers or tables)
+ *
+ * @author volaya
+ *
+ */
+public class MultipleInputSelectionDialog
+         extends
+            JDialog {
+
+   private final ArrayList    m_SelectedObjects;
+   private final ArrayList    m_SelectedObjectsOrg;
+
+   private JPanel       jPanelMain;
+   private CheckBoxList jList;
+   private JButton      jButtonCancel;
+   private JButton      jButtonOK;
+   private JScrollPane  jScrollPane;
+   private JButton      jButtonSelectAll;
+   private JButton      jButtonDeselectAll;
+   private final Object[]     m_Objects;
+
+
+   /**
+    * Creates a new dialog
+    *
+    * @param window
+    *                the parent window
+    * @param objects
+    *                an array of possible values
+    * @param selectedIndices
+    *                a list the indices of the values to show as selected when opening this dialog. If the user selects ok, the
+    *                new selection will be stored in this arraylist, clearing the previous selection. If not, it will be left
+    *                unchanged
+    */
+   public MultipleInputSelectionDialog(final Frame window,
+                                       final Object[] objects,
+                                       final ArrayList selectedIndices) {
+
+      super(window, "", true);
+
+      this.setResizable(false);
+
+      m_SelectedObjectsOrg = selectedIndices;
+      m_SelectedObjects = (ArrayList) selectedIndices.clone();
+      m_Objects = objects;
+      initGUI(objects);
+
+   }
+
+
+   private void initGUI(final Object[] values) {
+
+      int i;
+      final int iIndex;
+      final JCheckBox[] checkBox = new JCheckBox[values.length];
+
+      try {
+         this.setTitle(Sextante.getText("Multiple_selection"));
+         for (i = 0; i < values.length; i++) {
+            checkBox[i] = new JCheckBox(values[i].toString());
+         }
+         {
+            jPanelMain = new JPanel();
+            final TableLayout jPanelMainLayout = new TableLayout(new double[][] { { 5, TableLayoutConstants.FILL, 5, TableLayoutConstants.FILL, 5.0 },
+                     { 5, TableLayoutConstants.FILL, 5, 25, 5, 25, 5 } });
+            jPanelMain.setLayout(jPanelMainLayout);
+            getContentPane().add(jPanelMain, BorderLayout.CENTER);
+            jPanelMain.setPreferredSize(new java.awt.Dimension(357, 335));
+            {
+
+               jList = new CheckBoxList();
+               jList.setListData(checkBox);
+               //jList.setPreferredSize(new java.awt.Dimension(318, 293));
+               jList.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+               jScrollPane = new JScrollPane();
+               jScrollPane.setViewportView(jList);
+               jPanelMain.add(jScrollPane, "1,1,3,1");
+            }
+            {
+               jButtonOK = new JButton();
+               jPanelMain.add(jButtonOK, "1,5");
+               jButtonOK.setText(Sextante.getText("OK"));
+               jButtonOK.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     btnOKActionPerformed(evt);
+                  }
+               });
+            }
+            {
+               jButtonCancel = new JButton();
+               jPanelMain.add(jButtonCancel, "3,5");
+               jButtonCancel.setText(Sextante.getText("Cancel"));
+               jButtonCancel.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     btnCancelActionPerformed(evt);
+                  }
+               });
+            }
+            {
+               jButtonSelectAll = new JButton();
+               jPanelMain.add(jButtonSelectAll, "1,3");
+               jButtonSelectAll.setText(Sextante.getText("Select_all"));
+               jButtonSelectAll.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     selectAll(true);
+                  }
+               });
+            }
+            {
+               jButtonDeselectAll = new JButton();
+               jPanelMain.add(jButtonDeselectAll, "3,3");
+               jButtonDeselectAll.setText(Sextante.getText("Deselect_all"));
+               jButtonDeselectAll.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     selectAll(false);
+                  }
+               });
+            }
+         }
+         for (i = 0; i < m_SelectedObjects.size(); i++) {
+            for (int j = 0; j < m_Objects.length; j++) {
+               final ObjectAndDescription oad = (ObjectAndDescription) m_Objects[j];
+               final String sKey = ((String) m_SelectedObjects.get(i));
+               if (oad.getObject().equals(sKey)) {
+                  checkBox[j].setSelected(true);
+               }
+            }
+         }
+         {
+            this.setSize(365, 369);
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void selectAll(final boolean bSelect) {
+
+      int i;
+
+      for (i = 0; i < jList.getModel().getSize(); i++) {
+         final JCheckBox checkBox = (JCheckBox) jList.getModel().getElementAt(i);
+         checkBox.setSelected(bSelect);
+      }
+      jList.updateUI();
+
+   }
+
+
+   private void btnOKActionPerformed(final ActionEvent evt) {
+
+      int i;
+      m_SelectedObjectsOrg.clear();
+
+      for (i = 0; i < jList.getModel().getSize(); i++) {
+         final JCheckBox checkBox = (JCheckBox) jList.getModel().getElementAt(i);
+         if (checkBox.isSelected()) {
+            m_SelectedObjectsOrg.add(((ObjectAndDescription) m_Objects[i]).getObject());
+         }
+      }
+
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private void btnCancelActionPerformed(final ActionEvent evt) {
+
+      dispose();
+      setVisible(false);
+
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/MultipleInputSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CustomCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CustomCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CustomCellRenderer.java	(revision 369)
@@ -0,0 +1,77 @@
+package es.unex.sextante.gui.modeler;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeCellRenderer;
+
+public class CustomCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+   ImageIcon m_Icon;
+
+
+   public CustomCellRenderer(final ImageIcon icon) {
+
+      setOpaque(false);
+      setBackground(null);
+      m_Icon = icon;
+
+   }
+
+
+   protected Icon getCustomIcon(final Object value) {
+
+      if (((DefaultMutableTreeNode) value).getUserObject() instanceof String) {
+         return null;
+      }
+      else {
+         return m_Icon;
+      }
+
+   }
+
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean sel,
+                                                 final boolean expanded,
+                                                 boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      String sName;
+
+      setFont(tree.getFont());
+      this.setIcon(getCustomIcon(value));
+
+      sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+      setEnabled(tree.isEnabled());
+      setText(sName);
+      if (!leaf) {
+         setFont(new java.awt.Font("Tahoma", 1, 11));
+         setForeground(Color.black);
+      }
+      else {
+         if (sel) {
+            setForeground(Color.blue);
+         }
+         else {
+            setForeground(Color.black);
+         }
+      }
+
+      return this;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/CustomCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelGraphPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelGraphPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelGraphPanel.java	(revision 369)
@@ -0,0 +1,735 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseWheelEvent;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JDialog;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+
+import org.jgraph.JGraph;
+import org.jgraph.event.GraphModelEvent;
+import org.jgraph.event.GraphModelListener;
+import org.jgraph.graph.DefaultEdge;
+import org.jgraph.graph.DefaultGraphCell;
+import org.jgraph.graph.DefaultGraphModel;
+import org.jgraph.graph.DefaultGraphSelectionModel;
+import org.jgraph.graph.GraphConstants;
+import org.jgraph.graph.GraphModel;
+import org.jgraph.graph.GraphSelectionModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.IGUIFactory;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.parameters.ParameterPanel;
+import es.unex.sextante.gui.modeler.parameters.ParameterPanelFactory;
+import es.unex.sextante.modeler.elements.ModelElementFactory;
+import es.unex.sextante.parameters.Parameter;
+
+
+public class ModelGraphPanel
+         extends
+            JScrollPane {
+
+   private ModelAlgorithm     m_Algorithm;
+   private final HashMap      m_DataObjects;
+   private final ArrayList    m_InputKeys;
+   private JGraph             jGraph;
+   private DefaultGraphSelectionModel SelectionModel;
+   private final Icon         m_InputIcon;
+   private final Icon         m_ProcessIcon;
+   private int                m_iInputs;
+   private final ModelerPanel m_ModelerPanel;
+   private JPopupMenu         popupMenu;
+   private DefaultGraphCell   m_ActiveCell = null;
+   private final HashMap      m_Coords;
+   private final JDialog      m_Parent;
+   private JMenuItem          menuItemEdit;
+   
+   private final static double 	  d_Opacity = 0.66; // opacity setting (%) for new nodes
+
+
+   public ModelGraphPanel(final ModelAlgorithm algorithm,
+                          final HashMap dataObjects,
+                          final ArrayList inputKeys,
+                          final ModelerPanel modelerPanel,
+                          final JDialog parent) {
+
+      m_DataObjects = dataObjects;
+      m_InputKeys = inputKeys;
+      m_Algorithm = algorithm;
+      m_ModelerPanel = modelerPanel;
+      m_Coords = new HashMap();
+      m_Parent = parent;
+
+      m_InputIcon = new ImageIcon(getClass().getClassLoader().getResource("images/list-add.png"));
+      m_ProcessIcon = new ImageIcon(getClass().getClassLoader().getResource("images/module2.png"));
+      
+      this.setWheelScrollingEnabled(false);
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      JMenuItem menuItem;
+      popupMenu = new JPopupMenu("Menu");
+
+
+      menuItemEdit = new JMenuItem(Sextante.getText("Edit"));
+
+      menuItemEdit.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            final Object ob = m_ActiveCell.getUserObject();
+            //System.out.println(ob.getClass());
+            editCell((ObjectAndDescription) ob);
+         }
+      });
+      popupMenu.add(menuItemEdit);
+
+
+      menuItem = new JMenuItem(Sextante.getText("Remove"));
+      menuItem.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+        	boolean removed;
+            final Object ob = m_ActiveCell.getUserObject();
+            final String sKey = (String) ((ObjectAndDescription) ob).getObject();
+            removed=m_ModelerPanel.removeElement(sKey);
+            m_ModelerPanel.setHasChanged(removed);
+         }
+      });
+      popupMenu.add(menuItem);
+
+      updateGraph();
+
+   }
+
+
+   @Override
+   public void update(final Graphics g) {
+
+      super.update(g);
+
+   }
+
+
+   public void updateGraph() {
+
+      int i;
+      String sKey;
+
+      m_iInputs = 0;
+
+      initGraph();
+
+      for (i = 0; i < m_InputKeys.size(); i++) {
+         sKey = (String) m_InputKeys.get(i);
+         addInput(sKey);
+      }
+
+      final ArrayList algKeys = m_Algorithm.getAlgorithmKeys();
+
+      for (i = 0; i < algKeys.size(); i++) {
+         sKey = (String) algKeys.get(i);
+         addAlgorithm(sKey);
+      }
+
+      if ( m_ModelerPanel.getGridEnabled() == true ) {
+    	  jGraph.setGridEnabled(true);
+    	  jGraph.setGridVisible(true);
+    	  jGraph.setGridSize(m_ModelerPanel.getGridSize());    	  
+      }
+      
+	  jGraph.setScale(m_ModelerPanel.getScale());
+      
+      this.setViewportView(jGraph);
+
+   }
+
+   
+   public JGraph getGraph () {
+	   return (jGraph);
+   }
+   
+   
+   private void initGraph() {
+
+      final GraphModel model = new DefaultGraphModel();
+      jGraph = new JGraph(model);
+
+      jGraph.setCloneable(false);
+      jGraph.setInvokesStopCellEditing(true);
+      jGraph.setJumpToDefaultPort(true);
+      jGraph.setConnectable(false);
+      jGraph.setDisconnectable(false);
+      jGraph.setEditable(false);
+      jGraph.setAntiAliased(true);
+      jGraph.setSizeable(true);
+      jGraph.setEnabled(true);
+      
+      SelectionModel = new DefaultGraphSelectionModel(jGraph);
+      SelectionModel.setSelectionMode(GraphSelectionModel.SINGLE_GRAPH_SELECTION);
+      jGraph.setSelectionModel(SelectionModel);
+
+      jGraph.addMouseListener(new MouseAdapter() {
+         @Override
+         public void mousePressed(final MouseEvent e) {
+            if (e.getButton() == MouseEvent.BUTTON3) {
+               showPopupMenu(e);
+               return;
+            }            
+            if (e.getClickCount() == 2) {
+               editCell(e);
+               return;
+            }
+                        
+            final int x = e.getX();
+            final int y = e.getY();
+            final DefaultGraphCell cell = (DefaultGraphCell) jGraph.getFirstCellForLocation(x, y);
+            if ( cell != null ) {
+            	final ObjectAndDescription oad = (ObjectAndDescription) cell.getUserObject();
+            	if ( oad != null ) {
+            		final String sKey = (String) oad.getObject();
+            		final Object usrObj = m_ModelerPanel.getObjectFromKey(sKey);            	
+            		if ( usrObj instanceof GeoAlgorithm || usrObj instanceof ObjectAndDescription ) {            		
+            			m_ModelerPanel.toggleEditButtons(true, oad);
+            			jGraph.scrollCellToVisible(cell);
+            		}
+            	}
+            } else {
+            	m_ModelerPanel.toggleEditButtons(false, null);
+            }            
+         }         
+      });
+      
+      jGraph.addMouseWheelListener(new MouseAdapter() {
+    	  public void mouseWheelMoved(MouseWheelEvent e) {
+    		  int notches = e.getWheelRotation();
+    		  if (notches < 0) {
+    			  //Mouse wheel moved UP
+    			  m_ModelerPanel.zoomPlus();
+    		  } else {
+    			  //Mouse wheel moved DOWN
+    			  m_ModelerPanel.zoomMinus();
+    		  }
+    	  }
+      });
+      
+      jGraph.addKeyListener(new KeyAdapter () {
+    	  public void keyPressed(KeyEvent e) {
+    		  boolean removed;
+    		  if ( e.getKeyCode() == e.VK_DELETE || e.getKeyCode() == e.VK_BACK_SPACE ) {
+    			  final DefaultGraphCell cell = (DefaultGraphCell) jGraph.getSelectionCell();
+    			  if ( cell != null ) {
+    				  final ObjectAndDescription oad = (ObjectAndDescription) cell.getUserObject();
+    				  final String sKey = (String) (oad.getObject());
+    				  removed = m_ModelerPanel.removeElement(sKey);
+    				  m_ModelerPanel.setHasChanged(removed);
+    			  }
+    		  }
+    	  }    	  
+      });
+      
+      jGraph.getModel().addGraphModelListener(new GraphModelListener() {
+
+		public void graphChanged(GraphModelEvent e) {
+			m_ModelerPanel.setHasChanged(true);			
+		}    	  
+      });
+
+   }
+
+
+   void storeCoords() {
+
+      if (jGraph == null) {
+         return;
+      }
+
+      int i;
+      final GraphModel model = jGraph.getModel();
+      DefaultGraphCell cell;
+      ObjectAndDescription oad;
+      String sCellKey;
+
+      m_Coords.clear();
+
+      for (i = 0; i < model.getRootCount(); i++) {
+         try {
+            cell = (DefaultGraphCell) model.getRootAt(i);
+            oad = (ObjectAndDescription) cell.getUserObject();
+            sCellKey = (String) oad.getObject();
+            
+            cell.getAttributes();
+            final Rectangle2D rect = GraphConstants.getBounds(cell.getAttributes());
+            m_Coords.put(sCellKey, rect);
+         }
+         catch (final Exception e) {
+         }
+      }
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      final int x = e.getX();
+      final int y = e.getY();
+
+      m_ActiveCell = (DefaultGraphCell) jGraph.getFirstCellForLocation(x, y);
+
+      if (m_ActiveCell == null) {
+         return;
+      }
+
+      final Object ob = m_ActiveCell.getUserObject();
+
+      if (ob != null) {
+         //ObjectAndDescription oad = (ObjectAndDescription) ob;
+         //menuItemEdit.setVisible(oad.getObject() instanceof GeoAlgorithm);
+         popupMenu.show(e.getComponent(), x, y);
+      }
+
+
+   }
+
+
+   private void editCell(final MouseEvent e) {
+
+      final int x = e.getX();
+      final int y = e.getY();
+      final DefaultGraphCell cell = (DefaultGraphCell) jGraph.getFirstCellForLocation(x, y);
+
+      if (cell != null) {
+         try {
+            final ObjectAndDescription oad = (ObjectAndDescription) cell.getUserObject();
+            editCell(oad);
+         }
+         catch (final Exception ex) {
+            ex.printStackTrace();
+         }
+      }
+
+   }
+
+
+   public void editCell(ObjectAndDescription oad) {
+
+	   try {
+		   final String sDescription = oad.getDescription();
+		   final String sKey = (String) oad.getObject();
+		   final Object usrObj = m_ModelerPanel.getObjectFromKey(sKey);
+
+		   if (usrObj instanceof GeoAlgorithm) {
+			   final GeoAlgorithm alg = (GeoAlgorithm) usrObj;
+			   GeoAlgorithmModelerParametersPanel paramPanel = null;
+			   Class paramPanelClass = SextanteGUI.getModelerParametersPanel(alg.getCommandLineName());
+			   if (paramPanelClass == null) {
+				   paramPanelClass = SextanteGUI.getGUIFactory().getDefaultModelerParametersPanel();
+			   }
+			   try {
+				   paramPanel = (GeoAlgorithmModelerParametersPanel) paramPanelClass.newInstance();
+			   }
+			   catch (final Exception e) {
+				   try {
+					   paramPanel = SextanteGUI.getGUIFactory().getDefaultModelerParametersPanel().newInstance();
+				   }
+				   catch (final Exception e1) {
+				   }
+			   }
+			   AlgorithmDialog dialog;
+			   if (m_Parent == null) {
+				   dialog = new AlgorithmDialog(alg, sKey, sDescription, m_Algorithm, paramPanel, m_DataObjects);
+			   }
+			   else {
+				   dialog = new AlgorithmDialog(alg, sKey, sDescription, m_Algorithm, paramPanel, m_DataObjects, m_Parent);
+			   }
+			   dialog.pack();
+			   dialog.setTitle(Sextante.getText("modeler_edit_algorithm") + " (" + alg.getName() + ")");
+			   dialog.setVisible(true);
+			   if (dialog.getDialogReturn() == IGUIFactory.OK) {
+				   m_ModelerPanel.setHasChanged(true);
+				   m_ModelerPanel.updatePanel(true);
+			   }
+		   }
+		   else if (usrObj instanceof ObjectAndDescription) { // Got an input parameter
+			   final ParametersSet params = m_ModelerPanel.getAlgorithm().getParameters();
+			   Parameter param = params.getParameter(sKey);
+			   final ParameterPanel paramPanel = getParameterPanel(param);			   
+			   if (paramPanel != null) {
+				   paramPanel.setColor( new Color(
+						   	param.getColorR(),
+  						 	param.getColorG(),
+  						 	param.getColorB(),
+  						 	param.getColorAlpha()
+  				   ));
+				   paramPanel.getColorComboBox().getComboBox().setBackground(new Color(
+						   	param.getColorR(),
+  						 	param.getColorG(),
+  						 	param.getColorB(),
+  						 	param.getColorAlpha()
+  				   ));
+				   paramPanel.updateOptions();
+				   paramPanel.setParameter(param); // Restore current settings
+				   paramPanel.pack();
+				   paramPanel.setTitle(Sextante.getText("modeler_edit_parameter"));
+				   paramPanel.setVisible(true);
+				   Parameter newParam = paramPanel.getParameter(); 
+				   if (newParam != null) {
+					   /* store new settings for this parameter */
+					   param.setColorR(paramPanel.getColor().getRed());
+					   param.setColorG(paramPanel.getColor().getGreen());
+					   param.setColorB(paramPanel.getColor().getBlue());
+					   param.setColorAlpha(paramPanel.getColor().getAlpha());					   					   
+					   final AdditionalInfo ai = newParam.getParameterAdditionalInfo();					   
+					   param.setParameterAdditionalInfo(ai);			
+					   param.setParameterDescription(newParam.getParameterDescription());
+					   oad = new ObjectAndDescription(param.getParameterDescription(),
+							   ModelElementFactory.getParameterAsModelElement(newParam));					   
+					   m_DataObjects.put(sKey, oad);
+					   m_ModelerPanel.setHasChanged(true);
+					   m_ModelerPanel.updatePanel(true);
+				   }
+			   }
+		   }
+	   }
+	   catch (final Exception ex) {
+		   ex.printStackTrace();
+	   }
+
+   }
+
+
+   private ParameterPanel getParameterPanel(final Parameter param) {
+
+      return ParameterPanelFactory.getParameterPanel(param, m_ModelerPanel, m_Parent);
+
+   }
+
+
+   public void addInput(final String sKey) {
+
+      double x, y, w, h;
+      int R,G,B,Alpha;
+
+      try {
+         final ObjectAndDescription oad = (ObjectAndDescription) m_ModelerPanel.getObjectFromKey(sKey);
+         if (oad != null) {
+            final Rectangle2D box = getBoundingBox();
+            x = box.getMaxX() + 20;
+            y = 20;
+            w = 45;
+            h = 45;
+            final Rectangle2D rect = (Rectangle2D) m_Coords.get(sKey);
+            if (rect != null) {
+               x = rect.getMinX();
+               y = rect.getMinY();
+               w = rect.getWidth();
+               h = rect.getHeight();
+            }
+            final ParametersSet params = m_ModelerPanel.getAlgorithm().getParameters();
+            Parameter param = params.getParameter(sKey);
+            R = param.getColorR();
+            G = param.getColorG();
+            B = param.getColorB();
+            Alpha = param.getColorAlpha();
+            final DefaultGraphCell cell = createInputVertex(new ObjectAndDescription(oad.getDescription(), sKey), 
+            												x, y, w, h,
+            												R, G, B, Alpha );
+            jGraph.getGraphLayoutCache().insert(cell);
+
+            m_iInputs++;
+            
+            m_ModelerPanel.repaint();
+         }
+      }
+      catch (final ClassCastException e) {
+      } catch (WrongParameterIDException e) {
+		e.printStackTrace();
+	}
+
+   }
+
+
+   public void addAlgorithm(String sKey) {
+
+      int i;
+      double x, y, w, h;
+      ArrayList dependences;
+      DefaultGraphCell cell, parentCell;
+      DefaultEdge edge;
+
+      final Object obj = m_ModelerPanel.getObjectFromKey(sKey);
+      if (obj instanceof GeoAlgorithm) {
+         final GeoAlgorithm alg = (GeoAlgorithm) obj;
+         //final ObjectAndDescription oad = new ObjectAndDescription(alg.getName(), sKey);
+         final ObjectAndDescription oad = new ObjectAndDescription(alg.getDescription(), sKey);
+         final Rectangle2D box = getBoundingBox();
+         x = box.getMaxX() + 20;
+         y = box.getMaxY() + 20;
+         w = 45;
+         h = 45;
+         if (!isAlgorithmAlreadyAdded(sKey)) {
+            final Rectangle2D rect = (Rectangle2D) m_Coords.get(sKey);
+            if (rect != null) {
+               x = rect.getMinX();
+               y = rect.getMinY();
+               w = rect.getWidth();
+               h = rect.getHeight();
+            }
+            cell = createProcessVertex(oad, x, y, w, h, alg.getColorR(), alg.getColorG(), alg.getColorB(), alg.getColorAlpha());
+            jGraph.getGraphLayoutCache().insert(cell);
+            dependences = m_ModelerPanel.getDependences(sKey);
+            for (i = 0; i < dependences.size(); i++) {
+               sKey = (String) dependences.get(i);
+               addAlgorithm(sKey);
+               parentCell = getCellFromKey(sKey);
+               edge = createEdge(cell, parentCell);
+               jGraph.getGraphLayoutCache().insert(edge);
+            }
+         }
+      }
+
+   }
+
+
+   private Rectangle2D getBoundingBox() {
+
+      double dMaxX = 0;
+      double dMaxY = 0;
+      Rectangle2D rect;
+      String sKey;
+
+      final Set set = m_Coords.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         sKey = (String) iter.next();
+         rect = (Rectangle2D) m_Coords.get(sKey);
+         dMaxX = Math.max(rect.getMaxX(), dMaxX);
+         dMaxY = Math.max(rect.getMaxY(), dMaxY);
+      }
+
+
+      return new Rectangle2D.Double(0, 0, dMaxX, dMaxY);
+
+   }
+
+
+   private boolean isAlgorithmAlreadyAdded(final String sKey) {
+
+      final DefaultGraphCell cell = getCellFromKey(sKey);
+
+      return (cell != null);
+
+   }
+
+
+   private DefaultGraphCell getCellFromKey(final String sKey) {
+
+      int i;
+      final GraphModel model = jGraph.getModel();
+      DefaultGraphCell cell;
+      ObjectAndDescription oad;
+      String sCellKey;
+
+      for (i = 0; i < model.getRootCount(); i++) {
+         try {
+            cell = (DefaultGraphCell) model.getRootAt(i);
+            oad = (ObjectAndDescription) cell.getUserObject();
+            sCellKey = (String) oad.getObject();
+            if (sKey.equals(sCellKey)) {
+               return cell;
+            }
+         }
+         catch (final Exception e) {
+         }
+      }
+
+      return null;
+
+   }
+
+
+   private DefaultEdge createEdge(final DefaultGraphCell cell,
+                                  final DefaultGraphCell parentCell) {
+
+      DefaultEdge edge;
+
+      edge = new DefaultEdge();
+
+      edge.setSource(parentCell.getChildAt(0));
+      edge.setTarget(cell.getChildAt(0));
+
+      GraphConstants.setLineEnd(edge.getAttributes(), GraphConstants.ARROW_CLASSIC);
+      GraphConstants.setEndFill(edge.getAttributes(), true);
+
+      return edge;
+
+   }
+
+
+   private DefaultGraphCell createInputVertex(final ObjectAndDescription oad,
+                                              final double x,
+                                              final double y,
+                                              final double w,
+                                              final double h,
+                                              final int R,
+                                              final int G,
+                                              final int B,
+                                              final int Alpha ) {
+
+      return createVertex(oad, x, y, w, h, m_InputIcon, R, G, B, Alpha );
+
+
+   }
+
+
+   private DefaultGraphCell createProcessVertex(final ObjectAndDescription oad,
+                                                final double x,
+                                                final double y,
+                                                final double w,
+                                                final double h,
+                                                final int R,
+                                                final int G,
+                                                final int B,
+                                                final int Alpha ) {
+
+      final GeoAlgorithm alg = (GeoAlgorithm) m_ModelerPanel.getObjectFromKey((String) oad.getObject());
+
+      return createVertex(oad, x, y, w, h, SextanteGUI.getAlgorithmIcon(alg), R, G, B, Alpha);
+
+   }
+
+
+   private DefaultGraphCell createVertex(final Object obj,
+                                         final double x,
+                                         final double y,
+                                         final double w,
+                                         final double h,
+                                         final Icon icon,
+                                         final int R,
+                                         final int G,
+                                         final int B,
+                                         final int Alpha ) {
+
+      final DefaultGraphCell cell = new DefaultGraphCell(obj);
+            
+      GraphConstants.setBounds(cell.getAttributes(), new Rectangle2D.Double(x, y, w, h));
+
+      GraphConstants.setResize(cell.getAttributes(), false);
+                  
+      GraphConstants.setIcon(cell.getAttributes(), icon);
+      GraphConstants.setAutoSize(cell.getAttributes(), false);
+
+      GraphConstants.setBorder(cell.getAttributes(), BorderFactory.createEtchedBorder());
+      GraphConstants.setBorderColor(cell.getAttributes(), Color.black);      
+      GraphConstants.setBackground(cell.getAttributes(), new Color( R, G, B, (int) (Alpha*d_Opacity) ) );
+      if ( R < 50 && G < 50 && B < 50 ) {
+    	  GraphConstants.setForeground(cell.getAttributes(), Color.white);
+      } else {
+    	  GraphConstants.setForeground(cell.getAttributes(), Color.black);    	  
+      }
+      
+      GraphConstants.setOpaque(cell.getAttributes(), true);
+
+      GraphConstants.setInset(cell.getAttributes(), 10);
+      GraphConstants.setMoveable(cell.getAttributes(), true);
+      
+      GraphConstants.setSizeable(cell.getAttributes(), true);
+
+      cell.addPort();
+
+      return cell;
+
+   }
+
+
+   public void removeCell(final String sKey) {
+
+      int i, j;
+      Object obj;
+      String sCellKey;
+      final GraphModel model = jGraph.getModel();
+      DefaultGraphCell cell;
+      Object[] elementsToRemove;
+
+      for (i = 0; i < model.getRootCount(); i++) {
+         obj = model.getRootAt(i);
+         if (obj instanceof DefaultGraphCell) {
+            cell = (DefaultGraphCell) obj;
+            sCellKey = (String) ((ObjectAndDescription) cell.getUserObject()).getObject();
+            if (sCellKey.equals(sKey)) {
+               final ArrayList listEdges = new ArrayList();
+               final int numChildren = model.getChildCount(cell);
+               for (j = 0; j < numChildren; j++) {
+                  final Object port = model.getChild(cell, j);
+                  if (model.isPort(port)) {
+                     final Iterator iter = model.edges(port);
+                     while (iter.hasNext()) {
+                        listEdges.add(iter.next());
+                     }
+                  }
+               }
+               elementsToRemove = new Object[listEdges.size() + 1];
+               for (j = 0; j < listEdges.size(); j++) {
+                  elementsToRemove[j] = listEdges.get(j);
+               }
+               elementsToRemove[j] = cell;
+               model.remove(elementsToRemove);
+               return;
+            }
+         }
+      }
+
+   }
+
+
+   public void setAlgorithm(final ModelAlgorithm alg) {
+
+      m_Algorithm = alg;
+
+   }
+
+
+   public void resetCoords() {
+
+      initGraph();
+      m_Coords.clear();
+
+   }
+
+
+   public HashMap getCoords() {
+
+      return m_Coords;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelGraphPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/InputsPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/InputsPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/InputsPanel.java	(revision 369)
@@ -0,0 +1,453 @@
+package es.unex.sextante.gui.modeler;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeCellRenderer;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.modeler.parameters.BooleanPanel;
+import es.unex.sextante.gui.modeler.parameters.FixedTablePanel;
+import es.unex.sextante.gui.modeler.parameters.MultipleInputPanel;
+import es.unex.sextante.gui.modeler.parameters.NumericalValuePanel;
+import es.unex.sextante.gui.modeler.parameters.ParameterPanel;
+import es.unex.sextante.gui.modeler.parameters.PointPanel;
+import es.unex.sextante.gui.modeler.parameters.Raster3DLayerPanel;
+import es.unex.sextante.gui.modeler.parameters.RasterBandPanel;
+import es.unex.sextante.gui.modeler.parameters.RasterLayerPanel;
+import es.unex.sextante.gui.modeler.parameters.SelectionPanel;
+import es.unex.sextante.gui.modeler.parameters.StringPanel;
+import es.unex.sextante.gui.modeler.parameters.TableFieldPanel;
+import es.unex.sextante.gui.modeler.parameters.TablePanel;
+import es.unex.sextante.gui.modeler.parameters.VectorLayerPanel;
+import es.unex.sextante.gui.modeler.parameters.FilepathPanel;
+import es.unex.sextante.modeler.elements.ModelElementFactory;
+import es.unex.sextante.parameters.Parameter;
+
+public class InputsPanel
+         extends
+            JPanel {
+
+   private JTree              jTree;
+   private JScrollPane        jScrollPaneTree;
+   private final HashMap      m_DataObjects;
+   private final ArrayList    m_InputKeys;
+   private final ModelerPanel m_ModelerPanel;
+   private final JDialog      m_Parent;
+
+
+   public InputsPanel(final ModelerPanel modelerPanel,
+                      final JDialog parent) {
+
+      super();
+
+      //m_iParameterID = 1;
+      m_DataObjects = modelerPanel.getDataObjects();
+      m_InputKeys = modelerPanel.getInputKeys();
+      m_ModelerPanel = modelerPanel;
+      m_Parent = parent;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      jScrollPaneTree = new JScrollPane();
+      jTree = new JTree();
+      jScrollPaneTree.setViewportView(jTree);
+      final MouseListener ml = new MouseAdapter() {
+         @Override
+         public void mousePressed(MouseEvent e) {
+            TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+            if (e.getClickCount() == 2) {
+               addSelectedInput(path);
+            }
+         }
+      };
+      jTree.addMouseListener(ml);
+      jTree.setCellRenderer(new MyCellRenderer());
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+      this.add(jScrollPaneTree, BorderLayout.CENTER);
+      fillTree();
+
+   }
+
+
+   private void fillTree() {
+
+	   DefaultMutableTreeNode node;
+	   final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("node_Inputs"));
+	     final DefaultMutableTreeNode layersNode = new DefaultMutableTreeNode(Sextante.getText("node_Layers"));
+	       mainNode.add(layersNode);
+	         node = new DefaultMutableTreeNode(getNewVectorLayerPanel());
+	         layersNode.add(node);
+	         node = new DefaultMutableTreeNode(getNewRasterLayerPanel());
+	         layersNode.add(node);
+	         node = new DefaultMutableTreeNode(getNewRasterBandPanel());
+	         layersNode.add(node);
+	         node = new DefaultMutableTreeNode(getNew3DRasterLayerPanel());
+	         layersNode.add(node);
+	     final DefaultMutableTreeNode valuesNode = new DefaultMutableTreeNode(Sextante.getText("node_Values"));
+	       mainNode.add(valuesNode);
+	         node = new DefaultMutableTreeNode(getNewNumericalValuePanel());
+	         valuesNode.add(node);
+	         node = new DefaultMutableTreeNode(getNewStringPanel());
+	         valuesNode.add(node);
+	         node = new DefaultMutableTreeNode(getNewBooleanPanel());
+	         valuesNode.add(node);
+		 final DefaultMutableTreeNode fandtNode = new DefaultMutableTreeNode(Sextante.getText("node_Fields_and_Tables"));
+		   mainNode.add(fandtNode);	         
+		     node = new DefaultMutableTreeNode(getNewTableFieldPanel());
+		     fandtNode.add(node);
+		     node = new DefaultMutableTreeNode(getNewTablePanel());
+		     fandtNode.add(node);
+		     node = new DefaultMutableTreeNode(getNewFixedTablePanel());
+		     fandtNode.add(node);      
+		 final DefaultMutableTreeNode othersNode = new DefaultMutableTreeNode(Sextante.getText("node_Others"));
+		   mainNode.add(othersNode);
+	         node = new DefaultMutableTreeNode(getNewFilepathPanel());
+	         othersNode.add(node);		   
+	         node = new DefaultMutableTreeNode(getNewPointPanel());
+	         othersNode.add(node);	   	   
+	         node = new DefaultMutableTreeNode(getNewMultipleInputPanel());
+	         othersNode.add(node);
+	         node = new DefaultMutableTreeNode(getNewSelectionPanel());
+	         othersNode.add(node);
+	   jTree.setModel(new DefaultTreeModel(mainNode));
+
+   }
+
+
+   public JTree getTree () {
+	   return ( jTree );
+   }
+   
+   
+   private Object getNewNumericalValuePanel() {
+
+      if (m_Parent != null) {
+         return new NumericalValuePanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new NumericalValuePanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewBooleanPanel() {
+
+      if (m_Parent != null) {
+         return new BooleanPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new BooleanPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewRasterLayerPanel() {
+
+      if (m_Parent != null) {
+         return new RasterLayerPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new RasterLayerPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewRasterBandPanel() {
+
+      if (m_Parent != null) {
+         return new RasterBandPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new RasterBandPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNew3DRasterLayerPanel() {
+
+      if (m_Parent != null) {
+         return new Raster3DLayerPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new Raster3DLayerPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewVectorLayerPanel() {
+
+      if (m_Parent != null) {
+         return new VectorLayerPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new VectorLayerPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewStringPanel() {
+
+      if (m_Parent != null) {
+         return new StringPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new StringPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewTableFieldPanel() {
+
+      if (m_Parent != null) {
+         return new TableFieldPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new TableFieldPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewTablePanel() {
+
+      if (m_Parent != null) {
+         return new TablePanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new TablePanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewPointPanel() {
+
+      if (m_Parent != null) {
+         return new PointPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new PointPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewFixedTablePanel() {
+
+      if (m_Parent != null) {
+         return new FixedTablePanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new FixedTablePanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewSelectionPanel() {
+
+      if (m_Parent != null) {
+         return new SelectionPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new SelectionPanel(m_ModelerPanel);
+      }
+
+   }
+
+
+   private Object getNewMultipleInputPanel() {
+
+      if (m_Parent != null) {
+         return new MultipleInputPanel(m_Parent, m_ModelerPanel);
+      }
+      else {
+         return new MultipleInputPanel(m_ModelerPanel);
+      }
+
+   }
+
+   
+   private Object getNewFilepathPanel() {
+
+	      if (m_Parent != null) {
+	         return new FilepathPanel(m_Parent, m_ModelerPanel);
+	      }
+	      else {
+	         return new FilepathPanel(m_ModelerPanel);
+	      }
+
+		}
+
+
+   public void addSelectedInput() {
+
+      addSelectedInput(jTree.getSelectionPath());
+
+   }
+
+
+   protected void addSelectedInput(final TreePath path) {
+
+      Parameter param;
+      ObjectAndDescription oad;
+      String sKey;
+
+      if (path == null) {
+         return;
+      }
+
+      try {
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         if (node.getUserObject() instanceof ParameterPanel) {
+            final ParameterPanel paramPanel = (ParameterPanel) node.getUserObject();
+            if (paramPanel.parameterCanBeAdded()) {
+               paramPanel.updateOptions();
+               paramPanel.pack();
+               paramPanel.setVisible(true);
+               param = paramPanel.getParameter();
+               if (param != null) {
+                  sKey = getValidName();
+                  param.setParameterName(sKey);
+                  m_ModelerPanel.getAlgorithm().addInput(param);
+                  oad = new ObjectAndDescription(param.getParameterDescription(),
+                           ModelElementFactory.getParameterAsModelElement(param));
+                  m_DataObjects.put(sKey, oad);
+                  m_InputKeys.add(sKey);
+                  m_ModelerPanel.setHasChanged(true);
+                  m_ModelerPanel.getGraph().addInput(sKey);
+                  m_ModelerPanel.updatePanel(true);
+               }
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public String getValidName() {
+
+      boolean bFound;
+      int i = 0;
+      String sName;
+
+      do {
+         sName = "INPUT" + Integer.toString(i);
+         if (this.m_InputKeys.contains(sName)) {
+            i++;
+            bFound = false;
+         }
+         else {
+            bFound = true;
+         }
+
+      }
+      while (!bFound);
+
+      return sName;
+
+   }
+
+   class MyCellRenderer
+            extends
+               JLabel
+            implements
+               TreeCellRenderer {
+
+      ImageIcon m_ModuleIcon = new ImageIcon(getClass().getClassLoader().getResource("images/list-add.png"));
+
+
+      protected Icon getCustomIcon(final Object value) {
+
+         if (((DefaultMutableTreeNode) value).getUserObject() instanceof ParameterPanel) {
+            return m_ModuleIcon;
+         }
+         else {
+            return null;
+         }
+
+      }
+
+
+      public Component getTreeCellRendererComponent(final JTree tree,
+                                                    final Object value,
+                                                    final boolean sel,
+                                                    final boolean expanded,
+                                                    boolean leaf,
+                                                    final int row,
+                                                    final boolean hasFocus) {
+
+         String sName;
+
+         setFont(tree.getFont());
+         this.setIcon(getCustomIcon(value));
+
+         sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+
+         setEnabled(tree.isEnabled());
+         setText(sName);
+         try {
+            if (!leaf) {
+               setFont(new java.awt.Font("Tahoma", 1, 11));
+               setForeground(Color.black);
+            }
+            else {
+               final ParameterPanel panel = ((ParameterPanel) ((DefaultMutableTreeNode) value).getUserObject());
+               if (!panel.parameterCanBeAdded()) {
+                  setForeground(Color.gray);
+               }
+               else if (sel) {
+                  setForeground(Color.blue);
+               }
+               else {
+                  setForeground(Color.black);
+               }
+            }
+         }
+         catch (final ClassCastException e) {
+            setForeground(Color.black);
+         }
+
+         return this;
+
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/InputsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputParameterContainer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputParameterContainer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputParameterContainer.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.modeler;
+
+public class OutputParameterContainer {
+
+   Object m_Container;
+   String m_sParameterName;
+
+
+   public OutputParameterContainer(final String sName,
+                                   final Object container) {
+
+      m_sParameterName = sName;
+      m_Container = container;
+
+   }
+
+
+   public Object getContainer() {
+
+      return m_Container;
+
+   }
+
+
+   public void setContainer(final Object container) {
+
+      m_Container = container;
+
+   }
+
+
+   public String getName() {
+
+      return m_sParameterName;
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sParameterName = sName;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputParameterContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/EditModelAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/EditModelAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/EditModelAction.java	(revision 369)
@@ -0,0 +1,30 @@
+package es.unex.sextante.gui.modeler;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class EditModelAction
+         implements
+            IToolboxRightButtonAction {
+
+   public void execute(final GeoAlgorithm alg) {
+
+      SextanteGUI.getGUIFactory().showModelerDialog((ModelAlgorithm) alg);
+
+   }
+
+
+   public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) {
+
+      return alg instanceof ModelAlgorithm;
+   }
+
+
+   public String getDescription() {
+
+      return Sextante.getText("Edit");
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/EditModelAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelFileFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelFileFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelFileFilter.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.gui.modeler;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import es.unex.sextante.core.Sextante;
+
+public class ModelFileFilter
+         extends
+            FileFilter {
+
+   @Override
+   public boolean accept(final File f) {
+
+      if (f.isDirectory()) {
+         return true;
+      }
+
+      final String extension = getExtension(f);
+      if (extension != null) {
+         if (extension.equals("model") || extension.equals("java")) {
+            return true;
+         }
+         else {
+            return false;
+         }
+      }
+
+      return false;
+   }
+
+
+   @Override
+   public String getDescription() {
+
+      return Sextante.getText("Toolbox_models") + " (*.model)";
+
+   }
+
+
+   private String getExtension(final File f) {
+
+      String ext = null;
+      final String s = f.getName();
+      final int i = s.lastIndexOf('.');
+
+      if ((i > 0) && (i < s.length() - 1)) {
+         ext = s.substring(i + 1).toLowerCase();
+      }
+
+      return ext;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelFileFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmDialog.java	(revision 369)
@@ -0,0 +1,380 @@
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IGUIFactory;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.ColorComboBox;
+import es.unex.sextante.modeler.elements.IModelElement;
+import es.unex.sextante.modeler.elements.ModelElement3DRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.modeler.elements.ModelElementTable;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputNumericalValue;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+
+public class AlgorithmDialog
+extends
+JDialog {
+
+	private final ModelAlgorithm                 m_ModelAlgorithm;
+	private final GeoAlgorithm                   m_Algorithm;
+	private final String                         m_sAlgorithmName;
+	private final String                         m_sAlgorithmDescription;
+	private final HashMap                        m_DataObjects;
+	
+	private JTextField							 jTextFieldDescription;
+	private JLabel								 jLabelDescription;
+	private JPanel								 jPanelName;
+	private JPanel                               jPanelButtons;
+	private ColorComboBox                        jComboColor;
+	private JButton                              jButtonInfo;	
+	private JButton                              jButtonCancel;
+	private JButton                              jButtonOK;
+
+	protected GeoAlgorithmModelerParametersPanel jPanelParametersMain = null;
+	private int                                  m_iDialogReturn;
+
+
+	public AlgorithmDialog(final GeoAlgorithm algorithm,
+			final String sName,
+			final String sDescription,
+			final ModelAlgorithm modelAlgorithm,
+			final GeoAlgorithmModelerParametersPanel panel,
+			final HashMap dataObjects,
+			final JDialog parent) {
+
+		super(parent, sDescription, true);
+		//setLocationRelativeTo(null);
+
+		m_Algorithm = algorithm;
+		m_ModelAlgorithm = modelAlgorithm;
+		m_DataObjects = dataObjects;
+		m_sAlgorithmName = sName;
+		m_sAlgorithmDescription = sDescription;
+
+		jPanelParametersMain = panel;
+		jPanelParametersMain.init(this);
+
+		initGUI();
+		setLocationRelativeTo(null);
+
+	}
+
+
+	public AlgorithmDialog(final GeoAlgorithm algorithm,
+			final String sName,
+			final String sDescription,
+			final ModelAlgorithm modelAlgorithm,
+			final GeoAlgorithmModelerParametersPanel panel,
+			final HashMap dataObjects) {
+
+		super(SextanteGUI.getMainFrame(), "", true);
+		setLocationRelativeTo(null);
+
+		m_Algorithm = algorithm;
+		m_ModelAlgorithm = modelAlgorithm;
+		m_DataObjects = dataObjects;
+		m_sAlgorithmName = sName;
+		m_sAlgorithmDescription = sDescription;
+
+		jPanelParametersMain = panel;
+		jPanelParametersMain.init(this);
+
+		initGUI();
+		setLocationRelativeTo(null);
+
+	}
+
+
+	private void initGUI() {
+
+		this.setTitle(Sextante.getText("modeler_add_algorithm") + " (" + m_Algorithm.getName()  + ")" );
+		this.setPreferredSize(new java.awt.Dimension(700, 450));
+		this.setResizable(false);
+		
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ TableLayoutConstants.FILL },
+				{ 3.0, TableLayoutConstants.MINIMUM, 1.0, TableLayoutConstants.FILL, 1.0, 40.0, 4.0 } });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);		
+		this.getContentPane().setLayout(thisLayout);
+		this.getContentPane().add(getJPanelParameters(), "0, 3"); // algorithm parameters
+		
+		/* description */
+		jPanelName = new JPanel();
+        final TableLayout jPanelNameLayout = new TableLayout
+        	(new double[][] { { 5.0, TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL, 5.0 },
+                 { 20.0, 3.0, TableLayoutConstants.MINIMUM } });
+        jPanelNameLayout.setHGap(5);
+        jPanelNameLayout.setVGap(5);
+        jPanelName.setLayout(jPanelNameLayout);		
+		{
+			jLabelDescription = new JLabel();
+			jLabelDescription.setText(Sextante.getText("Description"));
+			jPanelName.add(jLabelDescription, "1, 0");
+		}            
+		{
+			jTextFieldDescription = new JTextField();
+			jTextFieldDescription.setText(getDefaultName());
+			jPanelName.add(jTextFieldDescription, "3, 0");
+		}
+		jPanelName.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 2, 3, 2");
+		this.getContentPane().add(jPanelName, "0, 1"); // editable description
+		
+		/* row of buttons on panel bottom area */
+		final TableLayout panelLayout = new TableLayout(new double[][] {
+				{ 	5.0,
+					TableLayoutConstants.MINIMUM, // col 1: Help
+					5.0,
+					90.0, // 3: Colour
+					TableLayoutConstants.FILL,
+					90.0, // 5: Cancel
+					5.0,
+					90.0, // 7: OK
+					5.0 },
+				{ 1.0, 30.0, 5.0 } });
+		panelLayout.setHGap(5);
+		panelLayout.setVGap(5);
+				
+		jPanelButtons = new JPanel();
+		jPanelButtons.setLayout(panelLayout);
+		{
+			jButtonInfo = new JButton();
+			jPanelButtons.add(jButtonInfo, "1, 1");
+            jButtonInfo.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/info.gif")));
+            jButtonInfo.addActionListener(new ActionListener() {
+               public void actionPerformed(final ActionEvent evt) {
+            	   SextanteGUI.getGUIFactory().showHelpDialog(m_Algorithm);
+               }
+            });
+		}
+		{
+			jComboColor = new ColorComboBox();
+			final Color curColor = new Color( 	m_Algorithm.getColorR(),
+												m_Algorithm.getColorG(),
+												m_Algorithm.getColorB(),
+												m_Algorithm.getColorAlpha());
+			jComboColor.getComboBox().setBackground(curColor);
+			jPanelButtons.add(jComboColor.getComboBox(), "3, 1");
+			jComboColor.getComboBox().addActionListener(new ActionListener() {
+                public void actionPerformed(final ActionEvent evt) {
+                	final Color curColor = (Color) jComboColor.getComboBox().getSelectedItem();
+                	jComboColor.getComboBox().setBackground(curColor);
+                	m_Algorithm.setColorR(curColor.getRed());
+                	m_Algorithm.setColorG(curColor.getGreen());
+                	m_Algorithm.setColorB(curColor.getBlue());
+                	m_Algorithm.setColorAlpha(curColor.getAlpha());                	
+                }
+             });			
+		}		
+		{
+			jButtonCancel = new JButton();
+			jPanelButtons.add(jButtonCancel, "5, 1");
+			jButtonCancel.setText(Sextante.getText("Cancel"));
+			jButtonCancel.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(final java.awt.event.ActionEvent e) {
+					m_iDialogReturn = IGUIFactory.CANCEL;
+					cancel();
+				}
+			});
+		}		
+		{
+			jButtonOK = new JButton();
+			jPanelButtons.add(jButtonOK, "7, 1");
+			jButtonOK.setText(Sextante.getText("OK"));
+			jButtonOK.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(final java.awt.event.ActionEvent e) {
+					if (addAlgorithm()) {
+						m_iDialogReturn = IGUIFactory.OK;
+						cancel();
+					}
+				}
+			});
+		}
+		this.getContentPane().add(jPanelButtons,"0, 5");				
+	}
+
+
+	private String getDefaultName() {
+
+		if ( m_Algorithm.getDescription() != null && m_Algorithm.getDescription().length() > 1 ) {
+			return (m_Algorithm.getDescription());
+		}
+	
+		return m_Algorithm.getName();
+
+	}	
+	
+	
+	protected boolean addAlgorithm() {
+
+		String sKey;
+		String sAssignment;
+		String sDescription;
+		final HashMap map = new HashMap();
+		OutputObjectsSet ooSet;
+		if (assignParameters(map)) {
+			m_ModelAlgorithm.addAlgorithm(m_Algorithm, m_sAlgorithmName);
+			if ( jTextFieldDescription.getText() != null && jTextFieldDescription.getText().length() > 0 ) {
+				sDescription = jTextFieldDescription.getText();
+				m_Algorithm.setDescription(jTextFieldDescription.getText());
+			} else {
+				m_Algorithm.setDescription(m_Algorithm.getName());
+			}
+			final Set set = map.keySet();
+			final Iterator iter = set.iterator();
+			while (iter.hasNext()) {
+				sKey = (String) iter.next();
+				sAssignment = (String) map.get(sKey);
+				//System.out.println ("*** ADD ASSIGNMENT: KEY=" + sKey +" ASSIGN=" +sAssignment + ".\n");
+				m_ModelAlgorithm.addInputAsignment(sKey, sAssignment, m_sAlgorithmName);
+			}
+			ooSet = m_Algorithm.getOutputObjects();
+			for (int i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+				final Output out = ooSet.getOutput(i);
+				if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+						|| (out instanceof Output3DRasterLayer) || (out instanceof OutputNumericalValue)) {
+					sKey = out.getName();
+					sDescription = out.getDescription();
+					sKey += m_sAlgorithmName;
+					sDescription = "\"" + sDescription + "\" " + Sextante.getText("from") + " " + m_sAlgorithmDescription;
+					m_DataObjects.put(sKey, new ObjectAndDescription(sDescription, getOutputAsModelElement(out)));
+				}
+
+			}
+			
+			return true;
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_parameters"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+	}
+
+
+	private IModelElement getOutputAsModelElement(final Output out) {
+
+		IModelElement element = null;
+
+		if (out instanceof OutputRasterLayer) {
+			element = new ModelElementRasterLayer();
+			final int iBands = ((OutputRasterLayer) out).getNumberOfBands();
+			((ModelElementRasterLayer) element).setNumberOfBands(iBands);
+		}
+		else if (out instanceof OutputVectorLayer) {
+			element = new ModelElementVectorLayer();
+			final int iShapeType = ((OutputVectorLayer) out).getShapeType();
+			((ModelElementVectorLayer) element).setShapeType(iShapeType);
+		}
+		else if (out instanceof OutputTable) {
+			element = new ModelElementTable();
+		}
+		else if (out instanceof Output3DRasterLayer) {
+			element = new ModelElement3DRasterLayer();
+		}
+		else if (out instanceof OutputNumericalValue) {
+			element = new ModelElementNumericalValue();
+		}
+
+		return element;
+
+	}
+
+
+	protected boolean assignParameters(final HashMap map) {
+
+		return getJPanelParameters().assignParameters(map);
+
+	}
+
+
+	public void cancel() {
+
+		dispose();
+		setVisible(false);
+
+	}
+
+
+	private GeoAlgorithmModelerParametersPanel getJPanelParameters() {
+
+		return jPanelParametersMain;
+
+	}
+
+
+	public int getDialogReturn() {
+
+		return m_iDialogReturn;
+
+	}
+
+
+	public GeoAlgorithm getAlgorithm() {
+
+		return m_Algorithm;
+
+	}
+
+
+	public ModelAlgorithm getModelAlgorithm() {
+
+		return m_ModelAlgorithm;
+
+	}
+
+
+	public HashMap getDataObjects() {
+
+		return m_DataObjects;
+
+	}
+
+
+	public String getAlgorithmName() {
+
+		return m_sAlgorithmName;
+
+	}
+
+
+	public String getAlgorithmDescription() {
+
+		return m_sAlgorithmDescription;
+
+	}
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/SelectionAndChoices.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/SelectionAndChoices.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/SelectionAndChoices.java	(revision 369)
@@ -0,0 +1,52 @@
+package es.unex.sextante.gui.modeler;
+
+public class SelectionAndChoices {
+
+   private String   m_Description;
+   private String[] m_Choices;
+
+
+   public SelectionAndChoices(final String parameterDescription,
+                              final String[] choices) {
+
+      m_Description = parameterDescription;
+      m_Choices = choices;
+
+   }
+
+
+   public String getDescription() {
+
+      return m_Description;
+
+   }
+
+
+   public void setDescription(final String sDescription) {
+
+      m_Description = sDescription;
+
+   }
+
+
+   public String[] getChoices() {
+
+      return m_Choices;
+
+   }
+
+
+   public void setChoices(final String[] sChoices) {
+
+      m_Choices = sChoices;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return getDescription();
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/SelectionAndChoices.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithm.java	(revision 369)
@@ -0,0 +1,1068 @@
+package es.unex.sextante.gui.modeler;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.modeler.elements.IModelElement;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+/**
+ * An algorithm representing a model (a set of other geoalgorithms linked together in a workflow)
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+
+public class ModelAlgorithm
+         extends
+            GeoAlgorithm {
+
+   /**
+    * A map of all inputs used along the execution of the model, not only the ones set by the user, but also the input to
+    * intermediate algorithms, which are created from other intermediate algorithms.
+    */
+   private HashMap   m_Inputs;
+
+   /**
+    * A list of all used algorithms in the model
+    */
+   private ArrayList m_Algorithms;
+
+   /**
+    * A list of keys to identify the algorithms
+    */
+   private ArrayList m_AlgorithmKeys;
+
+   private ArrayList m_InputAssignments;
+
+   /**
+    * The filename associated with this model
+    */
+   private String    m_sFilename;
+
+   private int       m_iGeometryTypeRestriction;
+
+
+   /**
+    * Creates a new model algorithm
+    */
+   public ModelAlgorithm() {
+
+      super();
+
+      m_Algorithms = new ArrayList();
+      m_AlgorithmKeys = new ArrayList();
+      m_InputAssignments = new ArrayList();
+      m_Inputs = new HashMap();
+
+      setName(Sextante.getText("[New_model]"));
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {}
+
+
+   /**
+    * Sets the values used by the model algorithm
+    * 
+    * @param algs
+    *                The list of algorithm used by the model
+    * @param algKeys
+    *                a list of keys to identify the used algorithms
+    * @param assignments
+    *                a list of assignments
+    * @param inputs
+    *                the list of inputs of the algorithm
+    * @param outputs
+    *                The output objects that the algorithm generates
+    */
+   public void setValues(final ArrayList algs,
+                         final ArrayList algKeys,
+                         final ArrayList assignments,
+                         final HashMap inputs,
+                         final OutputObjectsSet outputs) {
+
+      m_Algorithms = algs;
+      m_AlgorithmKeys = algKeys;
+      m_InputAssignments = assignments;
+      m_Inputs = inputs;
+      m_OutputObjects = outputs;
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iExecuted = 0;
+      boolean bHasChanged;
+      final boolean bExecuted[] = new boolean[m_Algorithms.size()];
+      String sKey, sAlgKey;
+      GeoAlgorithm alg;
+      OutputObjectsSet oldOOSet;
+      Object object;
+
+      setInputs();
+
+      do {
+         bHasChanged = false;
+         for (i = 0; (i < m_Algorithms.size()) && !m_Task.isCanceled(); i++) {
+            if (!bExecuted[i]) {
+               if (prepareAlgorithm(i)) {
+                  alg = (GeoAlgorithm) m_Algorithms.get(i);
+                  if (!alg.preprocessForModeller(this)) {
+                     continue;
+                  }
+                  bExecuted[i] = true;
+                  iExecuted++;
+                  sAlgKey = (String) m_AlgorithmKeys.get(i);
+                  if (m_bIsAutoExtent) {
+                     alg.setAnalysisExtent(null);
+                  }
+                  else {
+                     alg.setAnalysisExtent(this.getAnalysisExtent());
+                  }
+                  oldOOSet = alg.getOutputObjects().getNewInstance();
+                  m_Task.setProcessDescription(alg.getName());
+                  m_Task.setProgress(0);
+                  m_Task.setDeterminate(alg.isDeterminatedProcess());
+                  boolean bSuccess;
+                  try {
+                     bSuccess = alg.execute(m_Task, m_OutputFactory);
+                  }
+                  catch (final GeoAlgorithmExecutionException e) {
+                     final GeoAlgorithm wrongAlg = (GeoAlgorithm) m_Algorithms.get(i);
+                     Sextante.addErrorToLog(Sextante.getText("error_en_algoritmo" + " ") + Integer.toString(i + 1) + ":"
+                                            + wrongAlg.getName()); //
+                     throw e;
+                  }
+                  if (bSuccess) {
+                     bHasChanged = true;
+                     final OutputObjectsSet ooset = alg.getOutputObjects();
+                     for (int j = 0; j < ooset.getOutputObjectsCount(); j++) {
+                        final Output output = ooset.getOutput(j);
+                        object = output.getOutputObject();
+                        //if the output has been created by an external application, object might be null
+                        //We have to create it from the output channel
+                        if (object == null) {
+                           object = getDataObjectFromOutputChannel(output);
+                           ((IDataObject) object).setName(output.getName());
+
+                        }
+                        sKey = output.getName();
+                        sKey += sAlgKey;
+                        if (m_OutputObjects.containsKey(sKey)) {
+                           final Output out = m_OutputObjects.getOutput(sKey);
+                           out.setOutputObject(object);
+                        }
+                        if (!(output instanceof OutputRasterLayer) && !(output instanceof OutputVectorLayer)
+                            && !(output instanceof OutputTable) && !(output instanceof Output3DRasterLayer)) {
+                           m_OutputObjects.add(output.getNewInstance());
+                        }
+                        m_Inputs.put(sKey, object);
+                     }
+                     alg.setOutputObjects(oldOOSet);
+                  }
+                  else {
+                     return false;
+                  }
+               }
+            }
+         }
+      }
+      while (bHasChanged && !m_Task.isCanceled());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private IDataObject getDataObjectFromOutputChannel(final Output output) throws GeoAlgorithmExecutionException {
+
+      final String sFilename = ((FileOutputChannel) output.getOutputChannel()).getFilename();
+      final IDataObject obj = SextanteGUI.getInputFactory().openDataObjectFromFile(sFilename);
+      if (obj == null) {
+         throw new GeoAlgorithmExecutionException("Could not open intermediate layer");
+      }
+
+      return obj;
+
+   }
+
+
+   /**
+    * Initiates the list of inputs with the inputs selected by the user.
+    */
+   private void setInputs() {
+
+      int i;
+      int iCount;
+      int iField;
+      AdditionalInfoTableField aitf;
+      Parameter param, parent;
+      String sParent;
+      String sFieldName = "";
+
+      iCount = m_Parameters.getNumberOfParameters();
+
+      for (i = 0; i < iCount; i++) {
+         param = m_Parameters.getParameter(i);
+         m_Inputs.put(param.getParameterName(), param.getParameterValueAsObject());
+      }
+
+      for (i = 0; i < iCount; i++) {
+         param = m_Parameters.getParameter(i);
+         if (param instanceof ParameterTableField) {
+            try {
+               aitf = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+               sParent = aitf.getParentParameterName();
+               parent = m_Parameters.getParameter(sParent);
+               iField = param.getParameterValueAsInt();
+               if (parent instanceof ParameterVectorLayer) {
+                  final IVectorLayer layer = parent.getParameterValueAsVectorLayer();
+                  sFieldName = layer.getFieldName(iField);
+               }
+               else if (parent instanceof ParameterTable) {
+                  final ITable table = parent.getParameterValueAsTable();
+                  sFieldName = table.getFieldName(iField);
+
+               }
+               m_Inputs.put(param.getParameterName(), sFieldName);
+            }
+            catch (final Exception e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   /**
+    * Prepares an algorithm to be executed.
+    * 
+    * @param iAlgorithm
+    *                the index of the algorithm in the list of them kept by the model
+    * @return true if the algorithm can be executed. False if some of the inputs needed are not yet available (other algorithms
+    *         have to be run before)
+    * @throws GeoAlgorithmExecutionException
+    */
+   private boolean prepareAlgorithm(final int iAlgorithm) throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      boolean bMandatory;
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iAlgorithm);
+      final ParametersSet ps = alg.getParameters();
+      Parameter param;
+      Object asignment;
+      Object input;
+      HashMap map;
+      ArrayList inputArray;
+
+      iCount = ps.getNumberOfParameters();
+      map = (HashMap) m_InputAssignments.get(iAlgorithm);
+
+      for (i = 0; i < iCount; i++) {
+         param = ps.getParameter(i);
+         asignment = map.get(param.getParameterName());
+         if (param instanceof ParameterMultipleInput) {
+            if (asignment != null) {
+               inputArray = (ArrayList) m_Inputs.get(asignment);
+               if (inputArray == null) {
+                  return false;
+               }
+               else {
+                  input = new ArrayList();
+                  if (createMultipleInputFromArray(inputArray, (ArrayList) input, param)) {
+                     param.setParameterValue(input);
+                     bMandatory = ((AdditionalInfoMultipleInput) param.getParameterAdditionalInfo()).getIsMandatory();
+                     if (bMandatory && (((ArrayList) input).size() == 0)) {
+                        return false;
+                     }
+                  }
+                  else {
+                     return false;
+                  }
+
+               }
+            }
+         }
+         else {
+            if (param instanceof ParameterDataObject) {
+               try {
+                  bMandatory = ((AdditionalInfoDataObject) param.getParameterAdditionalInfo()).getIsMandatory();
+               }
+               catch (final NullParameterAdditionalInfoException e) {
+                  Sextante.addErrorToLog(e);
+                  return false;
+               }
+            }
+            else {
+               bMandatory = false;
+            }
+
+            if (asignment == null) {
+               if (bMandatory) {
+                  return false;
+               }
+            }
+            else {
+               input = m_Inputs.get(asignment);
+               if (input instanceof IModelElement) {
+                  return false;
+               }
+               else {
+                  if (!(param instanceof ParameterTableField)) {
+                     param.setParameterValue(input);
+                  }
+
+               }
+            }
+         }
+
+      }
+
+      setOutputs(iAlgorithm);
+      checkVectorLayers(iAlgorithm);
+      checkTableFields(iAlgorithm);
+      checkRasterBands(iAlgorithm);
+      checkNumericalValues(iAlgorithm);
+      //checkFilepaths(iAlgorithm);
+
+      return true;
+
+   }
+
+
+   /**
+    * Sets output filenames for a given algorithm. If outputs of this algorithm are also outputs of the model (i.e. they are not
+    * intermediate results), they are assigned the corresponding filenames
+    * 
+    * @param iIndex
+    *                the index of the algorithm in the model
+    */
+   private void setOutputs(final int iIndex) {
+
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iIndex);
+      final String sAlgKey = (String) m_AlgorithmKeys.get(iIndex);
+      final OutputObjectsSet ooset = alg.getOutputObjects();
+      for (int j = 0; j < ooset.getOutputObjectsCount(); j++) {
+         final Output output = ooset.getOutput(j);
+         String sKey = output.getName();
+         sKey += sAlgKey;
+         if (m_OutputObjects.containsKey(sKey)) {
+            output.setOutputChannel(this.getOutputChannel(sKey));
+         }
+      }
+
+   }
+
+
+   /**
+    * Checks that numerical inputs for a given algorithm are correct
+    * 
+    * @param iAlgorithm
+    *                the index of the algorithm in the list of them kept by the model
+    * @throws GeoAlgorithmExecutionException
+    *                 if numerical inputs of the algorithm are incorrect
+    */
+   private void checkNumericalValues(final int iAlgorithm) throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      double dValue;
+      double dMin, dMax;
+      Object asignment;
+      AdditionalInfoNumericalValue ainv;
+      Parameter param;
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iAlgorithm);
+      final ParametersSet ps = alg.getParameters();
+      final HashMap map = (HashMap) m_InputAssignments.get(iAlgorithm);
+
+      iCount = ps.getNumberOfParameters();
+
+      for (i = 0; i < iCount; i++) {
+         try {
+            param = ps.getParameter(i);
+            asignment = map.get(param.getParameterName());
+            if (param instanceof ParameterNumericalValue) {
+               dValue = ((Double) m_Inputs.get(asignment)).doubleValue();
+               ainv = (AdditionalInfoNumericalValue) param.getParameterAdditionalInfo();
+               dMax = ainv.getMaxValue();
+               dMin = ainv.getMinValue();
+               if ((dMax < dValue) || (dValue < dMin)) {
+                  final String sError = "Valor_fuera_rango" + Double.toString(dValue);
+                  throw new GeoAlgorithmExecutionException(sError);
+               }
+            }
+
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+      }
+
+   }
+
+
+   /**
+    * Checks that vector layer inputs for a given algorithm are correct
+    * 
+    * @param iAlgorithm
+    *                the index of the algorithm in the list of them kept by the model
+    * @throws GeoAlgorithmExecutionException
+    *                 if vector layer inputs of the algorithm are incorrect
+    */
+   private void checkVectorLayers(final int iAlgorithm) throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      int iType, iTypeLayer;
+      Object asignment;
+      AdditionalInfoVectorLayer aivl;
+      IVectorLayer layer;
+      Parameter param;
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iAlgorithm);
+      final ParametersSet ps = alg.getParameters();
+      final HashMap map = (HashMap) m_InputAssignments.get(iAlgorithm);
+
+      iCount = ps.getNumberOfParameters();
+
+      for (i = 0; i < iCount; i++) {
+         try {
+            param = ps.getParameter(i);
+            asignment = map.get(param.getParameterName());
+            if (param instanceof ParameterVectorLayer) {
+               layer = (IVectorLayer) m_Inputs.get(asignment);
+               aivl = (AdditionalInfoVectorLayer) param.getParameterAdditionalInfo();
+               iType = aivl.getShapeType();
+               iTypeLayer = layer.getShapeType();
+               if ((iType == iTypeLayer) || (iType == AdditionalInfoVectorLayer.SHAPE_TYPE_ANY)) {}
+               else {
+                  final String sError = "ERROR: Layer " + layer.getName() + ". Wrong layer type";
+                  throw new GeoAlgorithmExecutionException(sError);
+               }
+            }
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+      }
+
+   }
+
+
+   /**
+    * Checks that table field inputs for a given algorithm are correct
+    * 
+    * @param iAlgorithm
+    *                the index of the algorithm in the list of them kept by the model
+    * @throws GeoAlgorithmExecutionException
+    *                 if table field inputs of the algorithm are incorrect
+    */
+   private void checkTableFields(final int iAlgorithm) throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      int iField;
+      Object asignment;
+      AdditionalInfoTableField aitf;
+      IVectorLayer layer;
+      ITable table;
+      Parameter param, parentParam;
+      String sParent;
+      String sFieldName;
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iAlgorithm);
+      final ParametersSet ps = alg.getParameters();
+      final HashMap map = (HashMap) m_InputAssignments.get(iAlgorithm);
+
+      iCount = ps.getNumberOfParameters();
+
+      for (i = 0; i < iCount; i++) {
+         try {
+            param = ps.getParameter(i);
+            asignment = map.get(param.getParameterName());
+            if (param instanceof ParameterTableField) {
+               sFieldName = (String) m_Inputs.get(asignment);
+               aitf = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+               if (sFieldName.trim().equals("") && !aitf.getIsMandatory()) {
+                  continue;
+               }
+               sParent = aitf.getParentParameterName();
+               parentParam = ps.getParameter(sParent);
+               if (parentParam instanceof ParameterVectorLayer) {
+                  layer = ps.getParameterValueAsVectorLayer(sParent);
+                  iField = layer.getFieldIndexByName(sFieldName);
+                  if (iField != -1) {
+                     param.setParameterValue(new Integer(iField));
+                  }
+                  else {
+                     final String sError = "ERROR: Field " + sFieldName + " not found in layer " + layer.getName();
+                     throw new GeoAlgorithmExecutionException(sError);
+                  }
+               }
+               else {//table
+                  table = ps.getParameterValueAsTable(sParent);
+                  iField = table.getFieldIndexByName(sFieldName);
+                  if (iField != -1) {
+                     param.setParameterValue(new Integer(iField));
+                  }
+                  else {
+                     final String sError = "ERROR: Field " + sFieldName + " not found in layer " + table.getName();
+                     throw new GeoAlgorithmExecutionException(sError);
+                  }
+               }
+
+            }
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+      }
+
+   }
+
+
+   /**
+    * Checks that raster band inputs for a given algorithm are correct
+    * 
+    * @param iAlgorithm
+    *                the index of the algorithm in the list of them kept by the model
+    * @throws GeoAlgorithmExecutionException
+    *                 if raster band inputs of the algorithm are incorrect
+    */
+   private void checkRasterBands(final int iAlgorithm) throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      int iBand;
+      Object asignment;
+      AdditionalInfoBand aib;
+      IRasterLayer layer;
+      Parameter param;
+      String sParent;
+      final GeoAlgorithm alg = (GeoAlgorithm) m_Algorithms.get(iAlgorithm);
+      final ParametersSet ps = alg.getParameters();
+      final HashMap map = (HashMap) m_InputAssignments.get(iAlgorithm);
+
+      iCount = ps.getNumberOfParameters();
+
+      for (i = 0; i < iCount; i++) {
+         try {
+            param = ps.getParameter(i);
+            asignment = map.get(param.getParameterName());
+            if (param instanceof ParameterBand) {
+               iBand = ((Integer) m_Inputs.get(asignment)).intValue();
+               aib = (AdditionalInfoBand) param.getParameterAdditionalInfo();
+               sParent = aib.getParentParameterName();
+               layer = ps.getParameterValueAsRasterLayer(sParent);
+               if (layer.getBandsCount() > iBand) {
+                  param.setParameterValue(new Integer(iBand));
+               }
+               else {
+                  final String sError = "ERROR: Band " + Integer.toString(iBand + 1) + " not found in layer " + layer.getName();
+                  throw new GeoAlgorithmExecutionException(sError);
+               }
+            }
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+      }
+
+   }
+
+
+   private boolean createMultipleInputFromArray(final ArrayList array,
+                                                final ArrayList paramInput,
+                                                final Parameter param) {
+
+      final ArrayList paramInputUnprocessed = new ArrayList();
+      final boolean bReturn = createMultipleInputFromArray(array, paramInputUnprocessed);
+
+      if (bReturn) {
+         AdditionalInfoMultipleInput ai;
+         try {
+            ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+            if (ai.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+               createArrayOfBands(paramInput, paramInputUnprocessed);
+            }
+            else {
+               for (int i = 0; i < paramInputUnprocessed.size(); i++) {
+                  paramInput.add(paramInputUnprocessed.get(i));
+               }
+            }
+            return true;
+         }
+         catch (final NullParameterAdditionalInfoException e) {
+            Sextante.addErrorToLog(e);
+            return false;
+         }
+
+      }
+      else {
+         return false;
+      }
+
+
+   }
+
+
+   private void createArrayOfBands(final ArrayList array,
+                                   final ArrayList unprocessed) {
+
+
+      for (int i = 0; i < unprocessed.size(); i++) {
+         final Object obj = unprocessed.get(i);
+         if (obj instanceof RasterLayerAndBand) {
+            array.add(obj);
+         }
+         else {
+            final IRasterLayer lyr = (IRasterLayer) obj;
+            for (int j = 0; j < lyr.getBandsCount(); j++) {
+               array.add(new RasterLayerAndBand(lyr, j));
+            }
+         }
+      }
+
+   }
+
+
+   private boolean createMultipleInputFromArray(final ArrayList array,
+                                                final ArrayList paramInput) {
+
+      String sName;
+      Object item;
+      int i;
+      final int iParams = array.size();
+
+      for (i = 0; i < iParams; i++) {
+         sName = (String) array.get(i);
+         item = m_Inputs.get(sName);
+         if (item == null) {
+            return false;
+         }
+         else if (item instanceof ArrayList) {
+            if (!createMultipleInputFromArray((ArrayList) item, paramInput)) {
+               return false;
+            }
+         }
+         else {
+            paramInput.add(item);
+         }
+      }
+
+      return true;
+
+
+   }
+
+
+   /**
+    * Adds a new algorithm to the model
+    * 
+    * @param alg
+    *                the algorithm to add
+    * @param sName
+    *                the name to identify the algorithm
+    */
+   public void addAlgorithm(final GeoAlgorithm alg,
+                            final String sName) {
+
+      if (!m_AlgorithmKeys.contains(sName)) {
+         m_Algorithms.add(alg);
+         m_AlgorithmKeys.add(sName);
+         m_InputAssignments.add(new HashMap());
+         checkUserCanDefineOutputExtent();
+      }
+
+   }
+
+
+   /**
+    * Removes an algorithm from the model
+    * 
+    * @param sKey
+    *                the name to identify the algorithm to remove
+    */
+   public void removeAlgorithm(final String sKey) {
+
+      String sAlgKey;
+
+      for (int i = 0; i < m_AlgorithmKeys.size(); i++) {
+         sAlgKey = (String) m_AlgorithmKeys.get(i);
+         if (sAlgKey.equals(sKey)) {
+            m_Algorithms.remove(i);
+            m_AlgorithmKeys.remove(i);
+            m_InputAssignments.remove(i);
+            checkUserCanDefineOutputExtent();
+            return;
+         }
+      }
+
+   }
+
+
+   /**
+    * Checks if the algorithm generates user-defined output and updates the corresponding property
+    * 
+    */
+   private void checkUserCanDefineOutputExtent() {
+
+      setUserCanDefineAnalysisExtent(false);
+
+      for (int i = 0; i < m_Algorithms.size(); i++) {
+         if (((GeoAlgorithm) m_Algorithms.get(i)).getUserCanDefineAnalysisExtent()) {
+            setUserCanDefineAnalysisExtent(true);
+            return;
+         }
+      }
+
+   }
+
+
+   /**
+    * Adds an input assignment
+    * 
+    * @param sParamName
+    *                the name of the parameter
+    * @param sInputName
+    *                the name of the input
+    * @param alg
+    *                the algorithm
+    * @return true if could make the assignment
+    */
+   public boolean addInputAsignment(final String sParamName,
+                                    final String sInputName,
+                                    final String alg) {
+
+      int i;
+      String alg2;
+      HashMap map;
+
+      for (i = 0; i < m_Algorithms.size(); i++) {
+         alg2 = (String) m_AlgorithmKeys.get(i);
+         if (alg.equals(alg2)) {
+            map = (HashMap) m_InputAssignments.get(i);
+            map.put(sParamName, sInputName);
+            return true;
+         }
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Adds an input to the model
+    * 
+    * @param param
+    *                the input parameter to add
+    * @throws RepeatedParameterNameException
+    */
+   public void addInput(final Parameter param) throws RepeatedParameterNameException {
+
+      m_Parameters.addParameter(param);
+
+   }
+
+
+   /**
+    * Removes a parameter input
+    * 
+    * @param param
+    *                the parameter to remove
+    */
+   public void removeInput(final Parameter param) {
+
+      try {
+         m_Parameters.removeParameter(param);
+      }
+      catch (final WrongParameterIDException e) {}
+
+   }
+
+
+   /**
+    * Removes a parameter input
+    * 
+    * @param sKey
+    *                the name of the parameter to remove
+    */
+   public void removeInput(final String sKey) {
+
+      try {
+         unassign(sKey);
+         m_Parameters.removeParameter(sKey);
+         m_InputAssignments.remove(sKey);
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   /**
+    * Removes an assignment
+    * 
+    * @param sAssignmentKey
+    *                the key of the assignment to remove
+    */
+   public void unassign(final String sAssignmentKey) {
+
+      int i, j;
+      Set set;
+      Iterator iter;
+      String sKey;
+      String sInput;
+      final ArrayList toRemove = new ArrayList();
+
+      for (i = 0; i < m_InputAssignments.size(); i++) {
+         final HashMap assignments = (HashMap) m_InputAssignments.get(i);
+         set = assignments.keySet();
+         iter = set.iterator();
+         while (iter.hasNext()) {
+            sKey = (String) iter.next();
+            sInput = (String) assignments.get(sKey);
+            if ((sInput != null) && sInput.equals(sAssignmentKey)) {
+               toRemove.add(sKey);
+            }
+
+         }
+         for (j = 0; j < toRemove.size(); j++) {
+            sKey = (String) toRemove.get(j);
+            assignments.remove(sKey);
+         }
+      }
+
+   }
+
+
+   /**
+    * Returns an arraylist with algorithm keys
+    * 
+    * @return an arraylist with algorithm keys
+    */
+   public ArrayList getAlgorithmKeys() {
+
+      return m_AlgorithmKeys;
+
+   }
+
+
+   /**
+    * Returns an arraylist with algorithms used in this model
+    * 
+    * @return an arraylist with algorithms used in this model
+    */
+   public ArrayList getAlgorithms() {
+
+      return m_Algorithms;
+
+   }
+
+
+   public ArrayList getInputAssignments() {
+
+      return m_InputAssignments;
+
+   }
+
+
+   public HashMap getInputs() {
+
+      return m_Inputs;
+
+   }
+
+
+   /**
+    * Returns an algorithm from the ones used in this model
+    * 
+    * @param sKey
+    *                the key used to identify the algorithm to get
+    * @return an algorithm from the ones used in this model. Returns null if no algorithm with that key was found
+    */
+   public GeoAlgorithm getAlgorithm(final String sKey) {
+
+      String sAlgKey;
+
+      for (int i = 0; i < m_AlgorithmKeys.size(); i++) {
+         sAlgKey = (String) m_AlgorithmKeys.get(i);
+         if (sAlgKey.equals(sKey)) {
+            return (GeoAlgorithm) m_Algorithms.get(i);
+         }
+      }
+
+      return null;
+
+   }
+
+
+   public HashMap getInputAssignments(final String sKey) {
+
+      String sAlgKey;
+
+      for (int i = 0; i < m_AlgorithmKeys.size(); i++) {
+         sAlgKey = (String) m_AlgorithmKeys.get(i);
+         if (sAlgKey.equals(sKey)) {
+            return (HashMap) m_InputAssignments.get(i);
+         }
+      }
+
+      return null;
+
+   }
+
+
+   public String getInputAsignment(final String sParamName,
+                                   final GeoAlgorithm alg) {
+
+      int i;
+      GeoAlgorithm alg2;
+      HashMap map;
+
+      for (i = 0; i < m_Algorithms.size(); i++) {
+         alg2 = (GeoAlgorithm) m_Algorithms.get(i);
+         if (alg.equals(alg2)) {
+            map = (HashMap) m_InputAssignments.get(i);
+            return (String) map.get(sParamName);
+         }
+      }
+
+      return null;
+
+   }
+
+
+   @Override
+   public GeoAlgorithm getNewInstance() throws InstantiationException, IllegalAccessException {
+
+      final ModelAlgorithm alg = this.getClass().newInstance();
+
+      final OutputObjectsSet ooSet = m_OutputObjects.getNewInstance();
+
+      alg.setOutputObjects(ooSet);
+      alg.setName(this.getName());
+      alg.setValues(m_Algorithms, m_AlgorithmKeys, m_InputAssignments, m_Inputs, ooSet);
+      alg.setParameters(m_Parameters);
+      alg.setIsDeterminatedProcess(false);
+      alg.checkUserCanDefineOutputExtent();
+      alg.setAnalysisExtent(m_AnalysisExtent);
+      alg.setFilename(m_sFilename);
+
+      if (m_bIsAutoExtent) {
+         alg.setAnalysisExtent(null);
+         alg.m_bIsAutoExtent = true;
+      }
+
+      return alg;
+
+   }
+
+
+   /**
+    * Returns the filename associated with this model
+    * 
+    * @return the filename associated with this model
+    */
+   public String getFilename() {
+
+      return m_sFilename;
+
+   }
+
+
+   /**
+    * Sets the filename associated with this model
+    * 
+    * @param sFilename
+    *                the filename where this model is stored
+    */
+   public void setFilename(final String sFilename) {
+
+      m_sFilename = sFilename;
+
+   }
+
+
+   @Override
+   public String getCommandLineName() {
+
+      return "model:" + new File(m_sFilename).getName();
+
+   }
+
+
+   @Override
+   public boolean canDefineOutputExtentFromInput() {
+
+
+      for (int i = 0; i < m_Algorithms.size(); i++) {
+         if (!((GeoAlgorithm) m_Algorithms.get(i)).canDefineOutputExtentFromInput()) {
+            return false;
+         }
+      }
+
+      return true;
+
+   }
+
+
+   public void setGeometryTypeRestriction(final int iRestriction) {
+
+      m_iGeometryTypeRestriction = iRestriction;
+
+   }
+
+
+   public int getGeometryTypeRestriction() {
+
+      return m_iGeometryTypeRestriction;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ColorComboBox.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ColorComboBox.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ColorComboBox.java	(revision 369)
@@ -0,0 +1,83 @@
+package es.unex.sextante.gui.modeler;
+
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+
+
+public class ColorComboBox
+{
+	
+	
+	private static final Color colors[] = { 	
+			  SextanteGUI.COLOR_WHITE,
+			  SextanteGUI.COLOR_GREY,
+			  SextanteGUI.COLOR_BLACK,
+			  SextanteGUI.COLOR_YELLOW,
+			  SextanteGUI.COLOR_ORANGE,
+			  SextanteGUI.COLOR_RED,
+			  SextanteGUI.COLOR_GREEN_LIGHT,
+			  SextanteGUI.COLOR_GREEN_DARK,
+			  SextanteGUI.COLOR_BLUE_LIGHT,
+			  SextanteGUI.COLOR_BLUE_DARK,
+			  SextanteGUI.COLOR_PINK,			  
+			  SextanteGUI.COLOR_PURPLE,
+			  SextanteGUI.COLOR_BROWN_LIGHT,
+			  SextanteGUI.COLOR_BROWN_DARK
+	};
+	
+	private JComboBox comboBox;
+	private ColorCellRenderer renderer;
+	
+
+	public ColorComboBox() {
+
+		comboBox = new JComboBox(colors);
+		comboBox.setMaximumRowCount(colors.length);
+		comboBox.setEditable(false);
+		renderer =  new ColorCellRenderer();
+		comboBox.setRenderer(renderer);
+	}	
+	
+	
+	public JComboBox getComboBox() {
+		return ( comboBox );
+	}
+	
+	
+	public ColorCellRenderer getRenderer() {
+		return ( renderer );
+	}	
+	
+	
+	static class ColorCellRenderer implements ListCellRenderer {
+		protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
+
+		private final static Dimension preferredSize = new Dimension(0, 20);
+
+		public Component getListCellRendererComponent(JList list, Object value,
+				int index, boolean isSelected, boolean cellHasFocus) {
+			JLabel renderer = (JLabel) defaultRenderer
+			.getListCellRendererComponent(list, value, index,
+					isSelected, cellHasFocus);
+			if (value instanceof Color) {
+				renderer.setBackground((Color) value);
+			}
+			renderer.setText("");
+			renderer.setPreferredSize(preferredSize);
+			return renderer;
+		}
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ColorComboBox.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerDialog.java	(revision 369)
@@ -0,0 +1,55 @@
+package es.unex.sextante.gui.modeler;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+import es.unex.sextante.core.Sextante;
+
+public class ModelerDialog
+         extends
+            JDialog {
+
+   private ModelerPanel modelerPanel;
+
+
+   public ModelerDialog(final Frame parent) {
+
+      super(parent, Sextante.getText("Modeler"), false);
+	        
+      initialize();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   public void initialize() {
+
+      final JPanel pane = new JPanel();
+      this.setContentPane(pane);      
+      this.setSize(new java.awt.Dimension(600, 500));
+      {
+
+         final BorderLayout thisLayout = new BorderLayout();
+         this.getContentPane().setLayout(thisLayout);
+
+         modelerPanel = new ModelerPanel(this);
+         this.getContentPane().setLayout(thisLayout);
+         this.getContentPane().add(modelerPanel);
+
+      }
+
+   }
+
+
+   public ModelerPanel getModelerPanel() {
+
+      return modelerPanel;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerPanel.java	(revision 369)
@@ -0,0 +1,1206 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.AbstractAction;
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSeparator;
+import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
+import javax.swing.JSpinner;
+import javax.swing.JCheckBox;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.SwingConstants;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.text.JTextComponent;
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.parameters.ParameterPanel;
+import es.unex.sextante.gui.settings.SextanteModelerSettings;
+import es.unex.sextante.outputs.Output;
+
+
+public class ModelerPanel
+extends
+JPanel {
+
+	private JPanel          jModelPanel;
+	private JPanel          jElementsPanel;
+	private JButton         jButtonMenu;
+	private JButton         jButtonEdit = null;
+	private JButton         jButtonDelete = null;
+	private JPopupMenu		popup;
+	private JMenuItem		jMenuSave;
+	private JButton         jButtonHelp;
+	private JPanel          jPanelButtonsModel;
+	private JTextField      jTextFieldName;
+	private JComboBox       jComboBoxGroup;
+	private JLabel          jLabelGroup;
+	private JLabel          jLabelName;
+	private JScrollPane     jModelGraphicalDescriptionPanel;
+	private JTabbedPane     jElementsTabbedPane;
+	private JButton         jButtonAdd;
+	private JPanel          jPanelButtonsElements;
+	private InputsPanel     inputsPanel;
+	private AlgorithmsPanel extensionsPanel;
+	private JSplitPane      jSplitPane;
+	private ModelGraphPanel modelGraphPanel;
+	private JCheckBox		jGridBox;
+	private JSpinner      	jGridSize;
+	private JButton			jScaleButtonMinus;
+	private JButton			jScaleButtonOne;
+	private JButton			jScaleButtonPlus;
+
+
+	private ObjectAndDescription	currentNode = null;
+
+	private ModelAlgorithm  m_Algorithm;
+	private final HashMap   m_DataObjects;                  //all data objects, whether generated by modules or as input from the user
+	private final ArrayList m_InputKeys;                    //keys of those elements in m_DataObjects that come from user input
+	private boolean         m_bHasChanged;
+	private boolean			m_bGridEnabled = false;
+	private double			m_dGridSize = 10.0;
+	private double			m_dScale = 1.0;
+
+	private final JDialog   m_Parent;
+
+
+	public ModelerPanel(final JDialog parent) {
+
+		m_DataObjects = new HashMap();
+		m_InputKeys = new ArrayList();
+		m_Algorithm = new ModelAlgorithm();
+		m_Parent = parent;
+
+		initGUI();
+
+		newModel();
+
+	}
+
+
+	private void initGUI() {
+		{
+			final BorderLayout thisLayout = new BorderLayout();
+			this.setLayout(thisLayout);
+			this.setSize(new java.awt.Dimension(950, 500));
+			jMenuSave= new JMenuItem(new AbstractAction(Sextante.getText("Save")) {
+	            public void actionPerformed(ActionEvent e) {
+	            	saveModel(false);
+	            }
+	        });
+			{
+				jSplitPane = new JSplitPane();
+				this.add(jSplitPane, BorderLayout.CENTER);
+				{
+					jModelPanel = new JPanel();
+					final TableLayout jModelPanelLayout = new TableLayout(new double[][] {
+							{ 	5.0,
+								TableLayoutConstants.MINIMUM,
+								TableLayoutConstants.FILL,
+								TableLayoutConstants.MINIMUM,
+								TableLayoutConstants.FILL,
+								5.0 },
+								{ 7.0, TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, 5.0, 30.0, 5.0 } });
+					jModelPanelLayout.setHGap(5);
+					jModelPanelLayout.setVGap(5);
+					jModelPanel.setLayout(jModelPanelLayout);
+					jSplitPane.add(jModelPanel, JSplitPane.RIGHT);
+
+					modelGraphPanel = new ModelGraphPanel(m_Algorithm, m_DataObjects, m_InputKeys, this, m_Parent);
+					jModelGraphicalDescriptionPanel = new JScrollPane();
+					jModelGraphicalDescriptionPanel.setViewportView(modelGraphPanel);
+					jModelGraphicalDescriptionPanel.setWheelScrollingEnabled(false);
+
+					//modelGraphPanel.setPreferredSize(new java.awt.Dimension(480, 401));
+					{
+						jLabelName = new JLabel();
+						jLabelName.setText(Sextante.getText("Name")+":");
+						jModelPanel.add(jLabelName, "1, 1");
+					}
+					{
+						jTextFieldName = new JTextField();
+						jTextFieldName.addFocusListener(new FocusAdapter() {
+							@Override
+							public void focusLost(final FocusEvent e) {
+								m_bHasChanged = true;
+								m_Algorithm.setName(jTextFieldName.getText());
+							}
+						});
+						jModelPanel.add(jTextFieldName, "2, 1");
+					}
+					{
+						jLabelGroup = new JLabel();
+						jLabelGroup.setText(Sextante.getText("Group")+":");
+						jModelPanel.add(jLabelGroup, "3, 1");
+					}
+					{
+						jComboBoxGroup = new JComboBox();
+						jModelPanel.add(jComboBoxGroup, "4, 1");
+						final JTextComponent editor = (JTextComponent) jComboBoxGroup.getEditor().getEditorComponent();
+						editor.addFocusListener(new FocusAdapter() {
+							@Override
+							public void focusLost(final FocusEvent e) {
+								m_bHasChanged = true;
+								m_Algorithm.setGroup((String) jComboBoxGroup.getSelectedItem());
+							}
+						});
+						final ComboBoxModel jComboBoxGroupModel = new DefaultComboBoxModel(getGroups());
+						jComboBoxGroup.setModel(jComboBoxGroupModel);
+						jComboBoxGroup.setEditable(true);
+						jModelPanel.add(modelGraphPanel, "1, 2, 4, 2");
+					}
+
+					{
+						/* this panel has buttons for file and node editing operations */
+						jPanelButtonsModel = new JPanel();
+						final TableLayout jPanelButtonsModelLayout =
+							new TableLayout(new double[][] { { 	120.0, //col 0
+																3.0,
+																90.0,  //col 2
+																3.0,
+																90.0, // col 4
+																TableLayoutConstants.FILL,
+																TableLayoutConstants.MINIMUM, // col 6
+																TableLayoutConstants.MINIMUM, // col 7
+																3.0,
+																24.0, // col 9
+																36.0, // col 10
+																24.0, // col 11
+																3.0
+																},
+								{ TableLayoutConstants.FILL } });
+						jPanelButtonsModelLayout.setHGap(5);
+						jPanelButtonsModelLayout.setVGap(5);
+						jPanelButtonsModel.setLayout(jPanelButtonsModelLayout);
+						jModelPanel.add(jPanelButtonsModel, "1, 4, 5, 4");
+						{
+							/* popup menu for selecting New, Open, Save and Save As actions */
+							jButtonMenu = new JButton();
+							popup = new JPopupMenu();
+					        popup.add(new JMenuItem(new AbstractAction(Sextante.getText("New")) {
+					            public void actionPerformed(ActionEvent e) {
+					            	checkChangesAndCreateNewModel();
+					            }
+					        }));
+					        popup.add(new JMenuItem(new AbstractAction(Sextante.getText("Open")) {
+					            public void actionPerformed(ActionEvent e) {
+					            	checkChangesAndOpenModel();
+					            }
+					        }));
+					        popup.add(new JSeparator(SwingConstants.HORIZONTAL));
+
+					        popup.add(jMenuSave);
+				        	if ( m_Algorithm.getFilename() != null ) {
+				        		jMenuSave.setEnabled(true);
+				        	} else {
+				        		jMenuSave.setEnabled(false);
+				        	}
+					        popup.add(new JMenuItem(new AbstractAction(Sextante.getText("Save_as")) {
+					            public void actionPerformed(ActionEvent e) {
+					            	saveModel(true);
+					            }
+					        }));
+					        jButtonMenu.addMouseListener(new MouseAdapter() {
+					            public void mousePressed(MouseEvent e) {
+					                popup.show(e.getComponent(), e.getX(), e.getY());
+					            }
+					        });
+							jButtonMenu.setText(Sextante.getText("file_operations"));
+							jButtonMenu.setIcon(new ImageIcon(getClass().getClassLoader().
+									getResource("javax/swing/plaf/metal/icons/ocean/menu.gif")));
+							jButtonMenu.setIconTextGap(8);
+							jPanelButtonsModel.add (jButtonMenu,"0, 0");
+						}
+
+						/* edit the selected node */
+						jButtonEdit = new JButton();
+						jButtonEdit.setText(Sextante.getText("Edit"));
+						jButtonEdit.setEnabled(false);
+						jButtonEdit.addActionListener(new ActionListener() {
+							public void actionPerformed(final ActionEvent evt) {
+								if ( currentNode != null )
+									modelGraphPanel.editCell(currentNode);
+							}
+						});
+						jPanelButtonsModel.add (jButtonEdit,"2, 0");
+
+						/* delete the selected node */
+						jButtonDelete = new JButton();
+						jButtonDelete.setText(Sextante.getText("Remove"));
+						jButtonDelete.setEnabled(false);
+						jButtonDelete.addActionListener(new ActionListener() {
+							public void actionPerformed(final ActionEvent evt) {
+								if ( currentNode != null ) {
+									final String sKey = (String) (currentNode.getObject());
+					            	removeElement(sKey);
+								}
+							}
+						});
+						jPanelButtonsModel.add (jButtonDelete,"4, 0");
+
+
+						/* controls for grid settings */
+
+						jGridBox = new JCheckBox(Sextante.getText("modeler_grid_activate"));
+						jGridBox.setSelected(false);
+						jGridBox.setEnabled(true);
+						jPanelButtonsModel.add (jGridBox,"6, 0");
+
+						jGridSize = new JSpinner(new SpinnerNumberModel((int)m_dGridSize,1,100,1));
+						jGridSize.setEnabled(false);
+						jPanelButtonsModel.add (jGridSize,"7, 0");
+
+						jGridSize.addChangeListener(new ChangeListener() {
+							public void stateChanged(ChangeEvent e) {
+								if ( jGridBox.isSelected() == true ) {
+									final Integer value=(Integer) jGridSize.getValue();
+									final int ival=value.intValue();
+									modelGraphPanel.getGraph().setGridSize(ival);
+									m_dGridSize = (double) ival;
+								}
+							}
+						});
+
+						jGridBox.addActionListener(new ActionListener() {
+							public void actionPerformed(final ActionEvent evt) {
+								if ( jGridBox.isSelected() == true ) {
+									modelGraphPanel.getGraph().setScale(m_dScale);
+									modelGraphPanel.getGraph().setGridEnabled(true);
+									modelGraphPanel.getGraph().setGridVisible(true);
+									m_bGridEnabled = true;
+									jGridSize.setEnabled(true);
+								} else {
+									modelGraphPanel.getGraph().setScale(m_dScale);
+									modelGraphPanel.getGraph().setGridEnabled(false);
+									modelGraphPanel.getGraph().setGridVisible(false);
+									m_bGridEnabled = false;
+									jGridSize.setEnabled(false);
+								}
+							}
+						});
+					}
+
+					/* controls for scale settings */
+
+					jScaleButtonMinus = new JButton(Sextante.getText("-"));
+					jPanelButtonsModel.add (jScaleButtonMinus,"9, 0");
+
+					jScaleButtonOne = new JButton(Sextante.getText("1:1"));
+					jPanelButtonsModel.add (jScaleButtonOne,"10, 0");
+
+					jScaleButtonPlus = new JButton(Sextante.getText("+"));
+					jPanelButtonsModel.add (jScaleButtonPlus,"11, 0");
+
+					jScaleButtonMinus.addActionListener(new ActionListener() {
+						public void actionPerformed(final ActionEvent evt) {
+							zoomMinus();
+						}
+					});
+
+					jScaleButtonOne.addActionListener(new ActionListener() {
+						public void actionPerformed(final ActionEvent evt) {
+							zoomReset();
+						}
+					});
+
+					jScaleButtonPlus.addActionListener(new ActionListener() {
+						public void actionPerformed(final ActionEvent evt) {
+							zoomPlus();
+						}
+					});
+
+					jElementsPanel = new JPanel();
+					final TableLayout jElementsPanelLayout =
+							new TableLayout(new double[][] { { 3.0, TableLayoutConstants.FILL, 3.0 },
+							{ 	3.0,
+								TableLayoutConstants.FILL, // row 1: inputs selector
+								40.0, // row 3: buttons panel ( Add | Help )
+								3.0 } });
+					jElementsPanelLayout.setHGap(5);
+					jElementsPanelLayout.setVGap(5);
+					jElementsPanel.setLayout(jElementsPanelLayout);
+					jSplitPane.add(jElementsPanel, JSplitPane.LEFT);
+					jSplitPane.setDividerLocation(0.3);
+					jElementsPanel.setMinimumSize(new java.awt.Dimension(250, 528));
+					{
+						jPanelButtonsElements = new JPanel();
+						final TableLayout jButtonsElementsPanelLayout =
+							new TableLayout(new double[][] { { 3.0,
+								120.0,
+								TableLayoutConstants.FILL,
+								TableLayoutConstants.MINIMUM,
+								3.0 },
+							{ 	3.0,
+								30.0,
+								3.0 } });
+						jButtonsElementsPanelLayout.setHGap(5);
+						jButtonsElementsPanelLayout.setVGap(5);
+						jPanelButtonsElements.setLayout(jButtonsElementsPanelLayout);
+						{
+							jButtonAdd = new JButton();
+							jButtonAdd.setText(Sextante.getText("Add") + "..." );
+							jPanelButtonsElements.add(jButtonAdd,"1, 1");
+							jButtonAdd.setEnabled(false); //only enable if a selection has been made from the tree
+							jButtonAdd.addActionListener(new ActionListener() {
+								public void actionPerformed(final ActionEvent evt) {
+									switch (jElementsTabbedPane.getSelectedIndex()) {
+									case 0:
+										inputsPanel.addSelectedInput();
+										break;
+									case 1:
+										extensionsPanel.addSelectedProcess();
+										break;
+									}
+								}
+							});
+							jButtonHelp = new JButton();
+							//jButtonHelp.setText(Sextante.getText("Help"));
+							jButtonHelp.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/info.gif")));
+							jPanelButtonsElements.add(jButtonHelp, "3, 1");
+							jButtonHelp.addActionListener(new ActionListener() {
+								public void actionPerformed(final ActionEvent evt) {
+									showHelp(evt);
+								}
+							});
+						}
+					}
+					jElementsPanel.add(jPanelButtonsElements,"1, 2");
+					{
+						jElementsTabbedPane = new JTabbedPane();
+						jElementsTabbedPane.setTabPlacement(SwingConstants.BOTTOM);
+						jElementsPanel.add(jElementsTabbedPane, "1, 1");
+						{
+							inputsPanel = new InputsPanel(this, m_Parent);
+							jElementsTabbedPane.addTab(Sextante.getText("Inputs"), null, inputsPanel, null);
+							extensionsPanel = new AlgorithmsPanel(this, m_Parent);
+							jElementsTabbedPane.addTab(Sextante.getText("Procedures"), null, extensionsPanel, null);
+						}
+						/* provide mouse and key listeners to toggle "Add.." button state */
+						inputsPanel.getTree().addMouseListener(new MouseListener () {
+							public void mouseClicked(MouseEvent e) {
+								jButtonAdd.setEnabled(false);
+								if ( inputsPanel.getTree().getSelectionPath() != null ) {
+									final DefaultMutableTreeNode node = (DefaultMutableTreeNode) inputsPanel.getTree().
+											getSelectionPath().getLastPathComponent();
+							         if (node.getUserObject() instanceof ParameterPanel) {
+							            final ParameterPanel paramPanel = (ParameterPanel) node.getUserObject();
+							            if (paramPanel.parameterCanBeAdded()) {
+							            	jButtonAdd.setEnabled(true);
+							            }
+							         }
+								}
+								jButtonAdd.repaint();
+							}
+							public void mouseEntered(MouseEvent e) {}
+							public void mouseExited(MouseEvent e) {}
+							public void mousePressed(MouseEvent e) {}
+							public void mouseReleased(MouseEvent e) {}
+						});
+						inputsPanel.getTree().addKeyListener(new KeyListener () {
+							public void keyReleased(KeyEvent e) {
+								jButtonAdd.setEnabled(false);
+								if ( inputsPanel.getTree().getSelectionPath() != null ) {
+									final DefaultMutableTreeNode node = (DefaultMutableTreeNode) inputsPanel.getTree().
+											getSelectionPath().getLastPathComponent();
+							         if (node.getUserObject() instanceof ParameterPanel) {
+							            final ParameterPanel paramPanel = (ParameterPanel) node.getUserObject();
+							            if (paramPanel.parameterCanBeAdded()) {
+							            	jButtonAdd.setEnabled(true);
+							            }
+							         }
+								}
+								jButtonAdd.repaint();
+							}
+							public void keyTyped(KeyEvent e) {}
+							public void keyPressed(KeyEvent e) {}
+
+						});
+						/* provide mouse and key listeners to toggle "Add.." button state */
+						extensionsPanel.getTree().addMouseListener(new MouseListener () {
+							public void mouseClicked(MouseEvent e) {
+								jButtonAdd.setEnabled(false);
+								if ( extensionsPanel.getTree().getSelectionPath() != null ) {
+							         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) extensionsPanel.
+							         		getTree().getSelectionPath().getLastPathComponent();
+							         if ( node.getUserObject() instanceof java.lang.String == false ) {
+							        	 final GeoAlgorithm alg = (GeoAlgorithm) node.getUserObject();
+							        	 if (extensionsPanel.isAlgorithmEnabled(alg)) {
+							        		 jButtonAdd.setEnabled(true);
+							        	 }
+							         }
+								}
+								jButtonAdd.repaint();
+							}
+							public void mouseEntered(MouseEvent e) {}
+							public void mouseExited(MouseEvent e) {}
+							public void mousePressed(MouseEvent e) {}
+							public void mouseReleased(MouseEvent e) {}
+						});
+						extensionsPanel.getTree().addKeyListener(new KeyListener () {
+							public void keyReleased(KeyEvent e) {
+								jButtonAdd.setEnabled(false);
+								if ( extensionsPanel.getTree().getSelectionPath() != null ) {
+									final DefaultMutableTreeNode node = (DefaultMutableTreeNode) extensionsPanel.getTree().
+											getSelectionPath().getLastPathComponent();
+							         if (node.getUserObject() instanceof ParameterPanel) {
+							            final ParameterPanel paramPanel = (ParameterPanel) node.getUserObject();
+							            if (paramPanel.parameterCanBeAdded()) {
+							            	jButtonAdd.setEnabled(true);
+							            }
+							         }
+								}
+								jButtonAdd.repaint();
+							}
+							public void keyTyped(KeyEvent e) {}
+							public void keyPressed(KeyEvent e) {}
+
+						});
+					}
+				}
+			}
+		}
+
+	}
+
+
+	public boolean getGridEnabled () {
+		return (m_bGridEnabled);
+	}
+
+
+	public double getScale () {
+		return (m_dScale);
+	}
+
+
+	public double getGridSize () {
+		return (m_dGridSize);
+	}
+
+
+	public void toggleEditButtons ( boolean active, ObjectAndDescription node ) {
+		if ( jButtonEdit != null && jButtonDelete != null ) {
+			if ( active == true ) {
+				jButtonEdit.setEnabled(true);
+				jButtonDelete.setEnabled(true);
+				currentNode = node;
+			} else {
+				jButtonEdit.setEnabled(false);
+				jButtonDelete.setEnabled(false);
+				currentNode = null;
+			}
+			jButtonEdit.repaint();
+			jButtonDelete.repaint();
+		}
+	}
+
+
+	public void zoomMinus () {
+		if ( m_dScale > 0.2 ) {
+			m_dScale = m_dScale * 0.90;
+			modelGraphPanel.getGraph().setScale(m_dScale);
+		}
+	}
+
+
+	public void zoomPlus () {
+		if ( m_dScale < 2.0 ) {
+			m_dScale = m_dScale * 1.10;
+			modelGraphPanel.getGraph().setScale(m_dScale);
+		}
+	}
+
+
+	public void zoomReset () {
+		m_dScale = 1.0;
+		modelGraphPanel.getGraph().setScale(m_dScale);
+	}
+
+
+	private String[] getGroups() {
+
+		final ArrayList<String> groups = new ArrayList<String>();
+
+		groups.add(Sextante.getText("Models"));
+		final HashMap<String, GeoAlgorithm> algs = Sextante.getAlgorithms().get("SEXTANTE");
+		final Set<String> keys = algs.keySet();
+		final Iterator<String> iter = keys.iterator();
+		while (iter.hasNext()) {
+			final GeoAlgorithm alg = algs.get(iter.next());
+			if (!groups.contains(alg.getGroup())) {
+				groups.add(alg.getGroup());
+			}
+		}
+
+
+		final String[] sortedGroups = groups.toArray(new String[0]);
+		Arrays.sort(sortedGroups);
+
+		return sortedGroups;
+
+	}
+
+
+	protected void showHelp(final ActionEvent evt) {
+
+		SextanteGUI.getGUIFactory().showHelpDialog("modeler");
+
+	}
+
+
+	public ModelGraphPanel getGraph() {
+
+		return modelGraphPanel;
+
+	}
+
+
+	public void checkChangesAndOpenModel(final String sFilename) {
+
+		if (m_bHasChanged) {
+			final int iRet = JOptionPane.showConfirmDialog(null,
+					Sextante.getText("Model_has_been_modified") + "\n"
+					+ Sextante.getText("Do_you_want_to_open_a_new_model_without_saving_changes"),
+					Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+			if (iRet == JOptionPane.YES_OPTION) {
+				openModel(sFilename);
+			}
+		}
+		else {
+			openModel(sFilename);
+		}
+
+	}
+
+
+	public void checkChangesAndCloseModel() {
+
+		if (m_bHasChanged) {
+			final int iRet = JOptionPane.showConfirmDialog(null,
+					Sextante.getText("Model_has_been_modified") + "\n"
+					+ Sextante.getText("Do_you_want_to_save_your_changes"),
+					Sextante.getText("Warning"), JOptionPane.YES_NO_OPTION);
+			if (iRet == JOptionPane.YES_OPTION) {
+				saveModel(false);
+			}
+		}
+	}
+
+
+	private void openModel(final String sFilename) {
+
+		newModel();
+
+		if (sFilename != null) {
+			final File file = new File(sFilename);
+			try {
+				m_Algorithm = ModelAlgorithmIO.open(file, this);
+				extensionsPanel.setAlgorithm(m_Algorithm);
+				extensionsPanel.setAlgorithmCount(m_Algorithm.getAlgorithms().size() + 1);
+				updatePanel(false);
+				jTextFieldName.setText(m_Algorithm.getName());
+				final JTextField textField = (JTextField) jComboBoxGroup.getEditor().getEditorComponent();
+				textField.setText(m_Algorithm.getGroup());
+			}
+			catch (final Exception e) {
+				Sextante.addErrorToLog(e);
+				return;
+			}
+			jMenuSave.setEnabled(true);
+		}
+
+		m_bHasChanged = false;
+
+	}
+
+
+	protected void checkChangesAndOpenModel() {
+
+		if (m_bHasChanged) {
+			final int iRet = JOptionPane.showConfirmDialog(null,
+					Sextante.getText("Model_has_been_modified") + "\n"
+					+ Sextante.getText("Do_you_want_to_open_a_new_model_without_saving_changes"),
+					Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+			if (iRet == JOptionPane.YES_OPTION) {
+				openModel();
+			}
+		}
+		else {
+			openModel();
+		}
+
+	}
+
+
+	protected void saveModel( boolean SaveAs) {
+
+		String sFilename = m_Algorithm.getFilename();
+		final JFileChooser fc = new JFileChooser();
+		final GenericFileFilter javaFilter = new GenericFileFilter("java", Sextante.getText("Java_code") + " (*.java)");
+		final ModelFileFilter modelFilter = new ModelFileFilter();
+		fc.addChoosableFileFilter(modelFilter);
+		fc.addChoosableFileFilter(javaFilter);
+		fc.setAcceptAllFileFilterUsed(false);
+		fc.setFileFilter(modelFilter);
+		if (sFilename != null) {
+			fc.setSelectedFile(new File(sFilename));
+		}
+		else {
+			final String sFolder = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+			fc.setCurrentDirectory(new File(sFolder));
+		}
+
+		/* we only show a "Save As..." dialog if it is really necessary */
+		int returnVal;
+		if ( SaveAs == true || m_Algorithm.getFilename() == null ) {
+			returnVal = fc.showSaveDialog(this);
+			if ( returnVal == JFileChooser.APPROVE_OPTION && fc.getSelectedFile() != null ) {
+				final File f = fc.getSelectedFile();
+				if(f.exists()) {
+					final int iRet = JOptionPane.showConfirmDialog(null,
+					Sextante.getText("Model_file_exists") + "\n"
+					+ Sextante.getText("Do_you_want_to_overwrite"),
+					Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+					if (iRet == JOptionPane.YES_OPTION) {
+						returnVal = JFileChooser.APPROVE_OPTION;
+					} else {
+						returnVal = JFileChooser.CANCEL_OPTION;
+					}
+				}
+			}
+		} else {
+			returnVal = JFileChooser.APPROVE_OPTION;
+		}
+
+		File file = null;
+		if (returnVal == JFileChooser.APPROVE_OPTION) {
+			if ( SaveAs == true || m_Algorithm.getFilename() == null ) {
+				file = fc.getSelectedFile();
+				sFilename = file.getAbsolutePath();
+				m_Algorithm.setFilename(sFilename);
+			} else {
+				sFilename = m_Algorithm.getFilename();
+				file = new File(sFilename);
+			}
+			if (fc.getFileFilter() == javaFilter) {
+				/* this can only happen if we have a "Save As..." action */
+				if (!sFilename.endsWith("java")) {
+					file = new File(sFilename + ".java");
+				}
+				ModelAlgorithmIO.saveAsJava(m_Algorithm, file);
+			}
+			else {
+				if (!sFilename.endsWith("model")) {
+					file = new File(sFilename + ".model");
+					jMenuSave.setEnabled(true);
+				}
+				modelGraphPanel.storeCoords();
+				ModelAlgorithmIO.save(this, file);
+				setHasChanged(false);
+				SextanteGUI.updateAlgorithmProvider(ModelerAlgorithmProvider.class);
+				SextanteGUI.getGUIFactory().updateToolbox();
+			}
+		}
+
+	}
+
+
+	protected void openModel() {
+
+		final JFileChooser fc = new JFileChooser();
+		final ModelFileFilter filter = new ModelFileFilter();
+
+		final String sFolder = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+		fc.setFileFilter(filter);
+		fc.setCurrentDirectory(new File(sFolder));
+		final int returnVal = fc.showOpenDialog(this);
+
+		if (returnVal == JFileChooser.APPROVE_OPTION) {
+			final File file = fc.getSelectedFile();
+			try {
+				newModel();
+				m_Algorithm = ModelAlgorithmIO.open(file, this);
+				extensionsPanel.setAlgorithm(m_Algorithm);
+				extensionsPanel.setAlgorithmCount(m_Algorithm.getAlgorithms().size() + 1);
+				jTextFieldName.setText(m_Algorithm.getName());
+				updatePanel(false);
+			}
+			catch (final Exception e) {
+				Sextante.addErrorToLog(e);
+				return;
+			}
+		}
+		setHasChanged(false);
+	}
+
+
+	protected void checkChangesAndCreateNewModel() {
+
+		if (m_bHasChanged) {
+			final int iRet = JOptionPane.showConfirmDialog(null,
+					Sextante.getText("Model_has_been_modified") + "\n"
+					+ Sextante.getText("Do_you_want_to_start_a_new_model_without_saving_changes?"),
+					Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+			if (iRet == JOptionPane.YES_OPTION) {
+				newModel();
+			}
+		}
+		else {
+			newModel();
+		}
+
+
+	}
+
+
+	public void updatePanel(final boolean bUpdateCoords) {
+
+		updateGraphicalDescription(bUpdateCoords);
+		//updateButtons();
+
+	}
+
+
+	/*   private void updateButtons() {
+
+         final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+         jButtonExecute.setEnabled(m_Algorithm.meetsDataRequirements(objs));
+
+      }*/
+
+
+	private void updateGraphicalDescription(final boolean bUpdateCoords) {
+
+		if (bUpdateCoords) {
+			modelGraphPanel.storeCoords();
+		}
+		modelGraphPanel.updateGraph();
+
+	}
+
+
+	private void newModel() {
+
+		m_bHasChanged = false;
+		m_Algorithm = new ModelAlgorithm();
+		m_Algorithm.setGroup(Sextante.getText("Models"));
+		m_DataObjects.clear();
+		m_InputKeys.clear();
+		extensionsPanel.setAlgorithm(m_Algorithm);
+		extensionsPanel.setAlgorithmCount(0);
+		modelGraphPanel.setAlgorithm(m_Algorithm);
+		modelGraphPanel.resetCoords();
+		jTextFieldName.setText(Sextante.getText("[New_model]"));
+		jComboBoxGroup.setSelectedItem(Sextante.getText("Models"));
+		jMenuSave.setEnabled(false);
+		m_dScale = 1.0;
+		m_dGridSize = 10.0;
+		m_bGridEnabled = false;
+		modelGraphPanel.getGraph().setScale(m_dScale);
+		updatePanel(true);
+	}
+
+
+	private void removeAlgorithm(final String sAlgKey) {
+
+		OutputObjectsSet ooSet;
+		Set set;
+		Iterator iter;
+		final GeoAlgorithm alg = m_Algorithm.getAlgorithm(sAlgKey);
+		String sKey;
+		final ArrayList toRemove = new ArrayList();
+
+		ooSet = alg.getOutputObjects();
+		for (int i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+			final Output out = ooSet.getOutput(i);
+			sKey = out.getName();
+			sKey += sAlgKey;
+			m_Algorithm.unassign(sKey);
+			m_Algorithm.getOutputObjects().remove(sKey);
+			m_DataObjects.remove(sKey);
+		}
+
+		set = m_DataObjects.keySet();
+		iter = set.iterator();
+		while (iter.hasNext()) {
+			final Object obj = iter.next();
+			if (obj instanceof String) {
+				sKey = (String) obj;
+				if (sKey.startsWith("INNERPARAM") && sKey.endsWith(sAlgKey)) {
+					toRemove.add(sKey);
+				}
+			}
+		}
+
+		for (int i = 0; i < toRemove.size(); i++) {
+			m_DataObjects.remove(toRemove.get(i));
+		}
+
+		m_Algorithm.removeAlgorithm(sAlgKey);
+		m_bHasChanged = true;
+
+	}
+
+
+	private void removeDataObject(final String sKey) {
+
+		m_Algorithm.removeInput(sKey);
+		m_DataObjects.remove(sKey);
+		m_InputKeys.remove(sKey);
+		//modelGraphPanel.removeCell(sKey);
+		m_bHasChanged = true;
+
+	}
+
+
+	public boolean removeElement(final String sKey) {
+
+		final Object obj = getObjectFromKey(sKey);
+
+		if (obj instanceof GeoAlgorithm) {
+			if (canRemoveAlgorithm(sKey)) {
+				final int iRet = JOptionPane.showConfirmDialog(null,
+						Sextante.getText("delete_modeler_node_question"),
+						Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+				if (iRet == JOptionPane.YES_OPTION) {
+					removeAlgorithm(sKey);
+					updatePanel(true);
+					return (true);
+				}
+			}
+			else {
+				JOptionPane.showMessageDialog(null, Sextante.getText("Other_elements_depend_on_the_selected_one") + ".\n"
+						+ Sextante.getText("Remove_them_before_removing_this_one"),
+						Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+			}
+		}
+		else {
+			if (canRemoveDataObject(sKey)) {
+				final int iRet = JOptionPane.showConfirmDialog(null,
+						Sextante.getText("delete_modeler_node_question"),
+						Sextante.getText("Warning"), JOptionPane.YES_NO_CANCEL_OPTION);
+				if (iRet == JOptionPane.YES_OPTION) {
+					removeDataObject(sKey);
+					updatePanel(true);
+					return ( true );
+				}
+			}
+			else {
+				JOptionPane.showMessageDialog(null, Sextante.getText("Other_elements_depend_on_the_selected_one") + ".\n"
+						+ Sextante.getText("Remove_them_before_removing_this_one"),
+						Sextante.getText("Warning"), JOptionPane.WARNING_MESSAGE);
+			}
+		}
+
+		return ( false );
+	}
+
+
+	private boolean canRemoveAlgorithm(final String sKey) {
+
+		String sObjectKey;
+		final GeoAlgorithm alg = m_Algorithm.getAlgorithm(sKey);
+		OutputObjectsSet ooSet = alg.getOutputObjects();
+		ooSet = alg.getOutputObjects();
+		for (int i = 0; i < ooSet.getOutputObjectsCount(); i++) {
+			final Output out = ooSet.getOutput(i);
+			sObjectKey = out.getName() + sKey;
+			if (!canRemoveDataObject(sObjectKey)) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+
+	private boolean canRemoveDataObject(final String sKey) {
+
+		int i;
+		final ArrayList algorithmKeys = m_Algorithm.getAlgorithmKeys();
+		String sAlgKey;
+
+		for (i = 0; i < algorithmKeys.size(); i++) {
+			sAlgKey = (String) algorithmKeys.get(i);
+			final HashMap assignments = m_Algorithm.getInputAssignments(sAlgKey);
+			final Set set = assignments.keySet();
+			final Iterator iter = set.iterator();
+			String sAssignmentKey;
+			String sAssignment;
+			while (iter.hasNext()) {
+				sAssignmentKey = (String) iter.next();
+				sAssignment = (String) assignments.get(sAssignmentKey);
+				if (sAssignment != null) {
+					if (sAssignment.equals(sKey)) {
+						return false;
+					}
+					else if (sAssignment.startsWith("INNERPARAM")) {
+						//if it is a multiple input, check against its individual data objects
+						final Object obj = ((ObjectAndDescription) getDataObjects().get(sAssignment)).getObject();
+						if (obj instanceof ArrayList) {
+							final ArrayList list = (ArrayList) obj;
+							for (int j = 0; j < list.size(); j++) {
+								final String s = (String) list.get(j);
+								if (s.equals(sKey)) {
+									return false;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+
+		return true;
+
+	}
+
+
+	/*private void executeModel() {
+
+      m_Algorithm.getInputs().clear();
+
+      final Set set = m_DataObjects.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final String sKey = (String) iter.next();
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(sKey);
+         m_Algorithm.getInputs().put(sKey, oad.getObject());
+      }
+
+      try {
+         final GeoAlgorithm alg = m_Algorithm.getNewInstance();
+         final int iRet = SextanteGUI.getGUIFactory().showAlgorithmDialog(alg, m_Parent, null);
+         if (iRet == IGUIFactory.OK) {
+            GeoAlgorithmExecutors.execute(alg, m_Parent);
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }*/
+
+
+	public boolean hasChanged() {
+
+		return m_bHasChanged;
+
+	}
+
+
+	public void setHasChanged(final boolean hasChanged) {
+
+		m_bHasChanged = hasChanged;
+		jMenuSave.setEnabled(hasChanged);
+		this.repaint();
+	}
+
+
+	public Object getObjectFromKey(final String sObjectKey) {
+
+		int i;
+		String sKey;
+
+		for (i = 0; i < m_InputKeys.size(); i++) {
+			sKey = (String) m_InputKeys.get(i);
+			if (sKey.equals(sObjectKey)) {
+				return m_DataObjects.get(sKey);
+			}
+		}
+
+		final ArrayList algKeys = m_Algorithm.getAlgorithmKeys();
+
+		for (i = 0; i < algKeys.size(); i++) {
+			sKey = (String) algKeys.get(i);
+			if (sKey.equals(sObjectKey)) {
+				return m_Algorithm.getAlgorithm(sKey);
+			}
+		}
+
+		return null;
+
+	}
+
+
+	public void addInputToArray(String sKey,
+			final Object obj,
+			final ArrayList array) {
+
+		int i;
+		Object input;
+		if (obj instanceof ArrayList) {
+			final ArrayList multipleInput = (ArrayList) obj;
+			for (i = 0; i < multipleInput.size(); i++) {
+				sKey = (String) multipleInput.get(i);
+				input = ((ObjectAndDescription) m_DataObjects.get(sKey)).getObject();
+				if (input != null) {
+					addInputToArray(sKey, multipleInput.get(i), array);
+				}
+			}
+		}
+		else {
+			array.add(sKey);
+		}
+
+		m_bHasChanged = true;
+
+	}
+
+
+	private ArrayList getArrayOfSingleInputs(final HashMap assignments) {
+
+		Set set;
+		Iterator iter;
+		String sKey;
+		String sInput;
+		Object obj;
+		final ArrayList array = new ArrayList();
+
+		set = assignments.keySet();
+		iter = set.iterator();
+		while (iter.hasNext()) {
+			sKey = (String) iter.next();
+			sInput = (String) assignments.get(sKey);
+			if (sInput != null) {
+				if ( m_DataObjects != null && m_DataObjects.get(sInput) != null ) {
+					obj = ((ObjectAndDescription) m_DataObjects.get(sInput)).getObject();
+					addInputToArray(sInput, obj, array);
+				} else {
+					System.out.println("SEXTANTE: ModelerPanel.java: getArrayOfSingleInputs(): Got NULL object(s).\n");
+				}
+			}
+		}
+
+		return array;
+
+	}
+
+
+	public ArrayList getDependences(final String sKey) {
+
+		int i, j;
+		boolean bFoundMatch;
+		final ArrayList dependences = new ArrayList();
+		GeoAlgorithm alg = m_Algorithm.getAlgorithm(sKey);
+		final HashMap assignments = m_Algorithm.getInputAssignments(sKey);
+		final ArrayList algorithms = m_Algorithm.getAlgorithms();
+		final ArrayList algorithmKeys = m_Algorithm.getAlgorithmKeys();
+		OutputObjectsSet ooSet;
+		String sInput, sInputKey, sOutput;
+		String sAlgKey;
+
+		if (alg == null) {
+			return null;
+		}
+
+		final ArrayList inputs = getArrayOfSingleInputs(assignments);
+		for (j = 0; j < inputs.size(); j++) {
+			sInput = (String) inputs.get(j);
+			bFoundMatch = false;
+			for (i = 0; (i < algorithms.size()) && !bFoundMatch; i++) {
+				alg = (GeoAlgorithm) algorithms.get(i);
+				sAlgKey = (String) algorithmKeys.get(i);
+				ooSet = alg.getOutputObjects();
+				for (int k = 0; k < ooSet.getOutputObjectsCount(); k++) {
+					final Output out = ooSet.getOutput(k);
+					sOutput = out.getName();
+					sOutput += sAlgKey;
+					if (sInput.equals(sOutput)) {
+						bFoundMatch = true;
+						if (!dependences.contains(sAlgKey)) {
+							dependences.add(sAlgKey);
+						}
+						break;
+					}
+				}
+			}
+			if (!bFoundMatch) {
+				for (i = 0; (i < m_InputKeys.size()) && !bFoundMatch; i++) {
+					sInputKey = (String) m_InputKeys.get(i);
+					if (sInput.equals(sInputKey)) {
+						bFoundMatch = true;
+						if (!dependences.contains(sInputKey)) {
+							dependences.add(sInputKey);
+						}
+						break;
+					}
+				}
+			}
+		}
+
+		return dependences;
+
+	}
+
+
+	public ModelAlgorithm getAlgorithm() {
+
+		return m_Algorithm;
+
+	}
+
+
+	public HashMap getDataObjects() {
+
+		return m_DataObjects;
+
+	}
+
+
+	public ArrayList getInputKeys() {
+
+		return m_InputKeys;
+
+	}
+
+
+	public ModelGraphPanel getModelGraphPanel() {
+
+		return modelGraphPanel;
+
+	}
+
+}
+

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,146 @@
+package es.unex.sextante.gui.modeler;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.grass.GrassAlgorithmProvider;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteModelerSettings;
+
+public class ModelerAlgorithmProvider
+         implements
+            IAlgorithmProvider {
+
+   private HashMap<String, GeoAlgorithm> m_Algs;
+
+   private final static ImageIcon        MODEL_ICON = new ImageIcon(GrassAlgorithmProvider.class.getClassLoader().getResource(
+                                                             "images/model.png"));
+
+
+   public HashMap<String, GeoAlgorithm> getAlgorithms() {
+
+      return m_Algs;
+
+   }
+
+
+   public HashMap<String, Class> getCustomModelerParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public HashMap<String, Class> getCustomParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public ImageIcon getIcon() {
+
+      return MODEL_ICON;
+
+   }
+
+
+   public String getName() {
+
+      return Sextante.getText("Models");
+
+   }
+
+
+   public void initialize() {
+
+      m_Algs = new HashMap<String, GeoAlgorithm>();
+
+      final String sFolder = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+      final GeoAlgorithm[] algs = ModelAlgorithmIO.loadModelsAsAlgorithms(sFolder);
+
+      for (int i = 0; i < algs.length; i++) {
+         m_Algs.put(algs[i].getCommandLineName(), algs[i]);
+      }
+
+   }
+
+
+   public Setting getSettings() {
+
+      return new SextanteModelerSettings();
+
+   }
+
+
+   public void update() {
+
+      initialize();
+
+   }
+
+
+   public String getAlgorithmHelp(final GeoAlgorithm alg) {
+
+      final String sModelFilename = ((ModelAlgorithm) alg).getFilename();
+      String sFilename = sModelFilename.substring(sModelFilename.lastIndexOf(File.separator));
+      sFilename = sFilename + ".xml";
+      final String sPath = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+      final String sFullPath = sPath + File.separator + sFilename;
+      return HelpIO.getHelpAsHTMLCode(alg, sFullPath);
+
+   }
+
+
+   public String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                          final boolean bForceCurrentLocale) {
+
+      final String sModelFilename = ((ModelAlgorithm) alg).getFilename();
+      String sFilename = sModelFilename.substring(sModelFilename.lastIndexOf(File.separator));
+      sFilename = sFilename + ".xml";
+      final String sPath = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+      final String sFullPath = sPath + File.separator + sFilename;
+
+      return sFullPath;
+
+   }
+
+
+   public boolean canEditHelp() {
+
+      return true;
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      final HashMap<NameAndIcon, ArrayList<ToolboxAction>> map = new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+      final NameAndIcon nai = new NameAndIcon(getName(), MODEL_ICON);
+      final ArrayList<ToolboxAction> list = new ArrayList<ToolboxAction>();
+      list.add(new CreateModelToolboxAction());
+      map.put(nai, list);
+
+      return map;
+   }
+
+
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+      return new IToolboxRightButtonAction[] { new EditModelAction(), new DeleteModelAction() };
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelerAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelCodeCreator.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelCodeCreator.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelCodeCreator.java	(revision 369)
@@ -0,0 +1,366 @@
+package es.unex.sextante.gui.modeler;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo3DRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.ParameterFilepath;
+
+
+public class ModelCodeCreator {
+
+   public static String getJavaCode(final ModelAlgorithm alg) {
+
+      final StringBuffer code = new StringBuffer();
+
+      addHeader(code, alg);
+      addOpening(code, alg);
+      addConstants(code, alg);
+      addDefineCharacteristics(code, alg);
+      addProcessAlgorithm(code, alg);
+
+      addClosing(code, alg);
+
+      return code.toString();
+
+
+   }
+
+
+   private static void addConstants(final StringBuffer code,
+                                    final ModelAlgorithm alg) {
+
+      final ParametersSet params = alg.getParameters();
+      for (int i = 0; i < params.getNumberOfParameters(); i++) {
+         final Parameter param = params.getParameter(i);
+         final String sName = getParameterNameFromDescription(param);
+         code.append("\tpublic static final String " + sName + "=\"" + sName + "\";\n");
+      }
+
+   }
+
+
+   private static void addOpening(final StringBuffer code,
+                                  final ModelAlgorithm alg) {
+
+      code.append("\npublic class UnnamedAlgorithm extends  GeoAlgorithm {\n\n");
+
+   }
+
+
+   private static void addClosing(final StringBuffer code,
+                                  final ModelAlgorithm alg) {
+
+      code.append("}\n");
+
+   }
+
+
+   private static void addProcessAlgorithm(final StringBuffer code,
+                                           final ModelAlgorithm alg) {
+
+      code.append("\n\tpublic boolean processAlgorithm() {\n\n");
+
+      String sAs = null;
+      String sClass = null;
+      final ParametersSet params = alg.getParameters();
+      for (int i = 0; i < params.getNumberOfParameters(); i++) {
+         final Parameter param = params.getParameter(i);
+         if (param instanceof ParameterRasterLayer) {
+            sAs = "RasterLayer";
+            sClass = "IRasterLayer";
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            sAs = "ArrayList";
+            sClass = "ArrayList";
+         }
+         else if (param instanceof ParameterVectorLayer) {
+            sAs = "VectorLayer";
+            sClass = "IVectorLayer";
+         }
+         else if (param instanceof ParameterTable) {
+            sAs = "Table";
+            sClass = "ITable";
+         }
+         else if (param instanceof ParameterNumericalValue) {
+            sAs = "Double";
+            sClass = "Double";
+         }
+         else if (param instanceof ParameterString) {
+            sAs = "String";
+            sClass = "String";
+
+         }
+         else if (param instanceof ParameterFixedTable) {
+            sAs = "Object";
+            sClass = "FixedTableModel";
+            final String sName = getParameterNameFromDescription(param);
+            code.append("\t\t" + sClass + " " + sName.toLowerCase() + " = (FixedTableModel) m_Parameters.getParameterValueAs"
+                        + sAs + "(" + sName + ");\n");
+            continue;
+         }
+         else if (param instanceof ParameterPoint) {
+            sAs = "Point";
+            sClass = "Point2D";
+         }
+         else if (param instanceof ParameterBoolean) {
+            sAs = "Boolean";
+            sClass = "Boolean";
+         }
+
+         final String sName = getParameterNameFromDescription(param);
+         code.append("\t\t" + sClass + " " + sName.toLowerCase() + " = m_Parameters.getParameterValueAs" + sAs + "(" + sName
+                     + ");\n");
+
+
+      }
+
+
+      code.append("\n\t\treturn !m_Task.isCanceled();\n");
+      code.append("\t}\n\n");
+
+
+   }
+
+
+   private static void addParameters(final StringBuffer code,
+                                     final ModelAlgorithm alg) {
+
+      final StringBuffer dependentCode = new StringBuffer();
+      final ParametersSet params = alg.getParameters();
+      for (int i = 0; i < params.getNumberOfParameters(); i++) {
+         final Parameter param = params.getParameter(i);
+         if (param instanceof ParameterRasterLayer) {
+            try {
+               final AdditionalInfoRasterLayer ai = (AdditionalInfoRasterLayer) param.getParameterAdditionalInfo();
+               code.append("\t\t\tm_Parameters.addInputRasterLayer(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + new Boolean(ai.getIsMandatory()).toString() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {};
+         }
+         else if (param instanceof Parameter3DRasterLayer) {
+             try {
+                final AdditionalInfo3DRasterLayer ai = (AdditionalInfo3DRasterLayer) param.getParameterAdditionalInfo();
+                code.append("\t\t\tm_Parameters.addInput3DRasterLayer(" + getParameterNameFromDescription(param) + ", \""
+                            + param.getParameterDescription() + "\", " + new Boolean(ai.getIsMandatory()).toString() + ");\n");
+             }
+             catch (final NullParameterAdditionalInfoException e) {};
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            try {
+               final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+               String sType;
+               switch (ai.getDataType()) {
+                  case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_BAND";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_RASTER";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D:
+                      sType = "AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D";
+                      break;                     
+                  case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_TABLE";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT";
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+                  default:
+                     sType = "AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON";
+                     break;
+               }
+               code.append("\t\t\tm_Parameters.addMultipleInput(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + sType + "," + new Boolean(ai.getIsMandatory()).toString()
+                           + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {};
+         }
+         else if (param instanceof ParameterVectorLayer) {
+            try {
+               final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) param.getParameterAdditionalInfo();
+               String sType;
+               switch (ai.getShapeType()) {
+                  case AdditionalInfoVectorLayer.SHAPE_TYPE_ANY:
+                     sType = "AdditionalInfoVectorLayer.SHAPE_TYPE_ANY";
+                     break;
+                  case AdditionalInfoVectorLayer.SHAPE_TYPE_LINE:
+                     sType = "AdditionalInfoVectorLayer.SHAPE_TYPE_LINE";
+                     break;
+                  case AdditionalInfoVectorLayer.SHAPE_TYPE_POINT:
+                     sType = "AdditionalInfoVectorLayer.SHAPE_TYPE_POINT";
+                     break;
+                  case AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON:
+                  default:
+                     sType = "AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON";
+                     break;
+               }
+               code.append("\t\t\tm_Parameters.addInputVectorLayer(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + sType + ", "
+                           + new Boolean(ai.getIsMandatory()).toString() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+
+         }
+         else if (param instanceof ParameterTable) {
+            try {
+               final AdditionalInfoTable ai = (AdditionalInfoTable) param.getParameterAdditionalInfo();
+               code.append("\t\t\tm_Parameters.addInputTable(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + new Boolean(ai.getIsMandatory()).toString() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterNumericalValue) {
+            try {
+               final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) param.getParameterAdditionalInfo();
+               String sType;
+               switch (ai.getType()) {
+                  case AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER:
+                     sType = "AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER";
+                     break;
+                  default:
+                     sType = "AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE";
+               }
+               code.append("\t\t\tm_Parameters.addNumericalValue(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + sType + ", " + Double.toString(ai.getDefaultValue())
+                           + ", " + Double.toString(ai.getMinValue()) + ", " + Double.toString(ai.getMaxValue()) + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterString) {
+            try {
+               final AdditionalInfoString ai = (AdditionalInfoString) param.getParameterAdditionalInfo();
+               code.append("\t\t\tm_Parameters.addString(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + ai.getDefaultString().toString() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterFilepath) {
+             try {
+                final AdditionalInfoFilepath ai = (AdditionalInfoFilepath) param.getParameterAdditionalInfo();
+                String ext;
+                if ( ai.getExtensions() != null && ai.getExtensions().length > 0 
+                		&& ai.getExtensions()[0] != null && ai.getExtensions()[0].length() > 0 ) {
+                	ext = new String (ai.getExtensions()[0]);
+                } else {
+                	ext = new String ("");
+                }
+                code.append("\t\t\tm_Parameters.addFilepath(" + getParameterNameFromDescription(param) + ", \""
+                            + param.getParameterDescription() 
+                            + "\", " + new Boolean(ai.isFolder()).toString() 
+                            + "\", " + new Boolean(ai.isOpenDialog()).toString()
+                            + "\", " + new Boolean(ai.getIsVoxelData()).toString()
+                            + "\", " + ext
+                            + ");\n");
+             }
+             catch (final NullParameterAdditionalInfoException e) {};
+         }         
+         else if (param instanceof ParameterFixedTable) {
+            try {
+               final AdditionalInfoFixedTable ai = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+               code.append("\t\t\tm_Parameters.addFixedTable(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + ai.getRowsCount() + ", " + ai.getColsCount() + ", "
+                           + Boolean.toString(ai.isNumberOfRowsFixed()) + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterPoint) {
+            code.append("\t\t\tm_Parameters.addString(" + getParameterNameFromDescription(param) + ", \""
+                        + param.getParameterDescription() + "\");\n");
+
+         }
+         else if (param instanceof ParameterBoolean) {
+            try {
+               final AdditionalInfoBoolean ai = (AdditionalInfoBoolean) param.getParameterAdditionalInfo();
+               code.append("\t\t\tm_Parameters.addBoolean(" + getParameterNameFromDescription(param) + ", \""
+                           + param.getParameterDescription() + "\", " + Boolean.toString(ai.getDefaultValue()) + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterBand) {
+            try {
+               final AdditionalInfoBand ai = (AdditionalInfoBand) param.getParameterAdditionalInfo();
+               dependentCode.append("\t\t\tm_Parameters.addBand(" + getParameterNameFromDescription(param) + ", \""
+                                    + param.getParameterDescription() + "\", " + ai.getParentParameterName() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterTableField) {
+            try {
+               final AdditionalInfoTableField ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+               dependentCode.append("\t\t\tm_Parameters.addTableField(" + getParameterNameFromDescription(param) + ", \""
+                                    + param.getParameterDescription() + "\", " + ai.getParentParameterName() + ");\n");
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+
+      }
+
+      code.append(dependentCode);
+
+   }
+
+
+   private static String getParameterNameFromDescription(final Parameter param) {
+
+      final String sDesc = param.getParameterDescription();
+
+      return sDesc.replaceAll(" ", "_").toUpperCase();
+
+   }
+
+
+   private static void addDefineCharacteristics(final StringBuffer code,
+                                                final ModelAlgorithm alg) {
+
+      code.append("\n\tpublic void defineCharacteristics() {\n\n");
+
+      code.append("\t\tsetName(Sextante.getText(\"" + alg.getName() + "\");\n");
+      code.append("\t\tsetGroup(Sextante.getText(\"" + alg.getGroup() + "\");\n");
+      code.append("\n");
+      code.append("\t\ttry{\n");
+      addParameters(code, alg);
+      code.append("\t\t}\n");
+      code.append("\t\tcatch(Exception e){}\n");
+      code.append("\t}\n\n");
+
+   }
+
+
+   private static void addHeader(final StringBuffer code,
+                                 final ModelAlgorithm alg) {
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/ModelCodeCreator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmCellRenderer.java	(revision 369)
@@ -0,0 +1,130 @@
+
+
+package es.unex.sextante.gui.modeler;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.util.ArrayList;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeCellRenderer;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+
+public class AlgorithmCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+   private final AlgorithmsPanel m_AlgorithmsPanel;
+
+
+   public AlgorithmCellRenderer(final AlgorithmsPanel algorithmsPanel) {
+
+      m_AlgorithmsPanel = algorithmsPanel;
+
+   }
+
+
+   protected Icon getCustomIcon(final Object value) {
+
+      final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+
+      final Object obj = ((DefaultMutableTreeNode) value).getUserObject();
+
+      if (obj instanceof GeoAlgorithm) {
+         return SextanteGUI.getAlgorithmIcon((GeoAlgorithm) obj);
+      }
+      else {
+         for (int i = 0; i < providers.size(); i++) {
+            if (value.toString().equals(providers.get(i).getName())) {
+               return providers.get(i).getIcon();
+            }
+         }
+         if (value.toString().equals("SEXTANTE")) {
+            return SextanteGUI.SEXTANTE_ICON;
+         }
+         return null;
+      }
+
+   }
+
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean sel,
+                                                 final boolean expanded,
+                                                 final boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      String sName;
+
+      setFont(tree.getFont());
+      this.setIcon(getCustomIcon(value));
+
+      sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+      setEnabled(tree.isEnabled());
+      setText(sName);
+      try {
+         if (leaf) {
+            if (sel) {
+               setForeground(Color.blue);
+            }
+            else {
+               final GeoAlgorithm alg = (GeoAlgorithm) ((DefaultMutableTreeNode) value).getUserObject();
+               if (!m_AlgorithmsPanel.isAlgorithmEnabled(alg)) {
+                  setForeground(Color.gray);
+               }
+               else {
+                  setForeground(Color.black);
+               }
+            }
+         }
+         else {
+            boolean activeAlgs = false;
+            for (int i = 0; !activeAlgs && (i < tree.getModel().getChildCount(value)); i++) {
+               final DefaultMutableTreeNode childValue = (DefaultMutableTreeNode) tree.getModel().getChild(value, i);
+               final Object childNode = childValue.getUserObject();
+               if (childNode instanceof GeoAlgorithm) {
+                  final GeoAlgorithm alg = (GeoAlgorithm) childNode;
+                  if (m_AlgorithmsPanel.isAlgorithmEnabled(alg)) {
+                     activeAlgs = true;
+                  }
+               }
+               else {
+                  // If child is not a algorithm
+                  activeAlgs = true;
+               }
+            }
+            setFont(new java.awt.Font("Tahoma", 1, 11));
+            if (sel) {
+               setForeground(Color.blue);
+            }
+            else {
+               if (activeAlgs) {
+                  setForeground(Color.black);
+               }
+               else {
+                  setForeground(Color.gray);
+               }
+            }
+         }
+      }
+      catch (final ClassCastException e) {
+         setForeground(Color.black);
+      }
+
+      return this;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/AlgorithmCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettings.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettings.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettings.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.modeler;
+
+public class OutputLayerSettings {
+
+   private String  sDescription;
+   private boolean bAddToView;
+
+
+   public OutputLayerSettings(final boolean addToView,
+                              final String desc) {
+
+      bAddToView = addToView;
+      sDescription = desc;
+
+   }
+
+
+   public boolean getAddToView() {
+
+      return bAddToView;
+
+   }
+
+
+   public void setAddToView(final boolean addToView) {
+
+      bAddToView = addToView;
+
+   }
+
+
+   public String getDescription() {
+
+      return sDescription;
+
+   }
+
+
+   public void setDescription(final String description) {
+
+      sDescription = description;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/OutputLayerSettings.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DeleteModelAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DeleteModelAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DeleteModelAction.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gui.modeler;
+
+import java.io.File;
+
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class DeleteModelAction
+         implements
+            IToolboxRightButtonAction {
+
+   public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) {
+
+      return alg instanceof ModelAlgorithm;
+
+   }
+
+
+   public void execute(final GeoAlgorithm alg) {
+
+      int deleteModelResult = JOptionPane.showConfirmDialog(null, Sextante.getText("are_you_sure_to_delete_the_selected_model"), Sextante.getText("Warning"), JOptionPane.YES_NO_OPTION);
+      if (deleteModelResult == JOptionPane.YES_OPTION) {
+         final ModelAlgorithm model = (ModelAlgorithm) alg;
+         final File file = new File(model.getFilename());
+         file.delete();
+         SextanteGUI.updateAlgorithmProvider(ModelerAlgorithmProvider.class);
+         SextanteGUI.getGUIFactory().updateToolbox();
+      }
+
+   }
+
+
+   public String getDescription() {
+
+      return Sextante.getText("Delete");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DeleteModelAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/PointPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/PointPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/PointPanel.java	(revision 369)
@@ -0,0 +1,95 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.ParameterPoint;
+
+public class PointPanel
+extends
+ParameterPanel {
+
+	private JLabel jLabel;	
+
+	public PointPanel(final JDialog parent,
+			final ModelerPanel panel) {
+
+		super(parent, panel);
+
+	}
+
+
+	public PointPanel(final ModelerPanel panel) {
+
+		super(panel);
+
+	}
+
+	@Override
+	protected void initGUI() {
+
+		super.initGUI();
+
+		super.setTitle(Sextante.getText("modeler_add_par_point"));
+
+		super.setPreferredSize(new java.awt.Dimension(400, 200));
+
+		try {
+			jLabel = new JLabel();
+			jPanelMiddle.add(jLabel);
+			jLabel.setText(Sextante.getText("nothing_to_set"));
+		}
+		catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}   
+
+
+	@Override
+	public String getParameterDescription() {
+
+		return Sextante.getText("Coordinate");
+
+	}
+
+
+	@Override
+	protected boolean prepareParameter() {
+
+
+		final String sDescription = jTextFieldDescription.getText();
+
+		if (sDescription.length() != 0) {
+			m_Parameter = new ParameterPoint();
+			m_Parameter.setParameterDescription(sDescription);
+			
+	        m_Parameter.setColorR(m_Color.getRed());        
+	        m_Parameter.setColorG(m_Color.getGreen());        
+	        m_Parameter.setColorB(m_Color.getBlue());        
+	        m_Parameter.setColorAlpha(m_Color.getAlpha());			
+			
+			return true;
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+
+	}
+
+
+	@Override
+	public boolean parameterCanBeAdded() {
+
+		return true;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/PointPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TableFieldPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TableFieldPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TableFieldPanel.java	(revision 369)
@@ -0,0 +1,192 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.util.ArrayList;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+public class TableFieldPanel
+         extends
+            ParameterPanel {
+
+   private JLabel    jLabelType;
+   private JComboBox jComboBoxParent;
+
+
+   //private JCheckBox jCheckBoxMandatory;
+
+
+   public TableFieldPanel(final JDialog parent,
+                          final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public TableFieldPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_field"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));      
+      
+      try {
+         final TableLayout thisLayout = new TableLayout(new double[][] {
+                  { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+                  { TableLayoutConstants.MINIMUM } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         jPanelMiddle.setLayout(thisLayout);
+         jLabelType = new JLabel();
+         jPanelMiddle.add(jLabelType, "0, 0");
+         jLabelType.setText(Sextante.getText("Parent_layer_or_table"));
+         jComboBoxParent = new JComboBox();
+         jPanelMiddle.add(jComboBoxParent, "2, 0");
+         /*jCheckBoxMandatory = new JCheckBox(Sextante.getText("Mandatory"));
+         jPanelMiddle.add(jCheckBoxMandatory, "0, 3, 2, 3");*/
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public void updateOptions() {
+
+      super.updateOptions();
+
+      int i;
+
+      ArrayList layers, tables;
+      final ParametersSet ps = m_ModelerPanel.getAlgorithm().getParameters();
+
+      layers = ps.getParametersOfType(ParameterVectorLayer.class);
+      tables = ps.getParametersOfType(ParameterTable.class);
+      final ObjectAndDescription oad[] = new ObjectAndDescription[layers.size() + tables.size()];
+      for (i = 0; i < layers.size(); i++) {
+         final ParameterVectorLayer param = (ParameterVectorLayer) layers.get(i);
+         oad[i] = new ObjectAndDescription(param.getParameterDescription() + Sextante.getText("[layer]"),
+                  param.getParameterName());
+      }
+      for (i = 0; i < tables.size(); i++) {
+         final ParameterTable param = (ParameterTable) tables.get(i);
+         oad[i + layers.size()] = new ObjectAndDescription(param.getParameterDescription() + Sextante.getText("[table]"),
+                  param.getParameterName());
+      }
+      final ComboBoxModel jComboBoxTypeModel = new DefaultComboBoxModel(oad);
+      jComboBoxParent.setModel(jComboBoxTypeModel);
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+      String sName;
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         sName = (String) ((ObjectAndDescription) jComboBoxParent.getSelectedItem()).getObject();
+         final AdditionalInfoTableField addInfo = new AdditionalInfoTableField(sName, /*jCheckBoxMandatory.isSelected()*/true);
+         m_Parameter = new ParameterTableField();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoTableField ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+         final ComboBoxModel model = jComboBoxParent.getModel();
+         for (int i = 0; i < model.getSize(); i++) {
+            final ObjectAndDescription item = (ObjectAndDescription) model.getElementAt(i);
+            final String sName = (String) item.getObject();
+            if (sName.equals(ai.getParentParameterName())) {
+               jComboBoxParent.setSelectedIndex(i);
+               //jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+               break;
+            }
+         }
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Field");
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      final ModelAlgorithm alg = m_ModelerPanel.getAlgorithm();
+
+      if (alg != null) {
+         return alg.requiresIndividualVectorLayers() || alg.requiresTables();
+      }
+      else {
+         return false;
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TableFieldPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FilepathPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FilepathPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FilepathPanel.java	(revision 369)
@@ -0,0 +1,187 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterFilepath;
+
+public class FilepathPanel
+         extends
+            ParameterPanel {
+
+   private JTextField jTextFieldExtension;
+   private JLabel     jLabelExtension;
+   private JComboBox  jComboBoxType;
+   private JLabel     jLabelType;
+   private JCheckBox  jCheckBoxVoxel;
+
+
+   public FilepathPanel(final JDialog parent,
+                      final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public FilepathPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+	   super.initGUI();
+
+	   super.setTitle(Sextante.getText("modeler_add_par_filepath"));
+
+	   super.setPreferredSize(new java.awt.Dimension(400, 250));
+
+	   try {
+		   {
+			   final TableLayout thisLayout = new TableLayout
+			   (new double[][] { { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+					   { 	TableLayoutConstants.MINIMUM,
+				   			1.0,
+				   			TableLayoutConstants.MINIMUM,
+				   			1.0,
+				   			TableLayoutConstants.MINIMUM } });
+			   thisLayout.setHGap(5);
+			   thisLayout.setVGap(5);
+
+			   jPanelMiddle.setLayout(thisLayout);
+
+			   jLabelType = new JLabel();
+			   jLabelType.setText(Sextante.getText("filepath_type"));
+			   jPanelMiddle.add(jLabelType, "0, 0");			   
+			   final ComboBoxModel jComboBoxTypeModel = new DefaultComboBoxModel(new String[] {
+					   Sextante.getText("filepath_file_open"),
+					   Sextante.getText("filepath_file_save"),
+					   Sextante.getText("filepath_folder") });
+			   jComboBoxType = new JComboBox();
+			   jComboBoxType.setModel(jComboBoxTypeModel);
+			   jPanelMiddle.add(jComboBoxType, "2, 0");
+
+			   jLabelExtension = new JLabel();
+			   jPanelMiddle.add(jLabelExtension, "0, 2");
+			   jLabelExtension.setText(Sextante.getText("file_extension"));
+			   jTextFieldExtension = new JTextField();
+			   jPanelMiddle.add(jTextFieldExtension, "2, 2");
+
+			   jCheckBoxVoxel = new JCheckBox();
+			   jCheckBoxVoxel.setSelected(false);
+			   jCheckBoxVoxel.setText(Sextante.getText("filepath_is_voxel_data"));
+			   jPanelMiddle.add(jCheckBoxVoxel, "0, 4");
+		   }
+	   }
+	   catch (final Exception e) {
+		   Sextante.addErrorToLog(e);
+	   }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Filepath");
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+      String[] sDefault;
+      
+      if (sDescription.length() != 0) {
+         final AdditionalInfoFilepath ai = new AdditionalInfoFilepath();
+         sDefault = new String[1];
+         sDefault[0]=jTextFieldExtension.getText();
+         if ( sDefault[0] != null && sDefault[0].length() > 0 ) {
+        	 ai.setExtensions(sDefault);
+         }
+         ai.setIsFolder(false);
+         ai.setIsOpenDialog(false);
+         switch (jComboBoxType.getSelectedIndex()) {
+			case 0:
+		         ai.setIsOpenDialog(true);
+				break;
+			case 2:
+				ai.setIsFolder(true);
+				break;
+		 }
+         ai.setIsVoxelData(jCheckBoxVoxel.isSelected());
+         m_Parameter = new ParameterFilepath();
+         m_Parameter.setParameterDescription(sDescription);
+         m_Parameter.setParameterAdditionalInfo(ai);
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoFilepath ai = (AdditionalInfoFilepath) param.getParameterAdditionalInfo();
+         if ( ai.getExtensions() != null )
+        	 jTextFieldExtension.setText(ai.getExtensions()[0]);
+         jComboBoxType.setSelectedIndex(1);
+         if ( ai.isOpenDialog() == true )
+        	 jComboBoxType.setSelectedIndex(0);
+         if ( ai.isFolder() == true )
+        	 jComboBoxType.setSelectedIndex(2);
+         if ( ai.getIsVoxelData() == true )
+        	 jCheckBoxVoxel.setSelected(true);
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FilepathPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterLayerPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterLayerPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterLayerPanel.java	(revision 369)
@@ -0,0 +1,118 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+
+public class RasterLayerPanel
+         extends
+            ParameterPanel {
+
+   private JCheckBox jCheckBoxMandatory;
+
+
+   public RasterLayerPanel(final JDialog parent,
+                           final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public RasterLayerPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_raster"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));      
+      
+      try {
+         jCheckBoxMandatory = new JCheckBox();
+         jCheckBoxMandatory.setSelected(true);
+         jPanelMiddle.add(jCheckBoxMandatory);
+         jCheckBoxMandatory.setText(Sextante.getText("Mandatory"));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         final AdditionalInfoRasterLayer addInfo = new AdditionalInfoRasterLayer(jCheckBoxMandatory.isSelected());
+         m_Parameter = new ParameterRasterLayer();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoRasterLayer ai = (AdditionalInfoRasterLayer) param.getParameterAdditionalInfo();
+         jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Raster_layer");
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterLayerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/VectorLayerPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/VectorLayerPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/VectorLayerPanel.java	(revision 369)
@@ -0,0 +1,183 @@
+
+
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+public class VectorLayerPanel
+extends
+ParameterPanel {
+
+	private JCheckBox jCheckBoxMandatory;
+	private JLabel    jLabelType;
+	private JComboBox jComboBoxType;
+
+
+	public VectorLayerPanel(final JDialog parent,
+			final ModelerPanel panel) {
+
+		super(parent, panel);
+
+	}
+
+
+	public VectorLayerPanel(final ModelerPanel panel) {
+
+		super(panel);
+
+	}
+
+
+	@Override
+	protected void initGUI() {
+
+		super.initGUI();
+
+		super.setTitle(Sextante.getText("modeler_add_par_vector"));
+
+		super.setPreferredSize(new java.awt.Dimension(400, 200)); 
+
+		try {
+
+			final TableLayout thisLayout = new TableLayout(new double[][] {
+					{ TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+					{ 	TableLayoutConstants.MINIMUM, 
+						1.0,
+						TableLayoutConstants.MINIMUM } });
+			thisLayout.setHGap(5);
+			thisLayout.setVGap(5);
+			
+			jPanelMiddle.setLayout(thisLayout);
+
+			jLabelType = new JLabel();
+			jPanelMiddle.add(jLabelType, "0, 0");
+			jLabelType.setText(Sextante.getText("vector_type"));
+			final ComboBoxModel jComboBoxTypeModel = new DefaultComboBoxModel(new String[] {
+					Sextante.getText("Any"),
+					Sextante.getText("Points"),
+					Sextante.getText("Lines"),
+					Sextante.getText("Polygons") });
+			jComboBoxType = new JComboBox();
+			jPanelMiddle.add(jComboBoxType, "2, 0");
+			jComboBoxType.setModel(jComboBoxTypeModel);
+			
+			jCheckBoxMandatory = new JCheckBox();
+			jCheckBoxMandatory.setSelected(true);
+			jCheckBoxMandatory.setText(Sextante.getText("Mandatory"));			
+			jPanelMiddle.add(jCheckBoxMandatory, "0, 2");			
+		}
+		catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+
+	@Override
+	protected boolean prepareParameter() {
+
+		int iType = AdditionalInfoVectorLayer.SHAPE_TYPE_ANY;
+		final String sDescription = jTextFieldDescription.getText();
+
+		if (sDescription.length() != 0) {
+			switch (jComboBoxType.getSelectedIndex()) {
+			case 0:
+				iType = AdditionalInfoVectorLayer.SHAPE_TYPE_ANY;
+				break;
+			case 1:
+				iType = AdditionalInfoVectorLayer.SHAPE_TYPE_POINT;
+				break;
+			case 2:
+				iType = AdditionalInfoVectorLayer.SHAPE_TYPE_LINE;
+				break;
+			case 3:
+				iType = AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON;
+				break;
+			}
+
+			final AdditionalInfoVectorLayer addInfo = new AdditionalInfoVectorLayer(iType, jCheckBoxMandatory.isSelected());
+			m_Parameter = new ParameterVectorLayer();
+			m_Parameter.setParameterAdditionalInfo(addInfo);
+			m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+			
+           	m_Parameter.setColorR(m_Color.getRed());
+        	m_Parameter.setColorG(m_Color.getGreen());
+        	m_Parameter.setColorB(m_Color.getBlue());
+        	m_Parameter.setColorAlpha(m_Color.getAlpha());
+			
+			return true;
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+
+	}
+
+
+	@Override
+	public void setParameter(final Parameter param) {
+
+		super.setParameter(param);
+
+		try {
+			final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) param.getParameterAdditionalInfo();
+			jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+			jComboBoxType.setSelectedIndex(0);
+			switch (ai.getShapeType()) {
+			case AdditionalInfoVectorLayer.SHAPE_TYPE_ANY:
+				jComboBoxType.setSelectedIndex(0);
+				break;
+			case AdditionalInfoVectorLayer.SHAPE_TYPE_POINT:
+				jComboBoxType.setSelectedIndex(1);
+				break;
+			case AdditionalInfoVectorLayer.SHAPE_TYPE_LINE:
+				jComboBoxType.setSelectedIndex(2);
+				break;
+			case AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON:
+				jComboBoxType.setSelectedIndex(3);
+				break;
+			}
+		}
+		catch (final NullParameterAdditionalInfoException e) {
+			e.printStackTrace();
+		}
+		
+	}
+
+
+	@Override
+	public String getParameterDescription() {
+
+		return Sextante.getText("Vector_layer");
+
+	}
+
+
+	@Override
+	public boolean parameterCanBeAdded() {
+
+		return true;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/VectorLayerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionTreePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionTreePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionTreePanel.java	(revision 369)
@@ -0,0 +1,255 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.text.Collator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeCellRenderer;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.SelectionAndChoices;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterSelection;
+
+public class SelectionTreePanel
+         extends
+            JPanel {
+
+   private JTree       jTree;
+   private JScrollPane jScrollPane;
+
+
+   public SelectionTreePanel() {
+
+      super();
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+      jTree = new JTree();
+      jTree.setCellRenderer(new MyCellRenderer());
+
+      fillTree();
+      jScrollPane = new JScrollPane(jTree, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+               ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+      //jScrollPane.setMinimumSize(new Dimension(300, 400));
+
+      this.add(jScrollPane, BorderLayout.CENTER);
+
+   }
+
+
+   public JTree getTree () {
+	   return jTree;
+   }
+   
+   
+   private void fillTree() {
+
+      int j;
+      boolean bHasSelection;
+      DefaultMutableTreeNode node;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Algorithms"));
+      DefaultMutableTreeNode child, subchild;
+      String sGroup;
+      final HashMap<String, HashMap<String, GeoAlgorithm>> algs = Sextante.getAlgorithms();
+      final Set<String> setGroups = algs.keySet();
+      final Iterator<String> iterGroups = setGroups.iterator();
+      while (iterGroups.hasNext()) {
+         final HashMap<String, DefaultMutableTreeNode> map = new HashMap<String, DefaultMutableTreeNode>();
+         final String sKeyGroups = iterGroups.next();
+         final DefaultMutableTreeNode groupNode = new DefaultMutableTreeNode(sKeyGroups);
+
+         final HashMap<String, GeoAlgorithm> group = algs.get(sKeyGroups);
+         Set<String> set = group.keySet();
+         Iterator<String> iter = set.iterator();
+         while (iter.hasNext()) {
+            final String sKey = iter.next();
+            final GeoAlgorithm alg = group.get(sKey);
+            if (alg.isSuitableForModelling()) {
+               bHasSelection = false;
+               child = new DefaultMutableTreeNode(alg);
+               final ParametersSet ps = alg.getParameters();
+               final int iParCount = ps.getNumberOfParameters();
+               for (j = 0; j < iParCount; j++) {
+                  final Parameter parameter = ps.getParameter(j);
+                  if (parameter instanceof ParameterSelection) {
+                     bHasSelection = true;
+                     AdditionalInfoSelection ai;
+                     try {
+                        ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
+                        subchild = new DefaultMutableTreeNode(new SelectionAndChoices(parameter.getParameterDescription(),
+                                 ai.getValues()));
+                        addNodeInSortedOrder(child, subchild);
+                     }
+                     catch (final NullParameterAdditionalInfoException e) {}
+                  }
+               }
+               if (bHasSelection) {
+                  sGroup = (alg.getGroup());
+                  if (map.containsKey(sGroup)) {
+                     node = map.get(sGroup);
+                  }
+                  else {
+                     node = new DefaultMutableTreeNode(sGroup);
+                     map.put(sGroup, node);
+                  }
+                  addNodeInSortedOrder(node, child);
+               }
+
+            }
+         }
+         set = map.keySet();
+         iter = set.iterator();
+
+         while (iter.hasNext()) {
+            final String sKey = iter.next();
+            node = map.get(sKey);
+            addNodeInSortedOrder(groupNode, node);
+         }
+
+         if (map.size() != 0) {
+            addNodeInSortedOrder(mainNode, groupNode);
+         }
+      }
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+   }
+
+
+   private void addNodeInSortedOrder(final DefaultMutableTreeNode parent,
+                                     final DefaultMutableTreeNode child) {
+
+      final int n = parent.getChildCount();
+      if (n == 0) {
+         parent.add(child);
+         return;
+      }
+      final Collator collator = Collator.getInstance();
+      collator.setStrength(Collator.PRIMARY);
+      DefaultMutableTreeNode node = null;
+      for (int i = 0; i < n; i++) {
+         node = (DefaultMutableTreeNode) parent.getChildAt(i);
+         try {
+            if (collator.compare(node.toString(), child.toString()) > 0) {
+               parent.insert(child, i);
+               return;
+            }
+         }
+         catch (final Exception e) {}
+      }
+      parent.add(child);
+
+   }
+
+
+   public SelectionAndChoices getSelectedList() {
+
+      final TreePath path = jTree.getSelectionPath();
+
+      if (path == null) {
+         return null;
+      }
+
+      try {
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         final SelectionAndChoices sac = (SelectionAndChoices) node.getUserObject();
+         return sac;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+   static class MyCellRenderer
+            extends
+               JLabel
+            implements
+               TreeCellRenderer {
+
+      //ImageIcon m_ModuleIcon = new ImageIcon(getClass().getClassLoader().getResource("images/module2.png"));
+
+	  /*
+      protected Icon getCustomIcon(final Object value) {
+
+         if (((DefaultMutableTreeNode) value).getUserObject() instanceof GeoAlgorithm) {
+            return m_ModuleIcon;
+         }
+         else {
+            return null;
+         }
+
+      }
+      */
+
+
+      public Component getTreeCellRendererComponent(final JTree tree,
+                                                    final Object value,
+                                                    final boolean sel,
+                                                    final boolean expanded,
+                                                    boolean leaf,
+                                                    final int row,
+                                                    final boolean hasFocus) {
+
+         String sName;
+
+         setFont(tree.getFont());
+         //this.setIcon(getCustomIcon(value));
+
+         sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+
+         setEnabled(tree.isEnabled());
+         setText(sName);
+         try {
+            if (!leaf) {
+               setFont(new java.awt.Font("Tahoma", 1, 11));
+               setForeground(Color.black);
+            }
+            else {
+               if (sel) {
+                  setForeground(Color.blue);
+               }
+               else {
+                  setForeground(Color.black);
+               }
+            }
+         }
+         catch (final ClassCastException e) {
+            setForeground(Color.black);
+         }
+
+         return this;
+
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionTreePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/StringPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/StringPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/StringPanel.java	(revision 369)
@@ -0,0 +1,138 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterString;
+
+public class StringPanel
+         extends
+            ParameterPanel {
+
+   private JTextField jTextFieldDefault;
+   private JLabel     jLabelDefault;
+
+
+   public StringPanel(final JDialog parent,
+                      final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public StringPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+      
+      super.setTitle(Sextante.getText("modeler_add_par_string"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));
+      
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout
+            	(new double[][] { { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+                     { TableLayoutConstants.MINIMUM, } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            jPanelMiddle.setLayout(thisLayout);
+            {
+               jLabelDefault = new JLabel();
+               jPanelMiddle.add(jLabelDefault, "0, 0");
+               jLabelDefault.setText(Sextante.getText("Default_value"));
+            }
+            {
+                jTextFieldDefault = new JTextField();
+                jPanelMiddle.add(jTextFieldDefault, "2, 0");
+             }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("String");
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+      final String sDefault = jTextFieldDefault.getText();
+
+      if (sDescription.length() != 0) {
+         final AdditionalInfoString ai = new AdditionalInfoString();
+         ai.setDefaultString(sDefault);
+         m_Parameter = new ParameterString();
+         m_Parameter.setParameterDescription(sDescription);
+         m_Parameter.setParameterAdditionalInfo(ai);
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoString ai = (AdditionalInfoString) param.getParameterAdditionalInfo();
+         jTextFieldDefault.setText(ai.getDefaultString());
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/StringPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FixedTablePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FixedTablePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FixedTablePanel.java	(revision 369)
@@ -0,0 +1,186 @@
+
+
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerListModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterFixedTable;
+
+
+public class FixedTablePanel
+         extends
+            ParameterPanel {
+
+   private JSpinner  jSpinnerRows;
+   private JLabel    jLabelRows;
+   private JCheckBox jCheckBox;
+   private JSpinner  jSpinnerCols;
+   private JLabel    jLabelCols;
+
+
+   public FixedTablePanel(final JDialog parent,
+                          final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public FixedTablePanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Fixed_table");
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+	   super.setTitle(Sextante.getText("modeler_add_par_fixed_table"));
+
+	   super.setPreferredSize(new java.awt.Dimension(400, 250));	   
+
+	   final Integer values[] = new Integer[15];
+	   super.initGUI();
+
+	   try {
+		   {
+			   final TableLayout thisLayout = new TableLayout(
+					   new double[][] {
+							   { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+							   { 	TableLayoutConstants.MINIMUM,
+								   	1.0,
+								   	TableLayoutConstants.MINIMUM,
+								   	1.0,
+								   	TableLayoutConstants.MINIMUM, } });
+			   thisLayout.setHGap(5);
+			   thisLayout.setVGap(5);
+			   jPanelMiddle.setLayout(thisLayout);
+			   for (int i = 0; i < 15; i++) {
+				   values[i] = new Integer(i + 1);
+			   }
+			   {
+				   jLabelRows = new JLabel();
+				   jPanelMiddle.add(jLabelRows, "0, 0");
+				   jLabelRows.setText(Sextante.getText("Number_of_rows"));
+			   }
+			   {
+				   jSpinnerRows = new JSpinner(new SpinnerListModel(values));
+				   jPanelMiddle.add(jSpinnerRows, "2, 0");
+			   }
+			   {
+				   jCheckBox = new JCheckBox();
+				   jPanelMiddle.add(jCheckBox, "2, 2");
+				   jCheckBox.setText(Sextante.getText("Fixed_number_of_rows"));
+			   }			   
+			   {
+				   jLabelCols = new JLabel();
+				   jPanelMiddle.add(jLabelCols, "0, 4");
+				   jLabelCols.setText(Sextante.getText("Number_of_columns"));
+			   }
+			   {
+				   jSpinnerCols = new JSpinner(new SpinnerListModel(values));
+				   jPanelMiddle.add(jSpinnerCols, "2, 4");
+			   }
+		   }
+	   }
+	   catch (final Exception e) {
+		   Sextante.addErrorToLog(e);
+	   }
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+      int iRows, iCols;
+      boolean bIsNumberOfRowsFixed;
+
+      try {
+         bIsNumberOfRowsFixed = jCheckBox.isSelected();
+         iRows = ((Integer) jSpinnerRows.getValue()).intValue();
+         iCols = ((Integer) jSpinnerCols.getValue()).intValue();
+      }
+      catch (final Exception e) {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_parameters"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+
+         final String sCols[] = new String[iCols];
+         for (int i = 0; i < iCols; i++) {
+            sCols[i] = Integer.toString(i + 1);
+         }
+         final AdditionalInfoFixedTable addInfo = new AdditionalInfoFixedTable(sCols, iRows, bIsNumberOfRowsFixed);
+         m_Parameter = new ParameterFixedTable();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoFixedTable ai = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+         jSpinnerCols.setValue(new Integer(ai.getColsCount()));
+         jSpinnerRows.setValue(new Integer(ai.getRowsCount()));
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/FixedTablePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanelFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanelFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanelFactory.java	(revision 369)
@@ -0,0 +1,240 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JDialog;
+
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+import es.unex.sextante.parameters.ParameterFilepath;
+
+public class ParameterPanelFactory {
+
+   public static ParameterPanel getParameterPanel(final Parameter parameter,
+                                                  final ModelerPanel modelerPanel,
+                                                  final JDialog parent) {
+
+      if (parameter instanceof ParameterBand) {
+         return getNewRasterBandPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterBoolean) {
+         return getNewBooleanPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterFixedTable) {
+         return getNewFixedTablePanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterMultipleInput) {
+         return getNewMultipleInputPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterNumericalValue) {
+         return getNewNumericalValuePanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterPoint) {
+         return getNewPointPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterRasterLayer) {
+         return getNewRasterLayerPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterVectorLayer) {
+         return getNewVectorLayerPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterTable) {
+         return getNewTablePanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterTableField) {
+         return getNewTableFieldPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterString) {
+         return getNewStringPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterSelection) {
+         return getNewSelectionPanel(modelerPanel, parent);
+      }
+      if (parameter instanceof ParameterFilepath) {
+          return getNewFilepathPanel(modelerPanel, parent);
+       }      
+      else {
+         return null;
+      }
+
+   }
+
+
+   private static ParameterPanel getNewNumericalValuePanel(final ModelerPanel modelerPanel,
+                                                           final JDialog parent) {
+
+      if (parent != null) {
+         return new NumericalValuePanel(parent, modelerPanel);
+      }
+      else {
+         return new NumericalValuePanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewBooleanPanel(final ModelerPanel modelerPanel,
+                                                    final JDialog parent) {
+
+      if (parent != null) {
+         return new BooleanPanel(parent, modelerPanel);
+      }
+      else {
+         return new BooleanPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewRasterLayerPanel(final ModelerPanel modelerPanel,
+                                                        final JDialog parent) {
+
+      if (parent != null) {
+         return new RasterLayerPanel(parent, modelerPanel);
+      }
+      else {
+         return new RasterLayerPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewRasterBandPanel(final ModelerPanel modelerPanel,
+                                                       final JDialog parent) {
+
+      if (parent != null) {
+         return new RasterBandPanel(parent, modelerPanel);
+      }
+      else {
+         return new RasterBandPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewVectorLayerPanel(final ModelerPanel modelerPanel,
+                                                        final JDialog parent) {
+
+      if (parent != null) {
+         return new VectorLayerPanel(parent, modelerPanel);
+      }
+      else {
+         return new VectorLayerPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewStringPanel(final ModelerPanel modelerPanel,
+                                                   final JDialog parent) {
+
+      if (parent != null) {
+         return new StringPanel(parent, modelerPanel);
+      }
+      else {
+         return new StringPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewTableFieldPanel(final ModelerPanel modelerPanel,
+                                                       final JDialog parent) {
+
+      if (parent != null) {
+         return new TableFieldPanel(parent, modelerPanel);
+      }
+      else {
+         return new TableFieldPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewTablePanel(final ModelerPanel modelerPanel,
+                                                  final JDialog parent) {
+
+      if (parent != null) {
+         return new TablePanel(parent, modelerPanel);
+      }
+      else {
+         return new TablePanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewPointPanel(final ModelerPanel modelerPanel,
+                                                  final JDialog parent) {
+
+      if (parent != null) {
+         return new PointPanel(parent, modelerPanel);
+      }
+      else {
+         return new PointPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewFixedTablePanel(final ModelerPanel modelerPanel,
+                                                       final JDialog parent) {
+
+      if (parent != null) {
+         return new FixedTablePanel(parent, modelerPanel);
+      }
+      else {
+         return new FixedTablePanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewSelectionPanel(final ModelerPanel modelerPanel,
+                                                      final JDialog parent) {
+
+      if (parent != null) {
+         return new SelectionPanel(parent, modelerPanel);
+      }
+      else {
+         return new SelectionPanel(modelerPanel);
+      }
+
+   }
+
+
+   private static ParameterPanel getNewMultipleInputPanel(final ModelerPanel modelerPanel,
+                                                          final JDialog parent) {
+
+      if (parent != null) {
+         return new MultipleInputPanel(parent, modelerPanel);
+      }
+      else {
+         return new MultipleInputPanel(modelerPanel);
+      }
+
+   }
+   
+   private static ParameterPanel getNewFilepathPanel(final ModelerPanel modelerPanel,
+		   final JDialog parent) {
+
+	   if (parent != null) {
+		   return new FilepathPanel(parent, modelerPanel);
+	   }
+	   else {
+		   return new FilepathPanel(modelerPanel);
+	   }
+
+   }   
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanelFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/MultipleInputPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/MultipleInputPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/MultipleInputPanel.java	(revision 369)
@@ -0,0 +1,214 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+
+public class MultipleInputPanel
+extends
+ParameterPanel {
+
+	private JLabel    jLabelType;
+	private JComboBox jComboBoxType;
+	private JCheckBox jCheckBoxMandatory;
+
+
+	public MultipleInputPanel(final JDialog parent,
+			final ModelerPanel panel) {
+
+		super(parent, panel);
+
+	}
+
+
+	public MultipleInputPanel(final ModelerPanel panel) {
+
+		super(panel);
+
+	}
+
+
+	@Override
+	protected void initGUI() {
+
+		super.initGUI();
+
+		super.setTitle(Sextante.getText("modeler_add_par_multiple"));
+
+		super.setPreferredSize(new java.awt.Dimension(400, 200));
+
+		try {
+			{
+				final TableLayout thisLayout = new TableLayout
+					(new double[][] { { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+						{  	TableLayoutConstants.MINIMUM,
+							1.0,
+							TableLayoutConstants.MINIMUM,
+							1.0 } });
+				thisLayout.setHGap(5);
+				thisLayout.setVGap(5);
+				jPanelMiddle.setLayout(thisLayout);
+				{
+					jLabelType = new JLabel();
+					jPanelMiddle.add(jLabelType, "0, 0");
+					jLabelType.setText(Sextante.getText("Input_type"));
+				}
+				{
+					final ComboBoxModel jComboBoxTypeModel = new DefaultComboBoxModel(new String[] { 							
+							Sextante.getText("Vector_any_type"),							
+							Sextante.getText("Vectorial__points"),
+							Sextante.getText("Vectorial__lines"),
+							Sextante.getText("Vectorial__polygons"),
+							Sextante.getText("Raster"),
+							Sextante.getText("Raster_band"),
+							Sextante.getText("Table") });
+					jComboBoxType = new JComboBox();
+					jPanelMiddle.add(jComboBoxType, "2, 0");
+					jComboBoxType.setModel(jComboBoxTypeModel);
+				}
+				{
+					jCheckBoxMandatory = new JCheckBox();
+					jCheckBoxMandatory.setSelected(true);
+					jPanelMiddle.add(jCheckBoxMandatory, "0,2,2,2");
+					jCheckBoxMandatory.setText(Sextante.getText("Mandatory"));
+				}
+			}
+		}
+		catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+
+	@Override
+	protected boolean prepareParameter() {
+
+		int iType = AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY;
+
+		switch (jComboBoxType.getSelectedIndex()) {
+		case 0:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY;
+			break;
+		case 1:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT;
+			break;
+		case 2:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE;
+			break;			
+		case 3:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON;
+			break;
+		case 4:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_RASTER;
+			break;
+		case 5:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_BAND;
+			break;
+		case 6:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D;
+			break;			
+		case 7:
+			iType = AdditionalInfoMultipleInput.DATA_TYPE_TABLE;
+			break;
+		}
+
+		final String sDescription = jTextFieldDescription.getText();
+		final boolean bMandatory = jCheckBoxMandatory.isSelected();
+
+		if (sDescription.length() != 0) {
+			final AdditionalInfoMultipleInput addInfo = new AdditionalInfoMultipleInput(iType, bMandatory);
+			m_Parameter = new ParameterMultipleInput();
+			m_Parameter.setParameterAdditionalInfo(addInfo);
+			m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+			
+	        m_Parameter.setColorR(m_Color.getRed());        
+	        m_Parameter.setColorG(m_Color.getGreen());        
+	        m_Parameter.setColorB(m_Color.getBlue());        
+	        m_Parameter.setColorAlpha(m_Color.getAlpha());			
+			
+			return true;
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+	}
+
+
+	@Override
+	public void setParameter(final Parameter param) {
+
+		super.setParameter(param);
+
+		try {
+			final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+			jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+			jComboBoxType.setSelectedIndex(0);
+			switch (ai.getDataType()) {
+			case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+				jComboBoxType.setSelectedIndex(0);
+				break;
+			case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+				jComboBoxType.setSelectedIndex(1);
+				break;
+			case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+				jComboBoxType.setSelectedIndex(2);
+				break;
+			case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+				jComboBoxType.setSelectedIndex(3);
+				break;				
+			case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+				jComboBoxType.setSelectedIndex(4);
+				break;
+			case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+				jComboBoxType.setSelectedIndex(5);
+				break;
+			case AdditionalInfoMultipleInput.DATA_TYPE_RASTER_3D:
+				jComboBoxType.setSelectedIndex(6);
+				break;				
+			case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+				jComboBoxType.setSelectedIndex(7);
+				break;
+			}
+
+		}
+		catch (final NullParameterAdditionalInfoException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+
+	@Override
+	public String getParameterDescription() {
+
+		return Sextante.getText("Multiple_input");
+
+	}
+
+
+	@Override
+	public boolean parameterCanBeAdded() {
+
+		return true;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/MultipleInputPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/NumericalValuePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/NumericalValuePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/NumericalValuePanel.java	(revision 369)
@@ -0,0 +1,369 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTextField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.gui.r.RAlgorithmProvider;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+
+public class NumericalValuePanel
+extends
+ParameterPanel {
+
+	private static int	typeFloat = 0;
+	private static int	typeInteger = 1;
+	
+	private JCheckBox  jCheckBoxMin;
+	private JCheckBox  jCheckBoxMax;
+	private JLabel     jLabelType;
+	private JTextField jTextFieldMin;
+	private JTextField jTextFieldMax;
+	private JTextField jTextFieldDefault;
+	private JComboBox  jComboBoxType;
+	private JLabel     jLabelDefault;
+
+
+	public NumericalValuePanel(final JDialog parent,
+			final ModelerPanel panel) {
+
+		super(parent, panel);
+
+	}
+
+
+	public NumericalValuePanel(final ModelerPanel panel) {
+
+		super(panel);
+
+	}
+
+
+	@Override
+	protected void initGUI() {
+
+		super.initGUI();
+
+		super.setTitle(Sextante.getText("modeler_add_par_numerical"));
+
+		super.setPreferredSize(new java.awt.Dimension(400, 290));
+
+		try {
+			{
+				final TableLayout thisLayout = new TableLayout(new double[][] {
+						{ 	TableLayoutConstants.MINIMUM, 
+							5.0,
+							TableLayoutConstants.FILL },
+							{ 		TableLayoutConstants.MINIMUM,
+								1.0,
+								TableLayoutConstants.MINIMUM,
+								1.0,
+								TableLayoutConstants.MINIMUM,
+								1.0,
+								TableLayoutConstants.MINIMUM } });
+				thisLayout.setHGap(5);
+				thisLayout.setVGap(5);
+				jPanelMiddle.setLayout(thisLayout);
+				{
+					jCheckBoxMin = new JCheckBox();					
+					jCheckBoxMin.setText(Sextante.getText("Min_value"));
+					jPanelMiddle.add(jCheckBoxMin, "0, 0");
+					jCheckBoxMin.addActionListener(new ActionListener() {
+						public void actionPerformed(final ActionEvent arg0) {
+							if  (jCheckBoxMin.isSelected() == true) {
+								jTextFieldMin.setEnabled(true);
+								jTextFieldMin.setEditable(true);
+							} else {
+								jTextFieldMin.setEnabled(false);
+								jTextFieldMin.setEditable(false);
+							}
+						}
+					});
+				}
+				{
+					jCheckBoxMax = new JCheckBox();					
+					jCheckBoxMax.setText(Sextante.getText("Max_value"));
+					jPanelMiddle.add(jCheckBoxMax, "0, 2");
+					jCheckBoxMax.addActionListener(new ActionListener() {
+						public void actionPerformed(final ActionEvent arg0) {
+							if  (jCheckBoxMax.isSelected() == true) {
+								jTextFieldMax.setEnabled(true);
+								jTextFieldMax.setEditable(true);
+							} else {
+								jTextFieldMax.setEnabled(false);
+								jTextFieldMax.setEditable(false);
+							}
+						}
+					});               
+				}
+				{
+					jTextFieldMin = new JTextField();
+					if ( jCheckBoxMin.isSelected() == false ) {
+						jTextFieldMin.setEnabled(false);
+						jTextFieldMin.setEditable(false);
+					} else {
+						jTextFieldMin.setEnabled(true);
+						jTextFieldMin.setEditable(true);
+					}
+					jPanelMiddle.add(jTextFieldMin, "2, 0");
+					jTextFieldMin.addFocusListener(new FocusAdapter() {
+						@Override
+						public void focusLost(final FocusEvent e) {
+							checkTextFieldContent((JTextField) e.getSource());
+						}
+					});
+				}
+				{
+					jTextFieldMax = new JTextField();
+					if ( jCheckBoxMax.isSelected() == false ) {
+						jTextFieldMax.setEnabled(false);
+						jTextFieldMax.setEditable(false);
+					} else {
+						jTextFieldMax.setEnabled(true);
+						jTextFieldMax.setEditable(true);
+					}
+					jPanelMiddle.add(jTextFieldMax, "2, 2");
+					jTextFieldMax.addFocusListener(new FocusAdapter() {
+						@Override
+						public void focusLost(final FocusEvent e) {
+							checkTextFieldContent((JTextField) e.getSource());
+						}
+					});
+				}
+				{
+					jLabelDefault = new JLabel();
+					jPanelMiddle.add(jLabelDefault, "0, 4");
+					jLabelDefault.setText(Sextante.getText("Default_value"));
+
+					jTextFieldDefault = new JTextField();
+					jPanelMiddle.add(jTextFieldDefault, "2, 4");
+					jTextFieldDefault.addFocusListener(new FocusAdapter() {
+						@Override
+						public void focusLost(final FocusEvent e) {
+							checkTextFieldContent((JTextField) e.getSource());
+						}
+					});
+				}
+				{
+					jLabelType = new JLabel();
+					jPanelMiddle.add(jLabelType, "0, 6");
+					jLabelType.setText(Sextante.getText("Value_type"));
+				}
+				{
+					final ComboBoxModel jComboBoxTypeModel = 
+						new DefaultComboBoxModel(new String[] { Sextante.getText("Float"),
+							Sextante.getText("Integer") });
+					jComboBoxType = new JComboBox();
+					jPanelMiddle.add(jComboBoxType, "2, 6");
+					jComboBoxType.setModel(jComboBoxTypeModel);
+				}
+			}
+		}
+		catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+	
+	/* Parses a text field containing a number and returns
+	   the result as a truncated double value */
+	private double truncNumeric ( String number ) throws Exception {
+		Integer Value;
+		try {
+			Value = Integer.parseInt(number);
+		} catch (final Exception e) {
+			throw e;
+		}
+		return ( (double) Value.intValue() );		
+	}
+	
+
+	@Override
+	protected boolean prepareParameter() {
+
+		double dMax, dMin;
+		double dAbsoluteMax, dAbsoluteMin;
+		double dDefault;
+		int iType;
+
+		try {
+			if (jComboBoxType.getSelectedIndex() == typeInteger ) {
+				iType = AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER;
+				dAbsoluteMin = Integer.MIN_VALUE;
+				dAbsoluteMax = Integer.MAX_VALUE;
+			}
+			else {
+				iType = AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE;
+				dAbsoluteMin = Double.NEGATIVE_INFINITY;
+				dAbsoluteMax = Double.MAX_VALUE;
+			}
+			if ( iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER ) {
+				/* truncate to integer before saving */
+				dDefault = truncNumeric (jTextFieldDefault.getText());
+			} else {
+				dDefault = Double.parseDouble(jTextFieldDefault.getText());
+			}			
+			if (jCheckBoxMin.isSelected()) {
+				if ( iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER ) {
+					/* truncate to integer before saving */
+					dMin = truncNumeric (jTextFieldMin.getText());
+				} else {				
+					dMin = Double.parseDouble(jTextFieldMin.getText());
+				}
+			}
+			else {
+				dMin = dAbsoluteMin;
+			}
+			if (jCheckBoxMax.isSelected()) {
+				if ( iType == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER ) {
+					/* truncate to integer before saving */
+					dMax = truncNumeric (jTextFieldMax.getText());
+				} else {								
+					dMax = Double.parseDouble(jTextFieldMax.getText());
+				}
+			}
+			else {
+				dMax = dAbsoluteMax;
+			}
+			if ( dDefault < dMin || dDefault > dMax || dMin > dMax ) {
+				JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_parameters"), Sextante.getText("Warning"),
+						JOptionPane.WARNING_MESSAGE);
+				return false;
+			}
+		}
+		catch (final Exception e) {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_parameters"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+		final String sDescription = jTextFieldDescription.getText();
+
+		if (sDescription.length() != 0) {
+			final AdditionalInfoNumericalValue addInfo = new AdditionalInfoNumericalValue(iType, dDefault, Math.min(dMin, dMax), Math.max(
+					dMin, dMax));
+			m_Parameter = new ParameterNumericalValue();
+			m_Parameter.setParameterAdditionalInfo(addInfo);
+			m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+			
+	        m_Parameter.setColorR(m_Color.getRed());        
+	        m_Parameter.setColorG(m_Color.getGreen());        
+	        m_Parameter.setColorB(m_Color.getBlue());        
+	        m_Parameter.setColorAlpha(m_Color.getAlpha());			
+			
+			return true;
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+	}
+
+
+	@Override
+	public void setParameter(final Parameter param) {
+
+		super.setParameter(param);
+
+		boolean isInt = false;
+		
+		try {
+			final AdditionalInfoNumericalValue ai = (AdditionalInfoNumericalValue) param.getParameterAdditionalInfo();
+			if (ai.getType() == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER) {
+				jComboBoxType.setSelectedIndex(typeInteger);
+				isInt = true;
+			}
+			else {
+				jComboBoxType.setSelectedIndex(typeFloat);
+			}			
+			if (ai.getMaxValue() != Double.MAX_VALUE && ai.getMaxValue() != Integer.MAX_VALUE) {
+				jCheckBoxMax.setSelected(true);
+				jTextFieldMax.setEnabled(true);
+				jTextFieldMax.setEditable(true);
+				if ( isInt == false ) {
+					jTextFieldMax.setText(Double.toString(ai.getMaxValue()));
+				} else {
+					jTextFieldMax.setText(Integer.toString((int)ai.getMaxValue()));
+				}
+			}
+			if (ai.getMinValue() != Double.NEGATIVE_INFINITY && ai.getMinValue() != Integer.MIN_VALUE) {
+				jCheckBoxMin.setSelected(true);
+				jTextFieldMin.setEnabled(true);
+				jTextFieldMin.setEditable(true);
+				if ( isInt == false ) {
+					jTextFieldMin.setText(Double.toString(ai.getMinValue()));
+				} else {
+					jTextFieldMin.setText(Integer.toString((int)ai.getMinValue()));
+				}
+			}
+			if ( isInt == false ) {
+				jTextFieldDefault.setText(Double.toString(ai.getDefaultValue()));
+			} else {
+				jTextFieldDefault.setText(Integer.toString((int)ai.getDefaultValue()));
+			}
+		}
+		catch (final NullParameterAdditionalInfoException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+
+	@Override
+	public String getParameterDescription() {
+
+		return Sextante.getText("Numerical_value");
+
+	}
+
+
+	private void checkTextFieldContent(final JTextField textField) {
+
+		final String content = textField.getText();
+		if (content.length() != 0) {
+			try {
+				Double.parseDouble(content);
+				return;
+			}
+			catch (final NumberFormatException nfe) {
+				getToolkit().beep();
+				textField.requestFocus();
+			}
+		}
+
+
+	}
+
+
+	@Override
+	public boolean parameterCanBeAdded() {
+
+		return true;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/NumericalValuePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/BooleanPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/BooleanPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/BooleanPanel.java	(revision 369)
@@ -0,0 +1,117 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+
+public class BooleanPanel
+         extends
+            ParameterPanel {
+
+   private JCheckBox jCheckBoxDefault;
+
+
+   public BooleanPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   public BooleanPanel(final JDialog parent,
+                       final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_boolean"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));
+      
+      try {
+         jCheckBoxDefault = new JCheckBox();
+         jCheckBoxDefault.setSelected(true);
+         jPanelMiddle.add(jCheckBoxDefault);
+         jCheckBoxDefault.setText(Sextante.getText("Default_value_true"));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Boolean_value");
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         m_Parameter = new ParameterBoolean();
+         m_Parameter.setParameterDescription(sDescription);
+         final AdditionalInfoBoolean ai = new AdditionalInfoBoolean(jCheckBoxDefault.isSelected());
+         m_Parameter.setParameterAdditionalInfo(ai);
+        	
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoBoolean ai = (AdditionalInfoBoolean) param.getParameterAdditionalInfo();
+         jCheckBoxDefault.setSelected(ai.getDefaultValue());
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/BooleanPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanel.java	(revision 369)
@@ -0,0 +1,288 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.ColorComboBox;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+
+public abstract class ParameterPanel
+         extends
+            JDialog {
+
+   protected JPanel       	jPanelName;
+   protected ColorComboBox	jComboColor;
+   protected JButton      	jButtonOk;
+   protected JButton      	jButtonCancel;
+   protected JLabel       	jLabelDescription;
+   protected JPanel       	jPanelMiddle;
+   protected JPanel       	jPanelButtons;
+   protected JTextField   	jTextFieldDescription;
+   protected Parameter    	m_Parameter;
+   protected ModelerPanel 	m_ModelerPanel;
+   protected Color			m_Color = null;
+
+
+   public abstract String getParameterDescription();
+
+
+   protected abstract boolean prepareParameter();
+
+
+   public abstract boolean parameterCanBeAdded();
+
+
+   public ParameterPanel(final JDialog dialog,
+                         final ModelerPanel modelerPanel) {
+
+      super(dialog, "", true);
+      this.setLocationRelativeTo(null);
+
+      m_ModelerPanel = modelerPanel;
+
+      initGUI();
+
+   }
+
+
+   public ParameterPanel(final ModelerPanel modelerPanel) {
+
+      super(SextanteGUI.getMainFrame(), "", true);
+      this.setLocationRelativeTo(null);
+
+      m_ModelerPanel = modelerPanel;
+      
+      /* default color for new parameters is white */
+      if ( m_Color == null )
+    	  m_Color = new Color( 	255, 255, 255, 255 );
+
+      initGUI();
+
+   }
+
+
+   protected void initGUI() {
+
+	  /* the preferred size for this dialog is set by a more
+	     specific class (e.g. NumericalValuePanel) after running
+	     this (super) class' constructor.
+	   */
+      //this.setSize(new java.awt.Dimension(390, 300));
+      //this.setPreferredSize(new java.awt.Dimension(390, 300));
+	  this.setResizable(false);
+      {
+         final TableLayout thisLayout = new TableLayout(new double[][] { { 3.0, TableLayoutConstants.FILL, 3.0 },
+                  { 3.0, TableLayoutConstants.MINIMUM, TableLayoutConstants.FILL, TableLayoutConstants.MINIMUM, 3.0, 30.0, 3.0 } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         this.setLayout(thisLayout);
+         {
+            jPanelName = new JPanel();
+            final TableLayout jPanelNameLayout = new TableLayout
+            	(new double[][] { { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+                     { 20.0, 3.0, TableLayoutConstants.MINIMUM, 3.0 } });
+            jPanelNameLayout.setHGap(5);
+            jPanelNameLayout.setVGap(5);
+            jPanelName.setLayout(jPanelNameLayout);
+            this.add(jPanelName, "1, 1");
+            {
+                jLabelDescription = new JLabel();
+                jPanelName.add(jLabelDescription, "0, 0");
+                jLabelDescription.setText(Sextante.getText("Description"));
+             }            
+            {
+               jTextFieldDescription = new JTextField();
+               jTextFieldDescription.setText(getDefaultName());
+               jPanelName.add(jTextFieldDescription, "2, 0");
+            }
+            jPanelName.add(new JSeparator(SwingConstants.HORIZONTAL), "0, 2, 2, 2");
+         }
+         {
+            jPanelButtons = new JPanel();
+            final TableLayout jPanelButtonsLayout = new TableLayout(new double[][] { { 5.0, 90.0, TableLayoutConstants.FILL, 90.0, 5.0, 90.0 },
+            			{ 30.0 } });
+            //final FlowLayout jPanelButtonsLayout = new FlowLayout();
+            //jPanelButtonsLayout.setAlignment(FlowLayout.RIGHT);
+            jPanelButtons.setLayout(jPanelButtonsLayout);
+            this.add(new JSeparator(SwingConstants.HORIZONTAL), "1, 3");
+            this.add(jPanelButtons, "1, 5");
+    		{
+    			jComboColor = new ColorComboBox();
+    			if ( m_Parameter != null ) {
+    				m_Color = new Color( 	m_Parameter.getColorR(),
+    										m_Parameter.getColorG(),
+    										m_Parameter.getColorB(),
+    										m_Parameter.getColorAlpha());
+    			}
+    			jComboColor.getComboBox().setBackground(m_Color);
+    			jPanelButtons.add(jComboColor.getComboBox(), "1, 0");
+    			jComboColor.getComboBox().addActionListener(new ActionListener() {
+                    public void actionPerformed(final ActionEvent evt) {
+                    	m_Color = (Color) jComboColor.getComboBox().getSelectedItem();
+                    	jComboColor.getComboBox().setBackground(m_Color);  	
+                    }
+                 });			
+    		}            
+            {
+               jButtonCancel = new JButton();
+               jButtonCancel.setText(Sextante.getText("Cancel"));
+               jPanelButtons.add(jButtonCancel, "3, 0" );
+               jButtonCancel.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     m_Parameter = null;
+                     cancel();
+                  }
+               });
+            }
+            {
+                jButtonOk = new JButton();                
+                jButtonOk.setText(Sextante.getText("OK"));
+                jPanelButtons.add(jButtonOk, "5, 0");
+                jButtonOk.addActionListener(new ActionListener() {
+                   public void actionPerformed(final ActionEvent evt) {
+                      if (prepareParameter()) {
+                         cancel();
+                      }
+                   }
+                });
+             }            
+         }
+         {
+            jPanelMiddle = new JPanel();
+            FlowLayout layout = (FlowLayout) jPanelMiddle.getLayout();
+            layout.setVgap(1);
+            this.add(jPanelMiddle, "1, 2");
+         }
+      }
+
+   }
+
+
+   protected void cancel() {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   /**
+    * Returns the parameter created using this panel
+    *
+    * @return the parameter created using this panel
+    */
+   public Parameter getParameter() {
+
+      return m_Parameter;
+
+   }
+
+   
+   /**
+    * Returns the color currently selected using this panel
+    *
+    * @return the selected color
+    */
+   public Color getColor() {
+
+      return m_Color;
+
+   }  
+
+   
+   /**
+    * Sets the color currently selected in this panel
+    *
+    * @param
+    * 			Color to set
+    */
+   public void setColor(Color c) {
+
+      m_Color = c;
+
+   }   
+
+   
+   public ColorComboBox getColorComboBox () {
+	   
+	   return (jComboColor);
+   }
+   
+   
+   @Override
+   public String toString() {
+
+      return getParameterDescription();
+
+   }
+
+
+   private String getDefaultName() {
+
+      boolean bNameFound;
+      String sName;
+      int i = 1;
+      final ParametersSet ps = m_ModelerPanel.getAlgorithm().getParameters();
+      final int iCount = ps.getNumberOfParameters();
+      Parameter param;
+
+      do {
+         bNameFound = true;
+         sName = getParameterDescription() + " " + Integer.toString(i);
+         for (int j = 0; j < iCount; j++) {
+            param = ps.getParameter(j);
+            if (param.getParameterDescription().equals(sName)) {
+               bNameFound = false;
+               break;
+            }
+         }
+         i++;
+      }
+      while (!bNameFound);
+
+      return sName;
+
+   }
+
+
+   /**
+    * Fills the fields in the panel with default values
+    */
+   public void updateOptions() {
+
+      jTextFieldDescription.setText(getDefaultName());
+
+   };
+
+
+   /**
+    * Fills the fields in the panel with the characteristics of an already created parameter
+    *
+    * @param param
+    *                a parameter
+    */
+   public void setParameter(final Parameter param) {
+
+      jTextFieldDescription.setText(param.getParameterDescription());
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/ParameterPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/Raster3DLayerPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/Raster3DLayerPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/Raster3DLayerPanel.java	(revision 369)
@@ -0,0 +1,118 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo3DRasterLayer;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+
+public class Raster3DLayerPanel
+         extends
+            ParameterPanel {
+
+   private JCheckBox jCheckBoxMandatory;
+
+
+   public Raster3DLayerPanel(final JDialog parent,
+                             final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public Raster3DLayerPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_raster_3D"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));      
+      
+      try {
+         jCheckBoxMandatory = new JCheckBox();
+         jCheckBoxMandatory.setSelected(true);
+         jPanelMiddle.add(jCheckBoxMandatory);
+         jCheckBoxMandatory.setText(Sextante.getText("Mandatory"));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         final AdditionalInfo3DRasterLayer addInfo = new AdditionalInfo3DRasterLayer(jCheckBoxMandatory.isSelected());
+         m_Parameter = new Parameter3DRasterLayer();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfo3DRasterLayer ai = (AdditionalInfo3DRasterLayer) param.getParameterAdditionalInfo();
+         jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("3D_Raster_layer");
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/Raster3DLayerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterBandPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterBandPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterBandPanel.java	(revision 369)
@@ -0,0 +1,176 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.util.ArrayList;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+
+
+public class RasterBandPanel
+         extends
+            ParameterPanel {
+
+   private JLabel    jLabelType;
+   private JComboBox jComboBoxParent;
+
+
+   public RasterBandPanel(final JDialog parent,
+                          final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public RasterBandPanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_band"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));      
+      
+      try {
+
+         final TableLayout thisLayout = new TableLayout(new double[][] {
+                  { TableLayoutConstants.MINIMUM, 5.0, TableLayoutConstants.FILL },
+                  { TableLayoutConstants.MINIMUM } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         jPanelMiddle.setLayout(thisLayout);
+         jLabelType = new JLabel();
+         jPanelMiddle.add(jLabelType, "0, 0");
+         jLabelType.setText(Sextante.getText("Parent_layer"));
+         jComboBoxParent = new JComboBox();
+         jPanelMiddle.add(jComboBoxParent, "2, 0");
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public void updateOptions() {
+
+      super.updateOptions();
+
+      ArrayList layers;
+      final ParametersSet ps = m_ModelerPanel.getAlgorithm().getParameters();
+
+      layers = ps.getParametersOfType(ParameterRasterLayer.class);
+      final ObjectAndDescription oad[] = new ObjectAndDescription[layers.size()];
+      for (int i = 0; i < oad.length; i++) {
+         final ParameterRasterLayer param = (ParameterRasterLayer) layers.get(i);
+         oad[i] = new ObjectAndDescription(param.getParameterDescription(), param.getParameterName());
+      }
+      final ComboBoxModel jComboBoxTypeModel = new DefaultComboBoxModel(oad);
+      jComboBoxParent.setModel(jComboBoxTypeModel);
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+      String sName;
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         sName = (String) ((ObjectAndDescription) jComboBoxParent.getSelectedItem()).getObject();
+         final AdditionalInfoBand addInfo = new AdditionalInfoBand(sName);
+         m_Parameter = new ParameterBand();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoBand ai = (AdditionalInfoBand) param.getParameterAdditionalInfo();
+         final ComboBoxModel model = jComboBoxParent.getModel();
+         for (int i = 0; i < model.getSize(); i++) {
+            final ObjectAndDescription item = (ObjectAndDescription) model.getElementAt(i);
+            final String sName = (String) item.getObject();
+            if (sName.equals(ai.getParentParameterName())) {
+               jComboBoxParent.setSelectedIndex(i);
+               break;
+            }
+         }
+
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Raster_band");
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      if (m_ModelerPanel.getAlgorithm() != null) {
+         return m_ModelerPanel.getAlgorithm().requiresIndividualRasterLayers();
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/RasterBandPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionPanel.java	(revision 369)
@@ -0,0 +1,213 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.util.Arrays;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.gui.modeler.SelectionAndChoices;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterSelection;
+
+public class SelectionPanel
+extends
+ParameterPanel {
+
+	private SelectionTreePanel tree;
+	private String searchArgument;
+	private TreePath selectedPath = null;
+
+
+	public SelectionPanel(final JDialog parent,
+			final ModelerPanel panel) {
+
+		super(parent, panel);
+
+	}
+
+
+	public SelectionPanel(final ModelerPanel panel) {
+
+		super(panel);
+
+	}
+
+
+	@Override
+	public String getParameterDescription() {
+
+		return Sextante.getText("option_setting");
+
+	}
+
+
+	@Override
+	protected void initGUI() {
+
+		super.initGUI();
+
+		super.setTitle(Sextante.getText("modeler_add_par_selection"));
+
+		super.setPreferredSize(new java.awt.Dimension(400, 540));      
+
+		super.setResizable(true);
+
+		final TableLayout thisLayout = new TableLayout(new double[][] {
+				{ 	TableLayoutConstants.FILL },	
+				{ TableLayoutConstants.FILL} });
+		thisLayout.setHGap(5);
+		thisLayout.setVGap(5);
+		jPanelMiddle.setLayout(thisLayout);		
+
+		try {
+			tree = new SelectionTreePanel();
+			super.jButtonOk.setEnabled(false);
+			final JButton jButtonOk = super.jButtonOk;
+			final JPanel jPanel = super.m_ModelerPanel;
+			tree.getTree().addTreeSelectionListener(new TreeSelectionListener() {				
+				public void valueChanged(TreeSelectionEvent e) {
+					DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+					tree.getTree().getLastSelectedPathComponent();
+					if (node == null) {
+						jButtonOk.setEnabled(false);
+					} else {					
+						Object nodeInfo = node.getUserObject();
+						if (node.isLeaf()) {
+							jButtonOk.setEnabled(true);
+						} else {
+							jButtonOk.setEnabled(false);
+						}
+					}
+					jPanel.repaint();
+				}
+			});
+
+			jPanelMiddle.add(tree, "0, 0");
+		}
+		catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+
+	@Override
+	protected boolean prepareParameter() {
+
+
+		final String sDescription = jTextFieldDescription.getText();		
+
+		if (sDescription.length() != 0) {
+			m_Parameter = new ParameterSelection();
+			final SelectionAndChoices sac = tree.getSelectedList();
+			if (sac != null) {
+				final AdditionalInfoSelection ai = new AdditionalInfoSelection(sac.getChoices());
+				String sSelPath = tree.getTree().getSelectionPath().toString();				
+				ai.setSelectionPath(sSelPath);
+				m_Parameter.setParameterAdditionalInfo(ai);
+				if (sDescription.trim().equals("")) {
+					m_Parameter.setParameterDescription(sac.getDescription());
+				}
+				else {
+					m_Parameter.setParameterDescription(sDescription);
+				}
+
+				m_Parameter.setColorR(m_Color.getRed());        
+				m_Parameter.setColorG(m_Color.getGreen());        
+				m_Parameter.setColorB(m_Color.getBlue());        
+				m_Parameter.setColorAlpha(m_Color.getAlpha());				
+
+				return true;
+			}
+			else {
+				return false;
+			}
+		}
+		else {
+			JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+					JOptionPane.WARNING_MESSAGE);
+			return false;
+		}
+
+
+	}
+
+	
+	private void walk(final DefaultTreeModel model, final Object o) {
+		int cc;
+		
+		if ( searchArgument == null )
+			return;
+		
+		cc = model.getChildCount(o);
+		for (int i = 0; i < cc; i++) {
+			DefaultMutableTreeNode child = (DefaultMutableTreeNode) model.getChild(o, i);
+			if (model.isLeaf(child)) {
+				String path = Arrays.toString(child.getPath());				
+				if (searchArgument.equals(path.substring(1, path.length() - 1))) {
+					selectedPath = new TreePath(model.getPathToRoot(child));
+					searchArgument = null;
+					break;
+				}
+			} else {
+				walk(model, child);
+			}
+		}
+	}
+
+	
+	@Override
+	public void setParameter(final Parameter param) {
+
+		super.setParameter(param);
+
+		try {
+			if ( param != null ) {
+				final AdditionalInfoSelection ai = (AdditionalInfoSelection) param.getParameterAdditionalInfo();
+				if ( ai != null && ai.getSelectionPath() != null ) {
+					if ( ai.getSelectionPath().length() > 0 ) {
+						searchArgument = ai.getSelectionPath();
+						searchArgument = searchArgument.replace("[", "");
+						searchArgument = searchArgument.replace("]", "");
+						DefaultTreeModel model = (DefaultTreeModel) tree.getTree().getModel();
+						selectedPath = null;
+						walk(model, model.getRoot());
+						if ( selectedPath != null ) {
+							super.jButtonOk.setEnabled(true);
+							tree.getTree().expandPath(selectedPath);
+							tree.getTree().makeVisible(selectedPath);
+							tree.getTree().setSelectionPath(selectedPath);
+							tree.getTree().scrollPathToVisible(selectedPath.getParentPath());							
+						}
+					}
+				}
+			}
+		}
+		catch (final NullParameterAdditionalInfoException e) {}		
+	}
+
+
+	@Override
+	public boolean parameterCanBeAdded() {
+
+		return true;
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/SelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TablePanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TablePanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TablePanel.java	(revision 369)
@@ -0,0 +1,118 @@
+package es.unex.sextante.gui.modeler.parameters;
+
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.modeler.ModelerPanel;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterTable;
+
+public class TablePanel
+         extends
+            ParameterPanel {
+
+   private JCheckBox jCheckBoxMandatory;
+
+
+   public TablePanel(final JDialog parent,
+                     final ModelerPanel panel) {
+
+      super(parent, panel);
+
+   }
+
+
+   public TablePanel(final ModelerPanel panel) {
+
+      super(panel);
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      super.initGUI();
+
+      super.setTitle(Sextante.getText("modeler_add_par_table"));
+      
+      super.setPreferredSize(new java.awt.Dimension(400, 200));      
+      
+      try {
+         jCheckBoxMandatory = new JCheckBox();
+         jCheckBoxMandatory.setSelected(true);
+         jPanelMiddle.add(jCheckBoxMandatory);
+         jCheckBoxMandatory.setText(Sextante.getText("Mandatory"));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected boolean prepareParameter() {
+
+
+      final String sDescription = jTextFieldDescription.getText();
+
+      if (sDescription.length() != 0) {
+         final AdditionalInfoTable addInfo = new AdditionalInfoTable(jCheckBoxMandatory.isSelected());
+         m_Parameter = new ParameterTable();
+         m_Parameter.setParameterAdditionalInfo(addInfo);
+         m_Parameter.setParameterDescription(jTextFieldDescription.getText());
+         
+         m_Parameter.setColorR(m_Color.getRed());        
+         m_Parameter.setColorG(m_Color.getGreen());        
+         m_Parameter.setColorB(m_Color.getBlue());        
+         m_Parameter.setColorAlpha(m_Color.getAlpha());         
+         
+         return true;
+      }
+      else {
+         JOptionPane.showMessageDialog(null, Sextante.getText("Invalid_description"), Sextante.getText("Warning"),
+                  JOptionPane.WARNING_MESSAGE);
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void setParameter(final Parameter param) {
+
+      super.setParameter(param);
+
+      try {
+         final AdditionalInfoTable ai = (AdditionalInfoTable) param.getParameterAdditionalInfo();
+         jCheckBoxMandatory.setSelected(ai.getIsMandatory());
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public String getParameterDescription() {
+
+      return Sextante.getText("Table");
+
+   }
+
+
+   @Override
+   public boolean parameterCanBeAdded() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/parameters/TablePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NameAndIcon.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NameAndIcon.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NameAndIcon.java	(revision 369)
@@ -0,0 +1,49 @@
+
+
+package es.unex.sextante.gui.core;
+
+import javax.swing.ImageIcon;
+
+
+public class NameAndIcon implements HasIcon {
+
+   private String    m_sName;
+   private ImageIcon m_Icon;
+
+
+   public NameAndIcon(final String sName,
+                      final ImageIcon icon) {
+
+      m_sName = sName;
+      m_Icon = icon;
+
+   }
+
+
+   public String getName() {
+      return m_sName;
+   }
+
+
+   public void setName(final String name) {
+      m_sName = name;
+   }
+
+
+   public ImageIcon getIcon() {
+      return m_Icon;
+   }
+
+
+   public void setIcon(final ImageIcon icon) {
+      m_Icon = icon;
+   }
+
+
+   @Override
+   public String toString() {
+      return m_sName;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NameAndIcon.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ProgressMonitor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ProgressMonitor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ProgressMonitor.java	(revision 369)
@@ -0,0 +1,283 @@
+package es.unex.sextante.gui.core;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
+import javax.swing.WindowConstants;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.grass.GrassUtils;
+
+/**
+ * A progress monitor showing a progress bar and a cancel button
+ * 
+ * @author volaya
+ * 
+ */
+public class ProgressMonitor
+         extends
+            JDialog {
+
+   private JLabel       jTitle;
+   private JButton      jButtonCancel;
+   private JProgressBar jProgressBar;
+   private JLabel       jProgressText;
+   private boolean      m_bCanceled;
+   private String       m_sPrefix      = "";
+   private String       m_sDescription = "";
+
+
+   /**
+    * Constructor
+    * 
+    * @param sText
+    *                The title text to show
+    * @param bDeterminate
+    *                true if the process to monitor is determinate
+    * @param parent
+    *                the parent dialog
+    */
+   public ProgressMonitor(final String sText,
+                          final boolean bDeterminate,
+                          final JDialog parent) {
+
+      super(parent, "", false);
+
+      setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+      setLocationRelativeTo(null);
+
+      m_bCanceled = false;
+      m_sDescription = sText;
+
+      initGUI(bDeterminate);
+
+   }
+
+
+   /**
+    * Constructor. Uses the main frame as the parent component
+    * 
+    * @param sText
+    *                The title text to show
+    * @param bDeterminate
+    *                true if the process to monitor is determinate
+    */
+   public ProgressMonitor(final String sText,
+                          final boolean bDeterminate) {
+
+      super(SextanteGUI.getMainFrame(), "", false);
+
+      setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+      setLocationRelativeTo(null);
+
+      m_bCanceled = false;
+      m_sDescription = sText;
+
+      initGUI(bDeterminate);
+
+   }
+
+
+   private void initGUI(boolean bDeterminate) {
+
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 6.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 6.0 },
+               { 1.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 1, 15.0, 1.0, 25.0, 1.0 } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      setPreferredSize(new Dimension(350, 150));
+      setSize(new Dimension(350, 150));
+      getContentPane().setLayout(thisLayout);
+      {
+         jTitle = new JLabel(m_sDescription);
+         getContentPane().add(jTitle, "1, 1, 2, 1");
+      }
+      {
+         jButtonCancel = new JButton();
+         getContentPane().add(jButtonCancel, "2, 6");
+         jButtonCancel.setText(Sextante.getText("Cancel"));
+         jButtonCancel.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               cancel();
+            }
+         });
+      }
+      {
+         jProgressBar = new JProgressBar();
+         jProgressBar.setIndeterminate(!bDeterminate);
+         if (bDeterminate) {
+            jProgressBar.setMinimum(0);
+            jProgressBar.setMaximum(100);
+            jProgressBar.setValue(0);
+         }
+         getContentPane().add(jProgressBar, "1, 4, 2, 4");
+      }
+      {
+         jProgressText = new JLabel();
+         getContentPane().add(jProgressText, "1, 2");
+      }
+
+   }
+
+
+   private void cancel() {
+
+      //If this is a running GRASS process: kill it
+      GrassUtils.cancelProcess();
+
+      m_bCanceled = true;
+
+   }
+
+
+   /**
+    * Returns true if the process has been canceled using the cancel button
+    * 
+    * @return true if the process has been canceled
+    */
+   public boolean isCanceled() {
+
+      return m_bCanceled;
+
+   }
+
+
+   /**
+    * Sets the text describing the current phase of the process being monitored
+    * 
+    * @param sText
+    *                the description
+    */
+   public void setProgressText(final String sText) {
+
+      try {
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               jProgressText.setText(sText);
+            }
+         };
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            SwingUtilities.invokeAndWait(runnable);
+         }
+      }
+      catch (final Exception e) {}
+
+
+   }
+
+
+   /**
+    * Sets the description to show at the top of the progress monitor
+    * 
+    * @param sDescription
+    *                the description
+    */
+   public void setDescription(final String sDescription) {
+
+      m_sDescription = sDescription;
+      updateTitle();
+
+   }
+
+
+   private void updateTitle() {
+
+      try {
+
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               jTitle.setText(m_sPrefix + m_sDescription);
+            }
+         };
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            SwingUtilities.invokeAndWait(runnable);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   /**
+    * Sets the current progress value (in the range 1-100)
+    * 
+    * @param iValue
+    */
+   public void setProgress(final int iValue) {
+
+      try {
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               jProgressBar.setValue(iValue);
+            }
+         };
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            SwingUtilities.invokeAndWait(runnable);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   /**
+    * Sets whether the process being monitored is determinate or not
+    * 
+    * @param bDeterminate
+    */
+   public void setDeterminate(final boolean bDeterminate) {
+
+      try {
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               jProgressBar.setIndeterminate(!bDeterminate);
+            }
+         };
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            SwingUtilities.invokeAndWait(runnable);
+         }
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   /**
+    * this method sets a prefix to be prepended to the description title. This can be used for processes that include several
+    * algorithms, so when each algorithm sets its owns description, it will also contain a string indicating the part of the
+    * global process that it represents. This method should, therefore, not be called by simple algorithms, but just from complex
+    * processes
+    * 
+    * @param sPrefix
+    *                the prefix to prepend to the description title.
+    */
+   public void setDescriptionPrefix(final String sPrefix) {
+
+      m_sPrefix = sPrefix;
+      updateTitle();
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ProgressMonitor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GUIResources.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GUIResources.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GUIResources.java	(revision 369)
@@ -0,0 +1,201 @@
+package es.unex.sextante.gui.core;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ *
+ * Methods in this class act as entry points for algorithms and resource files.
+ *
+ * Algorithms are loaded when the library is initialized. Adding new algorithms after calling {@link Sextante#initialize()} will
+ * not add them to the list of currently available ones, so all additional algorithms should be added before initializing the
+ * library
+ *
+ */
+public class GUIResources {
+
+   private static ArrayList<Class> m_ParameterPanelClasses        = new ArrayList<Class>();
+   private static ArrayList<Class> m_ModelerParameterPanelClasses = new ArrayList<Class>();
+
+
+   /**
+    * Adds all sextante GUI resources located in the jar files in the classpath.
+    */
+   public static void addResourcesFromClasspath() {
+
+      final StringTokenizer localTokenizer = new StringTokenizer(System.getProperty("java.class.path"), File.pathSeparator, false);
+
+      //final Set<String> filenames = new LinkedHashSet();
+
+      while (localTokenizer.hasMoreTokens()) {
+         final String classpathElement = localTokenizer.nextToken();
+         final File classpathFile = new File(classpathElement);
+         final String sFilename = classpathFile.getName();
+         if (classpathFile.exists() && classpathFile.canRead()) {
+            if (sFilename.toLowerCase().endsWith(".jar") &&
+            	sFilename.toLowerCase().startsWith(SextanteGUI.resourcePrefix)) {
+               addResourcesFromJarFile(classpathElement);
+            }
+
+         }
+      }
+
+      final ClassLoader classloader = GUIResources.class.getClassLoader();
+      URL[] webappClasses = new URL[0];
+      if (classloader instanceof URLClassLoader) {
+         final URLClassLoader urlClassLoader = (URLClassLoader) classloader;
+         webappClasses = urlClassLoader.getURLs();
+      }
+
+      addResourcesFromURLs(webappClasses);
+
+   }
+
+
+   public static void addResourcesFromURLs(final URL[] urls) {
+
+      for (final URL url : urls) {
+         final File classpathFile = new File(URLDecoder.decode(url.getFile()));
+         final String sFilename = classpathFile.getName();
+         if (classpathFile.exists() && classpathFile.canRead()) {
+            if (sFilename.toLowerCase().endsWith(".jar") &&
+            	sFilename.toLowerCase().startsWith(SextanteGUI.resourcePrefix)) {
+               addResourcesFromJarFile(classpathFile.getAbsolutePath());
+            }
+         }
+      }
+
+
+   }
+
+
+   /**
+    * Adds all sextante GUI resources from files located in the jar files of a given folder.
+    */
+   public static void addResourcesFromFolder(final String sFolder) {
+
+      final File folder = new File(sFolder);
+      final File[] directoryFiles = folder.listFiles();
+      for (int i = 0; i < directoryFiles.length; i++) {
+         if (!directoryFiles[i].isDirectory()) {
+            final String sFilename = directoryFiles[i].getName();
+            if (sFilename.endsWith(".jar") &&
+            	sFilename.startsWith(SextanteGUI.resourcePrefix)) {
+               addResourcesFromJarFile(directoryFiles[i].getAbsolutePath());
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Adds all sextante algorithms and properties files located in a given jar file
+    *
+    * @param sFilename
+    *                the filename of the jar file
+    */
+    private static void addResourcesFromJarFile(final String sFilename) {
+
+        try {
+            File file = new File(sFilename);
+            final ZipFile zip = new ZipFile(sFilename);
+            final Enumeration entries = zip.entries();
+            while (entries.hasMoreElements()) {
+                final ZipEntry entry = (ZipEntry) entries.nextElement();
+                final String sName = entry.getName();
+                if (!entry.isDirectory()) {
+                    if (sName.toLowerCase().endsWith(
+                        "modelerparameterspanel.class")) {
+                        final String sClassName =
+                            sName.substring(0, sName.lastIndexOf('.')).replace(
+                                '/', '.');
+                        Class<?> loadedClassFromFile = loadClassFromFile(file, sClassName);
+                        if(loadedClassFromFile!=null){
+                            m_ModelerParameterPanelClasses.add(loadedClassFromFile);
+                        }
+                    } else if (sName.toLowerCase().endsWith("parameterspanel.class")) {
+                        final String sClassName =
+                            sName.substring(0, sName.lastIndexOf('.')).replace('/', '.');
+                        Class<?> loadedClassFromFile = loadClassFromFile(file, sClassName);
+                        if (loadedClassFromFile != null) {
+                            m_ParameterPanelClasses.add(loadedClassFromFile);
+                        }
+                    }
+                }
+            }
+        } catch (final Exception e) {/* ignore file */
+        }
+
+    }
+
+
+    private static Class loadClassFromFile(File jar, String className) {
+        Class cls = null;
+        try {
+            // Convert File to a URL
+            URL url = jar.toURL();
+            URL[] urls = new URL[] { url };
+
+            // Create a new class loader with the directory
+            ClassLoader cl = new URLClassLoader(urls, GUIResources.class.getClassLoader());
+
+            cls = cl.loadClass(className);
+        } catch (MalformedURLException e) {
+        } catch (ClassNotFoundException e) {
+        }
+        return cls;
+    }
+
+   /**
+    * Returns an array of class names corresponding to custom parameter panels found in jar files
+    *
+    * @return an array of class names corresponding to custom parameter panels found in jar files
+    */
+    public static String[] getParameterPanelClassNames() {
+
+        String[] names = new String[m_ParameterPanelClasses.size()];
+        for (int i = 0; i < names.length; i++) {
+            names[i] = m_ParameterPanelClasses.get(i).getName();
+
+        }
+        return names;
+    }
+
+   public static Class[] getParameterPanelClasses() {
+
+       return m_ParameterPanelClasses.toArray(new Class[0]);
+
+    }
+
+   /**
+    * Returns an array of class names corresponding to custom modeler parameter panels found in jar files
+    *
+    * @return an array of class names corresponding to custom modeler parameter panels found in jar files
+    */
+    public static String[] getModelerParameterPanelClassNames() {
+
+        String[] names = new String[m_ModelerParameterPanelClasses.size()];
+        for (int i = 0; i < names.length; i++) {
+            names[i] = m_ModelerParameterPanelClasses.get(i).getName();
+
+        }
+        return names;
+    }
+
+   public static Class[] getModelerParameterPanelClasses() {
+
+       return m_ModelerParameterPanelClasses.toArray(new Class[0]);
+
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GUIResources.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultTaskMonitor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultTaskMonitor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultTaskMonitor.java	(revision 369)
@@ -0,0 +1,146 @@
+package es.unex.sextante.gui.core;
+
+import javax.swing.JDialog;
+import javax.swing.SwingUtilities;
+
+import es.unex.sextante.core.ITaskMonitor;
+
+/**
+ * A simple task monitor, which just shows a progress monitor
+ * 
+ * @author volaya
+ * 
+ */
+public class DefaultTaskMonitor
+         implements
+            ITaskMonitor {
+
+   private ProgressMonitor m_ProgressMonitor;
+
+
+   /**
+    * Creates a new task monitor
+    * 
+    * @param sText
+    *                the text to show in the top bar of the progress monitor
+    * @param bDeterminate
+    *                whether the process to monitor is determinate (the number of total steps to complete is known)
+    * @param parent
+    *                the parent component. If null, the main frame will be used
+    */
+   public DefaultTaskMonitor(final String sText,
+                             final boolean bDeterminate,
+                             final JDialog parent) {
+
+      try {
+
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               if (parent != null) {
+                  m_ProgressMonitor = new ProgressMonitor(sText, bDeterminate, parent);
+               }
+               else {
+                  m_ProgressMonitor = new ProgressMonitor(sText, bDeterminate);
+               }
+               m_ProgressMonitor.pack();
+               m_ProgressMonitor.setVisible(true);
+            }
+         };
+
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            SwingUtilities.invokeAndWait(runnable);
+         }
+
+      }
+      catch (final Exception e) {}
+
+
+   }
+
+
+   public boolean isCanceled() {
+
+      if (m_ProgressMonitor != null) {
+         return m_ProgressMonitor.isCanceled();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   public void setProgress(final int iStep) {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.setProgress(iStep);
+      }
+
+   }
+
+
+   public void setProgressText(final String sText) {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.setProgressText(sText);
+      }
+
+   }
+
+
+   public void close() {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.dispose();
+         m_ProgressMonitor.setVisible(false);
+      }
+
+   }
+
+
+   public void setProgress(final int iStep,
+                           final int iTotalNumberOfSteps) {
+
+      if (m_ProgressMonitor != null) {
+         if (iTotalNumberOfSteps != 0) {
+            double dPercent = (double) iStep / (double) iTotalNumberOfSteps;
+            dPercent = Math.min(Math.max(0, dPercent), 1);
+            final int iCurrentStep = Math.min((int) (dPercent * 100), 100);
+            m_ProgressMonitor.setProgress(iCurrentStep);
+         }
+      }
+
+
+   }
+
+
+   public void setDeterminate(final boolean bDeterminate) {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.setDeterminate(bDeterminate);
+      }
+
+   }
+
+
+   public void setProcessDescription(final String sDescription) {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.setDescription(sDescription);
+      }
+
+   }
+
+
+   public void setDescriptionPrefix(final String sPrefix) {
+
+      if (m_ProgressMonitor != null) {
+         m_ProgressMonitor.setDescriptionPrefix(sPrefix);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultTaskMonitor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultGUIFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultGUIFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultGUIFactory.java	(revision 369)
@@ -0,0 +1,490 @@
+
+
+package es.unex.sextante.gui.core;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.BorderFactory;
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.additionalResults.AdditionalResultsDialog;
+import es.unex.sextante.gui.algorithm.AlgorithmDialog;
+import es.unex.sextante.gui.algorithm.DefaultParametersPanel;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.batch.BatchProcessDialog;
+import es.unex.sextante.gui.cmd.BSHDialog;
+import es.unex.sextante.gui.dataExplorer.DataExplorerDialog;
+import es.unex.sextante.gui.exceptions.WrongViewNameException;
+import es.unex.sextante.gui.help.HelpEditionDialog;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.help.SextanteHelpWindow;
+import es.unex.sextante.gui.history.DateAndCommand;
+import es.unex.sextante.gui.history.HistoryDialog;
+import es.unex.sextante.gui.history.HistoryPanel;
+import es.unex.sextante.gui.modeler.DefaultModelerParametersPanel;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.gui.modeler.ModelerDialog;
+import es.unex.sextante.gui.settings.SextanteConfigurationDialog;
+import es.unex.sextante.gui.toolbox.ToolboxDialog;
+import es.unex.sextante.gui.toolbox.ToolboxPanel;
+import java.awt.geom.Point2D;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.tuple.Pair;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.temporarystorage.TemporaryStorageGroup;
+import org.gvsig.temporarystorage.TemporaryStorageLocator;
+import org.gvsig.temporarystorage.TemporaryStorageManager;
+
+
+/**
+ * A default GUIFactory which shows SEXTANTE elements as Swing dialogs
+ * 
+ * @author volaya
+ * 
+ */
+public class DefaultGUIFactory
+         implements
+            IGUIFactory {
+
+   protected static ToolboxPanel       m_Toolbox;
+   protected static HistoryPanel       m_History;
+   private final ArrayList<NamedPoint> m_Coordinates = new ArrayList<NamedPoint>();
+
+
+   public void showToolBoxDialog() {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+
+      final ToolboxDialog toolbox = new ToolboxDialog(SextanteGUI.getMainFrame());
+      m_Toolbox = toolbox.getToolboxPanel();
+      toolbox.pack();
+      toolbox.setVisible(true);
+
+      SextanteGUI.getInputFactory().clearDataObjects();
+
+      m_Toolbox = null;
+
+   }
+
+
+   public int showAlgorithmDialog(final GeoAlgorithm alg,
+                                  final JDialog parent,
+                                  final ArrayList<DateAndCommand> commands) {
+
+      GeoAlgorithmParametersPanel paramPanel = null;
+      Class paramPanelClass = SextanteGUI.getParametersPanel(alg.getCommandLineName());
+
+      if (paramPanelClass == null) {
+         paramPanelClass = getDefaultParametersPanel();
+      }
+      try {
+         paramPanel = (GeoAlgorithmParametersPanel) paramPanelClass.newInstance();
+      }
+      catch (final Exception e) {
+         try {
+            paramPanel = (GeoAlgorithmParametersPanel) getDefaultParametersPanel().newInstance();
+         }
+         catch (final Exception e1) {
+         }
+      }
+
+      final Object[] objs = SextanteGUI.getInputFactory().getDataObjects();
+      if (alg.meetsDataRequirements(objs)) {
+         AlgorithmDialog dialog;
+         if (parent != null) {
+            dialog = new AlgorithmDialog(alg, parent, paramPanel, commands);
+         }
+         else {
+            dialog = new AlgorithmDialog(alg, paramPanel, commands);
+         }
+         //dialog.setResizable(true);
+         dialog.pack();
+         dialog.setVisible(true);
+         return dialog.getDialogReturn();
+      }
+      else {
+         return CANCEL;
+      }
+
+   }
+
+
+   public int showAlgorithmDialogForModeler(final GeoAlgorithm algorithm,
+                                            final String sName,
+                                            final String sDescription,
+                                            final ModelAlgorithm modelAlgorithm,
+                                            final HashMap dataObjects,
+                                            final JDialog parent) {
+
+      GeoAlgorithmModelerParametersPanel paramPanel = null;
+      Class paramPanelClass = SextanteGUI.getModelerParametersPanel(algorithm.getCommandLineName());
+
+      if (paramPanelClass == null) {
+         paramPanelClass = getDefaultModelerParametersPanel();
+      }
+      try {
+         paramPanel = (GeoAlgorithmModelerParametersPanel) paramPanelClass.newInstance();
+      }
+      catch (final Exception e) {
+         try {
+            paramPanel = (GeoAlgorithmModelerParametersPanel) getDefaultModelerParametersPanel().newInstance();
+         }
+         catch (final Exception e1) {
+         }
+      }
+
+      try {
+         es.unex.sextante.gui.modeler.AlgorithmDialog dialog;
+
+         if (parent != null) {
+            dialog = new es.unex.sextante.gui.modeler.AlgorithmDialog(algorithm.getNewInstance(), sName, sDescription,
+                     modelAlgorithm, paramPanel, dataObjects, parent);
+         }
+         else {
+            dialog = new es.unex.sextante.gui.modeler.AlgorithmDialog(algorithm.getNewInstance(), sName, sDescription,
+                     modelAlgorithm, paramPanel, dataObjects);
+         }
+
+         dialog.pack();
+         dialog.setVisible(true);
+         return dialog.getDialogReturn();
+      }
+      catch (final Exception e) {
+         return CANCEL;
+      }
+
+   }
+
+
+   public void showSettingsDialog(final ToolboxPanel panel,
+                                  final JDialog parent) {
+
+      SextanteConfigurationDialog dialog;
+
+      if (parent != null) {
+         dialog = new SextanteConfigurationDialog(panel, parent);
+      }
+      else {
+         dialog = new SextanteConfigurationDialog(panel);
+      }
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+
+   public void showModelerDialog() {
+
+      //SextanteGUI.getInputFactory().createDataObjects();
+
+      final ModelerDialog dialog = new ModelerDialog(SextanteGUI.getMainFrame());
+      dialog.pack();
+      dialog.setVisible(true);
+
+      //SextanteGUI.getInputFactory().clearDataObjects();
+
+   }
+
+
+   public void showModelerDialog(final ModelAlgorithm alg) {
+
+      final ModelerDialog dialog = new ModelerDialog(SextanteGUI.getMainFrame());
+      dialog.getModelerPanel().checkChangesAndOpenModel(alg.getFilename());
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+
+   public void showHelpEditionDialog(final GeoAlgorithm alg) {
+
+      final HelpEditionDialog dialog = new HelpEditionDialog(alg, SextanteGUI.getMainFrame());
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+
+   public void showHelpDialog(final GeoAlgorithm algorithm) {
+
+      final JEditorPane jEditorPane = new JEditorPane();
+      jEditorPane.setEditable(false);
+      final JScrollPane scrollPane = new JScrollPane();
+      scrollPane.setPreferredSize(new Dimension(800, 600));
+      scrollPane.setSize(new Dimension(800, 600));
+      scrollPane.setMaximumSize(new Dimension(800, 600));
+      scrollPane.setViewportView(jEditorPane);
+      scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+      jEditorPane.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+      jEditorPane.setContentType("text/html");
+      final Object help = SextanteGUI.getAlgorithmHelp(algorithm);
+      if (help instanceof String) {
+         jEditorPane.setText((String) help);
+      }
+      else if (help instanceof URL) {
+         try {
+            jEditorPane.setPage((URL) help);
+         }
+         catch (final Exception e) {
+            //will show a blank page
+         }
+      }
+      jEditorPane.setCaretPosition(0);
+
+      SextanteGUI.getGUIFactory().showGenericInfoDialog(scrollPane, Sextante.getText("Help"));
+
+   }
+
+
+   public void showHelpDialog(final String sTopic) {
+
+      final JEditorPane jEditorPane = new JEditorPane();
+      jEditorPane.setEditable(false);
+      final JScrollPane scrollPane = new JScrollPane();
+      scrollPane.setPreferredSize(new Dimension(800, 600));
+      scrollPane.setViewportView(jEditorPane);
+      scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
+      jEditorPane.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
+      jEditorPane.setContentType("text/html");
+
+      try {
+         final String sFilepath = HelpIO.getHelpFile(sTopic);
+         final URL url = new URL("file:///" + sFilepath);
+         jEditorPane.setPage(url);
+      }
+      catch (final Exception e) {
+         //will show a blank page
+      }
+      jEditorPane.setCaretPosition(0);
+
+      SextanteGUI.getGUIFactory().showGenericInfoDialog(scrollPane, Sextante.getText("Help"));
+
+
+   }
+
+
+   public void showAdditionalResultsDialog(final ArrayList components) {
+
+      if (components.size() != 0) {
+         final Runnable runnable = new Runnable() {
+            public void run() {
+               final AdditionalResultsDialog dialog = new AdditionalResultsDialog(components, SextanteGUI.getMainFrame());
+               dialog.pack();
+               dialog.setVisible(true);
+            }
+         };
+
+         if (SwingUtilities.isEventDispatchThread()) {
+            runnable.run();
+         }
+         else {
+            try {
+               SwingUtilities.invokeAndWait(runnable);
+            }
+            catch (final Exception e) {
+            }
+         }
+      }
+
+   }
+
+
+   public void showHistoryDialog() {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+
+      final HistoryDialog dialog = new HistoryDialog(SextanteGUI.getMainFrame());
+      SextanteGUI.setLastCommandOrigin(SextanteGUI.HISTORY);
+      SextanteGUI.setLastCommandOriginParentDialog(dialog);
+      m_History = dialog.getHistoryPanel();
+      dialog.pack();
+      dialog.setVisible(true);
+
+      SextanteGUI.getInputFactory().clearDataObjects();
+
+      m_History = null;
+
+   }
+
+
+   public void showCommandLineDialog() {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+
+      final BSHDialog dialog = new BSHDialog(SextanteGUI.getMainFrame());
+      SextanteGUI.setLastCommandOrigin(SextanteGUI.COMMANDLINE);
+      SextanteGUI.setLastCommandOriginParentDialog(dialog);
+      dialog.pack();
+      dialog.setVisible(true);
+
+      SextanteGUI.getInputFactory().clearDataObjects();
+
+   }
+
+
+   public void showGenericInfoDialog(final Component component,
+                                     final String text) {
+
+      final GenericInfoDialog dialog = new GenericInfoDialog(component, text, SextanteGUI.getMainFrame());
+      dialog.setVisible(true);
+
+   }
+
+
+   public void showBatchProcessingDialog(final GeoAlgorithm alg,
+                                         final JDialog parent) {
+
+      BatchProcessDialog dialog;
+
+      if (parent != null) {
+         dialog = new BatchProcessDialog(alg, parent);
+      }
+      else {
+         dialog = new BatchProcessDialog(alg);
+      }
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+
+   public void showBatchProcessingFromGISDialog(final GeoAlgorithm alg,
+                                                final JDialog parent) {
+
+      es.unex.sextante.gui.batch.nonFileBased.BatchProcessDialog dialog;
+
+      if (parent != null) {
+         dialog = new es.unex.sextante.gui.batch.nonFileBased.BatchProcessDialog(alg, parent);
+      }
+      else {
+         dialog = new es.unex.sextante.gui.batch.nonFileBased.BatchProcessDialog(alg);
+      }
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+
+   public void updateToolbox() {
+
+      if (m_Toolbox != null) {
+         m_Toolbox.fillTreesWithAllAlgorithms();
+      }
+
+   }
+
+
+   public void updateHistory() {
+
+      if (m_History != null) {
+         m_History.updateContent();
+      }
+
+   }
+
+
+   @Override
+   public List<NamedPoint> getCoordinatesList() {
+      ArrayList<NamedPoint> coordsList = new ArrayList<NamedPoint>();
+      try {
+           TemporaryStorageManager manager = TemporaryStorageLocator.getTemporaryStorageManager();
+           TemporaryStorageGroup points = manager.get("Points");
+           for (Pair<String, Object> pair : points.asList()) {
+               String key = pair.getKey();
+               Point value = (Point) pair.getValue();
+               double xx = value.getX();
+               double yy = value.getY();
+               Point2D.Double pp = new Point2D.Double(xx, yy);
+               NamedPoint np = new NamedPoint(key, pp);
+               coordsList.add(np);
+           }
+       } catch (Exception ex) {
+           Sextante.addErrorToLog("Not able to load 'Points' from temporary storage coordinates tool");
+       }
+      
+      return Collections.unmodifiableList(coordsList);
+
+   }
+
+
+   public void showDataExplorer() {
+
+      SextanteGUI.getInputFactory().createDataObjects();
+
+      final DataExplorerDialog dialog = new DataExplorerDialog(SextanteGUI.getMainFrame());
+      dialog.pack();
+      dialog.setVisible(true);
+
+      if (m_Toolbox == null) {
+         SextanteGUI.getInputFactory().clearDataObjects();
+      }
+
+   }
+
+
+   public Class getDefaultModelerParametersPanel() {
+
+      return DefaultModelerParametersPanel.class;
+
+   }
+
+
+   public Class getDefaultParametersPanel() {
+
+      return DefaultParametersPanel.class;
+
+   }
+
+
+   public void showHelpWindow() {
+
+      final SextanteHelpWindow window = new SextanteHelpWindow();
+      window.setExtendedState(window.getExtendedState() | JFrame.MAXIMIZED_BOTH);
+      window.pack();
+      window.setVisible(true);
+
+   }
+
+
+   public void addToView(final IDataObject obj,
+                         final String viewName) throws WrongViewNameException {
+
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      return new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+
+   }
+
+
+   public void showGenericDialog(final String name,
+                                 final Component component) {
+
+      final GenericDialog dialog = new GenericDialog(component, name, SextanteGUI.getMainFrame());
+      dialog.pack();
+      dialog.setVisible(true);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultGUIFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GeoAlgorithmExecutors.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GeoAlgorithmExecutors.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GeoAlgorithmExecutors.java	(revision 369)
@@ -0,0 +1,139 @@
+package es.unex.sextante.gui.core;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.ProcessTask;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.gui.algorithm.iterative.IterativeAlgorithmMonitorableTask;
+
+/**
+ * This class contains convenience methods to call geoalgorithms from the SEXTANTE GUI
+ * 
+ * @author volaya
+ * 
+ */
+public class GeoAlgorithmExecutors {
+
+   //private static ExecutorService pool;
+
+   static {
+      //pool = Executors.newFixedThreadPool(2);
+   }
+
+
+   /**
+    * Executes an algorithm in a new thread and then gets the results and puts them into the GUI using the current post process
+    * task. The algorithm must already have valid parameter values.
+    * 
+    * @param alg
+    *                the algorithm to execute
+    */
+   public static void execute(final GeoAlgorithm alg,
+                              final JDialog parent) {
+
+      final Runnable run = new Runnable() {
+
+         public void run() {
+            ITaskMonitor tm = SextanteGUI.getOutputFactory().getTaskMonitor(alg.getName(), alg.isDeterminatedProcess(), parent);
+            ProcessTask task = new ProcessTask(alg, SextanteGUI.getOutputFactory(), tm);
+            final ExecutorService pool = Executors.newFixedThreadPool(1);
+            Future<Boolean> future = pool.submit(task);
+            Boolean success = null;
+            try {
+               success = future.get();
+            }
+            catch (InterruptedException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final ExecutionException e) {
+               tm.close();
+               Sextante.addErrorToLog(e);
+               try {
+                  SwingUtilities.invokeAndWait(new Runnable() {
+                     public void run() {
+                        JOptionPane.showMessageDialog(null, e.getMessage(), Sextante.getText("Error"), JOptionPane.ERROR_MESSAGE);
+                     }
+                  });
+               }
+               catch (Exception ex) {}
+               return;
+            }
+            tm.close();
+            if ((success != null) && success.booleanValue()) {
+               Runnable postProcess = SextanteGUI.getPostProcessTask(alg, true);
+               if (postProcess != null) {
+                  Thread th = new Thread(postProcess);
+                  th.start();
+               }
+            }
+         }
+      };
+
+      final Thread th = new Thread(run);
+      th.start();
+
+   }
+
+
+   /**
+    * Executes an algorithm in a new thread and then gets the results and puts them into the GUI using the current post process
+    * task. The algorithm must already have valid parameter values. Since this can be used to call several algorithms in a script,
+    * it does not perform the post-process task in a separate thread, but waits instead for its completion.
+    * 
+    * @param alg
+    *                the algorithm to execute
+    * @return true if execution went OK and other algorithms after this one should be executed
+    */
+   public static boolean executeForCommandLine(final GeoAlgorithm alg,
+                                               final JDialog parent) throws GeoAlgorithmExecutionException {
+
+      final ITaskMonitor tm = SextanteGUI.getOutputFactory().getTaskMonitor(alg.getName(), alg.isDeterminatedProcess(), parent);
+      final ExecutorService pool = Executors.newFixedThreadPool(1);
+      final Future<Boolean> p = pool.submit(new ProcessTask(alg, SextanteGUI.getOutputFactory(), tm));
+      try {
+         final Boolean success = p.get();
+         tm.close();
+         if ((success != null) && success.booleanValue()) {
+            final Runnable postProcess = SextanteGUI.getPostProcessTask(alg, false);
+            if (postProcess != null) {
+               postProcess.run();
+               SextanteGUI.getInputFactory().clearDataObjects();
+               SextanteGUI.getInputFactory().createDataObjects();
+            }
+            return success.booleanValue();
+         }
+         return false;
+
+      }
+      catch (final Exception e) {
+         tm.close();
+         Sextante.addErrorToLog(e);
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+
+   }
+
+
+   public static void executeIterative(final GeoAlgorithm alg,
+                                       final JDialog parent,
+                                       final String sParameterName) throws GeoAlgorithmExecutionException {
+
+      final IterativeAlgorithmMonitorableTask task = new IterativeAlgorithmMonitorableTask(alg, parent, sParameterName);
+      final Thread th = new Thread(task);
+      th.start();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GeoAlgorithmExecutors.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ToolboxAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ToolboxAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ToolboxAction.java	(revision 369)
@@ -0,0 +1,25 @@
+
+
+package es.unex.sextante.gui.core;
+
+public abstract class ToolboxAction {
+
+   public abstract void execute();
+
+
+   public abstract String getName();
+
+
+   public abstract String getGroup();
+
+
+   public abstract boolean isActive();
+   
+   @Override
+   public String toString() {
+      
+      return getName();
+      
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/ToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/HasIcon.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/HasIcon.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/HasIcon.java	(revision 369)
@@ -0,0 +1,9 @@
+
+package es.unex.sextante.gui.core;
+
+import javax.swing.ImageIcon;
+
+
+public interface HasIcon {
+    public ImageIcon getIcon();
+}
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IGUIFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IGUIFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IGUIFactory.java	(revision 369)
@@ -0,0 +1,267 @@
+
+
+package es.unex.sextante.gui.core;
+
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.JDialog;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.gui.exceptions.WrongViewNameException;
+import es.unex.sextante.gui.history.DateAndCommand;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.gui.toolbox.ToolboxPanel;
+import java.util.List;
+
+
+/**
+ * a GUI factory implements method to show SEXTANTE elements, adapted to the particular framework being used, and the graphical
+ * characteristics of the application SEXTANTE is running onto.
+ * 
+ * @author volaya
+ * 
+ */
+public interface IGUIFactory {
+
+
+   public static final int OK     = 1;
+   public static final int CANCEL = 0;
+
+
+   /**
+    * Shows the SEXTANTE toolbox
+    */
+   public void showToolBoxDialog();
+
+
+   /**
+    * Shows the dialog for the specified algorithm
+    * 
+    * @param alg
+    *                a GeoAlgorithm
+    * @param parent
+    *                the parent dialog (usually the toolbox). If null, the main frame is used
+    * @param command
+    *                a list of previous commands to use instead of all the ones available in the history. If null, all commands
+    *                from the history are used
+    * @return GUIFactory.OK if the user accepted the execution of the algorithm. GUIFactory.CANCEL if he canceled or the dialog
+    *         was not shown due to lack of input data
+    */
+   public int showAlgorithmDialog(GeoAlgorithm alg,
+                                  JDialog parent,
+                                  ArrayList<DateAndCommand> command);
+
+
+   /**
+    * Shows the dialog to add the selected algorithm to a model using the graphical modeler
+    * 
+    * @param algorithm
+    *                a GeoAlgorithm
+    * @param sName
+    *                the name of the algorithm
+    * @param sDescription
+    *                the description of the algorithm
+    * @param modelAlgorithm
+    *                the model to add the algorithm to
+    * @param dataObjects
+    *                the set of data objects currently in the model
+    * @param parent
+    *                the parent dialog
+    * @return GUIFactory.OK if the user accepted the addition of the algorithm. GUIFactory.CANCEL if he canceled or the dialog was
+    *         not shown due to lack of input data
+    */
+   public int showAlgorithmDialogForModeler(GeoAlgorithm algorithm,
+                                            String sName,
+                                            String sDescription,
+                                            ModelAlgorithm modelAlgorithm,
+                                            HashMap dataObjects,
+                                            JDialog parent);
+
+
+   /**
+    * Show the settings dialog
+    * 
+    * @param panel
+    *                The toolbox panel
+    * @param parent
+    *                the parent dialog from which this method was invoked
+    */
+   public void showSettingsDialog(ToolboxPanel panel,
+                                  JDialog parent);
+
+
+   /**
+    * Shows the modeler dialog
+    */
+   public void showModelerDialog();
+
+
+   /**
+    * Opens a model and shows the modeler dialog.
+    * 
+    * @param alg
+    *                the model. it will be reopened from its filename, that meaning that it must have been saved before opening.
+    *                If it has not been save and its filename is null, the dialog will open with no model.
+    */
+   public void showModelerDialog(ModelAlgorithm alg);
+
+
+   /**
+    * Shows the help editing dialog for the specified algorithm
+    * 
+    * @param alg
+    *                the algorithm
+    */
+   public void showHelpEditionDialog(GeoAlgorithm alg);
+
+
+   /**
+    * Shows a dialog containing help associated with the specified algorithm
+    * 
+    * @param algorithm
+    *                the algorithm
+    */
+   public void showHelpDialog(GeoAlgorithm algorithm);
+
+
+   /**
+    * Shows a dialog containing the help associated with the passed topic
+    * 
+    * @param sTopic
+    * 
+    */
+   public void showHelpDialog(String sTopic);
+
+
+   /**
+    * Shows the help manager window
+    */
+   public void showHelpWindow();
+
+
+   /**
+    * Shows the additional results dialog, only if there is at least one additional result
+    * 
+    * @param components
+    *                a list of components representing additional
+    */
+   public void showAdditionalResultsDialog(ArrayList components);
+
+
+   /**
+    * Shows the data-explorer dialog
+    */
+   public void showDataExplorer();
+
+
+   /**
+    * Shows the history dialog
+    */
+   public void showHistoryDialog();
+
+
+   /**
+    * Shows the command-line dialog
+    */
+   public void showCommandLineDialog();
+
+
+   /**
+    * Shows a simple dialog with the specified component as its only content
+    * 
+    * @param component
+    *                the component to add to the dialog
+    * @param text
+    *                the title of the dialog
+    */
+   public void showGenericInfoDialog(Component component,
+                                     String text);
+
+
+   /**
+    * Shows the batch processing dialog for the specified algorithm
+    * 
+    * @param alg
+    *                The algorithm
+    * @param parent
+    *                the parent dialog (usually the toolbox)
+    */
+   public void showBatchProcessingDialog(GeoAlgorithm alg,
+                                         JDialog parent);
+
+
+   /**
+    * Shows the batch processing dialog using data from the GIS interface (not from files)for the specified algorithm
+    * 
+    * @param alg
+    *                The algorithm
+    * @param parent
+    *                the parent dialog (usually the toolbox)
+    */
+   public void showBatchProcessingFromGISDialog(GeoAlgorithm alg,
+                                                JDialog parent);
+
+
+   /**
+    * If the toolbox is visible, it updates its list of algorithms
+    */
+   public void updateToolbox();
+
+
+   /**
+    * If the history is visible, it updates its content. This should be called from the history component itself when an algorithm
+    * is executed from it, to update it with the results of that algorithm.
+    */
+   public void updateHistory();
+
+
+   /**
+    * Returns the list of predefined coordinates to be used as input for algorithms that require coordinate pairs.
+    */
+   public List<NamedPoint> getCoordinatesList();
+
+
+   /**
+    * Returns the Class of the default parameters panel for algorithms
+    * 
+    * @return the class of the default parameters panel
+    */
+   public Class getDefaultParametersPanel();
+
+
+   /**
+    * Returns the class of the default parameters panel for algorithms when executed from the modeler interface
+    * 
+    * @return the class of the default parameters panel
+    */
+   public Class<? extends GeoAlgorithmModelerParametersPanel> getDefaultModelerParametersPanel();
+
+
+   /**
+    * adds a data object (layer) to a view designated by a given name
+    * 
+    * @param obj
+    * @param sViewName
+    * @throws WrongViewNameException
+    */
+   public void addToView(IDataObject obj,
+                         String sViewName) throws WrongViewNameException;
+
+
+   /**
+    * Returns toolbox actions specific of this GUI (that is, of this application)
+    * 
+    * @return toolbox actions specific of this GUI
+    */
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions();
+
+
+   public void showGenericDialog(String sName,
+                                 Component component);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IGUIFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IToolboxRightButtonAction.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IToolboxRightButtonAction.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IToolboxRightButtonAction.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.gui.core;
+
+import es.unex.sextante.core.GeoAlgorithm;
+
+public interface IToolboxRightButtonAction {
+
+   public void execute(GeoAlgorithm alg);
+
+
+   public String getDescription();
+
+
+   public boolean canBeExecutedOnAlgorithm(GeoAlgorithm alg);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IToolboxRightButtonAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericDialog.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.gui.core;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Frame;
+
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+/**
+ * A simple dialog to show a java component with which the user might interact
+ * 
+ * @author volaya
+ * 
+ */
+public class GenericDialog
+         extends
+            JDialog {
+
+   /**
+    * constructor
+    * 
+    * @param component
+    *                the component to show in the dialog
+    * @param sTitle
+    *                the title of the dialog
+    * @param parent
+    *                the parent frame
+    */
+   public GenericDialog(final Component component,
+                        final String sTitle,
+                        final Frame parent) {
+
+      super(parent, sTitle, true);
+
+      initGUI(component);
+
+      pack();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   protected void initGUI(final Component component) {
+
+      setPreferredSize(component.getPreferredSize());
+      setSize(component.getPreferredSize());
+      final BorderLayout thisLayout = new BorderLayout();
+      final JPanel pane = new JPanel();
+      pane.setLayout(thisLayout);
+      setContentPane(pane);
+      pane.add(component, BorderLayout.CENTER);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NamedPoint.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NamedPoint.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NamedPoint.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gui.core;
+
+import java.awt.geom.Point2D;
+
+public class NamedPoint {
+
+   private final Point2D m_Point;
+   private final String  m_sName;
+
+
+   public NamedPoint(final String sName,
+                     final Point2D point) {
+
+      m_Point = point;
+      m_sName = sName;
+
+   }
+
+
+   public Point2D getPoint() {
+      return m_Point;
+   }
+
+
+   public String getName() {
+      return m_sName;
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sName;
+
+   }
+
+
+   public String toStringFull() {
+
+      return m_sName + ":" + Double.toString(m_Point.getX()) + "," + Double.toString(m_Point.getY());
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/NamedPoint.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/SextanteGUI.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/SextanteGUI.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/SextanteGUI.java	(revision 369)
@@ -0,0 +1,1102 @@
+
+
+package es.unex.sextante.gui.core;
+
+import java.awt.Color;
+import java.awt.Container;
+import java.awt.Frame;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.ImageIcon;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.IInputFactory;
+import es.unex.sextante.core.OutputFactory;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.cmd.ScriptAlgorithmProvider;
+import es.unex.sextante.gui.help.HelpIO;
+import es.unex.sextante.gui.modeler.ModelerAlgorithmProvider;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteGeneralSettings;
+import es.unex.sextante.gui.settings.SextanteGrassSettings;
+import es.unex.sextante.gui.settings.SextanteModelerSettings;
+import es.unex.sextante.gui.settings.SextanteRSettings;
+import es.unex.sextante.gui.settings.SextanteSagaSettings;
+import es.unex.sextante.gui.settings.SextanteScriptsSettings;
+
+
+/**
+ * This class centralizes most actions related to the SextanteGUI, containing methods to show dialogs and retrieve basic values
+ * used by GUI elements
+ */
+public class SextanteGUI {
+   public static String                               resourcePrefix              = "org.gvsig.toolbox";
+   public static final int                            HISTORY                     = 0;
+   public static final int                            COMMANDLINE                 = 1;
+
+   private static IInputFactory                       m_InputFactory;
+   private static OutputFactory                       m_OutputFactory;
+   private static IGUIFactory                         m_GUIFactory                = new DefaultGUIFactory();
+
+   private static IPostProcessTaskFactory             m_PostProcessTaskFactory;
+
+   private static JDialog                             m_LastCommandOriginParentPanel;
+   private static int                                 m_iLastCommandOrigin;
+   private static Frame                               m_MainFrame;
+
+   private static boolean                             m_bShowOnlyActiveAlgorithms = false;
+   private static String                              m_sOutputFolder;
+   private static HashMap<String, String>             m_Settings                  = new HashMap<String, String>();
+   private static HashMap<String, String>             m_DefaultSettings           = new HashMap<String, String>();
+   private static IDataRenderer                       m_Renderer;
+   private static String m_sSextanteHomePath;
+   private static String m_sSextanteInstallPath;
+
+   private static ArrayList<String> foldersWithResources = new ArrayList<String>();
+   private static boolean initialized = false;
+
+
+   private final static HashMap<String, Class>        m_ParametersPanel           = new HashMap<String, Class>();
+   private final static HashMap<String, Class>        m_ModelerParametersPanel    = new HashMap<String, Class>();
+
+   private final static ArrayList<IAlgorithmProvider> m_AlgorithmProviders        = new ArrayList<IAlgorithmProvider>();
+
+   public final static ImageIcon                      SEXTANTE_ICON               = new ImageIcon(
+                                                                                           SextanteGUI.class.getClassLoader().getResource(
+                                                                                                    "images/module2.png"));
+
+   public final static Color COLOR_WHITE = new Color(255, 255, 255, 255);
+   public final static Color COLOR_GREY = new Color(128, 128, 128, 255);
+   public final static Color COLOR_BLACK = new Color(0, 0, 0, 255);
+   public final static Color COLOR_RED = new Color (255, 51, 51, 255);
+   public final static Color COLOR_ORANGE = new Color(255, 103, 51, 255);
+   public final static Color COLOR_YELLOW = new Color(255, 255, 51, 255);
+   public final static Color COLOR_GREEN_LIGHT = new Color(51, 255, 51, 255);
+   public final static Color COLOR_GREEN_DARK = new Color(0, 184, 0, 255);
+   public final static Color COLOR_BLUE_LIGHT = new Color (102, 179, 255, 255);
+   public final static Color COLOR_BLUE_DARK = new Color (0, 102, 204, 255);
+   public final static Color COLOR_PINK = new Color(255, 153, 255, 255);
+   public final static Color COLOR_PURPLE = new Color(163, 71, 255, 255);
+   public final static Color COLOR_BROWN_LIGHT = new Color(255, 168, 82, 255);
+   public final static Color COLOR_BROWN_DARK = new Color(204, 102, 0, 255);
+
+
+   static {
+
+      m_AlgorithmProviders.add(new ScriptAlgorithmProvider());
+      m_AlgorithmProviders.add(new ModelerAlgorithmProvider());
+
+   }
+
+
+   /**
+    * Sets a new main frame. This will be used as the parent frame by SEXTANTE GUI elements
+    *
+    * @param frame
+    *                The main frame
+    */
+   public static void setMainFrame(final Frame frame) {
+
+      m_MainFrame = frame;
+
+   }
+
+
+   /**
+    * Returns the current main frame
+    *
+    * @return the current main frame
+    */
+   public static Frame getMainFrame() {
+
+      return m_MainFrame;
+
+   }
+
+
+   /** ************************************************************ */
+
+   /**
+    * Returns the current input factory
+    *
+    * @see IInputFactory.
+    * @return the current input factory
+    */
+   public static IInputFactory getInputFactory() {
+
+      return m_InputFactory;
+
+   }
+
+
+   /**
+    * Sets a new input factory as the current one
+    *
+    * @param inputFactory
+    *                the new input factory
+    */
+   public static void setInputFactory(final IInputFactory inputFactory) {
+
+      m_InputFactory = inputFactory;
+
+   }
+
+
+   /**
+    * Returns the current OutputFactory
+    *
+    * @return the current OutputFactory
+    */
+   public static OutputFactory getOutputFactory() {
+
+      return m_OutputFactory;
+
+   }
+
+
+   /**
+    * sets a new output factory
+    *
+    * @param outputFactory
+    *                the new output factory
+    */
+   public static void setOutputFactory(final OutputFactory outputFactory) {
+
+      m_OutputFactory = outputFactory;
+      m_OutputFactory.setDefaultNoDataValue(getDefaultNoDataValue());
+
+   }
+
+
+   /**
+    * Returns the current GUIFactory
+    *
+    * @return the current GUIFactory
+    */
+   public static IGUIFactory getGUIFactory() {
+
+      return m_GUIFactory;
+
+   }
+
+
+   /**
+    * sets a new GUI factory
+    *
+    * @param guiFactory
+    *                the new GUI factory
+    */
+   public static void setGUIFactory(final IGUIFactory guiFactory) {
+
+      m_GUIFactory = guiFactory;
+
+   }
+
+
+   /**
+    * Returns the task to post-process the algorithm outputs, usually to add them to the GUI of the GIS app.
+    *
+    * @param alg
+    *                the algorithm to postprocess. Since this task will mainly deal with output results, the algorithm should have
+    *                been previously executed, so it contains non-null output values
+    * @param bShowResultsDialog
+    *                if this parameter is true, the task will show the results dialog if the algorithm has produced some kind of
+    *                output other than layers or tables. If it is false, those results will be added to the set of current
+    *                results, but the results dialog will not be shown
+    *
+    * @return a task to postprocess the given algorithm
+    */
+   public static Runnable getPostProcessTask(final GeoAlgorithm alg,
+                                             final boolean bShowResultsDialog) {
+
+      return m_PostProcessTaskFactory.getPostProcessTask(alg, bShowResultsDialog);
+
+   }
+
+
+   /**
+    * Sets the current post process task factory
+    *
+    * @param factory
+    *                the new post-process task factory
+    */
+   public static void setPostProcessTaskFactory(final IPostProcessTaskFactory factory) {
+
+      m_PostProcessTaskFactory = factory;
+
+   }
+
+
+   /** ******************************************* */
+
+   /**
+    * Adds an algorithm provider. This has to be done before calling initialize(), so the providers can be initialized as well.
+    *
+    * @param provider
+    *                the algorithm provider to add
+    */
+   public static void addAlgorithmProvider(final IAlgorithmProvider provider) {
+
+      //providers are added at the beginning of the array, because models and scripts might depend on them
+      m_AlgorithmProviders.add(0, provider);
+
+   }
+
+
+   /**
+    * Checks if a portable directory exists and has the required access privileges.
+    * Non-existing directories will be created if possible.
+    * Displays a GUI warning message if there are problems, and exits with a corresponding error code.
+    *
+    * @param dir String with name of folder/directory to be checked. Use only a relative path here.
+    * @param read_only set to "true" if only read access is required
+    * @param provider name of the algorithm provider for which this folder is being checked.
+    * @return "0" if all is OK, "1" if directory does not exist and could not be created, "2" if access is forbidden, "3" if a _file_ with that name already exists
+    */
+   public static int checkDir ( String dir, boolean read_only, String provider ) {
+
+	  final File f = new File ( SextanteGUI.getSextanteHomePath() + File.separator + dir );
+
+	  if ( f.exists() ) {
+		  if ( f.isFile() ) {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_dir_error") + " " + f.getAbsolutePath() + ".\n" +
+					  Sextante.getText("portable_dir_is_file") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+			  return ( 3 );
+		  }
+		  if ( read_only ) {
+			  if ( f.canRead() ) {
+				  return ( 0 );
+			  }
+		  }
+		  if ( f.canWrite() ) {
+			  return ( 0 );
+		  }
+		  if ( read_only ) {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_dir_error") + " " + f.getAbsolutePath() +
+					  Sextante.getText("portable_dir_error_ro") + "\n" + ":" +
+					  Sextante.getText("portable_dir_no_access") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+		  } else {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_dir_error") + " " + f.getAbsolutePath() +
+					  Sextante.getText("portable_dir_error_rw") + "\n" + ":" +
+					  Sextante.getText("portable_dir_no_access") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+		  }
+		  return ( 2 );
+	  }
+
+	  /* directory does not exist: attempt to create it */
+	  if ( f.mkdir() == false ) {
+		  JOptionPane.showMessageDialog(null,
+				  Sextante.getText("portable_dir_error") + " " + f.getAbsolutePath() + ".\n" +
+				  Sextante.getText("portable_dir_no_create") + "\n" +
+				  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+				  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+		  return ( 1 );
+	  }
+
+	  return ( 0 );
+   }
+
+
+   /**
+    * Checks if a file exists in one of the portable folders, and if it has the required access privileges.
+    * Displays a GUI warning message if there are problems, and exits with a corresponding error code.
+    *
+    * @param file String with name of file to be checked. Use only a relative path here.
+    * @param read_only set to "true" if only read access is required
+    * @param provider name of the algorithm provider for which this file is being checked.
+    * @return "0" if all is OK, "1" if file does not exist, "2" if access is forbidden, "3" if a _directory_ with that name already exists
+    */
+   public static int checkFile ( String file, boolean read_only, String provider ) {
+
+	  final File f = new File ( SextanteGUI.getSextanteHomePath() + File.separator + file );
+
+	  if ( f.exists() ) {
+		  if ( f.isDirectory() ) {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_file_error") + " " + f.getAbsolutePath() + ".\n" +
+					  Sextante.getText("portable_file_is_dir") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+			  return ( 3 );
+		  }
+		  if ( read_only ) {
+			  if ( f.canRead() ) {
+				  return ( 0 );
+			  }
+		  }
+		  if ( f.canWrite() ) {
+			  return ( 0 );
+		  }
+		  if ( read_only ) {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_file_error") + " " + f.getAbsolutePath() +
+					  Sextante.getText("portable_file_error_ro") + "\n" + ":" +
+					  Sextante.getText("portable_file_no_access") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+		  } else {
+			  JOptionPane.showMessageDialog(null,
+					  Sextante.getText("portable_file_error") + " " + f.getAbsolutePath() +
+					  Sextante.getText("portable_file_error_rw") + "\n" + ":" +
+					  Sextante.getText("portable_file_no_access") + "\n" +
+					  Sextante.getText("portable_provider_not_usable") + " <html></i>" + provider + "+</i>+</html>."
+					  , "Inane warning", JOptionPane.WARNING_MESSAGE);
+		  }
+		  return ( 2 );
+	  }
+
+	  return ( 1 );
+   }
+
+
+   /**
+    * Portable SEXTANTE requires that external providers' (e.g. GRASS) algorithms
+    * and user-editable scripts are stored in folders within the SEXTANTE extension
+    * folder. In some case, read access to these folders is fine, in others r/w is required.
+    * This method checks whether an algorithm provider has been set to be portable and
+    * if so, it makes sure that the required folder(s) is/are present with the required
+    * access rights. It will attempt to create any missing folders and will display a
+    * warning if anythign goes wrong.
+    */
+   public static void checkPortableFolders () {
+
+	   String sPath;
+	   int result;
+
+
+	   sPath = new String ("");
+
+	   if ( Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteRSettings.R_PORTABLE)) == true ) {
+		   /* set R binaries folder */
+		   result = checkDir ( Sextante.PORTABLE_R_FOLDER, true, "R" );
+		   sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteRSettings.R_FOLDER, sPath);
+
+		   /* set R user scripts folder */
+		   result = checkDir ( Sextante.PORTABLE_R_SCRIPTS_FOLDER, false, "R user scripts" );
+		   sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_R_SCRIPTS_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteRSettings.R_SCRIPTS_FOLDER, sPath);
+	   }
+	   if ( Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteGrassSettings.GRASS_PORTABLE)) == true ) {
+		   /* set GRASS binaries folder */
+		   result = checkDir ( Sextante.PORTABLE_GRASS_FOLDER, true, "GRASS GIS" );
+		   sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_GRASS_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_FOLDER, sPath);
+		   /* set GRASS shell support (MSYS) binaries folder (Windows only) */
+		   if ( Sextante.isWindows() ) {
+			   result = checkFile ( Sextante.PORTABLE_MSYS_FILE, true, "GRASS GIS shell scripts" );
+			   sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_MSYS_FILE;
+			   SextanteGUI.setSettingParameterValue(SextanteGrassSettings.GRASS_WIN_SHELL, sPath);
+		   }
+	   }
+	   if ( Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_PORTABLE)) == true ) {
+		   /* set SAGA binaries folder */
+		   result = checkDir ( Sextante.PORTABLE_SAGA_FOLDER, true, "SAGA GIS" );
+		   sPath = SextanteGUI.getSextanteInstallPath() + File.separator + Sextante.PORTABLE_SAGA_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_FOLDER, sPath);
+	   }
+	   if ( Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_PORTABLE)) == true ) {
+		   /* set user scripts folder */
+		   result = checkDir ( Sextante.PORTABLE_SCRIPTS_FOLDER, true, "Toolbox user scripts" );
+		   sPath = SextanteGUI.getSextanteHomePath() + File.separator + Sextante.PORTABLE_SCRIPTS_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER, sPath);
+	   }
+	   if ( Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_PORTABLE)) == true ) {
+		   /* set user models folder */
+		   result = checkDir ( Sextante.PORTABLE_MODELS_FOLDER, true, "Toolbox user models" );
+		   sPath = SextanteGUI.getSextanteHomePath() + File.separator + Sextante.PORTABLE_MODELS_FOLDER;
+		   SextanteGUI.setSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER, sPath);
+	   }
+   }
+
+
+   /**
+    * Initializes the GUI parameters and resources. It takes GUI resources (custom panels, etc.) from classpath jars. Should be
+    * called before setting parameters using other methods from this class, except for the setSextantePath() and
+    * setCustomDefaultSettings() methods.
+    */
+   public static void initialize() {
+
+      GUIResources.addResourcesFromClasspath();
+      _initialize();
+
+   }
+
+
+   /**
+    * Initializes the GUI parameters and resources. It takes GUI resources (custom panels, etc.) from the specified urls. Should
+    * be called before setting parameters using other methods from this class, except for the setSextantePath() method.
+    *
+    * @param jars
+    *                the urls of the jar files with custom GUI resources
+    */
+   public static void initialize(final URL[] jars) {
+
+      GUIResources.addResourcesFromURLs(jars);
+      _initialize();
+
+   }
+
+
+   /**
+    * Initializes the GUI parameters and resources. It takes GUI resources (custom panels, etc.) from the specified folder. Should
+    * be called before setting parameters using other methods from this class, except for the setSextantePath() method.
+    *
+    * @param sFolder
+    *                the folder with jars with custom GUI resources
+    */
+   public static void initialize(final String sFolder) {
+
+      GUIResources.addResourcesFromFolder(sFolder);
+      _initialize();
+
+
+   }
+
+    public static void addResourcesFromFolder(final String sFolder) {
+        if (initialized) {
+            GUIResources.addResourcesFromFolder(sFolder);
+            loadResources();
+        } else {
+            foldersWithResources.add(sFolder);
+        }
+    }
+
+    private static void _initialize() {
+
+        setDefaultSettings();
+        readConfigFile();
+
+        checkPortableFolders();
+
+
+        for (Iterator iterator = foldersWithResources.iterator(); iterator
+            .hasNext();) {
+            String sFolder = (String) iterator.next();
+            GUIResources.addResourcesFromFolder(sFolder);
+        }
+
+        // this loads built-in SEXTANTE algorithms and resources
+        loadResources();
+
+        // and this loads additional algorithms from algorithm providers
+        for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+            final IAlgorithmProvider provider = m_AlgorithmProviders.get(i);
+            provider.initialize();
+            if (provider.getAlgorithms().size() > 0) {
+                Sextante.addAlgorithmsFromProvider(provider.getName(),
+                    provider.getAlgorithms());
+                addCustomModelerParametersPanel(provider
+                    .getCustomModelerParameterPanels());
+                addCustomParametersPanel(provider.getCustomParameterPanels());
+            }
+        }
+
+        initialized = true;
+
+    }
+
+
+   private static void setDefaultSettings() {
+
+      final Setting[] baseSettings = new Setting[] { new SextanteGeneralSettings() };
+      final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+      final Setting[] settings = new Setting[baseSettings.length + providers.size()];
+      System.arraycopy(baseSettings, 0, settings, 0, baseSettings.length);
+      for (int i = 0; i < providers.size(); i++) {
+         settings[i + baseSettings.length] = providers.get(i).getSettings();
+      }
+
+      for (int i = 0; i < settings.length; i++) {
+         final HashMap<String, String> map = settings[i].getInitValues();
+         m_Settings.putAll(map);
+      }
+
+      if (m_DefaultSettings != null) {
+         m_Settings.putAll(m_DefaultSettings);
+      }
+
+   }
+
+
+   /**
+    * This methods sets default setting values different from the hard-coded ones. It should be called right before initializing
+    * this class
+    *
+    * @param map
+    *                the map with new default settings
+    */
+   public static void setCustomDefaultSettings(final HashMap<String, String> map) {
+
+      m_DefaultSettings = map;
+
+   }
+
+
+   private static void loadResources() {
+       final Class[] sPanelClass = GUIResources.getParameterPanelClasses();
+       for (final Class element : sPanelClass) {
+          try {
+             final Class panelClass = element;
+             final String sAlgClassName = element.getName().substring(0, element.getName().indexOf("ParametersPanel")) + "Algorithm";
+             final Class algClass = panelClass.getClassLoader().loadClass(sAlgClassName);
+             final GeoAlgorithm alg = (GeoAlgorithm) algClass.newInstance();
+             m_ParametersPanel.put(alg.getCommandLineName(), panelClass);
+          }
+          catch (final Exception e) {/*ignore it if there are problems*/
+          }
+       }
+
+       final Class[] sModelerPanelClass = GUIResources.getModelerParameterPanelClasses();
+       for (final Class element : sModelerPanelClass) {
+          try {
+             final Class panelClass = element;
+             final String sAlgClassName = element.getName().substring(0, element.getName().indexOf("ModelerParametersPanel")) + "Algorithm";
+             final Class algClass = panelClass.getClassLoader().loadClass(sAlgClassName);
+             final GeoAlgorithm alg = (GeoAlgorithm) algClass.newInstance();
+             m_ModelerParametersPanel.put(alg.getCommandLineName(), panelClass);
+          }
+          catch (final Exception e) {/*ignore it if there are problems*/
+          }
+       }
+   }
+
+
+   /**
+    * Returns the path to help files
+    *
+    * @return the path to help files
+    */
+   public static String getHelpPath() {
+
+      return getSextanteInstallPath() + File.separator + "help";
+
+   }
+
+
+   /**
+    * Sets the current path to sextante folder. This is the folder where help files and additional software should be located.
+    * This should be done before initializing this class, since this folder is used by some algorithm providers
+    *
+    * @param sPath
+    *                the path to sextante help and additional programs
+    * @deprecated Use {@link #setSextanteInstallPath(String)} or {@link #setSextanteHomePath(String)}
+    */
+   public static void setSextantePath(final String sPath) {
+
+      m_sSextanteInstallPath = sPath;
+
+   }
+
+
+   /**
+    * Returns the path to sextante help and additional programs
+    *
+    * @return the path to sextante help and additional programs
+	*
+    * @deprecated Use {@link #getSextanteInstallPath()} or {@link #getSextanteHomePath()}
+    */
+   public static String getSextantePath() {
+
+      return m_sSextanteInstallPath;
+
+   }
+
+   public static String getSextanteHomePath() {
+	   return m_sSextanteHomePath;
+   }
+
+   public static String getSextanteInstallPath() {
+	   return m_sSextanteInstallPath;
+   }
+
+   public static void setSextanteHomePath(String path) {
+	   m_sSextanteHomePath = path;
+
+   }
+
+   public static void setSextanteInstallPath(String path) {
+	   m_sSextanteInstallPath = path;
+
+   }
+
+
+
+   /**
+    * Returns the default folder for output data.
+    *
+    * @return the default folder for output data.
+    */
+   public static String getOutputFolder() {
+
+      if ((m_sOutputFolder == null) || m_sOutputFolder.trim().equals("")) {
+         return System.getProperty("user.home");
+      }
+      else {
+         return m_sOutputFolder;
+      }
+
+   }
+
+
+   /**
+    * Returns the default value to represent "No Data" (null) raster cells.
+    *
+    * @return the current "No Data" value.
+    */
+   private static Double getDefaultNoDataValue() {
+
+      try {
+         final double dNoDataValue = Double.parseDouble(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.DEFAULT_NO_DATA_VALUE));
+         return dNoDataValue;
+      }
+      catch (final Exception e) {
+         return new Double(-99999d);
+      }
+
+   }
+
+
+   /**
+    * Loads configuration parameters from the config file
+    */
+   private static void readConfigFile() {
+
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(getConfigFile()));
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            final String[] sTokens = sLine.split("=");
+            if (sTokens.length == 2) {
+               m_Settings.put(sTokens[0], sTokens[1]);
+            }
+         }
+      }
+      catch (final FileNotFoundException e) {
+      }
+      catch (final IOException e) {
+      }
+      finally {
+         try {
+            if (input != null) {
+               input.close();
+            }
+         }
+         catch (final IOException e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+   }
+
+
+   /**
+    * Saves current settings to the config file
+    */
+   public static void saveSettings() {
+
+      Writer output = null;
+      try {
+         output = new BufferedWriter(new FileWriter(getConfigFile()));
+         final Set<String> set = m_Settings.keySet();
+         final Iterator<String> iter = set.iterator();
+         while (iter.hasNext()) {
+            final String sKey = iter.next();
+            final String sValue = m_Settings.get(sKey);
+            output.write(sKey + "=" + sValue + "\n");
+         }
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+      finally {
+         if (output != null) {
+            try {
+               output.close();
+            }
+            catch (final IOException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+   }
+
+
+   /**
+    * Returns the path to the SEXTANTE config file.
+    *
+    * @return A string with the full the path and name of the SEXTANTE config file.
+    */
+   private static String getConfigFile() {
+
+      final String sPath = getUserFolder();
+
+      return sPath + File.separator + "sextante.settings";
+
+   }
+
+
+   /**
+    * Returns the folder in which the SEXTANTE config file is stored.
+    * By default, this is the folder "sextante" in the user's home folder.
+    * But it is also possible to set a different folder through the
+    * Java property "SEXTANTE.confDir" when launching the VM:
+    *
+    *   java -DSEXTANTE.confDir=<path>
+    *
+    * @return A string with the full path and name of the config folder.
+    */
+   public static String getUserFolder() {
+
+      String sPath;
+      String sConfDir;
+
+
+      // default is to use system's home folder setting
+//      sPath = System.getProperty("user.home") + File.separator + "sextante";
+      sPath = SextanteGUI.getSextanteHomePath();
+      // check if SEXTANTE.confDir has been set
+      sConfDir = System.getProperty("SEXTANTE.confDir");
+      if ( sConfDir != null ) {
+    	  sConfDir = sConfDir.trim();
+    	  	if ( sConfDir.length() > 0 ) {
+    	  		// check if we have to append a separator char
+    	  		if ( sConfDir.endsWith(File.separator) ) {
+    	  			sPath = sConfDir;
+    	  		} else {
+    	  			sPath = sConfDir + File.separator;
+				}
+			}
+      }
+
+      final File sextanteFolder = new File(sPath);
+      if (!sextanteFolder.exists()) {
+    	  sextanteFolder.mkdir();
+      }
+      return sPath;
+
+   }
+
+
+   /**
+    * Returns the type of the last element from which a command-line command was executed
+    *
+    * @return the type of the element from which a command-line command was executed. SextanteGUI.HISTORY if the last component
+    *         was the history panel; SextanteGUI.COMMANDLINE if it was the regular SEXTANTE console
+    */
+   public static int getLastCommandOrigin() {
+
+      return m_iLastCommandOrigin;
+
+   }
+
+
+   /**
+    * Sets the type of the last element from which a command-line command was executed. This has to be called from any component
+    * that allows execution of commands
+    *
+    * @param iLast
+    *                one of the following constants: SextanteGUI.HISTORY if the last component was the history panel;
+    *                SextanteGUI.COMMANDLINE if it was the regular SEXTANTE console
+    */
+   public static void setLastCommandOrigin(final int iLast) {
+
+      m_iLastCommandOrigin = iLast;
+
+   }
+
+
+   /**
+    * Gets the dialog from which the last command--line command was executed. This will be used as the parent dialog for task
+    * monitors or message dialogs generated by the execution of that command.
+    *
+    * @return the dialog from which the last command--line command was executed
+    */
+   public static JDialog getLastCommandOriginParentDialog() {
+
+      return m_LastCommandOriginParentPanel;
+
+   }
+
+
+   /**
+    * Sets the dialog (if any) that contains the element from which the last command--line command was executed
+    *
+    * @param parent
+    *                the dialog (if any) that contains the element from which the last command--line command was executed
+    */
+   public static void setLastCommandOriginParentDialog(final JDialog parent) {
+
+      m_LastCommandOriginParentPanel = parent;
+
+   }
+
+
+   /**
+    * Returns true if only active algorithms (those that can be executed with the current data objects) should be shown in the
+    * toolbox
+    *
+    * @return true if only active algorithms (those that can be executed with the current data objects) should be shown in the
+    *         toolbox
+    */
+   public static boolean getShowOnlyActiveAlgorithms() {
+
+      return m_bShowOnlyActiveAlgorithms;
+
+   }
+
+
+   /**
+    * Sets whether only active algorithms (those that can be executed with the current data objects) should be shown in the
+    * toolbox
+    *
+    * @param showOnlyActiveAlgorithms
+    *                must be true if only active algorithms (those that can be executed with the current data objects) should be
+    *                shown in the toolbox
+    */
+   public static void setShowOnlyActiveAlgorithms(final boolean showOnlyActiveAlgorithms) {
+
+      m_bShowOnlyActiveAlgorithms = showOnlyActiveAlgorithms;
+
+   }
+
+
+   /**
+    * puts a collection of settings into the settings map
+    *
+    * @param settings
+    *                the map with settings values.
+    */
+   public static void setSettings(final HashMap<String, String> settings) {
+
+      m_Settings.putAll(settings);
+
+   }
+
+
+   /**
+    * Modifies the passed string, so it can be used as a safe data object name (without special characters)
+    *
+    * @param sName
+    *                the name to modify
+    * @return the modified safe name (with no special characters)
+    */
+   public static String modifyResultName(String sName) {
+
+      sName = sName.replaceAll("\\.", "_");
+      sName = sName.replaceAll(" ", "_");
+      sName = sName.replaceAll("\\[", "_");
+      sName = sName.replaceAll("\\]", "_");
+      sName = sName.replaceAll("\\(", "_");
+      sName = sName.replaceAll("\\)", "_");
+      sName = sName.replaceAll("á", "a");
+      sName = sName.replaceAll("é", "e");
+      sName = sName.replaceAll("í", "i");
+      sName = sName.replaceAll("ó", "o");
+      sName = sName.replaceAll("ú", "u");
+      sName = sName.replaceAll("ñ", "n");
+
+      return sName;
+
+   }
+
+
+   private static void addCustomParametersPanel(final HashMap<String, Class> map) {
+
+      m_ParametersPanel.putAll(map);
+
+   }
+
+
+   private static void addCustomModelerParametersPanel(final HashMap<String, Class> map) {
+
+      m_ModelerParametersPanel.putAll(map);
+
+   }
+
+
+   public static Class getModelerParametersPanel(final String sName) {
+
+      return m_ModelerParametersPanel.get(sName);
+
+   }
+
+
+   public static Class getParametersPanel(final String sName) {
+
+      return m_ParametersPanel.get(sName);
+
+   }
+
+
+   public static ImageIcon getAlgorithmIcon(final GeoAlgorithm alg) {
+
+      final String sName = Sextante.getAlgorithmProviderName(alg);
+      for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+         if (m_AlgorithmProviders.get(i).getName().equals(sName)) {
+            return m_AlgorithmProviders.get(i).getIcon();
+         }
+      }
+      return SEXTANTE_ICON;
+
+   }
+
+
+   public static ArrayList<IAlgorithmProvider> getAlgorithmProviders() {
+
+      return m_AlgorithmProviders;
+
+   }
+
+
+   public static String getSettingParameterValue(final String sParameterName) {
+
+      return m_Settings.get(sParameterName);
+
+   }
+
+
+   public static String setSettingParameterValue(final String sParameterName,
+                                                 final String sValue) {
+
+      return m_Settings.put(sParameterName, sValue);
+
+   }
+
+
+   public static void updateAlgorithmProvider(final Class providerClass) {
+
+      for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+         final IAlgorithmProvider provider = m_AlgorithmProviders.get(i);
+         if (providerClass.isInstance(provider)) {
+            provider.update();
+            Sextante.addAlgorithmsFromProvider(provider.getName(), provider.getAlgorithms());
+         }
+      }
+
+   }
+
+
+   public static Object getAlgorithmHelp(final GeoAlgorithm alg) {
+
+      try {
+        File helpfile = alg.getHelpFile();
+        if( helpfile != null ) {
+            return HelpIO.getHelpAsHTMLCode(alg, helpfile.getAbsolutePath());
+        }
+      } catch(Throwable th) {
+          // Do nothing
+      }
+      final String sName = Sextante.getAlgorithmProviderName(alg);
+      for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+         if (m_AlgorithmProviders.get(i).getName().equals(sName)) {
+            return m_AlgorithmProviders.get(i).getAlgorithmHelp(alg);
+         }
+      }
+      String sFilename;
+      String sPath;
+      if (sName.equals("SEXTANTE")) {
+         sFilename = alg.getCommandLineName() + ".xml";
+         sPath = HelpIO.getHelpPath(alg, false);
+         return HelpIO.getHelpAsHTMLCode(alg, sPath + File.separator + sFilename);
+      }
+      else {
+         return ""; //TODO:create default help page
+      }
+
+   }
+
+
+   public static String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                                 final boolean bForceCurrentLocale) {
+
+      final String sName = Sextante.getAlgorithmProviderName(alg);
+      for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+         if (m_AlgorithmProviders.get(i).getName().equals(sName)) {
+            return m_AlgorithmProviders.get(i).getAlgorithmHelpFilename(alg, bForceCurrentLocale);
+         }
+      }
+      String sFilename;
+      String sPath;
+      if (sName.equals("SEXTANTE")) {
+         sFilename = alg.getCommandLineName() + ".xml";
+         sPath = HelpIO.getHelpPath(alg, false);
+         return sPath + File.separator + sFilename;
+      }
+      else {
+         return ""; //TODO:create default help page
+      }
+
+   }
+
+
+   public static HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+
+      final HashMap<NameAndIcon, ArrayList<ToolboxAction>> map = new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+      for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+         final IAlgorithmProvider provider = m_AlgorithmProviders.get(i);
+         map.putAll(provider.getToolboxActions());
+      }
+      map.putAll(SextanteGUI.getGUIFactory().getToolboxActions());
+      return map;
+   }
+
+
+   public static IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+	   final ArrayList<IToolboxRightButtonAction> list = new ArrayList<IToolboxRightButtonAction>();
+	   for (int i = 0; i < m_AlgorithmProviders.size(); i++) {
+		   final IAlgorithmProvider provider = m_AlgorithmProviders.get(i);
+		   final IToolboxRightButtonAction[] actions = provider.getToolboxRightButtonActions();
+		   for (int j = 0; j < actions.length; j++) {
+			   list.add(actions[j]);
+		   }
+	   }
+      return list.toArray(new IToolboxRightButtonAction[0]);
+
+   }
+
+
+   /**
+    * Returns the renderer to use for layers created by SEXTANTE algorithms
+    *
+    */
+   public static IDataRenderer getDataRenderer() {
+
+      return m_Renderer;
+
+   }
+
+
+   public static void setDataRenderer(final IDataRenderer renderer) {
+
+      m_Renderer = renderer;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/SextanteGUI.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultDataRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultDataRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultDataRenderer.java	(revision 369)
@@ -0,0 +1,85 @@
+
+
+package es.unex.sextante.gui.core;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.HashMap;
+
+
+public abstract class DefaultDataRenderer
+         implements
+            IDataRenderer {
+
+   private HashMap<String, HashMap<String, Object>> m_Map = new HashMap<String, HashMap<String, Object>>();
+   private final String                             m_sFilename;
+
+
+   public DefaultDataRenderer(final String sFile) {
+
+      m_sFilename = sFile;
+
+   }
+
+
+   public Object getRenderingForLayer(final String sAlgCmdName,
+                                      final String sOutputLayer) {
+
+      final HashMap<String, Object> algRenderer = m_Map.get(sAlgCmdName);
+      if (algRenderer != null) {
+         return algRenderer.get(sOutputLayer);
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+   public void open() {
+      try {
+         if (!new File(m_sFilename).exists()) {
+            return;
+         }
+         final FileInputStream fis = new FileInputStream(m_sFilename);
+         final ObjectInputStream ois = new ObjectInputStream(fis);
+         m_Map = (HashMap<String, HashMap<String, Object>>) ois.readObject();
+         ois.close();
+         fis.close();
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   public void save() {
+
+      try {
+         final FileOutputStream fileOut = new FileOutputStream(m_sFilename);
+         final ObjectOutputStream out = new ObjectOutputStream(fileOut);
+         out.writeObject(m_Map);
+         out.close();
+         fileOut.close();
+      }
+      catch (final IOException e) {
+         e.printStackTrace();
+      }
+
+
+   }
+
+
+   public void setRenderingForAlgorithm(final String algCmdName,
+                                        final HashMap<String, Object> renderingData) {
+
+      m_Map.put(algCmdName, renderingData);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/DefaultDataRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/RenderingData.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/RenderingData.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/RenderingData.java	(revision 369)
@@ -0,0 +1,11 @@
+
+
+package es.unex.sextante.gui.core;
+
+public class RenderingData {
+
+   public String algName;
+   public String outputName;
+   public Object rendering;
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/RenderingData.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericInfoDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericInfoDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericInfoDialog.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.gui.core;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Frame;
+
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+/**
+ * A simple dialog to show a java component
+ * 
+ * @author volaya
+ * 
+ */
+public class GenericInfoDialog
+         extends
+            JDialog {
+
+   /**
+    * constructor
+    * 
+    * @param component
+    *                the component to show in the dialog
+    * @param sTitle
+    *                the title of the dialog
+    * @param parent
+    *                the parent frame
+    */
+   public GenericInfoDialog(final Component component,
+                            final String sTitle,
+                            final Frame parent) {
+
+      super(parent, sTitle, true);
+
+      initGUI(component);
+
+      pack();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   protected void initGUI(final Component component) {
+
+      setPreferredSize(component.getPreferredSize());
+      setSize(component.getPreferredSize());
+      final BorderLayout thisLayout = new BorderLayout();
+      final JPanel pane = new JPanel();
+      pane.setLayout(thisLayout);
+      setContentPane(pane);
+      pane.add(component, BorderLayout.CENTER);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/GenericInfoDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IPostProcessTaskFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IPostProcessTaskFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IPostProcessTaskFactory.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.gui.core;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.gui.additionalResults.AdditionalResults;
+
+/**
+ * Interface to be implemented by post process factories. A post process factory is used to define the task that should be
+ * performed with algorithm results, once a SEXTANTE geoalgorithm has been executed from the SEXTANTE GUI
+ * 
+ * @author volaya
+ * 
+ */
+public interface IPostProcessTaskFactory {
+
+   /**
+    * Returns a task to post-process the given algorithm. This task should take the outputs generated by the algorithm, adding
+    * them to the GUI or doing with them whatever is needed.
+    * 
+    * To be compatible with the {@link AdditionalResults} class, charts and text result has to be added as java Components. Check
+    * the documentation of that class for more information.
+    * 
+    * @param alg
+    *                the algorithm to post-process
+    * @param bShowResultsDialog
+    *                if this parameter is true, the task will show the results dialog if the algorithm has produced some kind of
+    *                output other than layers or tables. If it is false, those results will be added to the set of current
+    *                results, but the results dialog will not be shown
+    * @return a task to post-process the given algorithm
+    */
+   public Runnable getPostProcessTask(GeoAlgorithm alg,
+                                      boolean bShowResultsDialog);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IPostProcessTaskFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IDataRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IDataRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IDataRenderer.java	(revision 369)
@@ -0,0 +1,34 @@
+
+
+package es.unex.sextante.gui.core;
+
+import java.util.HashMap;
+
+import es.unex.sextante.dataObjects.ILayer;
+
+
+/**
+ * A class containing information needed to set rendering styles for layers generated by SEXTANTE geoalgorithms
+ * 
+ * @author volaya
+ * 
+ */
+public interface IDataRenderer {
+
+   public Object getRenderingForLayer(String sAlgCmdName,
+                                      String sOutputName);
+
+
+   public void setRenderingForAlgorithm(String sAlgCmdName,
+                                        HashMap<String, Object> renderer);
+
+
+   public void save();
+
+
+   public void open();
+
+
+   public Object getRenderingDataFromLayer(ILayer layer);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IDataRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,124 @@
+package es.unex.sextante.gui.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.gui.settings.Setting;
+
+public interface IAlgorithmProvider {
+
+   /**
+    * Performs the initialization needed to load the corresponding algorithm into the algorithm provider
+    */
+   public void initialize();
+
+
+   /**
+    * Returns the name of the algorithm provider. This will be used as the group name in the toolbox
+    * 
+    * @return
+    */
+   public String getName();
+
+
+   /**
+    * Returns a map with algorithm command-line names as keys and geoalgorithms as values
+    * 
+    * @return a map with algorithm command-line names as keys and geoalgorithms as values
+    */
+   public HashMap<String, GeoAlgorithm> getAlgorithms();
+
+
+   /**
+    * Returns a map of custom parameter panels. Keys are algorithm command-line names, and values are the corresponding panel
+    * classes
+    * 
+    * @return a map of custom parameter panels.
+    */
+   public HashMap<String, Class> getCustomModelerParameterPanels();
+
+
+   /**
+    * Returns a map of custom modeler parameter panels. Keys are algorithm command-line names, and values are the corresponding
+    * panel classes
+    * 
+    * @return a map of custom modeler parameter panels.
+    */
+   public HashMap<String, Class> getCustomParameterPanels();
+
+
+   /**
+    * Returns the icon to use for the algorithms provided by this provider
+    * 
+    * @return the icon to use for the algorithms provided by this provider
+    */
+   public ImageIcon getIcon();
+
+
+   /**
+    * Returns the settings object corresponding to this provider
+    * 
+    * @return the settings object corresponding to this provider
+    */
+   public Setting getSettings();
+
+
+   /**
+    * Updates the list of algorithms in this provider
+    */
+   public void update();
+
+
+   /**
+    * 
+    * Returns the help associated with the passed algorithm as a HTML string or a URL
+    * 
+    * @param alg
+    *                the algorithm
+    * @return the help associated with the passed algorithm as a HTML string or a URL
+    */
+   public Object getAlgorithmHelp(GeoAlgorithm alg);
+
+
+   /**
+    * Returns the filename where the help for a given algorithm is stored
+    * 
+    * @param alg
+    *                the algorithm
+    * @param bForceCurrentLocale
+    *                if true it will return the current locale folder, even if the help file does not exists
+    * @return
+    */
+   public String getAlgorithmHelpFilename(GeoAlgorithm alg,
+                                          boolean bForceCurrentLocale);
+
+
+   /**
+    * Returns true if the help files associated with the algorithms from this provider can be edited by the user
+    * 
+    * @return true if the help files associated with the algorithms from this provider can be edited by the user
+    */
+   public boolean canEditHelp();
+
+
+   /**
+    * Returns the toolbox actions to be added to the toolbox by this algorithm provider.
+    * 
+    * @return A Map containing toolbox actions to be added to the toolbox by this algorithm provider
+    */
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions();
+
+
+   /**
+    * Return the right button actions to be added to the toolbox by this algorithm provider. These actions should work on the
+    * particular type of algorithms provided by the provider
+    * 
+    * @return the right button actions to be added to the toolbox by this algorithm provider.
+    */
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions();
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/core/IAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionDialog.java	(revision 369)
@@ -0,0 +1,124 @@
+package es.unex.sextante.gui.help;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+
+import es.unex.sextante.core.Sextante;
+
+public class ImageSelectionDialog
+         extends
+            javax.swing.JDialog {
+
+   private JPanel              jPanelMain;
+   private JSeparator          jSeparator;
+   private JButton             jButtonCancel;
+   private JButton             jButtonOK;
+   private boolean             m_bOK = false;
+   private ImageSelectionPanel m_ImageSelectionPanel;
+   private final ImageAndDescription m_ImageAndDescription;
+   private final String              m_sHomeDir;
+
+
+   public ImageSelectionDialog(final Frame window,
+                               final ImageAndDescription iad,
+                               final String sHomeDir) {
+
+      super(window, "", true);
+      this.setResizable(false);
+
+      m_sHomeDir = sHomeDir;
+      m_ImageAndDescription = iad;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            this.setTitle(Sextante.getText("Image"));
+            {
+               jPanelMain = new JPanel();
+               getContentPane().add(jPanelMain, BorderLayout.CENTER);
+               jPanelMain.setPreferredSize(new java.awt.Dimension(400, 150));
+               {
+                  m_ImageSelectionPanel = new ImageSelectionPanel(m_sHomeDir);
+                  jPanelMain.add(m_ImageSelectionPanel);
+
+               }
+               {
+                  jSeparator = new JSeparator();
+                  jPanelMain.add(jSeparator);
+                  jSeparator.setPreferredSize(new java.awt.Dimension(350, 20));
+               }
+               {
+                  jButtonOK = new JButton();
+                  jPanelMain.add(jButtonOK);
+                  jButtonOK.setText(Sextante.getText("OK"));
+                  jButtonOK.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnOKActionPerformed(evt);
+                     }
+                  });
+               }
+               {
+                  jButtonCancel = new JButton();
+                  jPanelMain.add(jButtonCancel);
+                  jButtonCancel.setText(Sextante.getText("Cancel"));
+                  jButtonCancel.addActionListener(new ActionListener() {
+                     public void actionPerformed(final ActionEvent evt) {
+                        btnCancelActionPerformed(evt);
+                     }
+                  });
+               }
+            }
+         }
+         this.setSize(350, 100);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void btnOKActionPerformed(final ActionEvent evt) {
+
+      final File f = new File(m_ImageSelectionPanel.getFilename());
+      final File home = new File(m_sHomeDir);
+      String sFilename = FileUtilities.getRelativePath(home, f);
+      sFilename = sFilename.replaceAll("\\\\", "/");
+      m_ImageAndDescription.setFilename(sFilename);
+      m_ImageAndDescription.setDescription(m_ImageSelectionPanel.getDescription());
+
+      m_bOK = true;
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   private void btnCancelActionPerformed(final ActionEvent evt) {
+
+      m_bOK = false;
+      dispose();
+      setVisible(false);
+
+
+   }
+
+
+   public boolean getOK() {
+
+      return m_bOK;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionPanel.java	(revision 369)
@@ -0,0 +1,85 @@
+package es.unex.sextante.gui.help;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.FileSelectionPanel;
+
+public class ImageSelectionPanel
+         extends
+            JPanel {
+
+   private JLabel             jLabelDescription;
+   private JTextField         jTextFieldDescription;
+   private FileSelectionPanel fileSelectionPanel;
+   private JLabel             jLabelFilename;
+   private final String             m_sHomeDir;
+
+
+   public ImageSelectionPanel(final String homeDir) {
+
+      super();
+
+      m_sHomeDir = homeDir;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(372, 68));
+            {
+               jLabelFilename = new JLabel();
+               this.add(jLabelFilename, "1, 1");
+               jLabelFilename.setText(Sextante.getText("File"));
+            }
+            {
+               fileSelectionPanel = new FileSelectionPanel(false, true, new String[] { "jpg", "gif", "png" },
+                        Sextante.getText("Images"), m_sHomeDir);
+               this.add(fileSelectionPanel, "2, 1");
+            }
+            {
+               jLabelDescription = new JLabel();
+               this.add(jLabelDescription, "1, 2");
+               jLabelDescription.setText(Sextante.getText("Description"));
+            }
+            {
+               jTextFieldDescription = new JTextField();
+               this.add(jTextFieldDescription, "2, 2");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   public String getFilename() {
+
+      return fileSelectionPanel.getFilepath();
+
+   }
+
+
+   public String getDescription() {
+
+      return jTextFieldDescription.getText();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageAndDescription.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageAndDescription.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageAndDescription.java	(revision 369)
@@ -0,0 +1,66 @@
+package es.unex.sextante.gui.help;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlSerializer;
+
+public class ImageAndDescription {
+
+   private String             m_sFilename;
+   private String             m_sDescription;
+
+   public static final String DESCRIPTION = "description";
+   public static final String FILE        = "file";
+   public static final String IMAGE       = "image";
+
+
+   public String getDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public void setDescription(final String description) {
+
+      m_sDescription = description;
+
+   }
+
+
+   public String getFilename() {
+
+      return m_sFilename;
+
+   }
+
+
+   public void setFilename(final String filename) {
+
+      m_sFilename = filename;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sFilename;
+
+   }
+
+
+   public void serialize(final KXmlSerializer serializer) throws IOException {
+
+      serializer.text("\n");
+      serializer.text("\t\t\t");
+      serializer.startTag(null, IMAGE);
+      serializer.attribute(null, DESCRIPTION, m_sDescription);
+      serializer.attribute(null, FILE, m_sFilename);
+      serializer.text("\n");
+      serializer.text("\t\t\t");
+      serializer.endTag(null, IMAGE);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ImageAndDescription.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/FileUtilities.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/FileUtilities.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/FileUtilities.java	(revision 369)
@@ -0,0 +1,106 @@
+package es.unex.sextante.gui.help;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class FileUtilities {
+
+   /**
+    * @author David M. Howard
+    */
+
+   /**
+    * break a path down into individual elements and add to a list. example : if a path is /a/b/c/d.txt, the breakdown will be
+    * [d.txt,c,b,a]
+    *
+    * @param f
+    *                input file
+    * @return a List collection with the individual elements of the path in reverse order
+    */
+   private static List getPathList(final File f) {
+      List l = new ArrayList();
+      File r;
+      try {
+         r = f.getCanonicalFile();
+         while (r != null) {
+            l.add(r.getName());
+            r = r.getParentFile();
+         }
+      }
+      catch (final IOException e) {
+         e.printStackTrace();
+         l = null;
+      }
+      return l;
+   }
+
+
+   /**
+    * figure out a string representing the relative path of 'f' with respect to 'r'
+    *
+    * @param r
+    *                home path
+    * @param f
+    *                path of file
+    */
+   private static String matchPathLists(final List r,
+                                        final List f) {
+      int i;
+      int j;
+      String s;
+      // start at the beginning of the lists
+      // iterate while both lists are equal
+      s = "";
+      i = r.size() - 1;
+      j = f.size() - 1;
+
+      // first eliminate common root
+      while ((i >= 0) && (j >= 0) && (r.get(i).equals(f.get(j)))) {
+         i--;
+         j--;
+      }
+
+      // for each remaining level in the home path, add a ..
+      for (; i >= 0; i--) {
+         s += ".." + File.separator;
+      }
+
+      // for each level in the file path, add the path
+      for (; j >= 1; j--) {
+         s += f.get(j) + File.separator;
+      }
+
+      // file name
+      s += f.get(j);
+      return s;
+   }
+
+
+   /**
+    * get relative path of File 'f' with respect to 'home' directory example : home = /a/b/c f = /a/d/e/x.txt s =
+    * getRelativePath(home,f) = ../../d/e/x.txt
+    *
+    * @param home
+    *                base path, should be a directory, not a file, or it doesn't make sense
+    * @param f
+    *                file to generate path for
+    * @return path from home to f as a string
+    */
+   public static String getRelativePath(final File home,
+                                        final File f) {
+      final File r;
+      List homelist;
+      List filelist;
+      String s;
+
+      homelist = getPathList(home);
+      filelist = getPathList(f);
+      s = matchPathLists(homelist, filelist);
+
+      return s;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/FileUtilities.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/SextanteHelpWindow.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/SextanteHelpWindow.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/SextanteHelpWindow.java	(revision 369)
@@ -0,0 +1,386 @@
+package es.unex.sextante.gui.help;
+
+import java.awt.BorderLayout;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.net.URL;
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.grass.GrassAlgorithm;
+
+public class SextanteHelpWindow
+         extends
+            JFrame {
+
+   private JSplitPane   jSplitPane;
+   private JTree        jTree;
+   private JEditorPane  jEditorPane;
+   private JScrollPane  jScrollPane;
+   private JScrollPane  jScrollPanePage;
+   private TreePath     m_Path;
+   private JMenuItem    menuItemEditHelp;
+   private JPopupMenu   popupMenu;
+   private GeoAlgorithm m_Alg;
+
+
+   public SextanteHelpWindow() {
+
+      super(Sextante.getText("Help"));
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      try {
+         {
+            final BorderLayout thisLayout = new BorderLayout();
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(800, 500));
+            this.setSize(new java.awt.Dimension(800, 500));
+            {
+               jSplitPane = new JSplitPane();
+               this.add(jSplitPane, BorderLayout.CENTER);
+               {
+                  jTree = new JTree();
+                  jTree.setCellRenderer(new AlgorithmTreeCellRenderer());
+                  final MouseListener ml = new MouseAdapter() {
+                     @Override
+                     public void mousePressed(MouseEvent e) {
+                        m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+                        showHelp(m_Path);
+                        jTree.setSelectionPath(m_Path);
+                        if ((e.getButton() == MouseEvent.BUTTON3) && (m_Path != null)) {
+                           DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                           Object ob = node.getUserObject();
+                           if (ob instanceof GeoAlgorithm) {
+                              m_Alg = ((GeoAlgorithm) ob);
+                              showPopupMenu(e);
+                           }
+                        }
+                     }
+                  };
+                  jTree.addMouseListener(ml);
+                  jTree.addTreeSelectionListener(new TreeSelectionListener() {
+                     public void valueChanged(final TreeSelectionEvent e) {
+                        m_Path = e.getPath();
+                        if (m_Path != null) {
+                           showHelp(m_Path);
+                        }
+                        final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                        final Object ob = node.getUserObject();
+                        if (ob instanceof GeoAlgorithm) {
+                           m_Alg = ((GeoAlgorithm) ob);
+                        }
+                     }
+                  });
+
+                  jTree.addKeyListener(new KeyListener() {
+                     public void keyPressed(final KeyEvent e) {}
+
+
+                     public void keyReleased(final KeyEvent e) {}
+
+
+                     public void keyTyped(final KeyEvent e) {
+                        if (e.getKeyChar() == KeyEvent.VK_SPACE) {
+                           final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                           final Object ob = node.getUserObject();
+                           if (ob instanceof GeoAlgorithm) {
+                              showPopupMenu(e);
+                           }
+                        }
+                     }
+                  });
+
+                  fillTree();
+
+                  jEditorPane = new JEditorPane();
+                  jEditorPane.setEditable(false);
+                  jEditorPane.getDocument().putProperty("IgnoreCharsetDirective", Boolean.TRUE);
+                  jEditorPane.setContentType("text/html");
+                  jScrollPane = new JScrollPane(jTree, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+                           ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+                  jScrollPanePage = new JScrollPane(jEditorPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+                           ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+                  jScrollPane.setPreferredSize(new Dimension(300, 450));
+                  jScrollPane.setMinimumSize(new Dimension(300, 450));
+               }
+               {
+                  jSplitPane.add(jScrollPanePage, JSplitPane.RIGHT);
+                  jSplitPane.add(jScrollPane, JSplitPane.LEFT);
+               }
+            }
+         }
+         popupMenu = new JPopupMenu("Menu");
+
+         menuItemEditHelp = new JMenuItem(Sextante.getText("Edit_help"));
+         menuItemEditHelp.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               editHelp();
+            }
+         });
+         popupMenu.add(menuItemEditHelp);
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void editHelp() {
+
+      SextanteGUI.getGUIFactory().showHelpEditionDialog(m_Alg);
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      boolean bCanEdit = true;
+      final ArrayList<IAlgorithmProvider> providers = SextanteGUI.getAlgorithmProviders();
+      final String sName = Sextante.getAlgorithmProviderName(m_Alg);
+      for (int i = 0; i < providers.size(); i++) {
+         if (providers.get(i).getName().equals(sName)) {
+            bCanEdit = providers.get(i).canEditHelp();
+         }
+      }
+
+      if ((m_Alg != null) && bCanEdit) {
+         jTree.setSelectionPath(m_Path);
+         popupMenu.show(e.getComponent(), e.getX(), e.getY());
+      }
+
+   }
+
+
+   protected void showPopupMenu(final KeyEvent e) {
+
+      if ((m_Alg != null) && !(m_Alg instanceof GrassAlgorithm)) {
+         jTree.setSelectionPath(m_Path);
+         final Rectangle pathBounds = jTree.getPathBounds(m_Path);
+         popupMenu.show(e.getComponent(), pathBounds.x, pathBounds.y);
+      }
+
+   }
+
+
+   protected void showHelp(final TreePath path) {
+
+      if (path != null) {
+         try {
+            final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+            final Object ob = node.getUserObject();
+            if (ob instanceof GeoAlgorithm) {
+               final Object help = SextanteGUI.getAlgorithmHelp((GeoAlgorithm) ob);
+               if (help instanceof String) {
+                  jEditorPane.setText((String) help);
+               }
+               else if (help instanceof URL) {
+                  jEditorPane.setPage((URL) help);
+               }
+            }
+            else if (ob instanceof ObjectAndDescription) {
+               final ObjectAndDescription oad = (ObjectAndDescription) ob;
+               final String sHtmlFile = (String) oad.getObject();
+               try {
+                  final URL url = new URL("file:///" + sHtmlFile);
+                  jEditorPane.setPage(url);
+               }
+               catch (final Exception e) {
+                  //will show a blank page
+               }
+            }
+            jEditorPane.setCaretPosition(0);
+         }
+         catch (final Exception e) {
+            //Sextante.addErrorToLog(e);
+         }
+
+      }
+
+   }
+
+
+   public void fillTree() {
+
+      DefaultMutableTreeNode node;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Help"));
+      final DefaultMutableTreeNode algsNode = new DefaultMutableTreeNode(Sextante.getText("Algorithms"));
+      DefaultMutableTreeNode child;
+
+      final DefaultMutableTreeNode generalNode = new DefaultMutableTreeNode(Sextante.getText("Basic_concepts"));
+      /*generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("Introduction"),
+               HelpIO.getHelpFile("intro"))));*/
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("SEXTANTE_toolbox"),
+               HelpIO.getHelpFile("toolbox"))));
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("Batch_processing"),
+               HelpIO.getHelpFile("batch"))));
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("Models"),
+               HelpIO.getHelpFile("modeler"))));
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("Command_line"),
+               HelpIO.getHelpFile("cmd"))));
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("History"),
+               HelpIO.getHelpFile("history"))));
+      generalNode.add(new DefaultMutableTreeNode(new ObjectAndDescription(Sextante.getText("ConfiguringProviders"),
+               HelpIO.getHelpFile("providers"))));
+
+      mainNode.add(generalNode);
+      mainNode.add(algsNode);
+
+      setCursor(new Cursor(Cursor.WAIT_CURSOR));
+
+      final HashMap<String, HashMap<String, GeoAlgorithm>> algs = Sextante.getAlgorithms();
+      final Set<String> groupKeys = algs.keySet();
+      final Iterator<String> groupIter = groupKeys.iterator();
+      while (groupIter.hasNext()) {
+         final HashMap<String, DefaultMutableTreeNode> baseGroups = new HashMap<String, DefaultMutableTreeNode>();
+         final String groupKey = groupIter.next();
+         final DefaultMutableTreeNode toolsNode = new DefaultMutableTreeNode(groupKey);
+         algsNode.add(toolsNode);
+         final HashMap<String, GeoAlgorithm> groupAlgs = algs.get(groupKey);
+         final Set keys = groupAlgs.keySet();
+         final Iterator iter = keys.iterator();
+         while (iter.hasNext()) {
+            final GeoAlgorithm alg = groupAlgs.get(iter.next());
+            child = new DefaultMutableTreeNode(alg);
+            node = baseGroups.get(alg.getGroup());
+            if (node == null) {
+               node = new DefaultMutableTreeNode(alg.getGroup());
+               baseGroups.put(alg.getGroup(), node);
+               addNodeInSortedOrder(toolsNode, node);
+            }
+            addNodeInSortedOrder(node, child);
+         }
+
+      }
+      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+   }
+
+
+   private void addNodeInSortedOrder(final DefaultMutableTreeNode parent,
+                                     final DefaultMutableTreeNode child) {
+
+      final int n = parent.getChildCount();
+      if (n == 0) {
+         parent.add(child);
+         return;
+      }
+
+      final Collator collator = Collator.getInstance();
+      collator.setStrength(Collator.PRIMARY);
+      DefaultMutableTreeNode node = null;
+      for (int i = 0; i < n; i++) {
+         node = (DefaultMutableTreeNode) parent.getChildAt(i);
+         try {
+            if (collator.compare(node.toString(), child.toString()) > 0) {
+               parent.insert(child, i);
+               return;
+            }
+         }
+         catch (final Exception e) {}
+      }
+      parent.add(child);
+
+   }
+
+
+   private DefaultMutableTreeNode findNode(final GeoAlgorithm alg) {
+
+      Object ob;
+      final String sName = alg.getName();
+      final DefaultTreeModel data = (DefaultTreeModel) jTree.getModel();
+      final DefaultMutableTreeNode root = (DefaultMutableTreeNode) data.getRoot();
+      DefaultMutableTreeNode node = null;
+
+      //      if (alg instanceof GrassAlgorithm) {//GRASS algorithms: need to check for siblings
+      //         if (sName.contains("(")) {
+      //            //We have a sibling algorithm: link to parent's node instead
+      //            sName = sName.substring(0, sName.indexOf("(") - 1);
+      //         }
+      //      }
+
+      if (root != null) {
+         for (final Enumeration e = root.breadthFirstEnumeration(); e.hasMoreElements();) {
+            final DefaultMutableTreeNode current = (DefaultMutableTreeNode) e.nextElement();
+            ob = current.getUserObject();
+            if (ob instanceof GeoAlgorithm) {
+               if (((GeoAlgorithm) ob).getName().equals(sName)) {
+                  node = current;
+                  break;
+               }
+            }
+         }
+      }
+
+      return node;
+
+   }
+
+
+   //   private DefaultMutableTreeNode findNode(final String sNodeName) {
+   //
+   //      Object ob;
+   //      final DefaultTreeModel data = (DefaultTreeModel) jTree.getModel();
+   //      final DefaultMutableTreeNode root = (DefaultMutableTreeNode) data.getRoot();
+   //      DefaultMutableTreeNode node = null;
+   //
+   //      if (root != null) {
+   //         for (final Enumeration e = root.breadthFirstEnumeration(); e.hasMoreElements();) {
+   //            final DefaultMutableTreeNode current = (DefaultMutableTreeNode) e.nextElement();
+   //            ob = current.getUserObject();
+   //            if (ob instanceof ObjectAndDescription) {
+   //               final ObjectAndDescription oad = (ObjectAndDescription) ob;
+   //               final String s = oad.getDescription();
+   //               if (s.equals(sNodeName)) {
+   //                  node = current;
+   //                  break;
+   //               }
+   //
+   //            }
+   //         }
+   //      }
+   //
+   //      return node;
+   //
+   //   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/SextanteHelpWindow.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/AlgorithmTreeCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/AlgorithmTreeCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/AlgorithmTreeCellRenderer.java	(revision 369)
@@ -0,0 +1,77 @@
+package es.unex.sextante.gui.help;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeCellRenderer;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class AlgorithmTreeCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+   //   ImageIcon m_ModuleIcon      = new ImageIcon(getClass().getClassLoader().getResource("images/module2.png"));
+   //   ImageIcon m_ModuleIconWrong = new ImageIcon(getClass().getClassLoader().getResource("images/module_wrong.png"));
+
+
+   protected Icon getCustomIcon(final Object value) {
+
+      if (((DefaultMutableTreeNode) value).getUserObject() instanceof GeoAlgorithm) {
+         final GeoAlgorithm alg = (GeoAlgorithm) ((DefaultMutableTreeNode) value).getUserObject();
+         return SextanteGUI.getAlgorithmIcon(alg);
+         //         final String sFile = HelpIO.getHelpFilename(alg, true);
+         //         final File file = new File(sFile);
+         //
+         //         if (file.exists()) {
+         //            return m_ModuleIcon;
+         //         }
+         //         else {
+         //            return m_ModuleIconWrong;
+         //         }
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean sel,
+                                                 final boolean expanded,
+                                                 boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      final String sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+      setFont(tree.getFont());
+      setEnabled(tree.isEnabled());
+      setText(sName);
+      setIcon(getCustomIcon(value));
+
+      if (!leaf) {
+         setFont(new java.awt.Font("Tahoma", 1, 11));
+      }
+
+      if (sel) {
+         setForeground(Color.blue);
+      }
+      else {
+         setForeground(Color.black);
+      }
+
+      return this;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/AlgorithmTreeCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpIO.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpIO.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpIO.java	(revision 369)
@@ -0,0 +1,504 @@
+package es.unex.sextante.gui.help;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputChart;
+import es.unex.sextante.outputs.OutputNumericalValue;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputText;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+public class HelpIO {
+
+   private static String encoding = "ISO-8859-1";
+   private static String HELP     = "help";
+
+
+   public static void save(final ArrayList elements,
+                           final String sFilename) {
+
+      try {
+         final File file = new File(sFilename);
+         if (!file.exists()) {
+            final String dir = file.getParent();
+            new File(dir).mkdir();
+            file.createNewFile();
+         }
+         final Writer writer = new FileWriter(file);
+         final KXmlSerializer serializer = new KXmlSerializer();
+         serializer.setOutput(writer);
+         serializer.startDocument(encoding, new Boolean(true));
+         serializer.text("\n\t");
+         serializer.startTag(null, HELP);
+         for (int i = 0; i < elements.size(); i++) {
+            final HelpElement element = (HelpElement) elements.get(i);
+            element.serialize(serializer);
+         }
+         serializer.text("\n\t");
+         serializer.endTag(null, HELP);
+         serializer.text("\n");
+         serializer.startDocument(encoding, new Boolean(true));
+         writer.close();
+      }
+      catch (final IOException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   public static ArrayList open(final String sFilename) {
+
+      ArrayList images = null;
+      final ArrayList elements = new ArrayList();
+      HelpElement element = null;
+      final KXmlParser parser = new KXmlParser();
+
+      try {
+         final File file = new File(sFilename);
+         parser.setInput(new FileInputStream(file), encoding);
+         int tag = parser.nextTag();
+         boolean bOut = false;
+
+         if (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
+            while ((tag != XmlPullParser.END_DOCUMENT) && !bOut) {
+               switch (tag) {
+                  case XmlPullParser.START_TAG:
+                     if (parser.getName().compareTo(HELP) == 0) {}
+                     else if (parser.getName().compareTo(HelpElement.ELEMENT) == 0) {
+                        images = new ArrayList();
+                        final String sText = parser.getAttributeValue("", HelpElement.TEXT);
+                        final String sName = parser.getAttributeValue("", HelpElement.NAME);
+                        final String sDescription = parser.getAttributeValue("", HelpElement.DESCRIPTION);
+                        final int iType = Integer.parseInt(parser.getAttributeValue("", HelpElement.TYPE));
+                        element = new HelpElement();
+                        element.setText(sText);
+                        element.setName(sName);
+                        element.setType(iType);
+                        element.setDescription(sDescription);
+                     }
+                     else if (parser.getName().compareTo(ImageAndDescription.IMAGE) == 0) {
+                        final ImageAndDescription iad = new ImageAndDescription();
+                        final String sImageFilename = parser.getAttributeValue("", ImageAndDescription.FILE);
+                        final String sDesc = parser.getAttributeValue("", ImageAndDescription.DESCRIPTION);
+                        iad.setDescription(sDesc);
+                        iad.setFilename(sImageFilename);
+                        images.add(iad);
+                     }
+                     break;
+                  case XmlPullParser.END_TAG:
+                     if (parser.getName().compareTo(HELP) == 0) {
+                        bOut = true;
+                     }
+                     else if (parser.getName().compareTo(HelpElement.ELEMENT) == 0) {
+                        element.setImages(images);
+                        elements.add(element);
+                     }
+                     break;
+                  case XmlPullParser.TEXT:
+                     break;
+               }
+               if (!bOut) {
+                  tag = parser.next();
+               }
+            }
+         }
+
+      }
+      catch (final Exception e) {
+         return null;
+      }
+      return elements;
+
+   }
+
+
+   /**
+    * Returns the help associated with a given geoalgorithm as a html-formatted string
+    *
+    * @param alg
+    *                the geoalgorithm
+    * @param sFilename
+    *                the filename where help for the passed algorithm is stored
+    * @return a html-formatted string with help for the given algorithm
+    */
+
+   public static String getHelpAsHTMLCode(final GeoAlgorithm alg,
+                                          final String sFilename) {
+
+      HelpElement element;
+      final ArrayList list = open(sFilename);
+      HashMap elements;
+      final String sPath = "file:///" + sFilename.substring(0, sFilename.lastIndexOf(File.separator)) + File.separator;
+
+      if (list != null) {
+         elements = createMap(list);
+      }
+      else {
+         elements = new HashMap();
+      }
+
+      final HTMLDoc doc = new HTMLDoc();
+
+      doc.open(alg.getName());
+      doc.addHeader(Sextante.getText(alg.getName()), 1);
+
+      doc.addHeader(Sextante.getText("Description"), 2);
+
+      element = (HelpElement) elements.get("DESCRIPTION");
+      if (element != null) {
+         doc.addParagraph(element.getTextAsFormattedHTML());
+         for (int j = 0; j < element.getImages().size(); j++) {
+            final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+            doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+         }
+      }
+
+      doc.addHeader(Sextante.getText("Parameters"), 2);
+
+      final ParametersSet params = alg.getParameters();
+
+      doc.startUnorderedList();
+      for (int i = 0; i < params.getNumberOfParameters(); i++) {
+         final Parameter param = params.getParameter(i);
+         String sParam = param.getParameterDescription();
+         sParam = "<b>" + sParam + "[" + getParameterTypeName(param) + "]: </b>";
+         element = (HelpElement) elements.get(param.getParameterName());
+         if (element != null) {
+            sParam = sParam + element.getTextAsFormattedHTML();
+         }
+         doc.addListElement(sParam);
+         if (element != null) {
+            for (int j = 0; j < element.getImages().size(); j++) {
+               final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+               doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+            }
+         }
+
+      }
+
+      doc.closeUnorderedList();
+
+      doc.addHeader(Sextante.getText("Outputs"), 2);
+
+      element = (HelpElement) elements.get("OUTPUT_DESCRIPTION");
+      if (element != null) {
+         doc.addParagraph(element.getTextAsFormattedHTML());
+         for (int j = 0; j < element.getImages().size(); j++) {
+            final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+            doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+         }
+      }
+
+      doc.startUnorderedList();
+      final OutputObjectsSet oo = alg.getOutputObjects();
+      String sOutputType = "";
+      for (int i = 0; i < oo.getOutputObjectsCount(); i++) {
+         final Output out = oo.getOutput(i);
+         String sOutput = out.getDescription();
+         if (out instanceof OutputRasterLayer) {
+            sOutputType = Sextante.getText("Raster_Layer");
+         }
+         else if (out instanceof Output3DRasterLayer) {
+            sOutputType = Sextante.getText("3D_Raster_layer");
+         }
+         else if (out instanceof OutputVectorLayer) {
+            sOutputType = Sextante.getText("Vector_Layer");
+            final OutputVectorLayer ovl = (OutputVectorLayer) out;
+            switch (ovl.getShapeType()) {
+               case OutputVectorLayer.SHAPE_TYPE_UNDEFINED:
+               default:
+                  sOutputType = sOutputType + " - " + Sextante.getText("Any_type");
+                  break;
+               case OutputVectorLayer.SHAPE_TYPE_LINE:
+                  sOutputType = sOutputType + " - " + Sextante.getText("Line");
+                  break;
+               case OutputVectorLayer.SHAPE_TYPE_POLYGON:
+                  sOutputType = sOutputType + " - " + Sextante.getText("Polygon");
+                  break;
+               case OutputVectorLayer.SHAPE_TYPE_POINT:
+                  sOutputType = sOutputType + " - " + Sextante.getText("Point");
+                  break;
+            }
+         }
+         else if (out instanceof OutputTable) {
+            sOutputType = Sextante.getText("Table");
+         }
+         else if (out instanceof OutputChart) {
+            sOutputType = Sextante.getText("graph-chart");
+         }
+         else if (out instanceof OutputText) {
+            sOutputType = Sextante.getText("Text");
+         }
+         else if (out instanceof OutputNumericalValue) {
+            sOutputType = Sextante.getText("Numerical_value");
+         }
+         sOutput = "<b>" + sOutput + "[" + sOutputType + "]: </b>";
+         element = (HelpElement) elements.get(out.getName());
+         if (element != null) {
+            sOutput = sOutput + element.getTextAsFormattedHTML();
+         }
+         doc.addListElement(sOutput);
+         if (element != null) {
+            for (int j = 0; j < element.getImages().size(); j++) {
+               final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+               doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+            }
+         }
+
+      }
+      doc.closeUnorderedList();
+
+      doc.addHeader(Sextante.getText("Additional_information"), 2);
+
+      element = (HelpElement) elements.get("ADDITIONAL_INFO");
+      if (element != null) {
+         doc.addParagraph(element.getTextAsFormattedHTML());
+         for (int j = 0; j < element.getImages().size(); j++) {
+            final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+            doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+         }
+      }
+
+      doc.addHeader(Sextante.getText("Command_line"), 2);
+
+      String sText = alg.getCommandLineHelp();
+      sText = sText.replaceAll("\n", "<br>");
+      sText = sText.replace("   ", " &nbsp ");
+      doc.addCourierText(sText);
+
+      doc.addParagraph("");
+
+      element = (HelpElement) elements.get("EXTENSION_AUTHOR");
+      if (element != null) {
+         doc.addParagraph("<i>" + Sextante.getText("Algorithm_created_by") + " " + element.getText() + "</i>");
+         for (int j = 0; j < element.getImages().size(); j++) {
+            final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+            doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+         }
+      }
+
+      element = (HelpElement) elements.get("HELP_AUTHOR");
+      if (element != null) {
+         doc.addParagraph("<i>" + Sextante.getText("Help_file_created_by") + " " + element.getText() + "</i>");
+         for (int j = 0; j < element.getImages().size(); j++) {
+            final ImageAndDescription iad = (ImageAndDescription) element.getImages().get(j);
+            doc.addImageAndDescription(sPath + iad.getFilename(), iad.getDescription());
+         }
+      }
+
+      doc.close();
+
+      return doc.getHTMLCode();
+
+   }
+
+
+   private static String getParameterTypeName(final Parameter param) {
+
+      String s = Sextante.getText(param.getParameterTypeName().replace(' ', '_'));
+
+      if (param instanceof ParameterVectorLayer) {
+         try {
+            final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) param.getParameterAdditionalInfo();
+            switch (ai.getShapeType()) {
+               case AdditionalInfoVectorLayer.SHAPE_TYPE_ANY:
+               default:
+                  s = s + " - " + Sextante.getText("Any_type");
+                  break;
+               case AdditionalInfoVectorLayer.SHAPE_TYPE_LINE:
+                  s = s + " - " + Sextante.getText("Line");
+                  break;
+               case AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON:
+                  s = s + " - " + Sextante.getText("Polygon");
+                  break;
+               case AdditionalInfoVectorLayer.SHAPE_TYPE_POINT:
+                  s = s + " - " + Sextante.getText("Point");
+                  break;
+            }
+         }
+         catch (final NullParameterAdditionalInfoException e) {}
+      }
+
+      return s;
+
+   }
+
+
+   public static HashMap createMap(final ArrayList list) {
+
+      final HashMap map = new HashMap();
+
+      for (int i = 0; i < list.size(); i++) {
+         final HelpElement element = (HelpElement) list.get(i);
+         map.put(element.getName(), element);
+      }
+
+      return map;
+
+   }
+
+
+   /**
+    * Returns true if the help file associated with an algorithm contains a given search string
+    *
+    * @param alg
+    *                the GeoAlgorithm
+    * @param string
+    *                a string to search
+    * @return true if the help file associated with the algorithm contains the search string
+    */
+   public static boolean containsStringInHelpFile(final GeoAlgorithm alg,
+                                                  final String string) {
+
+      String line;
+
+      BufferedReader br = null;
+      InputStreamReader is = null;
+      FileInputStream fis = null;
+
+      final String sName = alg.getName().toLowerCase();
+      if (sName.indexOf(string) != -1) {
+         return true;
+      }
+
+      try {
+         final String sFilename = SextanteGUI.getAlgorithmHelpFilename(alg, false);
+         fis = new FileInputStream(sFilename);
+         is = new InputStreamReader(fis);
+         br = new BufferedReader(is);
+
+         while (null != (line = br.readLine())) {
+            line = line.toLowerCase();
+            if (line.indexOf(string) != -1) {
+               br.close();
+               is.close();
+               fis.close();
+               return true;
+            }
+         }
+      }
+      catch (final Exception e) {
+         //Sextante.addErrorToLog(e);
+      }
+      finally {
+         try {
+            br.close();
+            is.close();
+            fis.close();
+         }
+         catch (final Exception e) {}
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns the help filename for a given algorithm
+    *
+    * @param alg
+    *                the GeoAlgorithm
+    * @param bForceCurrentLocale
+    *                if true, returns the path to the current locale, even if it does not exist. If false, it will return the path
+    *                corresponding to the default locale (english) in case the one corresponding to the current locale does not
+    *                exist.
+    *
+    * @return the help filename for a given algorithm
+    */
+   //   public static String getHelpFilename(final GeoAlgorithm alg,
+   //                                        final boolean bForceCurrentLocale) {
+   //
+   //      String sPath;
+   //      String sFilename;
+   //
+   //      if (alg instanceof ModelAlgorithm) {
+   //         final String sModelFilename = ((ModelAlgorithm) alg).getFilename();
+   //         sFilename = sModelFilename.substring(sModelFilename.lastIndexOf(File.separator));
+   //         sFilename = sFilename + ".xml";
+   //         sPath = SextanteGUI.getSettingParameterValue(SextanteModelerSettings.MODELS_FOLDER);
+   //      }
+   //      else if (alg instanceof GrassAlgorithm) {
+   //         sFilename = alg.getName() + ".html";
+   //         if (sFilename.contains("(")) {
+   //            //GRASS algorithm siblings
+   //            sFilename = sFilename.substring(0, sFilename.indexOf("(") - 1) + ".html";
+   //         }
+   //         sPath = SextanteGUI.getGrassFolder() + File.separator + "docs" + File.separator + "html";
+   //      }
+   //      else {
+   //         sFilename = alg.getCommandLineName() + ".xml";
+   //         sPath = getHelpPath(alg, bForceCurrentLocale);
+   //      }
+   //
+   //      return sPath + File.separator + sFilename;
+   //
+   //   }
+   /**
+    * Returns the path where help files for a given algorithm are found
+    *
+    * @param alg
+    *                the GeoAlgorithm
+    * @param bForceCurrentLocale
+    *                if true, returns the path to the current locale, even if it does not exist. If false, it will return the path
+    *                corresponding to the default locale (english) in case the one corresponding to the current locale does not
+    *                exist.
+    * @return the help path for this algorithm
+    */
+   public static String getHelpPath(final GeoAlgorithm alg,
+                                    final boolean bForceLocale) {
+
+      String sPackage = alg.getClass().getName();
+      sPackage = sPackage.substring(0, sPackage.lastIndexOf("."));
+      String sPath = SextanteGUI.getHelpPath() + File.separator + Locale.getDefault().getLanguage() + File.separator + sPackage;
+
+      final File dir = new File(sPath);
+      if (!dir.exists() && !bForceLocale) {
+         sPath = SextanteGUI.getHelpPath() + File.separator + Locale.ENGLISH.getLanguage() + File.separator + sPackage;
+      }
+
+      return sPath;
+
+   }
+
+
+   public static String getHelpFile(final String sTopic) {
+
+      String sPath = SextanteGUI.getHelpPath() + File.separator + Locale.getDefault().getLanguage();
+
+      final File dir = new File(sPath);
+      if (!dir.exists()) {
+         sPath = SextanteGUI.getHelpPath() + File.separator + Locale.ENGLISH.getLanguage();
+      }
+      return sPath + File.separator + "general" + File.separator + sTopic + ".html";
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpIO.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpElement.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpElement.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpElement.java	(revision 369)
@@ -0,0 +1,230 @@
+package es.unex.sextante.gui.help;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlSerializer;
+
+public class HelpElement {
+
+   private String             m_sName              = "";
+   private ArrayList          m_Images             = new ArrayList();
+   private String             m_sDescription       = "";
+   private String             m_sText              = "";
+   private int                m_iType              = 0;
+
+   public static final int    TYPE_ADDITIONAL_INFO = 0;
+   public static final int    TYPE_INPUT           = 1;
+   public static final int    TYPE_OUTPUT          = 2;
+   public static final int    TYPE_PARAMETER       = 3;
+
+   public static final String ELEMENT              = "element";
+   public static final String NAME                 = "name";
+   public static final String TEXT                 = "text";
+   public static final String TYPE                 = "type";
+   public static final String DESCRIPTION          = "description";
+
+
+   public HelpElement(final String sName,
+                      final String sDescription,
+                      final int iType) {
+
+      m_sName = sName;
+      m_sDescription = sDescription;
+      m_iType = iType;
+
+   }
+
+
+   public HelpElement() {
+
+   }
+
+
+   public ArrayList getImages() {
+
+      return m_Images;
+
+   }
+
+
+   public void setImages(final ArrayList images) {
+
+      m_Images = images;
+
+   }
+
+
+   public String getText() {
+
+      return m_sText;
+
+   }
+
+
+   public String getTextAsFormattedHTML() {
+
+      boolean bList = false;
+      boolean bListElement = false;
+      final StringBuffer sb = new StringBuffer();
+      for (int i = 0; i < m_sText.length(); i++) {
+         final char c = m_sText.charAt(i);
+         if (c == '*') {
+            if (!bList) {
+               sb.append("<ul>");
+            }
+            sb.append("<li>");
+            bListElement = true;
+            bList = true;
+         }
+         else if (c == '\n') {
+            sb.append("<br>");
+            bListElement = false;
+         }
+         else {
+            if (bList && !bListElement) {
+               sb.append("</ul>");
+               bList = false;
+            }
+            sb.append(c);
+         }
+      }
+      sb.append("\n");
+
+      if (bList) {
+         sb.append("</ul>");
+      }
+
+      return sb.toString();
+
+   }
+
+
+   public String getTextForTooltip() {
+
+      final int MAX_CHARS = 60;
+
+      int iChars = 0;
+      boolean bList = false;
+      boolean bListElement = false;
+      final StringBuffer sb = new StringBuffer("<html>");
+      for (int i = 0; i < m_sText.length(); i++) {
+         final char c = m_sText.charAt(i);
+         if (c == '*') {
+            if (!bList) {
+               sb.append("<ul>");
+            }
+            sb.append("<li>");
+            bListElement = true;
+            bList = true;
+         }
+         else if (c == '\n') {
+            sb.append("<br>");
+            bListElement = false;
+         }
+         else if (c == ' ') {
+            sb.append(c);
+            if (iChars > MAX_CHARS) {
+               iChars = 0;
+               sb.append("<br>");
+            }
+            else {
+               iChars++;
+            }
+         }
+         else {
+            if (bList && !bListElement) {
+               sb.append("</ul>");
+               bList = false;
+            }
+            sb.append(c);
+         }
+      }
+      sb.append("\n</html>");
+
+      if (bList) {
+         sb.append("</ul>");
+      }
+
+      return sb.toString();
+
+
+   }
+
+
+   public void setText(final String text) {
+
+      m_sText = text;
+
+   }
+
+
+   public String getDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public void setDescription(final String description) {
+
+      m_sDescription = description;
+
+   }
+
+
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+   public void setName(final String name) {
+
+      m_sName = name;
+
+   }
+
+
+   public int getType() {
+
+      return m_iType;
+
+   }
+
+
+   public void setType(final int type) {
+
+      m_iType = type;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sDescription;
+   }
+
+
+   public void serialize(final KXmlSerializer serializer) throws IOException {
+
+      serializer.text("\n");
+      serializer.text("\t\t");
+      serializer.startTag(null, ELEMENT);
+      serializer.attribute(null, NAME, m_sName);
+      serializer.attribute(null, TEXT, m_sText);
+      serializer.attribute(null, DESCRIPTION, m_sDescription);
+      serializer.attribute(null, TYPE, Integer.toString(m_iType));
+      for (int i = 0; i < m_Images.size(); i++) {
+         ((ImageAndDescription) m_Images.get(i)).serialize(serializer);
+      }
+      serializer.text("\n");
+      serializer.text("\t\t");
+      serializer.endTag(null, ELEMENT);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpElement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpEditionDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpEditionDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpEditionDialog.java	(revision 369)
@@ -0,0 +1,303 @@
+package es.unex.sextante.gui.help;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+public class HelpEditionDialog
+         extends
+            JDialog {
+
+   private JSplitPane          jSplitPane;
+   private JTree               jTree;
+   private JScrollPane         jScrollPaneTree;
+   private final GeoAlgorithm  m_Alg;
+   private ArrayList           m_Elements;
+   private JButton             jButtonOK;
+   private JButton             jButtonCancel;
+   private ElementEditionPanel jElementEditionPanel;
+
+   private TreePath            m_Path = null;
+
+
+   public HelpEditionDialog(final GeoAlgorithm ga,
+                            final Frame parent) {
+
+      super(parent, ga.getName(), true);
+
+      m_Alg = ga;
+
+      initGUI();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 100.0, 100.0, 5.0 },
+                     { TableLayoutConstants.FILL, 5.0, 30.0, 5.0 } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(800, 500));
+            this.setSize(new java.awt.Dimension(800, 500));
+
+            jSplitPane = new JSplitPane();
+            this.add(jSplitPane, "0, 0, 2, 0");
+            {
+               jTree = new JTree();
+               jTree.setCellRenderer(new AlgorithmTreeCellRenderer());
+               final MouseListener ml = new MouseAdapter() {
+                  @Override
+                  public void mousePressed(MouseEvent e) {
+                     m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+                     if (m_Path != null) {
+                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                        Object ob = node.getUserObject();
+                        if (ob instanceof HelpElement) {
+                           setElement((HelpElement) ob);
+                        }
+                     }
+                  }
+               };
+               jTree.addMouseListener(ml);
+
+               jTree.addTreeSelectionListener(new TreeSelectionListener() {
+
+                  public void valueChanged(final TreeSelectionEvent e) {
+                     m_Path = e.getPath();
+                     if (m_Path != null) {
+                        final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                        final Object obj = node.getUserObject();
+                        if (obj instanceof HelpElement) {
+                           setElement((HelpElement) obj);
+                        }
+                     }
+                  }
+               });
+
+               jScrollPaneTree = new JScrollPane(jTree, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               jElementEditionPanel = new ElementEditionPanel(m_Alg);
+               jScrollPaneTree.setPreferredSize(new Dimension(200, 450));
+            }
+            {
+               jSplitPane.add(jElementEditionPanel, JSplitPane.RIGHT);
+               jSplitPane.add(jScrollPaneTree, JSplitPane.LEFT);
+            }
+            {
+               jButtonOK = new JButton();
+               this.add(jButtonOK, "1, 2");
+               jButtonOK.setText(Sextante.getText("OK"));
+               jButtonOK.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     saveHelp();
+                  }
+               });
+            }
+            {
+               jButtonCancel = new JButton();
+               this.add(jButtonCancel, "2, 2");
+               jButtonCancel.setText(Sextante.getText("Cancel"));
+               jButtonCancel.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     cancel();
+                  }
+               });
+            }
+
+            createElementsList();
+            fillTree();
+            expandAll();
+
+         }
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void expandAll() {
+
+      final TreeNode root = (TreeNode) jTree.getModel().getRoot();
+      expandAll(jTree, new TreePath(root), true);
+
+   }
+
+
+   private void expandAll(final JTree tree,
+                          final TreePath parent,
+                          final boolean expand) {
+
+      final TreeNode node = (TreeNode) parent.getLastPathComponent();
+      if (node.getChildCount() >= 0) {
+         for (final Enumeration e = node.children(); e.hasMoreElements();) {
+            final TreeNode n = (TreeNode) e.nextElement();
+            final TreePath path = parent.pathByAddingChild(n);
+            expandAll(tree, path, expand);
+         }
+      }
+
+      if (expand) {
+         tree.expandPath(parent);
+      }
+      else {
+         tree.collapsePath(parent);
+      }
+
+   }
+
+
+   protected void setElement(final HelpElement element) {
+
+      jElementEditionPanel.saveElement();
+      jElementEditionPanel.setElement(element);
+
+   }
+
+
+   protected void cancel() {
+
+      dispose();
+      setVisible(false);
+
+   }
+
+
+   protected void saveHelp() {
+
+      jElementEditionPanel.saveElement();
+
+      HelpIO.save(m_Elements, SextanteGUI.getAlgorithmHelpFilename(m_Alg, true));
+
+      cancel();
+
+   }
+
+
+   private void createElementsList() {
+
+      if (!createElementsListFromFile()) {
+         m_Elements = new ArrayList();
+         m_Elements.add(new HelpElement("DESCRIPTION", Sextante.getText("Description"), HelpElement.TYPE_ADDITIONAL_INFO));
+         m_Elements.add(new HelpElement("ADDITIONAL_INFO", Sextante.getText("Additional_information"),
+                  HelpElement.TYPE_ADDITIONAL_INFO));
+         m_Elements.add(new HelpElement("EXTENSION_AUTHOR", Sextante.getText("Algorithm_created_by"),
+                  HelpElement.TYPE_ADDITIONAL_INFO));
+         m_Elements.add(new HelpElement("HELP_AUTHOR", Sextante.getText("Help_file_created_by"), HelpElement.TYPE_ADDITIONAL_INFO));
+         m_Elements.add(new HelpElement("USER_NOTES", Sextante.getText("User_notes"), HelpElement.TYPE_ADDITIONAL_INFO));
+
+
+         final ParametersSet params = m_Alg.getParameters();
+         for (int i = 0; i < params.getNumberOfParameters(); i++) {
+            final Parameter param = params.getParameter(i);
+            m_Elements.add(new HelpElement(param.getParameterName(), param.getParameterDescription(), HelpElement.TYPE_PARAMETER));
+
+         }
+
+         m_Elements.add(new HelpElement("OUTPUT_DESCRIPTION", Sextante.getText("Description"), HelpElement.TYPE_OUTPUT));
+
+         final OutputObjectsSet oo = m_Alg.getOutputObjects();
+         for (int i = 0; i < oo.getOutputObjectsCount(); i++) {
+            final Output out = oo.getOutput(i);
+            m_Elements.add(new HelpElement(out.getName(), out.getDescription(), HelpElement.TYPE_OUTPUT));
+         }
+
+      }
+
+   }
+
+
+   private boolean createElementsListFromFile() {
+
+      final String sFilename = SextanteGUI.getAlgorithmHelpFilename(m_Alg, true);
+
+      m_Elements = HelpIO.open(sFilename);
+
+      return m_Elements != null;
+
+   }
+
+
+   public void fillTree() {
+
+      DefaultMutableTreeNode node;
+      final DefaultMutableTreeNode outputsNode = new DefaultMutableTreeNode(Sextante.getText("Outputs"));
+      final DefaultMutableTreeNode paramsNode = new DefaultMutableTreeNode(Sextante.getText("Parameters"));
+      final DefaultMutableTreeNode infoNode = new DefaultMutableTreeNode(Sextante.getText("Information"));
+
+      for (int i = 0; i < m_Elements.size(); i++) {
+         final HelpElement element = (HelpElement) m_Elements.get(i);
+         node = new DefaultMutableTreeNode(element);
+         switch (element.getType()) {
+            case HelpElement.TYPE_ADDITIONAL_INFO:
+               infoNode.add(node);
+               break;
+            case HelpElement.TYPE_OUTPUT:
+               outputsNode.add(node);
+               break;
+            case HelpElement.TYPE_PARAMETER:
+               paramsNode.add(node);
+               break;
+         }
+      }
+
+      DefaultMutableTreeNode selectedNode = null;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Elements"));
+      if (infoNode.getChildCount() != 0) {
+         mainNode.add(infoNode);
+         selectedNode = (DefaultMutableTreeNode) infoNode.getChildAt(0);
+
+      }
+      if (paramsNode.getChildCount() != 0) {
+         mainNode.add(paramsNode);
+      }
+
+      if (outputsNode.getChildCount() != 0) {
+         mainNode.add(outputsNode);
+      }
+      final DefaultTreeModel model = new DefaultTreeModel(mainNode);
+      jTree.setModel(model);
+      final TreePath path = new TreePath(model.getPathToRoot(selectedNode));
+      jTree.setSelectionPath(path);
+      jTree.scrollPathToVisible(path);
+      jElementEditionPanel.setElement((HelpElement) selectedNode.getUserObject());
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/HelpEditionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ElementEditionPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ElementEditionPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ElementEditionPanel.java	(revision 369)
@@ -0,0 +1,175 @@
+package es.unex.sextante.gui.help;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultListModel;
+import javax.swing.JButton;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.ListModel;
+import javax.swing.ListSelectionModel;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+
+public class ElementEditionPanel
+         extends
+            JPanel {
+
+   private HelpElement  m_Element;
+   private JPanel       jPanelImages;
+   private JTextArea    jTextAreaDescription;
+   private JScrollPane  jScrollPaneTextArea;
+   private JButton      jButtonRemoveImage;
+   private JButton      jButtonAddImage;
+   private JList        jListImages;
+   private JPanel       jPanelText;
+   private final GeoAlgorithm m_Alg;
+
+
+   public ElementEditionPanel(final GeoAlgorithm ext) {
+
+      super();
+
+      m_Alg = ext;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+      {
+         final TableLayout thisLayout = new TableLayout(new double[][] { { 5.0, TableLayoutConstants.FILL, 5.0 },
+                  { 5.0, TableLayoutConstants.FILL, 5.0, TableLayoutConstants.FILL, 5.0 } });
+         thisLayout.setHGap(5);
+         thisLayout.setVGap(5);
+         this.setLayout(thisLayout);
+         this.setPreferredSize(new java.awt.Dimension(565, 252));
+         {
+            jPanelText = new JPanel();
+            final BorderLayout jPanelTextLayout = new BorderLayout();
+            jPanelText.setLayout(jPanelTextLayout);
+            this.add(jPanelText, "1, 1");
+            jPanelText.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Description")));
+            {
+               jTextAreaDescription = new JTextArea();
+               jTextAreaDescription.setLineWrap(true);
+               jTextAreaDescription.setWrapStyleWord(true);
+               jScrollPaneTextArea = new JScrollPane(jTextAreaDescription, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
+                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               jPanelText.add(jScrollPaneTextArea, BorderLayout.CENTER);
+               jTextAreaDescription.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            }
+         }
+         {
+            jPanelImages = new JPanel();
+            final TableLayout jPanelImagesLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 5.0, 100.0, 5.0 },
+                     { TableLayoutConstants.FILL, 30.0, 5.0, 30.0, TableLayoutConstants.FILL } });
+            jPanelImagesLayout.setHGap(5);
+            jPanelImagesLayout.setVGap(5);
+            jPanelImages.setLayout(jPanelImagesLayout);
+            this.add(jPanelImages, "1, 3");
+            jPanelImages.setBorder(BorderFactory.createTitledBorder(Sextante.getText("Images")));
+            {
+               final ListModel jListImagesModel = new DefaultListModel();
+               jListImages = new JList();
+               jListImages.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+               jPanelImages.add(jListImages, "0, 0, 0, 4");
+               jListImages.setModel(jListImagesModel);
+               jListImages.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            }
+            {
+               jButtonAddImage = new JButton();
+               jButtonAddImage.setText(Sextante.getText("Add_image"));
+               jButtonAddImage.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     addImage();
+                  }
+               });
+               jPanelImages.add(jButtonAddImage, "2, 1");
+            }
+            {
+               jButtonRemoveImage = new JButton();
+               jButtonRemoveImage.setText(Sextante.getText("Remove_image"));
+               jButtonRemoveImage.addActionListener(new ActionListener() {
+                  public void actionPerformed(final ActionEvent evt) {
+                     removeImage();
+                  }
+               });
+               jPanelImages.add(jButtonRemoveImage, "2, 3");
+            }
+         }
+      }
+
+   }
+
+
+   protected void removeImage() {
+
+      final DefaultListModel model = (DefaultListModel) jListImages.getModel();
+      final int selection = jListImages.getSelectedIndex();
+      model.remove(selection);
+
+   }
+
+
+   private void addImage() {
+
+      final Frame window = new Frame();
+      final ImageAndDescription iad = new ImageAndDescription();
+      final ImageSelectionDialog dialog = new ImageSelectionDialog(window, iad, HelpIO.getHelpPath(m_Alg, true));
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      if (dialog.getOK()) {
+         final DefaultListModel model = (DefaultListModel) jListImages.getModel();
+         model.addElement(iad);
+      }
+
+   }
+
+
+   public void setElement(final HelpElement element) {
+
+      m_Element = element;
+
+      jTextAreaDescription.setText(element.getText());
+      final ArrayList images = element.getImages();
+      final DefaultListModel model = (DefaultListModel) jListImages.getModel();
+      model.clear();
+      for (int i = 0; i < images.size(); i++) {
+         model.addElement(images.get(i));
+      }
+
+   }
+
+
+   public void saveElement() {
+
+      if (m_Element != null) {
+         m_Element.setText(jTextAreaDescription.getText());
+         final ArrayList list = new ArrayList();
+         m_Element.setImages(list);
+         final DefaultListModel model = (DefaultListModel) jListImages.getModel();
+         for (int i = 0; i < model.size(); i++) {
+            list.add(model.get(i));
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/help/ElementEditionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsTreeCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsTreeCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsTreeCellRenderer.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.additionalResults;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.TreeCellRenderer;
+
+public class AdditionalResultsTreeCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean sel,
+                                                 final boolean expanded,
+                                                 boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      final String sName = tree.convertValueToText(value, sel, expanded, leaf, row, hasFocus);
+
+      setFont(tree.getFont());
+      setEnabled(tree.isEnabled());
+      setText(sName);
+
+      if (!leaf) {
+         setFont(new java.awt.Font("Tahoma", 1, 11));
+         setForeground(Color.black);
+      }
+      else {
+         if (sel) {
+            setForeground(Color.blue);
+         }
+         else {
+            setForeground(Color.black);
+         }
+      }
+      return this;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsTreeCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/TableTools.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/TableTools.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/TableTools.java	(revision 369)
@@ -0,0 +1,102 @@
+package es.unex.sextante.gui.additionalResults;
+
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableModel;
+
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class TableTools {
+
+   public static JScrollPane getScrollableTablePanelFromITable(final IDataObject obj) {
+
+      final JScrollPane jScrollPane = new JScrollPane();
+
+      final JTable jTable = new JTable();
+      jScrollPane.setViewportView(jTable);
+      final TableModel model = getTableModel(obj);
+      if (model != null) {
+         jTable.setModel(model);
+      }
+      jTable.setEnabled(false);
+
+      return jScrollPane;
+
+
+   }
+
+
+   private static TableModel getTableModel(final IDataObject obj) {
+
+      final DefaultTableModel model = new DefaultTableModel();
+
+      String[] fields;
+      int iCount;
+
+
+      if (obj instanceof ITable) {
+         iCount = (int) ((ITable) obj).getRecordCount();
+         fields = ((ITable) obj).getFieldNames();
+
+      }
+      else if (obj instanceof IVectorLayer) {
+         iCount = ((IVectorLayer) obj).getShapesCount();
+         fields = ((IVectorLayer) obj).getFieldNames();
+      }
+      else {
+         return null;
+      }
+
+      final String[][] data = new String[iCount][fields.length];
+
+      if (obj instanceof ITable) {
+         final IRecordsetIterator iter = ((ITable) obj).iterator();
+         int i = 0;
+         while (iter.hasNext()) {
+            IRecord record;
+            try {
+               record = iter.next();
+               for (int j = 0; j < fields.length; j++) {
+                  data[i][j] = record.getValue(j).toString();
+               }
+               i++;
+            }
+            catch (final IteratorException e) {
+               e.printStackTrace();
+            }
+         }
+      }
+      else {
+         final IFeatureIterator iter = ((IVectorLayer) obj).iterator();
+         int i = 0;
+         while (iter.hasNext()) {
+            IFeature feature;
+            try {
+               feature = iter.next();
+               for (int j = 0; j < fields.length; j++) {
+                  data[i][j] = feature.getRecord().getValue(j).toString();
+               }
+               i++;
+            }
+            catch (final IteratorException e) {
+               e.printStackTrace();
+            }
+         }
+      }
+
+      model.setDataVector(data, fields);
+
+      return model;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/TableTools.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResults.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResults.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResults.java	(revision 369)
@@ -0,0 +1,74 @@
+package es.unex.sextante.gui.additionalResults;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+/**
+ * This class stores results generated by SEXTANTE geoalgorithms that are neither layers nor tables (i.e text results and charts).
+ * They are all stored as java Component objects, so they can be shown in a dialogs. Charts do not have to be modified, since they
+ * already extend the Component class. Text strings should be put into some kind of panel or TextArea. This is not done by this
+ * class, but should be done by the corresponding post-process task (see {IPostProcessFactory})
+ *
+ * @author volaya
+ *
+ */
+public class AdditionalResults {
+
+   private static ArrayList m_Components = new ArrayList();
+
+
+   /**
+    * Shows a panel with results, only if there is at least one of them,
+    */
+   public static void showPanel() {
+
+      if (m_Components == null || m_Components.size() == 0) {
+         return;
+      }
+
+      SextanteGUI.getGUIFactory().showAdditionalResultsDialog(m_Components);
+
+   }
+
+
+   /**
+    * Returns the list of results as a list of components
+    *
+    * @return the list of results
+    */
+   public static ArrayList getComponents() {
+
+      return m_Components;
+
+   }
+
+
+   /**
+    * Adds a new result
+    *
+    * @param oad
+    *                a result and its description, to be shown in the corresponding panel
+    */
+   public static void addComponent(final ObjectAndDescription oad) {
+
+      m_Components.add(oad);
+
+
+   }
+
+
+   /**
+    * Removes a result
+    *
+    * @param oad
+    *                The result to remove
+    */
+   public static void removeComponent(final ObjectAndDescription oad) {
+
+      m_Components.remove(oad);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResults.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsDialog.java	(revision 369)
@@ -0,0 +1,417 @@
+
+
+package es.unex.sextante.gui.additionalResults;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.util.ArrayList;
+import java.util.Enumeration;
+
+import javax.swing.JDialog;
+import javax.swing.JFileChooser;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTable;
+import javax.swing.JTextPane;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.table.TableModel;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.ChartUtilities;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.GenericFileFilter;
+
+
+public class AdditionalResultsDialog
+         extends
+            JDialog {
+
+   private JSplitPane  jSplitPane;
+   private JTree       jTree;
+   private TreePath    m_Path;
+   private JScrollPane jScrollPane;
+   private JMenuItem   menuItemSave;
+   private JPopupMenu  popupMenu;
+   private JMenuItem   menuItemRemove;
+   private JMenuItem   menuItemRename;
+
+
+   public AdditionalResultsDialog(final ArrayList components,
+                                  final Frame mainFrame) {
+
+      super(mainFrame, Sextante.getText("Result"), true);
+
+      initGUI(components);
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private boolean initGUI(final ArrayList components) {
+
+      final JPanel panel = new JPanel();
+      final BorderLayout thisLayout = new BorderLayout();
+      panel.setLayout(thisLayout);
+      this.setContentPane(panel);
+
+      if (components.size() == 0) {
+         return false;
+      }
+      try {
+         {
+            this.setPreferredSize(new java.awt.Dimension(700, 350));
+            this.setSize(new java.awt.Dimension(700, 350));
+            {
+               jSplitPane = new JSplitPane();
+               panel.add(jSplitPane, BorderLayout.CENTER);
+               {
+                  jTree = new JTree();
+                  jTree.setCellRenderer(new AdditionalResultsTreeCellRenderer());
+                  final MouseListener ml = new MouseAdapter() {
+                     @Override
+                     public void mousePressed(MouseEvent e) {
+                        m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+                        showComponent();
+                        if ((e.getButton() == MouseEvent.BUTTON3) && (m_Path != null)) {
+                           DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                           if (node.getUserObject() instanceof ObjectAndDescription) {
+                              showPopupMenu(e);
+                           }
+                        }
+                     }
+                  };
+                  jTree.addMouseListener(ml);
+
+                  fillTree(components);
+
+                  if (components.size() > 0) {
+                     final DefaultMutableTreeNode node = findNode((ObjectAndDescription) components.get(components.size() - 1));
+                     final DefaultTreeModel model = (DefaultTreeModel) jTree.getModel();
+                     final TreePath path = new TreePath(model.getPathToRoot(node));
+                     jTree.setSelectionPath(path);
+                     jTree.scrollPathToVisible(path);
+                     m_Path = path;
+                     showComponent();
+                  }
+
+                  jScrollPane = new JScrollPane(jTree, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+                           ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+
+                  jScrollPane.setPreferredSize(new Dimension(200, 450));
+                  jScrollPane.setMinimumSize(new Dimension(200, 450));
+                  jScrollPane.setMaximumSize(new Dimension(200, 450));
+               }
+               {
+                  jSplitPane.add(jScrollPane, JSplitPane.LEFT);
+               }
+            }
+         }
+
+         popupMenu = new JPopupMenu("Menu");
+
+         menuItemSave = new JMenuItem(Sextante.getText("Save"));
+         menuItemSave.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               if (m_Path != null) {
+                  try {
+                     final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                     if (node.getUserObject() instanceof ObjectAndDescription) {
+                        save();
+                     }
+                  }
+                  catch (final Exception e) {
+                  }
+               }
+            }
+         });
+         popupMenu.add(menuItemSave);
+
+         menuItemRemove = new JMenuItem(Sextante.getText("Remove"));
+         menuItemRemove.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               if (m_Path != null) {
+                  try {
+                     final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                     if (node.getUserObject() instanceof ObjectAndDescription) {
+                        remove();
+                     }
+                  }
+                  catch (final Exception e) {
+                  }
+               };
+            }
+         });
+         popupMenu.add(menuItemRemove);
+
+         menuItemRename = new JMenuItem(Sextante.getText("Rename"));
+         menuItemRename.addActionListener(new ActionListener() {
+            public void actionPerformed(final ActionEvent evt) {
+               if (m_Path != null) {
+                  try {
+                     final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                     if (node.getUserObject() instanceof ObjectAndDescription) {
+                        rename();
+                     }
+                  }
+                  catch (final Exception e) {
+                  }
+               };
+            }
+
+         });
+         popupMenu.add(menuItemRename);
+
+         panel.updateUI();
+         return true;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      jTree.setSelectionPath(m_Path);
+
+      final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+      final ObjectAndDescription oad = (ObjectAndDescription) node.getUserObject();
+      final Component c = (Component) oad.getObject();
+      menuItemSave.setEnabled(true);
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   private void rename() {
+
+      if (m_Path != null) {
+         try {
+            final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+            final ObjectAndDescription oad = (ObjectAndDescription) node.getUserObject();
+            final String sName = oad.getDescription();
+
+            final JOptionPane pane = new JOptionPane();
+            pane.setMessage(Sextante.getText("introduce_nombre"));
+            pane.setMessageType(JOptionPane.QUESTION_MESSAGE);
+            pane.setWantsInput(true);
+            pane.setInitialSelectionValue(sName);
+            pane.setInputValue(sName);
+            final JDialog dlg = pane.createDialog(null, Sextante.getText("renombrar"));
+            dlg.setModal(true);
+            dlg.setVisible(true);
+
+            final String sNewName = pane.getInputValue().toString().trim();
+
+            if ((sNewName != null) && (sNewName.length() != 0)) {
+               oad.setDescription(sNewName);
+            }
+
+            update();
+         }
+         catch (final Exception e) {
+         }
+      }
+
+
+   }
+
+
+   protected void remove() {
+
+      if (m_Path != null) {
+         try {
+            final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+            final ObjectAndDescription oad = (ObjectAndDescription) node.getUserObject();
+            AdditionalResults.removeComponent(oad);
+            update();
+         }
+         catch (final Exception e) {
+         }
+      }
+
+   }
+
+
+   protected void save() {
+
+      if (m_Path != null) {
+         try {
+            final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+            final ObjectAndDescription oad = (ObjectAndDescription) node.getUserObject();
+            final Component c = (Component) oad.getObject();
+            if (c instanceof JScrollPane) {
+               final JScrollPane pane = (JScrollPane) c;
+               final Component view = pane.getViewport().getView();
+               if (view instanceof JTextPane) {
+                  final JTextPane text = (JTextPane) pane.getViewport().getView();
+                  final JFileChooser fc = new JFileChooser();
+                  fc.setFileFilter(new GenericFileFilter(new String[] { "htm" }, "HTML"));
+                  final int returnVal = fc.showSaveDialog(this);
+                  if (returnVal == JFileChooser.APPROVE_OPTION) {
+                     try {
+                        final File file = fc.getSelectedFile();
+                        final FileWriter fileWriter = new FileWriter(file);
+                        final BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
+                        bufferedWriter.write(text.getText());
+                        bufferedWriter.close();
+                     }
+                     catch (final Exception e) {
+                        JOptionPane.showMessageDialog(null, "Could not save selected result", Sextante.getText("Warning"),
+                                 JOptionPane.WARNING_MESSAGE);
+                     }
+                  }
+               }
+               else if (view instanceof JTable) {
+                  final JTable table = (JTable) pane.getViewport().getView();
+                  final TableModel model = table.getModel();
+                  final JFileChooser fc = new JFileChooser();
+                  fc.setFileFilter(new GenericFileFilter(new String[] { "csv" }, "Comma-Separated Values (csv)"));
+                  final int returnVal = fc.showSaveDialog(this);
+                  if (returnVal == JFileChooser.APPROVE_OPTION) {
+                     try {
+                        final File file = fc.getSelectedFile();
+                        final FileWriter fileWriter = new FileWriter(file);
+                        final BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
+                        for (int j = 0; j < model.getColumnCount(); j++) {
+                           bufferedWriter.write(model.getColumnName(j));
+                           if (j == model.getColumnCount() - 1) {
+                              bufferedWriter.write("\n");
+                           }
+                           else {
+                              bufferedWriter.write(",");
+                           }
+                        }
+                        for (int i = 0; i < model.getRowCount(); i++) {
+                           for (int j = 0; j < model.getColumnCount(); j++) {
+                              bufferedWriter.write(model.getValueAt(i, j).toString());
+                              if (j == model.getColumnCount() - 1) {
+                                 bufferedWriter.write("\n");
+                              }
+                              else {
+                                 bufferedWriter.write(",");
+                              }
+                           }
+                        }
+                        bufferedWriter.close();
+                     }
+                     catch (final Exception e) {
+                        JOptionPane.showMessageDialog(null, "Could not save selected result", Sextante.getText("Warning"),
+                                 JOptionPane.WARNING_MESSAGE);
+                     }
+                  }
+               }
+            }
+            else if (c instanceof ChartPanel) {
+               final ChartPanel panel = (ChartPanel) c;
+               final JFileChooser fc = new JFileChooser();
+               fc.setFileFilter(new GenericFileFilter(new String[] { "png" }, "png"));
+               final int returnVal = fc.showSaveDialog(this);
+               if (returnVal == JFileChooser.APPROVE_OPTION) {
+                  ChartUtilities.saveChartAsPNG(fc.getSelectedFile(), panel.getChart(), 600, 350);
+               }
+            }
+
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+   }
+
+
+   protected void showComponent() {
+
+      if (m_Path != null) {
+         try {
+            final DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+            final ObjectAndDescription oad = (ObjectAndDescription) node.getUserObject();
+            final Component c = (Component) oad.getObject();
+            c.setMinimumSize(new Dimension(300, 200));
+            jSplitPane.setRightComponent(c);
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+
+      }
+
+   }
+
+
+   public void fillTree(final ArrayList components) {
+
+      DefaultMutableTreeNode node;
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Toolbox"));;
+      final DefaultMutableTreeNode componentsNode = new DefaultMutableTreeNode(Sextante.getText("Result"));
+
+      for (int i = 0; i < components.size(); i++) {
+         node = new DefaultMutableTreeNode(components.get(i));
+         componentsNode.add(node);
+      }
+
+      mainNode.add(componentsNode);
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+   }
+
+
+   public void update() {
+
+      if (!initGUI(AdditionalResults.getComponents())) {
+         dispose();
+         setVisible(false);
+      }
+
+   }
+
+
+   private DefaultMutableTreeNode findNode(final ObjectAndDescription oad) {
+
+      Object ob;
+      final DefaultTreeModel data = (DefaultTreeModel) jTree.getModel();
+      final DefaultMutableTreeNode root = (DefaultMutableTreeNode) data.getRoot();
+      DefaultMutableTreeNode node = null;
+
+      if (root != null) {
+         for (final Enumeration e = root.breadthFirstEnumeration(); e.hasMoreElements();) {
+            final DefaultMutableTreeNode current = (DefaultMutableTreeNode) e.nextElement();
+            ob = current.getUserObject();
+            if (ob instanceof ObjectAndDescription) {
+               if (ob == oad) {
+                  node = current;
+                  break;
+               }
+            }
+         }
+      }
+
+      return node;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/additionalResults/AdditionalResultsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerTreeCellRenderer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerTreeCellRenderer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerTreeCellRenderer.java	(revision 369)
@@ -0,0 +1,99 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeCellRenderer;
+
+import es.unex.sextante.core.Sextante;
+
+public class DataExplorerTreeCellRenderer
+         extends
+            JLabel
+         implements
+            TreeCellRenderer {
+
+   private final ImageIcon m_RasterIcon;
+   private final ImageIcon m_VectorIcon;
+   private final ImageIcon m_TableIcon;
+   private final ImageIcon m_LayerIcon;
+
+
+   public DataExplorerTreeCellRenderer() {
+
+      m_RasterIcon = new ImageIcon(getClass().getClassLoader().getResource("images/raster_layer.gif"));
+      m_VectorIcon = new ImageIcon(getClass().getClassLoader().getResource("images/vector_layer.gif"));
+      m_TableIcon = new ImageIcon(getClass().getClassLoader().getResource("images/table_icon.png"));
+      m_LayerIcon = new ImageIcon(getClass().getClassLoader().getResource("images/layers.gif"));
+
+      setOpaque(false);
+      setBackground(null);
+
+   }
+
+
+   public Component getTreeCellRendererComponent(final JTree tree,
+                                                 final Object value,
+                                                 final boolean selected,
+                                                 final boolean expanded,
+                                                 final boolean leaf,
+                                                 final int row,
+                                                 final boolean hasFocus) {
+
+      String sName;
+
+      setFont(tree.getFont());
+      this.setIcon(getCustomIcon(value));
+
+      sName = tree.convertValueToText(value, selected, expanded, leaf, row, hasFocus);
+
+
+      setEnabled(tree.isEnabled());
+      setText(sName);
+
+      if (leaf) {
+         if (selected) {
+            setForeground(Color.blue);
+         }
+         else {
+            setForeground(Color.black);
+         }
+      }
+
+      return this;
+   }
+
+
+   private Icon getCustomIcon(final Object value) {
+
+      final Object obj = ((DefaultMutableTreeNode) value).getUserObject();
+      if (obj instanceof String) {
+         if (obj.equals(Sextante.getText("Raster_layers"))) {
+            return m_RasterIcon;
+         }
+         else if (obj.equals(Sextante.getText("Vector_layers"))) {
+            return m_VectorIcon;
+         }
+         else if (obj.equals(Sextante.getText("Tables"))) {
+            return m_TableIcon;
+         }
+         else if (obj.equals(Sextante.getText("Data"))) {
+            return m_LayerIcon;
+         }
+         else {
+            return null;
+         }
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerTreeCellRenderer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Modify.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Modify.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Modify.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.dataExplorer;
+
+public interface Modify {
+
+   public boolean modify();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Modify.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/TableDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/TableDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/TableDialog.java	(revision 369)
@@ -0,0 +1,58 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JDialog;
+import javax.swing.JScrollPane;
+
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.additionalResults.TableTools;
+import es.unex.sextante.gui.core.SextanteGUI;
+
+public class TableDialog
+         extends
+            JDialog {
+
+   private final IDataObject m_Object;
+
+
+   public TableDialog(final IDataObject dataObject) {
+
+      super(SextanteGUI.getMainFrame(), getDataObjectName(dataObject), true);
+
+      m_Object = dataObject;
+
+      initGUI();
+
+   }
+
+
+   private static String getDataObjectName(final Object dataObject) {
+
+      if (dataObject instanceof ITable) {
+         return ((ITable) dataObject).getName();
+      }
+      else if (dataObject instanceof IVectorLayer) {
+         return ((IVectorLayer) dataObject).getName();
+      }
+      return null;
+
+   }
+
+
+   private void initGUI() {
+
+      final JScrollPane table = TableTools.getScrollableTablePanelFromITable(m_Object);
+
+      getContentPane().add(table, BorderLayout.CENTER);
+
+      pack();
+      this.setSize(623, 330);
+
+      setLocationRelativeTo(null);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/TableDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ShowTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ShowTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ShowTable.java	(revision 369)
@@ -0,0 +1,35 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IDataObject;
+
+public class ShowTable
+         implements
+            Action {
+
+   private final IDataObject m_DataObject;
+
+
+   public ShowTable(final IDataObject obj) {
+
+      m_DataObject = obj;
+
+   }
+
+
+   public boolean execute() {
+
+      final TableDialog dialog = new TableDialog(m_DataObject);
+      dialog.setVisible(true);
+
+      return false;
+
+   }
+
+
+   public String getDescription() {
+
+      return Sextante.getText("Show_table");
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ShowTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/BandTreeNode.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/BandTreeNode.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/BandTreeNode.java	(revision 369)
@@ -0,0 +1,40 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+public class BandTreeNode
+         extends
+            DefaultMutableTreeNode {
+
+   private final int          m_iBand;
+   private final IRasterLayer m_Layer;
+
+
+   public BandTreeNode(final Object obj,
+                       final IRasterLayer layer,
+                       final int iBand) {
+
+      super(obj);
+
+      m_Layer = layer;
+      m_iBand = iBand;
+
+   }
+
+
+   public int getBand() {
+
+      return m_iBand;
+
+   }
+
+
+   public IRasterLayer getLayer() {
+
+      return m_Layer;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/BandTreeNode.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerDialog.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerDialog.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerDialog.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+
+import javax.swing.JDialog;
+
+import es.unex.sextante.core.Sextante;
+
+public class DataExplorerDialog
+         extends
+            JDialog {
+
+   private DataExplorerPanel m_DataExplorerPanel;
+
+
+   public DataExplorerDialog(final Frame parent) {
+
+      super(parent, Sextante.getText("Data"), true);
+
+      this.setResizable(true);
+
+      init();
+      setLocationRelativeTo(null);
+
+   }
+
+
+   private void init() {
+
+      this.setPreferredSize(new java.awt.Dimension(350, 380));
+      this.setSize(new java.awt.Dimension(350, 380));
+
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+
+      m_DataExplorerPanel = new DataExplorerPanel();
+      this.add(m_DataExplorerPanel, BorderLayout.CENTER);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerPanel.java	(revision 369)
@@ -0,0 +1,234 @@
+
+
+package es.unex.sextante.gui.dataExplorer;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeExpansionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.AbstractInputFactory;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.toolbox.TransparentScrollPane;
+
+
+public class DataExplorerPanel
+         extends
+            JPanel {
+
+   private static final String[] DATA_TYPE = { "BYTE", "", "SHORT", "INT", "FLOAT", "DOUBLE" };
+
+   private static final String[] TYPE_NAME = { "POINT", "LINE", "POLYGON" };
+
+   private JTree                 jTree;
+   private JScrollPane           jScrollPane;
+
+   private JMenuItem             menuItem;
+   private JPopupMenu            popupMenu;
+   private TreePath              m_Path;
+   private Action                m_Action;
+
+
+   public DataExplorerPanel() {
+
+      super();
+
+      init();
+
+   }
+
+
+   private void init() {
+
+      this.setPreferredSize(new java.awt.Dimension(350, 380));
+      this.setSize(new java.awt.Dimension(350, 380));
+
+      final BorderLayout thisLayout = new BorderLayout();
+      this.setLayout(thisLayout);
+
+      jTree = new JTree();
+      jTree.setOpaque(false);
+      jTree.setCellRenderer(new DataExplorerTreeCellRenderer());
+      final MouseListener ml = new MouseAdapter() {
+         @Override
+         public void mousePressed(MouseEvent e) {
+            m_Path = jTree.getPathForLocation(e.getX(), e.getY());
+            if (m_Path != null) {
+               try {
+                  DefaultMutableTreeNode node = (DefaultMutableTreeNode) m_Path.getLastPathComponent();
+                  ObjectAndDescription oad = ((ObjectAndDescription) node.getUserObject());
+                  m_Action = (Action) oad.getObject();
+                  if (e.getButton() == MouseEvent.BUTTON3) {
+                     showPopupMenu(e);
+                  }
+               }
+               catch (Exception ex) {
+                  //ex.printStackTrace();
+               }
+            }
+         }
+      };
+      jTree.addMouseListener(ml);
+
+      final TreeExpansionListener tel = new TreeExpansionListener() {
+         public void treeCollapsed(TreeExpansionEvent e) {
+         }
+
+
+         public void treeExpanded(TreeExpansionEvent e) {
+            m_Path = e.getPath();
+            Object obj = m_Path.getLastPathComponent();
+            if (obj instanceof BandTreeNode) {
+               BandTreeNode bandNode = (BandTreeNode) obj;
+               if (bandNode.getChildCount() == 1) {
+                  IRasterLayer rasterLayer = bandNode.getLayer();
+                  int iBand = bandNode.getBand();
+                  bandNode.removeAllChildren();
+                  rasterLayer.open();
+                  bandNode.add(new DefaultMutableTreeNode("AVG:" + Double.toString(rasterLayer.getMeanValue(iBand))));
+                  bandNode.add(new DefaultMutableTreeNode("MIN:" + Double.toString(rasterLayer.getMinValue(iBand))));
+                  bandNode.add(new DefaultMutableTreeNode("MAX:" + Double.toString(rasterLayer.getMaxValue(iBand))));
+                  bandNode.add(new DefaultMutableTreeNode("VAR:" + Double.toString(rasterLayer.getVariance(iBand))));
+                  rasterLayer.close();
+                  ((DefaultTreeModel) jTree.getModel()).reload(bandNode);
+                  jTree.repaint();
+               }
+            }
+         }
+      };
+      jTree.addTreeExpansionListener(tel);
+
+      fillTree();
+
+      jScrollPane = new TransparentScrollPane(jTree);
+      jScrollPane.setSize(new java.awt.Dimension(350, 380));
+      this.add(jScrollPane, BorderLayout.CENTER);
+
+   }
+
+
+   private void fillTree() {
+
+      final DefaultMutableTreeNode mainNode = new DefaultMutableTreeNode(Sextante.getText("Data"));
+
+      final DefaultMutableTreeNode rasterLayersNode = new DefaultMutableTreeNode(Sextante.getText("Raster_layers"));
+      mainNode.add(rasterLayersNode);
+
+      final IRasterLayer[] rasterLayers = SextanteGUI.getInputFactory().getRasterLayers();
+      for (int i = 0; i < rasterLayers.length; i++) {
+         final IRasterLayer rasterLayer = rasterLayers[i];
+         rasterLayer.open();
+         final DefaultMutableTreeNode rasterLayerNode = new DefaultMutableTreeNode(rasterLayer.getName());
+
+         rasterLayerNode.add(new DefaultMutableTreeNode(
+                  /*new ObjectAndDescription(*/"NODATA:" + Double.toString(rasterLayer.getNoDataValue())/*,
+                                    new ModifyNoDataValue(rasterLayer))*/));
+         final AnalysisExtent ge = rasterLayer.getLayerGridExtent();
+         rasterLayerNode.add(new DefaultMutableTreeNode("X:" + Double.toString(ge.getXMin()) + "-"
+                                                        + Double.toString(ge.getXMax())));
+         rasterLayerNode.add(new DefaultMutableTreeNode("Y:" + Double.toString(ge.getYMin()) + "-"
+                                                        + Double.toString(ge.getYMax())));
+         rasterLayerNode.add(new DefaultMutableTreeNode("NX:" + Integer.toString(ge.getNX()) + " | NY:"
+                                                        + Integer.toString(ge.getNY())));
+         rasterLayerNode.add(new DefaultMutableTreeNode("DATA_TYPE: " + DATA_TYPE[rasterLayer.getDataType()]));
+         final DefaultMutableTreeNode bandsNode = new DefaultMutableTreeNode("BANDS:"
+                                                                             + Integer.toString(rasterLayer.getBandsCount()));
+         rasterLayerNode.add(bandsNode);
+         for (int j = 0; j < rasterLayer.getBandsCount(); j++) {
+            final DefaultMutableTreeNode bandNode = new BandTreeNode("Band " + Integer.toString(j + 1), rasterLayer, j);
+            bandNode.add(new DefaultMutableTreeNode(Sextante.getText("Calculando") + "..."));
+            bandsNode.add(bandNode);
+         }
+         rasterLayersNode.add(rasterLayerNode);
+         rasterLayer.close();
+      }
+
+      final DefaultMutableTreeNode vectorLayersNode = new DefaultMutableTreeNode(Sextante.getText("Vector_layers"));
+      mainNode.add(vectorLayersNode);
+
+      final IVectorLayer[] vectorLayers = SextanteGUI.getInputFactory().getVectorLayers(AbstractInputFactory.SHAPE_TYPE_ANY);
+      for (int i = 0; i < vectorLayers.length; i++) {
+         final IVectorLayer vectorLayer = vectorLayers[i];
+         final DefaultMutableTreeNode vectorLayerNode = new DefaultMutableTreeNode(new ObjectAndDescription(
+                  vectorLayer.getName(), new ShowTable(vectorLayer)));
+         vectorLayerNode.add(new DefaultMutableTreeNode(Sextante.getText("Number_of_features") + ":"
+                                                        + vectorLayer.getShapesCount()));
+         vectorLayerNode.add(new DefaultMutableTreeNode(Sextante.getText("Type") + ":" + TYPE_NAME[vectorLayer.getShapeType()]));
+         final DefaultMutableTreeNode fieldsNode = new DefaultMutableTreeNode(Sextante.getText("fields") + ":"
+                                                                              + vectorLayer.getFieldCount());
+         for (int j = 0; j < vectorLayer.getFieldCount(); j++) {
+            fieldsNode.add(new DefaultMutableTreeNode(vectorLayer.getFieldName(j) + ":"
+                                                      + vectorLayer.getFieldType(j).getSimpleName()));
+         }
+         vectorLayerNode.add(fieldsNode);
+         vectorLayersNode.add(vectorLayerNode);
+
+      }
+
+      final DefaultMutableTreeNode tablesNode = new DefaultMutableTreeNode(Sextante.getText("Tables"));
+      mainNode.add(tablesNode);
+
+      final ITable[] tables = SextanteGUI.getInputFactory().getTables();
+      for (int i = 0; i < tables.length; i++) {
+         final ITable table = tables[i];
+         final DefaultMutableTreeNode tableNode = new DefaultMutableTreeNode(new ObjectAndDescription(table.getName(),
+                  new ShowTable(table)));
+         tableNode.add(new DefaultMutableTreeNode(Sextante.getText("Number_of_records") + ":" + table.getRecordCount()));
+         final DefaultMutableTreeNode fieldsNode = new DefaultMutableTreeNode(Sextante.getText("fields") + ":"
+                                                                              + table.getFieldCount());
+         for (int j = 0; j < table.getFieldCount(); j++) {
+            fieldsNode.add(new DefaultMutableTreeNode(table.getFieldName(j) + ":" + table.getFieldType(j).getSimpleName()));
+         }
+         tableNode.add(fieldsNode);
+         tablesNode.add(tableNode);
+      }
+
+      jTree.setModel(new DefaultTreeModel(mainNode));
+
+   }
+
+
+   protected void showPopupMenu(final MouseEvent e) {
+
+      jTree.setSelectionPath(m_Path);
+      popupMenu = new JPopupMenu("Menu");
+      menuItem = new JMenuItem(m_Action.getDescription());
+      menuItem.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            if (m_Action.execute()) {
+               fillTree();
+            }
+         }
+      });
+      popupMenu.add(menuItem);
+      popupMenu.show(e.getComponent(), e.getX(), e.getY());
+
+   }
+
+
+   public void update() {
+
+      fillTree();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/DataExplorerPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ModifyNoDataValue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ModifyNoDataValue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ModifyNoDataValue.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gui.dataExplorer;
+
+import javax.swing.JOptionPane;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+public class ModifyNoDataValue
+         implements
+            Action {
+
+   private final IRasterLayer m_Layer;
+
+
+   public ModifyNoDataValue(final IRasterLayer layer) {
+
+      m_Layer = layer;
+
+   }
+
+
+   public boolean execute() {
+
+      final String sValue = (String) JOptionPane.showInputDialog(null, "NoData", "NoData", JOptionPane.PLAIN_MESSAGE, null, null,
+               Double.toString(m_Layer.getNoDataValue()));
+      if (sValue != null) {
+         try {
+            final double dValue = Double.parseDouble(sValue);
+            m_Layer.setNoDataValue(dValue);
+            return true;
+         }
+         catch (final NumberFormatException e) {}
+      }
+
+      return false;
+
+   }
+
+
+   public String getDescription() {
+
+      return Sextante.getText("Modify");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/ModifyNoDataValue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Action.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Action.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Action.java	(revision 369)
@@ -0,0 +1,10 @@
+package es.unex.sextante.gui.dataExplorer;
+
+public interface Action {
+
+   public boolean execute();
+
+
+   public String getDescription();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/dataExplorer/Action.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaUtils.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaUtils.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaUtils.java	(revision 369)
@@ -0,0 +1,345 @@
+package es.unex.sextante.gui.saga;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.settings.SextanteSagaSettings;
+
+
+public class SagaUtils {
+
+
+   public static final String   SAGACMD_USE_START_PARAMETER = "SAGACMD_USE_START_PARAMETER";
+
+   private static SagaAlgorithm m_Alg;
+   private static StringBuffer  m_sMessages;
+
+
+   public static int installSaga() throws SagaExecutionException {
+
+      deleteDescriptionFiles();
+      createLibrariesListFile();
+      createLibrariesDescriptionFiles();
+      return createAlgorithmsDescriptionFiles();
+
+   }
+
+
+   public static void deleteDescriptionFiles() {
+
+      final File file = new File(getSagaDescriptionFolder());
+      final String[] files = file.list();
+
+      if (files != null) {
+         for (final String element : files) {
+            new File(file.getAbsoluteFile() + File.separator + element).delete();
+         }
+      }
+
+   }
+
+
+   public static void createLibrariesListFile() throws SagaExecutionException {
+
+
+      final String[] sCommands = new String[] { " > " + getSagaDescriptionFolder() + File.separator + "sagalibs.txt" };
+      createSagaBatchJobFileFromSagaCommands(sCommands);
+      executeSaga(null);
+
+   }
+
+
+   private static void createLibrariesDescriptionFiles() throws SagaExecutionException {
+
+
+      final ArrayList<String> commands = new ArrayList<String>();
+
+      final String sFile = getSagaDescriptionFolder() + File.separator + "sagalibs.txt";
+      BufferedReader input = null;
+      try {
+         input = new BufferedReader(new FileReader(sFile));
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            if (sLine.startsWith("-")) {
+               final String sLibraryName = sLine.substring(1, sLine.lastIndexOf(".")).trim();
+               commands.add(sLibraryName + " > " + getSagaDescriptionFolder() + File.separator + "lib_" + sLibraryName + ".txt");
+            }
+         }
+         input.close();
+         createSagaBatchJobFileFromSagaCommands(commands.toArray(new String[0]));
+         executeSaga(null);
+      }
+      catch (final Exception e) {
+         throw new SagaExecutionException();
+      }
+
+   }
+
+
+   private static int createAlgorithmsDescriptionFiles() throws SagaExecutionException {
+
+      int iAlg = 0;
+      final ArrayList<String> commands = new ArrayList<String>();
+
+      File file = new File(getSagaDescriptionFolder());
+      final String[] files = file.list();
+
+      if (files != null) {
+         for (final String sFilename : files) {
+            if (sFilename.startsWith("lib")) {
+               int iAlgsInLibrary = 0;
+               final String sLibraryName = sFilename.substring(4, sFilename.length() - 4);
+               file = new File(getSagaDescriptionFolder() + File.separator + sFilename);
+               BufferedReader input = null;
+               try {
+                  input = new BufferedReader(new FileReader(file.getAbsolutePath()));
+                  String sLine = null;
+                  while ((sLine = input.readLine()) != null) {
+                     final String[] sTokens = sLine.split("\t");
+                     if (sTokens.length > 0) {
+                        if (isNumber(sTokens[0].trim())) {
+                           commands.add(sLibraryName + " " + Integer.toString(iAlgsInLibrary) + " >" + getSagaDescriptionFolder()
+                                        + File.separator + "alg_" + sLibraryName + "_" + Integer.toString(iAlg) + ".txt 2>&1");
+                           iAlgsInLibrary++;
+                           iAlg++;
+
+                        }
+                     }
+                  }
+                  input.close();
+               }
+               catch (final Exception e) {
+                  throw new SagaExecutionException();
+               }
+            }
+         }
+      }
+
+      if (commands.size() != 0) {
+         createSagaBatchJobFileFromSagaCommands(commands.toArray(new String[0]));
+         executeSaga(null);
+      }
+
+      return iAlg;
+
+   }
+
+
+   private static boolean isNumber(final String s) {
+
+      try {
+         Integer.parseInt(s);
+         return true;
+      }
+      catch (final NumberFormatException e) {
+         return false;
+      }
+
+   }
+
+
+   public static String getSagaDescriptionFolder() {
+
+
+      final String sPath = SextanteGUI.getSextanteInstallPath() + File.separator + "saga" + File.separator + "description";
+
+      final File file = new File(sPath);
+      if (!file.exists()) {
+         file.mkdir();
+      }
+
+      return sPath;
+
+   }
+
+
+   public static String getBatchJobFilename() {
+
+      String sFile;
+
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         sFile = "saga_batch_job.sh";
+      }
+      else {//Windows
+         sFile = "saga_batch_job.bat";
+      }
+
+      sFile = SextanteGUI.getUserFolder() + File.separator + sFile;
+
+      return sFile;
+
+   }
+
+
+   public static void createSagaBatchJobFileFromSagaCommands(final String[] sCommands) {
+
+      final String sFilename = getBatchJobFilename();
+      final String sSagaFolder = SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_FOLDER);
+      try {
+         final BufferedWriter output = new BufferedWriter(new FileWriter(sFilename));
+         if (Sextante.isWindows()) {
+            output.write("set SAGA=" + sSagaFolder + "\n");
+            output.write("set SAGA_MLB=" + sSagaFolder + File.separator + "modules" + "\n");
+            output.write("PATH=PATH;%SAGA%;%SAGA_MLB%\n");
+         }
+         else {
+            //output.write("!#/bin/sh\n");
+            output.write("export SAGA_MLB=" + sSagaFolder + File.separator + "modules" + "\n");
+            output.write("PATH=$PATH:" + sSagaFolder + File.separator + "modules" + "\n");
+            output.write("export PATH");
+         }
+
+         final String value = SextanteGUI.getSettingParameterValue(SAGACMD_USE_START_PARAMETER);
+         boolean b = false;
+         if (value != null) {
+            b = Boolean.parseBoolean(value);
+         }
+         for (int i = 0; i < sCommands.length; i++) {
+            if (b) {
+               output.write("saga_cmd " + sCommands[i] + "> dummy.txt \n");
+            }
+            else {
+               output.write("saga_cmd " + sCommands[i] + "\n");
+            }
+         }
+         output.write("exit");
+         output.close();
+      }
+      catch (final IOException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+
+   }
+
+
+   public static int executeSaga(final SagaAlgorithm alg) throws SagaExecutionException {
+
+
+      m_Alg = alg;
+      final List<String> list = new ArrayList<String>();
+      ProcessBuilder pb;
+      pb = new ProcessBuilder(list);
+      if (Sextante.isUnix() || Sextante.isMacOSX()) {
+         setExecutable(getBatchJobFilename());
+         list.add(getBatchJobFilename());
+      }
+      else { //windows
+         list.add("cmd.exe");
+         list.add("/C");
+         //list.add("start");
+         final String value = SextanteGUI.getSettingParameterValue(SAGACMD_USE_START_PARAMETER);
+         if (value != null) {
+            final boolean b = Boolean.parseBoolean(value);
+            if (b) {
+               //list.add("start");
+            }
+         }
+         list.add(getBatchJobFilename());
+      }
+
+      m_sMessages = new StringBuffer();
+
+      Process process;
+      try {
+         process = pb.start();
+         final StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());
+         final StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream());
+         errorGobbler.start();
+         outputGobbler.start();
+         final int iReturn = process.waitFor();
+         SagaAlgorithmProvider.addMessage(m_sMessages.toString(), "SAGA execution");
+         return iReturn;
+      }
+      catch (final Exception e) {
+         throw new SagaExecutionException();
+      }
+
+
+   }
+
+
+   public static void setExecutable(final String pathname) throws SagaExecutionException {
+
+      final String version = System.getProperty("java.version").substring(0, 3);
+      final Float f = Float.valueOf(version);
+      if (f.floatValue() < (float) 1.6) {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            try {
+               Runtime.getRuntime().exec("chmod +x " + pathname);
+            }
+            catch (final IOException e) {
+               throw new SagaExecutionException();
+            }
+         }
+      }
+      else {
+         if (Sextante.isUnix() || Sextante.isMacOSX()) {
+            new File(pathname).setExecutable(true);
+         }
+      }
+   }
+
+
+   public static void processLine(String line) {
+
+      if (m_Alg == null) {
+         return;
+      }
+
+      line = line.replace("%", "").trim();
+      try {
+         final int i = Integer.parseInt(line);
+         m_Alg.updateProgress(i, 100);
+      }
+      catch (final Exception e) {
+         //System.out.println(line);
+         m_sMessages.append(line + "\n");
+
+      }
+
+   }
+
+}
+
+
+class StreamGobbler
+         extends
+            Thread {
+
+   InputStream is;
+   String      type;
+
+
+   StreamGobbler(final InputStream is) {
+
+      this.is = is;
+
+   }
+
+
+   @Override
+   public void run() {
+      try {
+         final InputStreamReader isr = new InputStreamReader(is);
+         final BufferedReader br = new BufferedReader(isr);
+         String line = null;
+         while ((line = br.readLine()) != null) {
+            SagaUtils.processLine(line);
+         }
+      }
+      catch (final IOException ioe) {
+
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithmProvider.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithmProvider.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithmProvider.java	(revision 369)
@@ -0,0 +1,189 @@
+package es.unex.sextante.gui.saga;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.core.IAlgorithmProvider;
+import es.unex.sextante.gui.core.IToolboxRightButtonAction;
+import es.unex.sextante.gui.core.NameAndIcon;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+import es.unex.sextante.gui.grass.GrassAlgorithmProvider;
+import es.unex.sextante.gui.settings.Setting;
+import es.unex.sextante.gui.settings.SextanteGrassSettings;
+import es.unex.sextante.gui.settings.SextanteSagaSettings;
+
+public class SagaAlgorithmProvider
+         implements
+            IAlgorithmProvider {
+
+   private final static ImageIcon              SAGA_ICON = new ImageIcon(
+                                                                  GrassAlgorithmProvider.class.getClassLoader().getResource(
+                                                                           "images/saga.png"));
+
+   private final HashMap<String, GeoAlgorithm> m_Algs    = new HashMap<String, GeoAlgorithm>();
+
+
+   public boolean canEditHelp() {
+
+      return false;
+
+   }
+
+
+   public String getAlgorithmHelp(final GeoAlgorithm alg) {
+
+      return "";
+
+   }
+
+
+   public String getAlgorithmHelpFilename(final GeoAlgorithm alg,
+                                          final boolean forceCurrentLocale) {
+
+      return null;
+
+   }
+
+
+   public HashMap<String, GeoAlgorithm> getAlgorithms() {
+
+      if (Boolean.parseBoolean(SextanteGUI.getSettingParameterValue(SextanteSagaSettings.SAGA_ACTIVATE))) {
+         return m_Algs;
+      }
+      else {
+         return new HashMap<String, GeoAlgorithm>();
+      }
+
+   }
+
+
+   public HashMap<String, Class> getCustomModelerParameterPanels() {
+
+      return new HashMap<String, Class>();
+   }
+
+
+   public HashMap<String, Class> getCustomParameterPanels() {
+
+      return new HashMap<String, Class>();
+
+   }
+
+
+   public ImageIcon getIcon() {
+
+      return SAGA_ICON;
+
+   }
+
+
+   public String getName() {
+
+      return "SAGA";
+
+   }
+
+
+   public Setting getSettings() {
+
+      return new SextanteSagaSettings();
+
+   }
+
+
+   public void initialize() {
+
+      loadSagaAlgorithmsFromDescriptions();
+
+   }
+
+
+   private void loadSagaAlgorithmsFromDescriptions() {
+
+      m_Algs.clear();
+
+      if ( SagaUtils.getSagaDescriptionFolder() == null ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_ACTIVATE, new Boolean(false).toString());    	  
+    	  return;
+      }
+      
+      if ( SagaUtils.getSagaDescriptionFolder().length() < 1 ) {
+    	  SextanteGUI.setSettingParameterValue(SextanteSagaSettings.SAGA_ACTIVATE, new Boolean(false).toString());  
+    	  return;
+      }      
+      
+      try {
+         final File file = new File(SagaUtils.getSagaDescriptionFolder());
+         final String[] files = file.list();
+         if (files != null) {
+            for (final String element : files) {
+               if (element.startsWith("alg")) {
+                  final SagaAlgorithm alg = createAlgorithm(SagaUtils.getSagaDescriptionFolder() + File.separator + element);
+                  if ((alg != null)) {
+                     m_Algs.put(alg.getCommandLineName(), alg);
+                  }
+               }
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private SagaAlgorithm createAlgorithm(final String sFile) {
+
+      final SagaAlgorithm alg = new SagaAlgorithm();
+      try {
+         alg.initialize(sFile);
+         if (alg.getName() != null) {//a quick way to check that everything went ok
+            return alg;
+         }
+         else {
+            return null;
+         }
+      }
+      catch (final UnwrappableSagaAlgorithmException e) {
+         return null;
+      }
+
+   }
+
+
+   public void update() {
+
+      initialize();
+
+   }
+
+
+   public HashMap<NameAndIcon, ArrayList<ToolboxAction>> getToolboxActions() {
+
+      return new HashMap<NameAndIcon, ArrayList<ToolboxAction>>();
+
+   }
+
+
+   public IToolboxRightButtonAction[] getToolboxRightButtonActions() {
+
+      return new IToolboxRightButtonAction[0];
+
+   }
+
+
+   public static void addMessage(final String sMessage,
+                                 final String sDescription) {
+
+      Sextante.getLogger().addToLog(sMessage, "SAGA", sDescription);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithmProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaExecutionException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaExecutionException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaExecutionException.java	(revision 369)
@@ -0,0 +1,22 @@
+package es.unex.sextante.gui.saga;
+
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+
+public class SagaExecutionException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public SagaExecutionException(final String sMessage) {
+
+      super(sMessage);
+
+   }
+
+
+   public SagaExecutionException() {
+
+      super("Saga Execution Exception");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaExecutionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithm.java	(revision 369)
@@ -0,0 +1,535 @@
+
+
+package es.unex.sextante.gui.saga;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.NullOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+public class SagaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private String                  m_sDescriptionFile;
+   private int                     m_iExportedLayers;
+   private HashMap<String, String> m_ExportedLayers;
+   private String                  m_sLibraryName;
+
+
+   public void initialize(final String sDescriptionFile) throws UnwrappableSagaAlgorithmException {
+
+      m_sDescriptionFile = sDescriptionFile;
+
+      setIsDeterminatedProcess(true);
+      setUserCanDefineAnalysisExtent(false);
+      defineCharacteristicsFromDescriptionFile();
+
+   }
+
+
+   private void defineCharacteristicsFromDescriptionFile() throws UnwrappableSagaAlgorithmException {
+
+
+      try {
+         String sLastParentParameterName = null;
+         final BufferedReader input = new BufferedReader(new FileReader(m_sDescriptionFile));
+         String sLine = input.readLine().trim();
+         while (sLine != null) {
+            sLine = sLine.trim();
+            boolean bReadLine = true;
+            if (sLine.startsWith("library name")) {
+               m_sLibraryName = sLine.split("\t")[1];
+               setGroup(SagaLibraryNames.getDecoratedLibraryName(m_sLibraryName));
+
+            }
+            if (sLine.startsWith("module name")) {
+               setName(sLine.split("\t")[1]);
+            }
+            if (sLine.contains("Olaya")) { //exclude my own algorithms. They are all in SEXTANTE and have been improved and further tested
+               throw new UnwrappableSagaAlgorithmException();
+            }
+            if (sLine.startsWith("-")) {
+               String sName, sDescription;
+               try {
+                  sName = sLine.substring(1, sLine.indexOf(":"));
+                  sDescription = sLine.substring(sLine.indexOf(">") + 1).trim();
+               }
+               catch (final Exception e) {//for some reason boolean params have a different syntax
+                  sName = sLine.substring(1, sLine.indexOf("\t"));
+                  sDescription = sLine.substring(sLine.indexOf("\t") + 1).trim();
+               }
+               if (SagaBlackList.isInBlackList(sName, getGroup())) {
+                  throw new UnwrappableSagaAlgorithmException();
+               }
+               sLine = input.readLine();
+               if (sLine.contains("Data object") && sLine.contains("File")) {
+                  throw new UnwrappableSagaAlgorithmException();
+               }
+               if (sLine.contains("Table")) {
+                  if (sLine.contains("input")) {
+                     m_Parameters.addInputTable(sName, sDescription, !sLine.contains("optional"));
+                     sLastParentParameterName = sName;
+                  }
+                  else if (sLine.contains("Static")) {
+                     sLine = input.readLine().trim();
+                     final String sNumber = sLine.split(" ")[0];
+                     final int iNumber = Integer.parseInt(sNumber);
+                     final String[] sColNames = new String[iNumber];
+                     for (int i = 0; i < sColNames.length; i++) {
+                        sLine = input.readLine();
+                        sColNames[i] = sLine.split("]")[1];
+                     }
+                     //can't get info about rows from description
+                     m_Parameters.addFixedTable(sName, sDescription, sColNames, 3, false);
+                  }
+                  else if (sLine.contains("field")) {
+                     if (sLastParentParameterName == null) {
+                        throw new UnwrappableSagaAlgorithmException();
+                     }
+                     m_Parameters.addTableField(sName, sDescription, sLastParentParameterName);
+                  }
+                  else {
+                     addOutputTable(sName, sDescription);
+                  }
+               }
+               if (sLine.contains("Grid")) {
+                  if (sLine.contains("input")) {
+                     if (sLine.contains("list")) {
+                        m_Parameters.addMultipleInput(sName, sDescription, AdditionalInfoMultipleInput.DATA_TYPE_RASTER,
+                                 !sLine.contains("optional"));
+                     }
+                     else {
+                        m_Parameters.addInputRasterLayer(sName, sDescription, !sLine.contains("optional"));
+                     }
+                  }
+                  else {
+                     addOutputRasterLayer(sName, sDescription);
+                  }
+               }
+               else if (sLine.contains("Shapes")) {
+                  if (sLine.contains("input")) {
+                     if (sLine.contains("list")) {
+                        m_Parameters.addMultipleInput(sName, sDescription, AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY,
+                                 !sLine.contains("optional"));
+                     }
+                     else {
+                        m_Parameters.addInputVectorLayer(sName, sDescription, AdditionalInfoVectorLayer.SHAPE_TYPE_ANY,
+                                 !sLine.contains("optional"));
+                        sLastParentParameterName = sName;
+                     }
+                  }
+                  else {
+                     addOutputVectorLayer(sName, sDescription, OutputVectorLayer.SHAPE_TYPE_UNDEFINED);
+                  }
+               }
+               else if (sLine.contains("Floating")) {
+                  m_Parameters.addNumericalValue(sName, sDescription, 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+               }
+               else if (sLine.contains("Integer")) {
+                  m_Parameters.addNumericalValue(sName, sDescription, 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER);
+               }
+               else if (sLine.contains("Boolean")) {
+                  m_Parameters.addBoolean(sName, sDescription, true);
+               }
+               else if (sLine.contains("Text")) {
+                  m_Parameters.addString(sName, sDescription);
+               }
+               else if (sLine.contains("Choice")) {
+                  input.readLine();
+                  final ArrayList<String> options = new ArrayList<String>();
+                  sLine = input.readLine().trim();
+                  while ((sLine != null) && !(sLine.trim().startsWith("-"))) {
+                     options.add(sLine);
+                     sLine = input.readLine();
+                  }
+                  m_Parameters.addSelection(sName, sDescription, options.toArray(new String[0]));
+                  if (sLine == null) {
+                     break;
+                  }
+                  else {
+                     bReadLine = false;
+                  }
+               }
+            }
+            if (bReadLine) {
+               sLine = input.readLine();
+            }
+         }
+         input.close();
+      }
+      catch (final Exception e) {
+         //SagaAlgorithmProvider.getSagaLogHandler().addMessage(e.getMessage());
+         throw new UnwrappableSagaAlgorithmException();
+      }
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final ArrayList<String> commands = new ArrayList<String>();
+      m_ExportedLayers = new HashMap<String, String>();
+
+      //resolve temporary output files
+      for (int i = 0; i < m_OutputObjects.getOutputDataObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         out.setOutputChannel(this.getOutputChannel(out.getName()));
+      }
+
+      //1: Export rasters to sgrd. only ASC and TIF are supported.
+      //   Vector layers must be in shapefile format and tables in dbf format. We check that.
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         if (param instanceof ParameterRasterLayer) {
+            final ParameterRasterLayer raster = (ParameterRasterLayer) param;
+            final IRasterLayer layer = raster.getParameterValueAsRasterLayer();
+            if (layer == null) {
+               continue;
+            }
+            commands.add(exportRasterLayer(layer));
+         }
+         if (param instanceof ParameterVectorLayer) {
+            final ParameterVectorLayer vector = (ParameterVectorLayer) param;
+            final IVectorLayer layer = vector.getParameterValueAsVectorLayer();
+            if (layer == null) {
+               continue;
+            }
+            final IOutputChannel channel = layer.getOutputChannel();
+            if (channel instanceof FileOutputChannel) {
+               final String sFilename = ((FileOutputChannel) channel).getFilename();
+               if (!sFilename.toLowerCase().endsWith("shp")) {
+                  throw new SagaExecutionException(Sextante.getText("unsupported_file_format"));
+               }
+            }
+            else {
+               throw new SagaExecutionException(Sextante.getText("error_non_file_based_input"));
+            }
+         }
+         if (param instanceof ParameterTable) {
+            final ParameterTable paramTable = (ParameterTable) param;
+            final ITable table = paramTable.getParameterValueAsTable();
+            final IOutputChannel channel = table.getOutputChannel();
+            if (channel instanceof FileOutputChannel) {
+               final String sFilename = ((FileOutputChannel) channel).getFilename();
+               if (!sFilename.toLowerCase().endsWith("dbf")) {
+                  throw new SagaExecutionException(Sextante.getText("unsupported_file_format"));
+               }
+            }
+            else {
+               throw new SagaExecutionException(Sextante.getText("error_non_file_based_input"));
+            }
+         }
+         if (param instanceof ParameterMultipleInput) {
+            final ArrayList list = (ArrayList) param.getParameterValueAsObject();
+            if ((list == null) || (list.size() == 0)) {
+               continue;
+            }
+            final AdditionalInfoMultipleInput aimi = (AdditionalInfoMultipleInput) ((ParameterMultipleInput) param).getParameterAdditionalInfo();
+            if (aimi.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+               for (int j = 0; j < list.size(); j++) {
+                  commands.add(exportRasterLayer((IRasterLayer) list.get(j)));
+               }
+            }
+            else if (aimi.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY) {
+               for (int j = 0; j < list.size(); j++) {
+                  final IVectorLayer layer = (IVectorLayer) list.get(j);
+                  if (layer == null) {
+                     continue;
+                  }
+                  final IOutputChannel channel = layer.getOutputChannel();
+                  if (channel instanceof FileOutputChannel) {
+                     final String sFilename = ((FileOutputChannel) channel).getFilename();
+                     if (!sFilename.toLowerCase().endsWith("shp")) {
+                        throw new SagaExecutionException(Sextante.getText("unsupported_file_format"));
+                     }
+                  }
+                  else {
+                     throw new SagaExecutionException(Sextante.getText("error_non_file_based_input"));
+                  }
+               }
+            }
+         }
+      }
+
+      //2: set parameters and outputs
+      final StringBuffer sCommand = new StringBuffer(m_sLibraryName + " \"" + getName() + "\"");
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         final Object paramObj = param.getParameterValueAsObject();
+         if (param instanceof ParameterRasterLayer) {
+            if (paramObj == null) {
+               continue;
+            }
+            final String sFilename = ((FileOutputChannel) ((IRasterLayer) paramObj).getOutputChannel()).getFilename();
+            sCommand.append(" -" + param.getParameterName() + " " + m_ExportedLayers.get(sFilename));
+         }
+         else if ((param instanceof ParameterVectorLayer) || (param instanceof ParameterTable)) {
+            if (paramObj == null) {
+               continue;
+            }
+            final String sFilename = ((FileOutputChannel) ((IDataObject) paramObj).getOutputChannel()).getFilename();
+            sCommand.append(" -" + param.getParameterName() + " " + sFilename);
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            if (paramObj == null) {
+               continue;
+            }
+            final ArrayList list = (ArrayList) paramObj;
+            if (list.size() == 0) {
+               continue;
+            }
+            sCommand.append(" -" + param.getParameterName() + " ");
+            final AdditionalInfoMultipleInput aimi = (AdditionalInfoMultipleInput) ((ParameterMultipleInput) param).getParameterAdditionalInfo();
+            if (aimi.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+               for (int j = 0; j < list.size(); j++) {
+                  final IDataObject dataObject = (IDataObject) list.get(j);
+                  final String sFilename = ((FileOutputChannel) dataObject.getOutputChannel()).getFilename();
+                  sCommand.append(m_ExportedLayers.get(sFilename));
+                  if (j < list.size() - 1) {
+                     sCommand.append(";");
+                  }
+               }
+            }
+            else {
+               for (int j = 0; j < list.size(); j++) {
+                  final IDataObject dataObject = (IDataObject) list.get(j);
+                  sCommand.append(((FileOutputChannel) dataObject.getOutputChannel()).getFilename());
+                  if (j < list.size() - 1) {
+                     sCommand.append(";");
+                  }
+               }
+            }
+         }
+         else if (param instanceof ParameterSelection) {
+            sCommand.append(" -" + param.getParameterName() + " " + Integer.toString(param.getParameterValueAsInt()));
+         }
+         else if (param instanceof ParameterBoolean) {
+            if (param.getParameterValueAsBoolean()) {
+               sCommand.append(" -" + param.getParameterName());
+            }
+         }
+         else {
+            sCommand.append(" -" + param.getParameterName() + " " + param.getParameterValueAsString());
+         }
+      }
+      for (int i = 0; i < m_OutputObjects.getOutputObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         if (out instanceof OutputRasterLayer) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               String sFilename = foc.getFilename();
+               if (!sFilename.endsWith("asc") && !sFilename.endsWith("tif")) {
+                  sFilename = sFilename + ".tif";
+               }
+               foc.setFilename(sFilename);
+               out.setOutputChannel(foc);
+               sFilename = SextanteGUI.getOutputFactory().getTempFolder() + File.separator + new File(sFilename).getName()
+                           + ".sgrd";
+               sCommand.append(" -" + out.getName() + " " + sFilename);
+            }
+            else if (channel instanceof NullOutputChannel) {
+               final String sFilename = SextanteGUI.getOutputFactory().getTempRasterLayerFilename();
+               sCommand.append(" -" + out.getName() + " " + sFilename + ".sgrd");
+            }
+            else {
+               throw new UnsupportedOutputChannelException();
+            }
+         }
+         else if (out instanceof OutputVectorLayer) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               String sFilename = foc.getFilename();
+               if (!sFilename.endsWith("shp")) {
+                  sFilename = sFilename + ".shp";
+               }
+               foc.setFilename(sFilename);
+               out.setOutputChannel(foc);
+               sCommand.append(" -" + out.getName() + " " + sFilename);
+            }
+            else if (channel instanceof NullOutputChannel) {
+               final String sFilename = SextanteGUI.getOutputFactory().getTempVectorLayerFilename();
+               sCommand.append(" -" + out.getName() + " " + sFilename);
+            }
+            else {
+               throw new UnsupportedOutputChannelException();
+            }
+         }
+         else if (out instanceof OutputTable) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (channel instanceof FileOutputChannel) {
+               final FileOutputChannel foc = (FileOutputChannel) channel;
+               String sFilename = foc.getFilename();
+               if (!sFilename.endsWith("dbf")) {
+                  sFilename = sFilename + ".dbf";
+               }
+               foc.setFilename(sFilename);
+               out.setOutputChannel(foc);
+               sCommand.append(" -" + out.getName() + " " + sFilename);
+            }
+            else if (channel instanceof NullOutputChannel) {
+               final String sFilename = SextanteGUI.getOutputFactory().getTempTableFilename();
+               sCommand.append(" -" + out.getName() + " " + sFilename);
+            }
+            else {
+               throw new UnsupportedOutputChannelException();
+            }
+         }
+
+      }
+
+      commands.add(sCommand.toString());
+
+      //3:Export resulting raster layers
+      for (int i = 0; i < m_OutputObjects.getOutputObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         if (out instanceof OutputRasterLayer) {
+            final IOutputChannel channel = getOutputChannel(out.getName());
+            if (!(channel instanceof FileOutputChannel)) {
+               if (channel instanceof NullOutputChannel) {
+                  continue;
+               }
+               else {
+                  throw new UnsupportedOutputChannelException();
+               }
+            }
+            final FileOutputChannel foc = (FileOutputChannel) channel;
+            String sFilename = foc.getFilename();
+            if (!sFilename.endsWith("asc") && !sFilename.endsWith("tif")) {
+               sFilename = sFilename + ".tif";
+            }
+            final String sFilename2 = SextanteGUI.getOutputFactory().getTempFolder() + File.separator
+                                      + new File(sFilename).getName() + ".sgrd";
+            if (sFilename.endsWith("asc")) {
+               commands.add("io_grid 0 -GRID " + sFilename2 + " -FORMAT 1 -FILE " + sFilename);
+            }
+            else {
+               commands.add("io_gdal 1 -GRIDS " + sFilename2 + " -FORMAT 1 -FILE " + sFilename);
+            }
+         }
+      }
+
+
+      //4 Run SAGA
+
+      SagaUtils.createSagaBatchJobFileFromSagaCommands(commands.toArray(new String[0]));
+      SagaUtils.executeSaga(this);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private String exportRasterLayer(final IRasterLayer layer) throws SagaExecutionException {
+
+      String sFilename;
+      final IOutputChannel channel = layer.getOutputChannel();
+      if (channel instanceof FileOutputChannel) {
+         sFilename = ((FileOutputChannel) channel).getFilename();
+         if (!sFilename.toLowerCase().endsWith("tif") && !sFilename.toLowerCase().endsWith("asc")) {
+            throw new SagaExecutionException(Sextante.getText("unsupported_file_format"));
+         }
+      }
+      else {
+         throw new SagaExecutionException(Sextante.getText("error_non_file_based_input"));
+      }
+      final String sExt = sFilename.substring(sFilename.lastIndexOf(".") + 1);
+      final String sDestFilename = getTempFilename();
+      m_ExportedLayers.put(((FileOutputChannel) channel).getFilename(), sDestFilename);
+      if (sExt.toLowerCase().equals("tif")) {
+         return "io_grid_image 1 -OUT_GRID " + sDestFilename + " -FILE " + sFilename + " -METHOD 0";
+      }
+      else {
+         return "io_grid 1 -GRID " + sDestFilename + " -FILE " + sFilename;
+
+      }
+
+   }
+
+
+   private String getTempFilename() {
+
+      m_iExportedLayers++;
+      final String sPath = SextanteGUI.getOutputFactory().getTempFolder();
+      final String sFilename = sPath + File.separator + Long.toString(Calendar.getInstance().getTimeInMillis())
+                               + Integer.toString(m_iExportedLayers) + ".sgrd";
+
+      return sFilename;
+   }
+
+
+   @Override
+   public String getCommandLineName() {
+
+      final String sName = "saga:" + getName().toLowerCase().replace(" ", "");
+      return sName;
+
+   }
+
+
+   @Override
+   public GeoAlgorithm getNewInstance() throws InstantiationException, IllegalAccessException {
+
+      final SagaAlgorithm alg = this.getClass().newInstance();
+      alg.setOutputObjects(m_OutputObjects.getNewInstance());
+      alg.setName(this.getName());
+      alg.setGroup(this.getGroup());
+      alg.setParameters(m_Parameters.getNewInstance());
+      alg.setIsDeterminatedProcess(true);
+      alg.setUserCanDefineAnalysisExtent(getUserCanDefineAnalysisExtent());
+      alg.m_sDescriptionFile = m_sDescriptionFile;
+      alg.m_sLibraryName = m_sLibraryName;
+
+      return alg;
+
+   }
+
+
+   public void updateProgress(final int iPartial,
+                              final int iTotal) {
+
+      setProgress(iPartial, iTotal);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/UnwrappableSagaAlgorithmException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/UnwrappableSagaAlgorithmException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/UnwrappableSagaAlgorithmException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.gui.saga;
+
+public class UnwrappableSagaAlgorithmException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/UnwrappableSagaAlgorithmException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaBlackList.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaBlackList.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaBlackList.java	(revision 369)
@@ -0,0 +1,24 @@
+
+
+package es.unex.sextante.gui.saga;
+
+public class SagaBlackList {
+
+   public static boolean isInBlackList(final String sName,
+                                       final String sGroup) {
+
+      if (sGroup.equals("Lectures")) {
+         return true;
+      }
+      if (sGroup.equals("pointcloud_viewer")) {
+         return true;
+      }
+      if (sGroup.startsWith("docs")) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaBlackList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaLibraryNames.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaLibraryNames.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaLibraryNames.java	(revision 369)
@@ -0,0 +1,91 @@
+
+
+package es.unex.sextante.gui.saga;
+
+import java.util.HashMap;
+
+
+public class SagaLibraryNames {
+
+   private static HashMap<String, String> map = new HashMap<String, String>();
+
+   static {
+
+      map.put("contrib_a_perego", "Contributions");
+      map.put("docs_html", null);
+      map.put("docs_pdf", null);
+      map.put("geostatistics_grid", "Geostatistics");
+      map.put("geostatistics_kriging", "Kriging");
+      map.put("geostatistics_points", "Geostatistics");
+      map.put("geostatistics_regression", "Geostatistics");
+      map.put("grid_analysis", "Grid - Analysis");
+      map.put("grid_calculus", "Grid - Calculus");
+      map.put("grid_calculus_bsl", "Grid - Calculus");
+      map.put("grid_discretisation", "Grid - Discretisation");
+      map.put("grid_filter", "Grid - Filter");
+      map.put("grid_gridding", "Grid - Gridding");
+      map.put("grid_spline", "Grid - Spline");
+      map.put("grid_tools", "Grid - Tools");
+      map.put("grid_visualisation", "Grid - Visualization");
+      map.put("hacres", "Hacres");
+      map.put("imagery_segmentation", "Imagery - Segmentation");
+      map.put("imagery_classification", "Imagery - Classification");
+      map.put("imagery_rga", "Imagery - RGA");
+      map.put("io_esri_e00", "I/O");
+      map.put("io_gdal", "I/O");
+      map.put("io_gps", "I/O");
+      map.put("io_grid", "I/O");
+      map.put("io_grid_grib2", "I/O");
+      map.put("io_grid_image", "I/O");
+      map.put("io_odbc", "I/O");
+      map.put("io_shapes", "I/O");
+      map.put("io_shapes_dxf", "I/O");
+      map.put("io_shapes_las", "I/O");
+      map.put("io_table", "I/O");
+      map.put("lectures_introduction", "Lectures");
+      map.put("pj_georeference", "Georeferencing");
+      map.put("pj_geotrans", "Projections and Transformations");
+      map.put("pj_proj4", "Projections and Transformations");
+      map.put("pointcloud_tools", "Point clouds");
+      map.put("pointcloud_viewer", null);
+      map.put("recreations_fractals", "Recreations");
+      map.put("recreations_games", "Diversiones");
+      map.put("shapes_grid", "Shapes - Grid");
+      map.put("shapes_lines", "Shapes - Lines");
+      map.put("shapes_points", "Shapes - Points");
+      map.put("shapes_polygons", "Shapes - Polygons");
+      map.put("shapes_tools", "Shapes - Tools");
+      map.put("shapes_transect", "Shapes - Transect");
+      map.put("sim_cellular_automata", "Simulation - CA");
+      map.put("sim_ecosystems_hugget", "Simulation - Ecosystems");
+      map.put("sim_fire_spreading", "Simulation - Fire Spreading");
+      map.put("sim_hydrology", "Simulation - Hydrology");
+      map.put("table_calculus", "Table - Calculus");
+      map.put("table_tools", "Table - Tools");
+      map.put("ta_channels", "Terrain Analysis - Channels");
+      map.put("ta_compound", "Terrain Analysis - Morphometry");
+      map.put("ta_hydrology", "Terrain Analysis - Hydrology");
+      map.put("ta_lighting", "Terrain Analysis - Lighting");
+      map.put("ta_morphometry", "Terrain Analysis - Morphometry");
+      map.put("ta_preprocessor", "Terrain Analysis - Hydrology");
+      map.put("ta_profiles", "Terrain Analysis - Profiles");
+      map.put("tin_tools", "TIN");
+      map.put("vigra", "Vigra");
+
+   }
+
+
+   public static String getDecoratedLibraryName(final String sName) {
+
+      final String s = map.get(sName);
+
+      if (s != null) {
+         return s;
+      }
+      else {
+         return sName;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/saga/SagaLibraryNames.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/org/gvsig/toolbox/gui/ToolboxGUILibrary.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/org/gvsig/toolbox/gui/ToolboxGUILibrary.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/org/gvsig/toolbox/gui/ToolboxGUILibrary.java	(revision 369)
@@ -0,0 +1,92 @@
+package org.gvsig.toolbox.gui;
+
+import java.net.URL;
+import java.util.Locale;
+import javax.swing.ImageIcon;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.Library;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.icontheme.IconTheme;
+
+public class ToolboxGUILibrary extends AbstractLibrary {
+
+	public ToolboxGUILibrary() {
+		super();
+	}
+
+	@Override
+	public void doRegistration() {
+		this.registerAs(ToolboxGUILibrary.class, Library.TYPE.IMPL);
+	}
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+		if (!Messages.hasLocales()) {
+			Messages.addLocale(Locale.getDefault());
+		}
+
+		Messages.addResourceFamily("org.gvsig.toolbox.gui.i18n.text",
+				ToolboxGUILibrary.class.getClassLoader(),
+				ToolboxGUILibrary.class.getClass().getName()); 
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+            IconTheme tm = ToolsSwingLocator.getIconThemeManager().getCurrent();
+            URL r0 = this.getClass().getResource("/images/layertypes/layer-type-point.png");
+            ImageIcon icon0 = new ImageIcon(r0);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-point", icon0, r0);
+            
+            URL r1 = this.getClass().getResource("/images/layertypes/layer-type-line.png");
+            ImageIcon icon1 = new ImageIcon(r1);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-line", icon1, r1);
+            
+            URL r2 = this.getClass().getResource("/images/layertypes/layer-type-polygon.png");
+            ImageIcon icon2 = new ImageIcon(r2);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-polygon", icon2, r2);
+            
+            URL r0s = this.getClass().getResource("/images/layertypes/layer-type-point-sel.png");
+            ImageIcon icon0s = new ImageIcon(r0s);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-point-sel", icon0s, r0s);
+            
+            URL r1s = this.getClass().getResource("/images/layertypes/layer-type-line-sel.png");
+            ImageIcon icon1s = new ImageIcon(r1s);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-line-sel", icon1s, r1s);
+            
+            URL r2s = this.getClass().getResource("/images/layertypes/layer-type-polygon-sel.png");
+            ImageIcon icon2s = new ImageIcon(r2s);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-polygon-sel", icon2s, r2s);
+            
+            URL r0m = this.getClass().getResource("/images/layertypes/layer-type-multipoint.png");
+            ImageIcon icon0m = new ImageIcon(r0m);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multipoint", icon0m, r0m);
+            
+            URL r1m = this.getClass().getResource("/images/layertypes/layer-type-multiline.png");
+            ImageIcon icon1m = new ImageIcon(r1m);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multiline", icon1m, r1m);
+            
+            URL r2m = this.getClass().getResource("/images/layertypes/layer-type-multipolygon.png");
+            ImageIcon icon2m = new ImageIcon(r2m);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multipolygon", icon2m, r2m);
+            
+            URL r0sm = this.getClass().getResource("/images/layertypes/layer-type-multipoint-sel.png");
+            ImageIcon icon0sm = new ImageIcon(r0sm);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multipoint-sel", icon0sm, r0sm);
+            
+            URL r1sm = this.getClass().getResource("/images/layertypes/layer-type-multiline-sel.png");
+            ImageIcon icon1sm = new ImageIcon(r1sm);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multiline-sel", icon1sm, r1sm);
+            
+            URL r2sm = this.getClass().getResource("/images/layertypes/layer-type-multipolygon-sel.png");
+            ImageIcon icon2sm = new ImageIcon(r2sm);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-multipolygon-sel", icon2sm, r2sm);
+            
+            URL ras = this.getClass().getResource("/images/layertypes/layer-type-raster.png");
+            ImageIcon icon2ras = new ImageIcon(ras);
+            tm.registerDefault("Toolbox", "layertypes", "layer-type-raster", icon2ras, ras);
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui/src/main/java/org/gvsig/toolbox/gui/ToolboxGUILibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.gui
___________________________________________________________________
Added: svn:ignore
   + .settings

.project

target

.classpath


Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/trove-0.1.8.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/trove-0.1.8.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/gishur_x.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/gishur_x.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/gishur_core.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/lib/gishur_core.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/MANIFEST.MF
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/MANIFEST.MF	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/MANIFEST.MF	(revision 369)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.7.1
+Created-By: 20.1-b02 (Sun Microsystems Inc.)
+Implementation-Version: 0.7
+Built-Date: 2013-02-23 00:34:19
+

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 369)
@@ -0,0 +1 @@
+org.gvsig.toolbox.algorithm.ToolboxAlgorithmLibrary
\ No newline at end of file
Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text.properties	(revision 369)
@@ -0,0 +1,2362 @@
+3D_Interpolation=Interpolaci�n 3D
+3D_Profile=Perfil 3D
+Profile_line=L�nea del perfil
+3D_Layer_from_function=Capa raster 3D a partir de funci�n
+3DLineFromTable=L�nea 3D a partir de tabla
+Time=Tiempo
+
+Woody_fuel_moisture=Humedad combustible vivo le�oso
+
+Herb_fuel_moisture=Humedad combustible herbaceo
+
+Dead_fuel_moisture_100=Humedad combustible muerto 100
+
+Dead_fuel_moisture_10H=Humedad combustible muerto 10H
+
+Dead_fuel_moisture_1H=Humedad combustible muerto 1H
+
+Wind_direction=Direcci�n del viento
+
+Wind_speed_m-s=Velocidad del viento (m/s)
+
+Ignition_points=Puntos de inicio
+
+Fuel_model=Modelo de combustible
+
+Fire_modeling=Modelizaci�n de incendios
+
+Fire_simulation=Simulaci�n de incendios
+
+Modified_cells=Celdas modificadas
+
+Classification=Clasificaci\u00f3n
+
+Clusters=Agregados
+
+Statistics=Estad\u00edsticas
+
+Number_of_classes=N\u00famero de clases
+
+Bands=Bandas para clasificaci\u00f3n
+
+Raster_layer_analysis=Herramientas de an\u00e1lisis para capas raster
+
+Unsupervised_classification__clustering=Clasificaci\u00f3n no supervisada (clustering)
+
+Angle=\u00c1ngulo
+
+Distance=Distancia
+
+Y=Componente Y
+
+X=Componente X
+
+Cost_distances_and_routes=Costes, distancias y rutas
+
+Cartesian_to_polar=Rectangulares a polares
+
+Closest_points=Punto m\u00e1s cercano
+
+Accumulated_cost=Coste acumulado
+
+K=Factor K
+
+Origin-destination_points=Puntos de origen/destino
+
+Direction_of_maximum_cost_[degrees]=Direcci\u00f3n de m\u00e1ximo coste unitario [grados]
+
+Anisotropic_cost=Coste unitario anisotropico
+
+Isotropic_cost=Coste unitario isotropico
+
+Accumulated_cost__combined=Coste acumulado (combinado)
+
+Type_of_distance=Tipo de distancia
+
+Threshold_for_route_separation=Umbral para diferenciaci\u00f3n de rutas
+
+Unitary_cost=Coste unitario
+
+Accumulated_cost__isotropic=Coste acumulado(isotr\u00f3pico)
+
+Manhattan=Manhattan
+
+Chessboard=Chessboard
+
+Euclidean=Eucl\u00eddea
+
+Maximum_unitary_cost=Coste unitario m\u00e1ximo
+
+Accumulated_cost__anisotropic=Coste acumulado (anisotr\u00f3pico)
+
+Routes=Rutas
+
+Cost=Coste
+
+Routes_and_cost=Rutas y coste
+
+Cost_for_predefined_routes=Coste por rutas predefinidas
+
+Classes=Clases
+
+Calculating_spectral_signatures=Extrayendo firmas espectrales
+
+Name=Nombre
+
+Method=M\u00e9todo
+
+Field_with_class_value=Campo con valor clase
+
+Polygons=Pol\u00edgonos
+
+Supervised_classification=Clasificaci\u00f3n supervisada
+
+Maximum_likelihood=M\u00e1xima similitud
+
+Minimum_distance=Distancia m\u00ednina
+
+Parallelepiped=Paralelep\u00edpedo
+
+[fuzzy]=[fuzzy]
+
+Result=Resultado
+
+Control_point_D=Punto de control D
+
+Control_point_C=Punto de control C
+
+Control_point_B=Punto de control B
+
+Control_point_A=Punto de control A
+
+Member_function=Tipo de funci\u00f3n de miembro
+
+Input_Layer=Capa de entrada
+
+Fuzzy_logic=L\u00f3gica difusa
+
+Fuzzify=Preparar para l\u00f3gica difusa
+
+J-shaped=En forma de J
+
+Sigmoidal=Sigmoidal
+
+Linear=Lineal
+
+Calculating_statistical_values=Extrayendo valores estad\u00edsticos
+
+Calculating_distances=C\u00e1lculando distancias
+
+Suitability=Idoneidad
+
+Cutoff__BIOCLIM=Punto de corte (BIOCLIM)
+
+Presence_points=Puntos de presencia
+
+Predictors=Predictores
+
+Predictive_models=Modelos predictivos
+
+BIOCLIM=BIOCLIM
+
+Mahalanobis_distance=Distancia de Mahalanobis
+
+Distance_to_mean_value=Distancia a la media
+
+ROC_curve=Curva ROC
+
+Profile=Perfil
+
+Presence-abscence_field=Campo de presencia/ausencia
+
+Observed_points=Puntos de datos
+
+OWA_Invalid_weight=OWA Valor inv\u00e1lido en la tabla de pesos
+
+OWA=OWA
+
+Weights=Ponderaci\u00f3n
+
+Layers=Capas
+
+Ordered_Weighted_Averaging__OWA=Ordered Weighted Averaging (OWA)
+
+Cost_variation_factors=Factores de variacion de coste
+
+Cost_for_predefined_routes__anisotropic=Coste por rutas predefinidas (anisotr\u00f3pico)
+
+Factor=Factor
+
+Difference=Desviaci\u00f3n
+
+Modulus=M\u00f3dulo
+
+Layer_2__final=Capa 2 Final
+
+Layer_1__final=Capa 1 Final
+
+Layer_2__init=Capa 2 Inicial
+
+Layer_1__init=Capa 1 Inicial
+
+Change_Vector_Analysis=Change Vector Analysis
+
+Polar_to_Cartesian=Polares a rectangulares
+
+Sum_of_cost_to_all_points=Suma de costes a todos los puntos
+
+Error_reading_table=Error leyendo tabla
+
+Warning_Inconsistent_weighting_values=AVISO los valores de comparaci\u00f3n son inconsistentes
+
+Analytical_Hierarchy_Process_Weights=Jerarqu\u00edas anal\u00edticas. Pesos
+
+Analytical_Hierarchy_Process=Jerarqu\u00edas anal\u00edticas
+
+Error_wrong_number_of_layers=Error Jerarqu\u00edas anal\u00edticas. N\u00famero inv\u00e1lido de capas
+
+Pairwise_comparisons=Comparaciones de pesos dos a dos
+
+Analytical_Hierarchy_Process__AHP=Jerarqu\u00edas anal\u00edsticas (AHP)
+
+area_under_the_curve=\u00c1rea bajo la curva
+
+Chamfer_3-4=Chamfer 3-4Grid_from_function=Grid a partir de f\u00f3rmula
+
+Formula=F\u00f3rmula
+
+Raster_creation_tools=Herramientas para crear nuevas capas raster
+
+Wrong_formula=F\u00f3rmula incorrecta
+
+Layer_from_function=Capa a partir de f\u00f3rmula
+
+Elevation=MDE
+
+Iterations=Iteraciones
+
+Radius_[cells]=Radio [en celdas]
+
+Random_DEM=Generar MDT artificial
+
+Constant_grid=Grid cte
+
+Value=Valor
+
+Volume=Volumen
+
+Calculated_volume=Vol\u00famen calculado
+
+Volumes=Vol\u00famenes
+
+Method=M\u00e9todo
+
+Base_level=Nivel Base
+
+Basic_tools_for_raster_layers=Herramientas b\u00e1sicas para capas raster
+
+Volume_calculation=C\u00e1lculo de vol\u00famenes
+
+Add_volumes_both_over_and_below_base_level=Sumar volumenes a ambos lados
+
+Add_volumes_over_base_level_and_substract_volumes_below_it=Sumar vol\u00famenes por encima y restar vol\u00famenes por debajo
+
+Only_volumes_below_base_level=S\u00f3lo vol\u00famenes por debajo del nivel base
+
+Only_volumes_over_base_level=S\u00f3lo vol\u00famenes por encima del nivel base
+
+Normalized=Normalizado
+
+Layer_to_normalize=Capa a normalizar
+
+Normalize=Normalizar
+
+Standard_deviation=Desviaci\u00f3n t\u00edpica
+
+[normalized]=[normalizado]
+
+Result=Resultado
+
+Layer=Capa
+
+Calculus_tools_for_raster_layer=Herramientas de c\u00e1lculo para capas raster
+
+Probability=Probabilidad
+
+Max_value=Valor m\u00e1ximo
+
+Min_value=Valor m\u00ednimo
+
+Random_grid__uniform=Generar grid aleatorio uniforme
+
+New_layer=Nueva capa
+
+Functions]=Funciones]
+
+ELEMENTS=ELEMENTOS
+
+Constants]=Constantes]
+
+Constants=Constantes
+
+Operators=Operadores
+
+Functions=Funciones
+
+unchecked=sin comprobar
+
+Layers=Capas
+
+from=de
+
+[Save_to_temporary_file]=[Guardar en archivo temporal]
+
+Cell_size_[=Tama\u00f1o celda [
+
+Raster_layers=Capas raster
+
+Raster_calculator=Calculadora de mapas
+
+Syntax_error=La sintaxis de la f\u00f3rmula no es correcta
+
+Total_volume=Vol\u00famen total
+
+Volume_-=volumen negativo
+
+Volume_+=Vol\u00famen positivo
+
+Upper_layer=Capa superior
+
+Lower_layer=Capa inferior
+
+Volumen_between_two_layers=Vol\u00famen entre dos capas
+
+Probability__%=Probabilidad (%)
+
+Random_grid__Bernouilli=Generar grid aleatorio Bernouilli
+
+Mean=Media
+
+Random_grid__normal=Generar grid aleatorio normal
+
+Filter_kernel=Nucleo del filtro (kernel)
+
+User-defined_3_X_3_filter=Filtro 3 X 3 definido por el usuario
+
+[reclassified]=[reclasificado]
+
+Reclassify=Reclasificaci\u00f3n
+
+Class_area_[cells]=\u00c1rea_de_cada_clase_(celdas)
+
+Layer=Capa origen
+
+Reclassify_raster_layers=Reclasificaci\u00f3n de capas raster
+
+Divide_into_n_classes_of_equal_area=Dividir en n clases de igual \u00e1rea
+
+Look-up_table=Tabla de asignaci\u00f3n
+
+Method=Criterio
+
+Layer_to_reclassify=Capa a reclasificar
+
+New_value=Nuevo valor
+
+Max_value=Valor m\u00e1ximo
+
+Min_value=Valor m\u00ednimo
+
+Number_of_classes=N\u00famero de clases
+
+Divide_into_n_classes_of_equal_amplitude=Dividir en n clases de igual amplitud
+
+Metrics=M\u00e9tricas
+
+Modified_Simpson_uniformity_index=\u00cdndice de uniformidad de Simpson modificado
+
+Simpson_uniformity_index=\u00cdndice de uniformidad de Simpson
+
+Shannon_uniformity_index=\u00cdndice de uniformidad de Shannon
+
+Modified_Simpson_index=\u00cdndice de Simpson modificado
+
+Simpson_index=\u00cdndice de Simpson
+
+Shannon_index=\u00cdndice de Shannon
+
+Relative_richness=Riqueza relativa
+
+Patch_Richness_Density=Densidad de riqueza
+
+Richness=Riqueza
+
+Landscape_metrics=M\u00e9tricas del paisaje global
+
+Diversity_metrics=M\u00e9tricas de diversidad
+
+Maximum_number_of_different_classes=N\u00famero m\u00e1ximo de clases distintas
+
+Raster_categories_analysis=Herramientas para capas raster categ\u00f3ricas
+
+Fragstats__diversity_metrics=Fragstats (metricas de diversidad)
+
+Grid_combination=Combinaci\u00f3n de grids
+
+Grid_2=Grid 2
+
+Grid_1=Grid 1
+
+Combine_grids=Combinar grids
+
+Valor_in_grid_2=Valor en grid 2
+
+Valor_in_grid_1=Valor en grid 1
+
+Reclassify_into_ordered_classes=Reclasificar en clases consecutivas
+
+Cross_checking=Chequeo cruzado
+
+Index_of_agreement=\u00cdndices de concordancia entre capas
+
+Kappa_for_class=Kappa de clase
+
+Global_kappa=Kappa global
+
+Cross_classification=Clasificaci\u00f3n cruzada
+
+Cross_checking_Kappa_index=Chequeo cruzado (\u00edndice Kappa)
+
+Tabulate_Area=Tabular �rea
+
+Values_Grid=Grid de Valores
+
+Zones_Grid=Grid de Zonas
+
+Profile=Perfil
+
+Window_size=Tama�o ventana
+
+Lacunarity=Lagunaridad
+
+Largest_window_size=M�ximo tama�o de ventana
+
+Input_Layer=Capa de entrada
+
+Class_statistics_[=Estad\u00edsticas de clases [
+
+Min_area=\u00c1rea m\u00ednima de zona
+
+Max_area=\u00c1rea m\u00e1xima de zona
+
+Variance_of_area=Varianza del \u00c1rea
+
+Mean_area=\u00c1rea media por zona
+
+Number_of_patches=N\u00famero de zonas
+
+total_area_Total=\u00c1rea Total
+
+Class_ID=Identificador de clase
+
+Class_statistics=Estad\u00edsticas de clases
+
+Filtered_layer=Capa filtrada
+
+Min_area_[cells]=\u00c1rea m\u00ednima(celdas)
+
+Filter_clumps=Eliminar agregados por tama\u00f1o
+
+Reclassify_into_disjoint_classes=Reclasificar en clases disjuntas
+
+Largest_patch_index=\u00cdndice de tesela mayor
+
+Landscape_shape_index=\u00cdndice de forma del paisaje
+
+Edge_Density=Densidad de bordes
+
+Total_perimeter=Per\u00edmetro total
+
+Patch_Density=Densidad de teselas
+
+Total_area=\u00c1rea total
+
+Percentage_of_Landscape=Porcentaje del paisaje
+
+Class=Clase
+
+Class_metrics=M\u00e9tricas por clases
+
+Radius_of_gyration=Radio de girado
+
+Perimeter=Per\u00edmetro
+
+Area=\u00c1rea
+
+Patch_metrics=M\u00e9tricas por teselas
+
+area-density-edge_metrics=M\u00e9tricas de \u00e1rea/densidad/borde
+
+Fragstats__area-density-edge_metrics=Fragstats (m\u00e9tricas de \u00e1rea/densidad/borde)
+
+Aggregation_index_[=\u00cdndice de agregaci\u00f3n [
+
+Aggregation_index=\u00cdndice de agregaci\u00f3n
+
+Area[%]=Area[%]
+
+Area_cells=Area(celdas)
+
+Processing_time=Tiempo de procesado
+
+Local_statistics=Estad\u00edsticas de celda para multiples capas raster
+
+Larger_values_count=Conteo mayor que
+
+Mean=Media
+
+Focal_statistics=Estad\u00edsticas por vecindad para una capa raster
+
+Equal_values_count__neighbourhood=Conteo igual a (por vecindad)
+
+Equal_values_count=Conteo igual a
+
+Range__neighbourhood=Rango (por vecindad)
+
+Maximum_value_layer=Capa de m\u00e1ximo valor
+
+Lower_values_count__neighbourhood=Conteo menor que (por vecindad)
+
+Minimum_value_layer=Capa de m\u00ednimo valor
+
+Skewness=Asimetr\u00eda
+
+Pattern_analysis=An\u00e1lisis de patrones
+
+Fragmentation=Fragmentaci\u00f3n
+
+Variance=Varianza
+
+Median__neighbourhood=Mediana (por vecindad)
+
+Range=Rango
+
+Kurtosis__neighbourhood=Kurtosis (por vecindad)
+
+Force_no-data_value=Forzar valor de sin datos
+
+Value=Valor
+
+Radius=Radio
+
+Layer=Capa
+
+Layers=Capas
+
+Cells=Celdas
+
+Minimum=M\u00ednimo
+
+Median=Mediana
+
+Maximum__neighbourhood=M\u00e1ximo (por vecindad)
+
+Diversity=Diversidad
+
+Kurtosis=Kurtosis
+
+Semivariances[=Semivarianzas[
+
+Semivar__Vert=Semivar. Vert
+
+Semivar__Horz=Semivar. Horz
+
+Distance=Distancia
+
+Semivariances=Semivarianzas
+
+Maximum_distance__pixels=Maxima distancia (pixels)
+
+Geostatistics=Geoestad\u00edstica
+
+Semivariances__raster=Semivarianzas (raster)
+
+Mayority=Mayor\u00eda
+
+Mean__neighbourhood=Media (por vecindad)
+
+Variance__neighbourhood=Varianza (por vecindad)
+
+Minimum__neighbourhood=M\u00ednimo (por vecindad)
+
+Lower_values_count=Conteo menor que
+
+Larger_values_count__neighbourhood=Conteo mayor que (por vecindad)
+
+Minority=Minor\u00eda
+
+Mayority__neighbourhood=Mayor\u00eda (por vecindad)
+
+Maximum=M\u00e1ximo
+
+Units=Unidades
+
+Standard_deviation=Desviaci\u00f3n t\u00edpica
+
+Maximum_radius__cells=Radio m\u00e1ximo (celdas)
+
+Radius_of_variance=Radio de varianza
+
+Map_units=Unidades de mapa
+
+Number_of_different_classes=N\u00famero de clases diferentes
+
+Dominance=Dominancia
+
+Minority__neighbourhood=Minor\u00eda (por vecindad)
+
+Skeweness__neighbourhood=Asimetr\u00eda (por vecindad)
+
+Regression_values=Datos del ajuste
+
+Regression=Regresi\u00f3n
+
+Function_type=Tipo de ecuaci\u00f3n
+
+Layer_2=Capa 2
+
+Layer_1=Capa 1
+
+Basic_tools_for_raster_layers=Herramientas b\u00e1sicas para capas raster
+
+Correlation_between_layers=Correlaci\u00f3n entre capas
+
+Best_fit=Mejor ajuste posible
+
+Merged_grids=Uni\u00f3n de grids
+
+Layers_to_be_merged_have_different_number_of_bands=Las capas a combinar tienen distinto n\u00famero de bandas
+
+Interpolation_method=M\u00e9todo de interpolaci\u00f3n
+
+Layers=Capas
+
+Merge_grids=Unir capas
+
+B-spline=B-spline
+
+Cubic_spline=Spline bic\u00fabico
+
+Inverse_distance=Distancia inversa
+
+Bilinear=Bilineal
+
+Nearest_neighbour=Vecino m\u00e1s cercano
+
+[Inverted]=[Invertido]
+
+[mirrored]=[Reflejo vertical]
+
+Result=Resultado
+
+Metodo=M\u00e9todo
+
+Layer=Capa origen
+
+Mirror-flip=Reflejar/invertir
+
+Invert=Invertir
+
+Mirror_vertically=Reflejo vertical
+
+Mirror_horizontally=Reflejo horizontal
+
+Create_grid_bounding_box=Crear pol\u00edgono envolvente de capa raster
+
+Max_values=Valores m\u00e1ximos
+
+Polygons=Pol\u00edgonos
+
+Locate_max_values=Localizar valores m\u00e1ximos
+
+Buffer=Buffer
+
+Absolute=Umbral absoluto
+
+Threshold=Tipo de umbral
+
+Threshold_values=Capa de umbrales
+
+Threshold_parameter=Capa de par\u00e1metro umbral
+
+Buffers=Zonas de influencia [buffers]
+
+Threshold_buffer=Zona de influencia mediante umbral
+
+Relative_to_cell_value=Relativo al valor de celda
+
+Cropped_layer=Capa recortada
+
+Layer_to_crop=Capa a cortar
+
+Crop_grid_with_polygon_layer=Cortar capa raster con capa de pol\u00edgonos
+
+Inverted_mask=M\u00e1scara invertida
+
+Invert_mask=Invertir m\u00e1scara
+
+[density]=[densidad]
+
+Density=Densidad
+
+Search_radius=Radio de b\u00fasqueda
+
+Field=Campo
+
+Vector_layer=Capa vectorial
+
+Rasterization_and_interpolation=Rasterizaci\u00f3n e interpolaci\u00f3n
+
+Histogram=Histograma
+
+Raster_layer=Capa raster
+
+[filled]=[rellenado]
+
+Filled_layer=Capa rellenada
+
+Void_filling_[nearest_neighbour]=Rellenar celdas sin datos (por vecindad)
+
+Statistics=Estad\u00edsticas
+
+No_data_cells=Celdas sin datos
+
+Valid_data_cells=Celdas con valores v\u00e1lidos
+
+Coefficient_of_variation=Coeficiente de variaci\u00f3n
+
+Total_sum=Suma total
+
+Variance=Varianza
+
+Maximum_value=Valor m\u00e1ximo
+
+Minimum_value=Valor m\u00ednimo
+
+Mean_squared_value=Valor cuadr\u00e1tico medio
+
+Mean_value=Valor medio
+
+Basic_statistics=Estad\u00edsticas b\u00e1sicas
+
+Tension_threshold=Umbral de tensi\u00f3n
+
+Void_filling=Rellenar celdas sin datos
+
+[cropped]=[recortado]
+
+Crop_to_valid_data_cells=Ajustar a extensi\u00f3n con datos v\u00e1lidos
+
+[gradient]=[gradiente]
+
+Aspect=Orientaci\u00f3n
+
+Slope=Pendiente
+
+Gradient_lines=L\u00edneas de gradiente
+
+Interval=Intervalo entre celdas analizadas
+
+Maximum_size=Tama\u00f1o m\u00e1ximo
+
+Minimum_size=Tama\u00f1o m\u00ednimo
+
+Density__kernel=Densidad (kernel)
+
+[sorted]=[ordenado]
+
+Sorted_raster_layer=Capa raster ordenada
+
+Sort=Ordenar
+
+[completed]=[completado]
+
+Additional_layer=Capa adicional
+
+Base_layer=Capa base
+
+Complete_grid=Completar grid
+
+Distance=Distancia
+
+Raster_buffer=Zona de influencia [raster]
+
+Use_cell_value_as_distance=Usar valor de celda como distancia
+
+Fixed_distance=Distancia fija
+
+[aggregated]=[agregada]
+
+Aggregated_layer=Capa agregada
+
+Aggregation_factor=Tama\u00f1o de agregaci\u00f3n
+
+Aggregate=Agregar
+
+Minimum=M\u00ednimo
+
+Maximum=M\u00e1ximo
+
+Sum=Suma
+
+Look-up_table=Tabla de correspondencias
+
+Raster_categories_analysis=Herramientas para capas raster categ\u00f3ricas
+
+Grids_from_table_and_classified_grid=Grids a partir de tabla y grid clasificado
+
+Data_type=Tipo de dato
+
+Change_data_type=Cambiar tipo de dato
+
+Clip_grid_with_bbox_of_polygons=Cortar grid con bbox
+
+Layer_to_clip=Capa a cortar
+
+Clipped_layer=Capa cortada
+
+INPUT_LAYER=Capa de entradaLS_factor=Factor LS
+
+Stream_Power_Index=\u00cdndice de potencia de cauce
+
+Topographic_Wetness_Index__TWI=\u00cdndice de humedad topogr\u00e1fica
+
+Flow_accumulation=Acumulaci\u00f3n de flujo
+
+Slope=Pendiente
+
+Indices_and_other_hydrological_parameters=\u00cdndices y otros par\u00e1metros hidrol\u00f3gicos
+
+Topographic_indices=\u00cdndices topogr\u00e1ficos
+
+Mean_value_uphill=Valor medio aguas arriba
+
+Parameter=Par\u00e1metro
+
+Elevation=MDE
+
+Calculando_hidrograma=Calculando hidrograma
+
+Intervalo_en_hietogramas__minutos=Intervalo en hietogramas (minutos)
+
+Intervalo_en_hidrogramas__minutos=Intervalo en hidrogramas (minutos)
+
+Tables=Tablas
+
+Nombre_de_tabla_con_hietograma=Nombre de tabla con hietograma
+
+N\u00famero_de_Curva=N\u00famero de Curva
+
+Time_to_outlet=Tiempo de salida
+
+A_simple_hydrological_model=Un modelo hidrologico
+
+Hyetographs_are_not_consistent=Los hietogramas no son consistentes
+
+C_factor_from_NDVI=Factor C a partir de NDVI
+
+Distance_to_channel_network=Distancia a red de drenaje
+
+Channel_network=Red de drenaje
+
+Watersheds=Cuencas
+
+Basic_hydrological_analysis=An\u00e1lisis hidrol\u00f3gico b\u00e1sico
+
+Watersheds_by_area=Cuencas por tama\u00f1o
+
+Interval__minutes=Intervalo (minutos)
+
+Average_water_velocity__Km-h=Velocidad media (Km/h)
+
+Area=\u00c1rea
+
+Next_reach_downslope=Tramo aguas abajo
+
+Length=Longitud
+
+Order=Orden
+
+Geomorphological_instantaneous_Unit_Hydrograph=Hidrograma geomorfol\u00f3gico instant\u00e1neo unitario
+
+Max_value_uphill=Valor m\u00e1ximo aguas arriba
+
+Minimum_watershed_size__cells=Tama\u00f1o m\u00ednimo de subcuenca (celdas)
+
+Slope_length=Longitud de pendiente
+
+Use_threshold=Utilizar umbral
+
+Slope_change_threshold=Relaci\u00f3n umbral de variaci\u00f3n de pendiente
+
+[preprocessed]=[preprocesado]
+
+Preprocessed=Preprocesado
+
+Min_angle_between_cells_[degrees]=\u00c1ngulo m\u00ednimo entre celdas [\u00b0]
+
+Sink_filling=Eliminar depresiones
+
+Outlet_point=Punto de salida
+
+speed_ratio__channel_-_overland=Relaci\u00f3n velocidades r\u00edo / ladera
+
+Time_to_outlet__h=Tiempo de salida (h)
+
+Standard_deviation=Desviaci\u00f3n t\u00edpica de la precipitaci\u00f3n
+
+Rainfall_mean=Media de precipitaci\u00f3n
+
+Time_to_peak__minutes=Tiempo al pico (minutos)
+
+Total_length__minutes=Duraci\u00f3n total (minutos)
+
+Return_periods=Periodos de retorno
+
+Create_synthetic_hyetograph=Crear hietograma sint\u00e9tico
+
+Upslope_area=\u00c1rea aguas arriba
+
+Zona_de_salida=Zona de salida
+
+Upslope_area_from_outlet_zone=Cuenca vertiente a una zona
+
+Prevailing_erosion_type=Erosion predominante
+
+Sheet_erosion=Erosion en ladera
+
+Rill_erosion=Erosion en c\u00e1rcavas
+
+Edge_contamination=Contaminaci\u00f3n de borde
+
+Strahler_Order=Orden de Strahler
+
+Upslope_area_from_a_single_point=Cuenca vertiente a un punto dado
+
+Elevation_over_channel_network=Elevaci\u00f3n sobre la red de drenaje
+
+Tension_threshold=Umbral de tensi\u00f3n
+
+Convergence_factor__MFD=Factor de convergencia para MFD
+
+Method=M\u00e9todo
+
+Weight=Ponderaci\u00f3n de celdas
+
+MFD__Multiple_Flow_Directions=MFD (Direcci\u00f3n de flujo m\u00faltiple)
+
+DInfinity=DInfinity
+
+Rho8=Rho8
+
+D8=D8
+
+Net_balance=Balance neto
+
+Creating_vector_layer=Creando red vectorial...
+
+Next=Siguiente
+
+ID=ID
+
+Calculating_orders=Calculando \u00f3rdenes...
+
+Delineating_channel_network=Trazando cauces...
+
+Threshold=Valor umbral
+
+Criteria=Tipo de umbral
+
+Threshold_layer=Capa umbral
+
+Lower_que=Menor que
+
+Greater_than=Mayor que
+
+Outlet_zone=Zona de salida
+
+Modified_DEM=MDE modificado
+
+Burn_streams=Horadar cauces
+
+Depth=Profundidad
+
+Iteration=Iteraci\u00f3n
+
+Thinned_image=Imagen adelgazada
+
+Image=Imagen
+
+Image_processing=Tratamiento y an\u00e1lisis de im\u00e1genes
+
+Thinning=Adelgazamiento(thinning)
+
+Upper_percentile=Percentil superior
+
+Lower_percentile=Percentil inferior
+
+Contrast_stretching=Expansi\u00f3n de contraste
+
+Equalize=Ecualizaci\u00f3n
+
+Calibrated_image=Imagen calibrada
+
+Offset=Desfase
+
+Gain=Amplificaci\u00f3n
+
+Resulting_average=Media resultante
+
+Method=M\u00e9todo
+
+Image_to_calibrate=Imagen a calibrar
+
+Calibrate_an_image=Calibrar una imagen
+
+Gain_and_offset=Amplificaci�n y desfase
+
+Average_and_standard_deviation=Media y desviaci�n t�pica
+
+B_band=Banda B
+
+B_layer=Capa B
+
+G_band=Banda G
+
+G_layer=Capa G
+
+R_band=Banda R
+
+R_layer=Capa R
+
+Processing=Procesando...
+
+Result=Resultado
+
+S_band=Banda S
+
+S_layer=Capa S
+
+I_band=Banda I
+
+I_layer=Capa I
+
+H_band=Banda H
+
+H_layer=Capa H
+
+Radius=Radio
+
+Operation=Operaci\u00f3n
+
+Erosion-Dilation=Erosi\u00f3n/Dilataci\u00f3n
+
+Dilation=Dilataci\u00f3n
+
+Erosion=Erosi\u00f3n
+
+Reference_image=Imagen de referencia
+
+Calibrate_an_image__regression=Calibrar una imagen (mediante regresi\u00f3n)
+
+Classifying=Clasificando
+
+Calculating_spectral_signatures=Extrayendo firmas espectrales
+
+Vectorizing=Vectorizando
+
+Trees=\u00c1rboles
+
+Tolerance_[size]=Tolerancia [tama�o]
+
+Tolerance=Tolerancia
+
+Sample_trees=\u00c1rboles muestra
+
+Bands=Bandas para clasificaci\u00f3n
+
+Detect_and_vectorize_individual_trees=Detectar y vectorizar \u00e1rboles individuales
+
+Quantization_[4_bits]=Reducir profundidad a 4 bits
+
+Texture_ASM=Analisis textural (ASM)
+
+Texture_Contrast=Analisis textural (Contraste)
+
+Texture_Dissimilarity=Analisis textural (Dissimilarity)
+
+Texture_Entropy=Analisis textural (Entrop�a)
+
+Texture_Homogeneity=Analisis textural (Homogeneidad)
+Line_of_sight=L\u00ednea de visi\u00f3n
+
+Visibility_and_lighting=Iluminaci\u00f3n y visibilidad
+
+Height_of_point=Altura del punto
+
+point=punto
+
+Elevation=MDE
+
+RF_Line_of_sight=Linea de visi\u00f3n (radiofrecuencia)
+
+Wavelength=Longitud de onda
+
+Distance=Distancia
+
+Angle=\u00C1ngulo
+
+Horizon=Horizonte
+
+Radius=Radio de alcance
+
+Height_of_emitter-receiver=Altura emisor/receptor
+
+Coordinates_of_emitter-receiver=Coordenadas emisor/receptor
+
+Horizon_blockage=Horizonte visible
+
+Visibility=Visibilidad
+
+Height_of_mobile_receiver-emitter=Altura receptor/emisor movil
+
+Method=M\u00e9todo
+
+Lighting=Iluminaci\u00f3n
+
+Visual_exposure=Exposici\u00f3n visual
+
+Weight=Ponderaci\u00f3n
+
+Elements=Elementos
+
+Colect_values=Colectar valores
+
+Irradiate=Irradiar valores
+
+Exposure=Exposici\u00f3n
+
+de=de
+
+Calculating_day=Calculando d\u00eda
+
+Insolation_time=Tiempo de insolaci\u00f3n
+
+Solar_radiation=Radiaci\u00f3n solar
+
+Ending_day=D\u00eda final
+
+Ending_month=Mes final
+
+Starting_day=D\u00eda inicial
+
+Starting_month=Mes inicial
+
+Interval_for_global_insolation_[days]=Intervalo para calculo de insolacion global [d\u00edas]
+
+Interval_for_daily_insolation_[h]=Intervalo para calculo de insolaci\u00f3n diaria [h]
+
+Latitude=Latitud
+
+Dust_[ppm]=Polvo [ppm]
+
+Atmospheric_water_content_[cm]=Contenido de agua atmosf\u00e9rico [cm]
+
+Atmospheric_pressure_[mb]=Presi\u00f3n atmosf\u00e9rica [mb]
+
+Global_transmittance=Transmitancia global
+
+Solar_constant_[W-m\u00b2]=Constante solar [W/m\u00b2]
+
+December=Diciembre
+
+November=Noviembre
+
+October=Octubre
+
+September=Septiembre
+
+August=Agosto
+
+July=Julio
+
+June=Junio
+
+May=Mayo
+
+April=Abril
+
+March=Marzo
+
+February=Febrero
+
+January=Enero
+
+Calculate_components_separately=Calculo individual de componentes
+
+Global_atmospheric_transmittance=Transmitancia atmosf\u00e9rica global
+
+Shaded_relief=Relieve sombreado
+
+Exaggeration=Exageraci\u00f3n
+
+Sun_azimuthal_angle_[degrees]=Azimut
+
+Sun_elevation_angle_[degrees]=Declinaci\u00f3n
+
+Combined=Combined
+
+Standard_max_90\u00b0=Standard(max 90\u00b0)
+
+Standard=Standard
+
+Approximated_Viewshed=Approximated Viewshed
+
+Approximated_viewshed_threshold =Approximation threshold [Usually 0.1-0.0001]
+
+Viewshed_output=Visibility Map
+
+R2_Viewshed=R2 Viewshed
+
+Statistics=Estad\u00edsticas
+
+Coefficient_of_variation=Coeficiente_de variaci\u00f3n
+
+Sum_of_distances=Suma total de distancias
+
+Variance=Varianza
+
+Maximum_distance=Distancia m\u00e1xima
+
+Min_distance=Distancia m\u00ednima
+
+Mean_squared_distance=Distancia cuadr\u00e1tica media
+
+Mean_distance=Distancia media
+
+Objective_function=Funci\u00f3n objetivo
+
+Statistics_of_global_solution=Estad\u00edsticas de la soluci\u00f3n global
+
+Resultado=Resultado
+
+Candidate=Candidato
+
+Preexistent=Preexistente
+
+Connections=Conexiones
+
+Distance=Distancia
+
+Y_resource=Y oferta
+
+X_resource=X oferta
+
+Resource=Punto de oferta
+
+Y_demand=Y demanda
+
+X_demand=X demanda
+
+Demand_point=Punto de demanda
+
+ID=ID
+
+Invalid_or_insufficient_data=Datos invalidos o insuficientes
+
+Number_of_resources_to_allocate=Nuevas localizaciones a establecer
+
+Method=M�todo
+
+Type_of_distance=Tipo de distancia
+
+Candidate_points=Puntos de oferta candidatos
+
+Preexistent_resources=Puntos de oferta existentes
+
+Field=Campo
+
+Demand_points=Puntos de demanda
+
+Location-allocation=Localizaci\u00f3n \u00f3ptima de elementos
+
+Minimum_coverage=Cobertura m\u00ednima
+
+Maximum_sum=Suma m\u00e1xima
+
+Maximum_coverage=Cobertura m\u00e1xima
+
+Minimize_maximum_distance=Minimizar m\u00e1ximo alejamiento
+
+Minimum_standard_deviation=Desviaci\u00f3n t\u00edpica m\u00ednima
+
+Minimum_sum_with_restrictions=Suma m\u00ednima con restricci\u00f3n de alejamiento
+
+Minimum_sum=Suma m\u00ednima
+
+Manhattan=Manhattan
+
+Euclidean=Euclidea
+
+Wrong_data_in_table=Datos incorrectos en la tabla
+
+Demand_offer_distance_table=Tabla de distancias (demanda-oferta)
+
+Demand_candidates_distance_table=Tabla de distancias (demanda-candidatos)
+
+Location-allocation_table_distance=Localizaci\u00f3n \u00f3ptima de elementos (con tabla de distancias)
+
+Elevation-relief_ratio=\u00cdndice de elevaci\u00f3n-relieve
+
+Elevation=MDE
+
+Geomorphometry_and_terrain_analysis=Geomorfometr\u00eda y an\u00e1lisis del relieve
+
+Real_area=\u00c1rea real
+
+Slope=Pendiente
+
+Units=Unidades
+
+Method=M\u00e9todo
+
+Percentage=Porcentaje
+
+Degrees=Grados
+
+Radians=Radianes
+
+Fit_3_Degree_Polynom__Haralick_1983=Ajuste a Polinomio de Grado 3 (Haralick 1983)
+
+Fit_2_Degree_Polynom__Zevenbergen_&_Thorne_1987=Ajuste a Polinomio de Grado 2 (Zevenbergen & Thorne 1987)
+
+Fit_2_Degree_Polynom__Heerdegen_&_Beran_1982=Ajuste a Polinomio de Grado 2 (Heerdegen & Beran 1982)
+
+Fit_2_Degree_Polynom__Bauer_Rohdenburg_Bork_1985=Ajuste a Polinomio de Grado 2 (Bauer, Rohdenburg, Bork 1985)
+
+Plane_fitting__Costa-Cabral_&_Burgess_1996=Plano de Ajuste (Costa-Cabral & Burgess 1996)
+
+Maximum_Triangle_Slope__Tarboton_1997=M\u00e1xima Pendiente por Tri\u00e1ngulos (Tarboton 1997)
+
+M\u00e1ximum_slope__Travis_et_al_1975=M\u00e1xima Pendiente (Travis et al. 1975)
+
+Classification=Clasificaci\u00f3n
+
+Curvature=Curvatura
+
+Vertical_curvature=Curvatura Vertical
+
+Horizontal_curvature=Curvatura Horizontal
+
+Curvatures=Curvaturas
+
+Result=Resultado
+
+Threshold__Peucker_&_Douglas=Umbral para Peucker & Douglas
+
+Landform_classification=Clasificaci\u00f3n de formas del terreno
+
+Peucker_&_Douglas=Peucker & Douglas
+
+Flow_direction=Direcci\u00f3n de flujo
+
+Opposite_neighbours=Vecinos opuestos
+
+Mark_Highest_Neighbour=Marcar vecino superior
+
+Aspect=Orientaci\u00f3n
+
+Protection_index=\u00cdndice de protecci\u00f3n
+
+Radius=Radio
+
+Convergence=Convergencia
+
+Convergence_index=\u00cdndice de convergencia
+
+Gradient=Gradiente
+
+Calculating_derivatives=Calculando derivadas
+
+Anisotropic_coefficient_of_variation=Coeficiente de variaci\u00f3n anisotr\u00f3pica
+
+Calculating_coefficient=Calculando coeficiente
+
+Hypsometry=Hipsometr\u00eda
+
+Hypsometry_[=Hipsometr\u00eda [
+
+Absolute_area=\u00c1rea absoluta
+
+Absolute_elevation=Altura absoluta
+
+Relative_area=\u00c1rea relativa
+
+Relative_elevation=Altura relativa
+
+Reading_input_data=Leyendo datos de entrada
+
+computing_elevation_values=Calculando cotas
+
+Contour_lines=Curvas de nivel
+
+equidistance=Equidistancia
+
+Uphill_lines=Lineas de ascenso
+
+Elevation_field=Campo de elevaci�n
+
+Interval_field=Campo de equidistancia
+
+Wrong_field_types=Tipo de campos incorrecto
+
+Reading_input_data=Leyendo datos de entrada
+
+computing_elevation_values=Calculando elevaciones
+
+Fill_elevation_values=Completar cotas en curvas de nivel
+nonSpatial=Algoritmos no espaciales
+Calculator=Calculadora
+Numerical_values=Variables num�ricasRipley_K=K de Ripley
+
+Points=Puntos
+
+Tools_for_point_layers=Herramientas para capas de puntos
+
+L=L
+
+K_Poisson=K teorica Poisson
+
+K=K
+
+Distance=Distancia
+
+Distance_matrix=Matriz de distancias
+
+Distance_matrix_[=Matriz de distancias [
+
+Median_center=Centro mediano
+
+Method=M\u00e9todo
+
+Weights=Ponderaci\u00f3n
+
+Weighted_median_center=Centro mediano ponderado
+
+Coord=Coord
+
+Iteration=Iteraci\u00f3n
+
+Statistics=Estad\u00edsticas
+
+Critical_value__at_5%=Valor cr\u00edtico al 5%
+
+D_value__Kolmogorov-Smirnov=Valor D del Test de Kolmogorov-Smirnov
+
+Coefficient_of_variation_[~0=Coeficiente de variaci\u00f3n [~0
+
+Variance=Varianza
+
+Mean=Media
+
+Quadrant_analysis=An\u00e1lisis por cuadrantes
+
+Analyzing_quadrants=Analizando cuadrantes.
+
+Creating_quadrants=Creando cuadrantes.
+
+Mean_center_and_standard_distance=Centro medio y distancia t\u00edpica
+
+Weighted_mean_center=Centro medio ponderado
+
+Mean_center=Centro medio
+
+Radius__standard_deviation=Radio (desv_tipica)
+
+Standard_distance=Distancia t\u00edpica
+
+Spatial_autocorrelation=Correlaci\u00f3n espacial
+
+Distance_interval=Intervalo de distancia
+
+Field=Campo
+
+Variogram_cloud_[=Nube del variograma [
+
+Semivariance=Semivarianza
+
+Spatial_autocorrelation_[=Autocorrelaci\u00f3n espacial [
+
+Geary_c=c de Geary
+
+Moran_I=I de Moran
+
+ERROR_Spatial_autocorrelation_Invalid_value_in_table=ERROR Correlacion espacial - Valores no v\u00e1lidos en tabla de atributos
+
+Nearest_neighbour_analysis=An\u00e1lisis de vecino mas pr\u00f3ximo
+
+Corrected_Z_value=Valor Z corregido
+
+Z_value=Valor Z
+
+Corrected_nearest_neighbour_index=\u00cdndice de vecino mas pr\u00f3ximo corregido
+
+Nearest_neighbour_index=\u00cdndice de vecino mas pr\u00f3ximo
+
+Edge-corrected_variance=Varianza corregida con efecto borde
+
+Edge-corrected_expected_distance=Distancia esperada corregida con efecto borde
+
+Expected_distance=Distancia esperada
+
+Mean_distance=Distancia media
+
+Nearest_neighbour=Vecino m\u00e1s cercano
+
+Point_series_analysis=An�lisis de serie de puntos
+
+Time=Tiempo
+
+Coefficient_of_variation=Coeficiente de variaci\u00f3n
+
+Total_sum=Suma total
+
+Max_value=Valor m\u00e1ximo
+
+Min_value=Valor m\u00ednimo
+
+Mean_squared_value=Valor cuadr\u00e1tico medio
+
+Mean_value=Valor medio
+
+Speed=Velocidad
+
+Basic_statistics=Estad\u00edsticas b\u00e1sicas
+
+Direction=Direcci\u00f3n
+Profile=Perfil
+
+Profile_[line]=Perfil [l\u00ednea]
+
+Profile_[points]=Perfil [puntos]
+
+Starting_point=Punto de inicio
+
+Additional_layers=Capas adicionales de datos
+
+Elevation=MDE
+
+Profiles=Perfiles
+
+Flow_line_profile=Perfil seg\u00fan l\u00ednea de flujo
+
+Profile_route=Ruta del perfil
+
+RealDist=DistReal
+
+ProjDist=DistHorz
+
+Cross_sections=Secciones transversales
+
+Number_of_points__on_each_side=Numero de ptos. de control (a cada lado)
+
+Section_width__to_each_side=Ancho de secci\u00f3n (a cada lado)
+
+Distance_between_sections=Distancia entre secciones
+
+Route=Ruta
+
+Route_[line]=Ruta (l\u00ednea)
+
+Route_[points]=Ruta (puntos)
+
+Accumulated_cost=Coste acumulado
+
+Cost_distances_and_routes=Costes, distancias y rutas
+
+Least_cost_path=Ruta de m\u00ednimo coste
+
+Zero_lines_in_layer=La capa no contienen l�neas
+
+Creating_index=Creando \u00edndice...
+
+Creating_cross_validation=Creando validaci\u00f3n cruzada....
+
+Cross_validation_[=Validaci\u00f3n cruzada [
+
+Diference=Diferencia
+
+Estimated_value=Valor estimado
+
+Real_value=Valor real
+
+Interpolating=Interpolando...
+
+[interpolated]=[interpolado]
+
+Result=Resultado
+
+Search_radius=Radio de b\u00fasqueda
+
+Field=Campo
+
+Point_layer=Capa de puntos
+
+[rasterizedo]=[rasterizado]
+
+Vector_layer=Capa vectorial
+
+Rasterization_and_interpolation=Rasterizaci\u00f3n e interpolaci\u00f3n
+
+Rasterize_vector_layer=Rasterizar capa vectorial
+
+Cross_validation=Validaci\u00f3n cruzada
+
+Exponent=Exponente
+
+Linear_decrease=Decremento lineal
+
+[variances]=[varianzas].
+
+Variances=Varianzas
+
+Range=Rango
+
+Sill=Sill
+
+Nugget=Nugget
+
+Model=Modelo
+
+Max_number_of_points=M\u00e1ximo n\u00famero de puntos
+
+Mino_number_of_points=M\u00ednimo n\u00famero de puntos
+
+Gaussian=Gaussiano
+
+Exponential=Exponencial
+
+Spherical=Esf\u00e9rico
+
+Kriging=Kriging
+
+Maximum_number_of_points=M\u00e1ximo n\u00famero de puntos
+
+Minimum_number_of_points=M\u00ednimo n\u00famero de puntos
+
+Predictors=Predictores
+
+Universal_Kriging=Kriging universal
+
+Euclidean_distance=Distancia euclidea
+
+Cost_distances_and_routes=Costes, distancias y rutas
+
+Inverse_Distance_Weighting__IDW=Distancia inversa
+
+Nearest_neighbour=Vecindad
+
+Direction_to_closest_point=Direcci�n al punto m�s cercano
+
+Calculating=Calculando
+Probability__binomial=Probabilidad (binomial)
+
+Result=Resultado
+
+Accumulated_probability=Probabilidad acumulada
+
+Number_of_trials=N\u00famero de pruebas
+
+Success_probability=Probabilidad de \u00e9xito
+
+Raster_layer=Capa raster
+
+Statistical_methods=M\u00e9todos estad\u00edsticos
+
+Bernouilli_probability_distribution=Distribuci\u00f3n de probabilidad binomial
+
+Probabilidty__Student's_t=Probabilidad (t de Student)
+
+Degrees_of_freedom=Grados de libertad
+
+Student's_t_probability_distribution=Distribuci\u00f3n de probabilidad t de Student
+
+Probability__chi_squared=Probabilidad (chi cuadrado)
+
+Chi_squared_probability_distribution=Distribuci\u00f3n de probabilidad chi cuadrado
+
+Covariance_matrix=Matriz de covarianzas
+
+Input_layers=Capas de entrada
+
+Probability__normal=Probabilidad (normal)
+
+Standard_deviation=Desviaci\u00f3n t\u00edpica
+
+Mean=Media
+
+Normal_probability_distribution=Distribuci\u00f3n de probabilidad normal
+
+Regression_values=Datos del ajuste
+
+Correlation=Correlaci\u00f3n
+
+Multiple_regression=Regresi\u00f3n m\u00faltiple
+
+Could_not_calculate_regression=No se pudo calcular la regresi\u00f3n
+
+Calculating_regression=Calculando regresi\u00f3n...
+
+Residuals=Residuos
+
+Invalid_input_data=Datos de entrada inv\u00e1lidos
+
+Diference=Diferencia
+
+Estimated_value=Valor estimado
+
+Real_value=Valor real
+
+Predictors=Predictores
+
+Field=Campo
+
+Points=Puntos
+
+Regression=Regresi\u00f3n
+
+Variance=Varianza
+
+Predictor_value=Valor del predictor
+
+Equation=Tipo de ecuaci\u00f3n
+
+Principal_Components_Analysis=An\u00e1lisis de Componentes Principales
+
+Error_not_enough_bands_selected=Error n\u00famero de bandas seleccionadas insuficiente
+
+Input_bands=Bandas de entrada
+
+Probability__exponential=Probabilidad (exponencial)
+
+Exponential_probability_distribution=Distribuci\u00f3n de probabilidad exponencial
+
+Bands_number=N\u00famero de bandas
+
+Iteration=Iteraci\u00f3n
+
+Statistics=Estad\u00edsticas
+
+Field=Campo
+
+Table=Tabla
+
+Table_tools=Herramientas para tablas
+
+Basic_statistics=Estad\u00edsticas b\u00e1sicas
+
+Coefficient_of_variation=Coeficiente de variaci\u00f3n
+
+Total_sum=Suma total
+
+Variance=Varianza
+
+Max_value=Valor m\u00e1ximo
+
+Min_value=Valor m\u00ednimo
+
+Mean_squared_value=Valor cuadr\u00e1tico medio
+
+Mean_value=Valor medio
+
+Result=Resultado
+
+Formula=F\u00f3rmula
+
+Layer=Capa
+
+Tools_for_vector_layers=Herramientas para capas vectoriales gen\u00E9ricas
+
+Field_calculator=Calculadora de campos
+
+[Save_to_temporary_file]=[Guardar en archivo temporal]
+
+Functions]=Funciones]
+
+ELEMENTS=ELEMENTOS
+
+Constants]=Constantes]
+
+Constants=Constantes
+
+Operators=Operadores
+
+Functions=Funciones
+
+Fields=Campos
+
+Vector_layer=Capas vectoriales
+
+Histogram=Histograma
+
+Normality_test=Test de normalidad
+
+Shapiro-Wilk_W=W de Shapiro-Wilk
+
+At_least_three_features_are_needed_for_using_this_algorithm=Se necesitan al menos tres elementos para ejecutar este algoritmo
+
+Regression_values=Datos del ajuste
+
+Regression=Regresion
+
+Equation=Tipo de ecuaci\u00f3n
+
+Correlation_between_fields=Correlaci\u00f3n entre campos
+
+Best_fit=Mejor ajuste posible
+
+Input_layer=Capa de entrada
+
+name_for_new_field=Nombre para campo a crear
+
+Class_field=Campo de clase
+
+Create_equivalent_numerical_class=Crear clase num�rica equivalente
+
+field_to_rename=Campo a renombrar
+
+Rename_field=Renombrar campo
+
+Filter_vector=Filtrar capa vectorial
+Extract_isolines=Calcular curvas de nivel
+Equidistance=Equidistancia
+Level_of_detail=Nivel de detalle
+Cluster_tolerance=Tolerancia
+Smoothing_coef=Coeficiente de suavizado (0.1 - 1)
+Bezier_surface=Suavizar mediante interpolaci�n Bezier
+Create_tin=Crear TIN a partir de puntos
+Height_field=Elevaci�n
+Create_tin_with_break_lines=Crear TIN empleando l�neas de ruptura
+Use_hard_lines=Usar l�neas de ruptura duras
+Use_hard_lines=Usar l�neas de ruptura suaves
+hard_break_lines=L�neas de ruptura duras
+soft_break_lines=L�neas de ruptura suaves
+Use_Z_value=Tomar valor de altura de la geometr�a
+Wrong_values_in_elevation_field=Valores erroneos en campo de elevaci�n
+Create_tin_with_breaklines=Crear TIN empleando l�neas de ruptura
+Breaklines=L�neas de rupturaNodes=Nodos
+
+Topology=Topolog�a
+
+Extract_Nodes=Extraer Nodos
+
+Endpoints=Puntos extremos
+
+Result=Resultado
+
+Input_Layer=Capa de entrada
+
+Extract_endpoints_of_lines=Obtener extremos de l�neas
+
+Join_near_lines=Unir l�neas cercanas
+
+Lines=L\u00EDneas
+
+Node_lines=A�adir nodos en cruces
+
+Result=Resultado
+
+Input_layer=Capa de entrada
+
+Vectorization=Vectorizaci\u00f3n
+
+Vectorize_raster_layer__lines=Vectorizar capa raster (l\u00edneas)
+
+Vectorize_raster_layer__polygons=Vectorizar capa raster (pol\u00edgonos)
+
+Contour_lines=Curvas de nivel
+
+Max_value=Valor m\u00e1ximo
+
+Min_value=Valor m\u00ednimo
+
+Equidistance=Equidistancia
+
+Points=Puntos
+
+Raster_layer_to_points_layer=Capa raster a capa de puntos
+
+Result=Resultado
+
+Field_for_labeling=Campo para etiquetado
+
+Layer=Capa
+
+Tools_for_vector_layers=Herramientas para capas vectoriales gen\u00e9ricas
+
+Separate_entities=Separar entidades
+
+Centroids=Centroides
+
+Vector_layer=Capa vectorial
+
+Tools_for_polygon_layers=Herramientas para capas de pol\u00edgonos
+
+Modified_classes=Registros modificados
+
+Number_of_classes=N\u00famero de clases
+
+Tools_for_point_layers=Herramientas para capas de puntos
+
+Spatial_cluster=Clasificar(cluster) espacialmente
+
+Class=Clase
+
+Field=Campo
+
+Points=Puntos
+
+Polygons=Pol\u00edgonos
+
+Point_statistics_in_polygons=Estad\u00edsticas de puntos en pol\u00edgonos
+
+Maximum=M\u00e1ximo
+
+Minimum=M\u00ednimo
+
+Variance=Varianza
+
+Mean=Media
+
+Sum=Suma
+
+Preserve_topology=Preservar topolog\u00eda
+
+Tolerance=Tolerancia
+
+Lines=L\u00edneas
+
+Input_layer=Capa de entrada
+
+Geometries_to_points=Convertir geometr\u00edas en puntos
+
+fields=Campos
+
+Cluster=Clasificar(cluster)
+
+File=Archivo
+
+Save_geometries_as_WKT=Guardar geometrias como WKT
+
+Smoothed_lines=L\u00edneas suavizadas
+
+Curve_type=Tipo de curva
+
+Intermediate_points=Puntos intermedios
+
+Tools_for_line_layers=Herramientas para capas de l\u00edneas
+
+Smooth_lines=Suavizar l\u00edneas
+
+smoothed=suavizadas
+
+Clean_vector_layer=Limpiar capa vectorial
+
+Polygons_to_polylines=Convertir pol\u00edgonos en polilineas
+
+Standard_deviation=Desviaci\u00f3n t\u00edpica
+
+Points_layer=Capa de puntos
+
+Perturbate_points_layer=Perturbar capa de puntos
+
+Graticule=Ret\u00edcula
+
+Type=Tipo
+
+Y_interval=Intervalo en Y
+
+X_interval=Intervalo en X
+
+Rectangles=Rect\u00e1ngulos
+
+Create_graticule=Crear ret\u00edcula
+
+Snapped_points=Puntos ajustados
+
+Snap_points_to_layer=Ajustar capa de puntos a otra capa
+
+Creating_index=Creando \u00edndice...
+
+Change_line_direction=Invertir sentido de l\u00edneas
+
+Count_points_in_polygons=Contar puntos en pol\u00edgonos
+
+Inner_points=Puntos interiores
+
+Use_interpolation=Usar interpolaci\u00f3n
+
+Raster_layers=Capas raster
+
+Sample_raster_layers=Muestrear capas raster
+
+Splitted_lines=L\u00edneas fragmentadas
+
+Method=M\u00e9todo
+
+Add_data_after_point=Asignar valores desde el punto
+
+Add_data_before_point=Asignar valores hasta el punto
+
+Split_lines_with_points_layer=Fragmentar l\u00edneas con capa de puntos
+
+Bounding_Box=Bounding Box
+
+Symmetric_difference=Diferencia sim\u00e9trica
+
+Lines_Dist_Angles=Lineas_Dist_Angulos
+
+ConvexHull_of_Layer_2=ConvexHull de capa 2
+
+Layer_2=Capa 2
+
+ConvexHull_of_layer_1=ConvexHull de capa 1
+
+Layer_1=Capa 1
+
+ID1_FIELDNAME=Atributo ID 1
+
+ID2_FIELDNAME=Atributo ID 2
+
+Distances_and_Angles=Distancias y \u00c1ngulos
+
+Clipped_Layer=Capa_recortada
+
+Clipping_layer=Capa de recorte
+
+Layer_to_clip=Capa a recortar
+
+Clip=Cortar
+
+Clipped_layer=Capa recortada
+
+Summary_statistics=Agrupamiento de variables
+
+Field_with_class_name=Campo de clase
+
+Dissolve=Disolver
+
+[Save_to_temporary_file]=[Guardar en archivo temporal]
+
+MAX=MAX
+
+MIN=MIN
+
+VAR=VAR
+
+AVG=MED
+
+Grids=Grids
+
+Grid_statistics_in_polygons=Estad\u00edsticas de grid en pol\u00edgonos
+
+Separate_multi-part_features=Separar entidades con m\u00faltiples partes
+
+Export_vector_layer=Exportar capa vectorial
+
+Polylines=Polil\u00edneas
+
+Polylines_to_polygons=Convertir polil\u00edneas en pol\u00edgonos
+
+Number_of_features_to_create=N\u00famero de geometr\u00edas
+
+Create_random_vector_layer=Capa vectorial con geometr\u00edas aleatorias
+
+Autoincrement_Value=Valor autoincremental
+
+Unique_Geometries=Geometr\u00edas sin duplicados
+
+Remove_repeated_geometries=Eliminar geometr\u00edas duplicadas
+
+Number_of_points=N\u00famero de puntos
+
+Field_for_number_of_points=Filed for number of points
+
+Adjust_n_point_to_polygon=Ajustar N puntos en pol\u00edgono
+
+Take_from_table_field=Tomar de campo
+
+Fixed_number=Fixed number
+
+Random=Aleatoria
+
+Regular_grid=En malla regular
+
+Clip_by_rectangle=Cortar por rect\u00e1ngulo
+
+sampled=muestreado
+
+Sampled_lines=L\u00edneas_muestreadas
+
+Sample_lines_extreme_points=Muestrear extremos de l\u00edneas
+
+Intersection=Intersecci\u00f3n
+
+Clean_points_layer=Limpiar capa de puntos
+
+Additional_layers=Capas adicionales
+
+Main_layer=Capa principal
+
+Merge=Juntar
+
+Anchor_point_Y=Punto de pivote Y
+
+Anchor_point_X=Punto de pivote X
+
+Scale_Factor__Y=Factor de escala (Y)
+
+Scale_factor__X=Factor de escala (X)
+
+Rotation_angle=\u00c1ngulo de rotaci\u00f3n
+
+Translation_Y=Traslaci�n Y
+
+Translation_X=Traslaci\u00f3n X
+
+Transform=Transformar
+
+Generalized_lines=L\u00edneas simplificadas
+
+Simplify_lines=Simplificar l\u00edneas
+
+Simplify_polygons=Simplificar pol\u00edgonos
+
+Simplified_polygons=Pol\u00edgonos simplificados
+
+Minimum_enclosing_shape=Envolvente m\u00ednima
+
+Create_one_polygon_for_each_class=Crear un pol\u00edgono para cada clase
+
+Enclosing_shape=Tipo de envolvente
+
+Minimum_enclosing_rectangle=M\u00ednimo rect\u00e1ngulo
+
+Minimum_enclosing_circle=M\u00ednimo c\u00edrculo
+
+Convex_hull=M\u00ednima envolvente convexa
+
+Minimum_enclosing_shapes=Envolventes m\u00ednimas
+
+[Enclosing_shape]=[Envolvente]
+
+Directional_mean=Media direccional
+
+Vector_mean=Media vectorial
+
+Circular_variance=Varianza circular
+
+Angle=\u00c1ngulo
+
+Mean_distance=Distancia media
+
+Polylines_to_single_segments=Convertir lineas en segmentos simples
+
+Geometric_properties_of_polygons=Propiedades geom\u00e9tricas de pol\u00edgonos
+
+PERIMETER=PERIMETRO
+
+AREA=AREA
+
+Group_near_features=Agrupar entidades cercanas
+
+Difference=Diferencia
+
+Alternative_routes=Rutas alternativas
+
+Routes=Rutas
+
+Use_base_route_sinuosity=USar sinuosidad de la ruta base
+
+Sinuosity=Sinuosidad
+
+Recombination=Recombinaci\u00f3n
+
+Constrained_brownian_motion=Movimiento browniano restringido
+
+Number_of_new_routes=N\u00famero de nuevas rutas
+
+Original_route=Ruta original
+
+Cost_distances_and_routes=Costes, distancias y rutas
+
+Generate_alternative_routes=Generar rutas alternativas
+
+Distance_between_points=Distancia entre puntos
+
+Lines_to_equispaced_points=Convertir lineas en puntos equiespaciados
+
+Direction=Direcci\u00f3n
+
+Average_angle=Angulo_medio
+
+Straight_length=Longitud_rectilinea
+
+Length=Longitud
+
+Geometric_properties_of_lines=Propiedades geom\u00e9tricas de l\u00edneas
+
+Remove_holes=Eliminar huecos
+
+Buffer=Buffer
+
+Do_not_round_resulting_polygons=No redondear pol\u00edgonos
+
+Number_of_concentric_rings=N\u00famero de anillos
+
+Buffer_type=Tipo de buffer
+
+Distance=Distancia
+
+Buffers=Zonas de influencia [buffers]
+
+Fixed_distance_buffer=Zona de influencia de distancia fija
+
+Both=Dentro y fuera
+
+Inner_buffer=Hacia dentro
+
+Outer_buffer=Hacia fuera
+
+Y=Coordenada Y
+
+X=Coordenada X
+
+Table=Tabla
+
+Points_layer_from_table=Capa de puntos a partir de tabla
+
+Layer_from_table=Capa a partir de tabla
+
+triangulated=triangulado
+
+Delaunay_triangulation=Triangulaci\u00f3n de Delaunay
+
+Add_coordinates_to_points=A\u00f1adir coordenadas a puntos
+
+Distance_field=Campo para distancia
+
+Variable_distance_buffer=Zona de influencia de distancia variable
+
+Distance_from_table_field=Distancia en campo de tabla
+
+Fixed_distance=distancia fija
+
+Split_polylines_at_nodes=Separar polil\u00edneas en nodos
+
+Union=Uni\u00f3n
+
+Copying_entities=Copiando entidades
+
+Add_field=A\u00f1adir campo
+
+Field_name=Nombre de campo
+
+Field_type=Tipo de campo
+
+Field_precision_Double_only=Precisi\u00f3n (s\u00f3lo para double)
+
+Default_value=Valor por defecto
+
+Delete_field=Eliminar campo
+
+Polygonize=Poligonar l�neas
+
+Distance_to_closest_geometry=Distancia a la geometr�a m�s cercana
+
+No_Elements_In_Distance_List=La lista de distancias no contiene valores v�lidos
+
+Wrong_Field_Name=Nombre de campo erroneo
+
+At_Least_One_Field_Needed=Se necesita al menos un campo para disolver
+
+Fields=Campos
+
+NN_Spatial_Join=Enlace espacial (por vecino m�s cercano)
+
+Additional_layer=Capa adicional
+
+Multiple_buffer=Zona de influencia m�ltiple
+
+Distances_table=Tabla de distancias
+
+Medial_Axis=Eje de pol�gono (medial axis)
+
+Voronoi_polygons=Teselaci�n de Voronoi
+
+Constrained_Delaunay_triangulation=Triangulaci�n de Delaunay (con l�neas de ruptura)
+
+InPolygonSpatialJoin=Enlace espacial por inclusi�n en pol�gono
+
+Dissolve_multiple=Disolver[campos m�ltiples]
+
+Place_point_on_line_at_distance=Situar puntos sobre l�neas a una distancia dada
+
+Line=L�nea
+
+Points_to_line=Puntos a l�nea
+
+Cannot_construct_line_with_less_than_2_points=No se puede crear la l�nea.\nSe necesitan al menos 2 puntos
+
+ResolvePolygonHoles=A�adir huecos a pol�gonos
+Result=Resultado
+
+Soil_line_intercept=Ordenada en el origen de la l�nea del suelo
+
+Soil_line_slope=Pendiente de la l�nea de suelo
+
+Near_infrared_band=Banda infrarrojo cercano
+
+Near_infrared_layer=Capa infrarrojo cercano
+
+Red_band=Banda rojo
+
+Red_layer=Capa rojo
+
+Vegetation_indices=�ndices de Vegetaci�n
+
+global_threshold=Umbral global
+
+CheckLineDirectionCoherence=Comprobar coherencia de sentidos
+
+Lines_layer=Capa de l�neas
+
+Secondary_layer=Capa secundaria
+
+Selected_points=Puntos seleccionados
+
+InPolygonSpatialJoinB=Asignaci�n por inclusi�n
+
+Processing=Procesando
+
+Average_slope_line=Pendiente media de l�neas
+
+Geometric_properties_of_lines_b=Propiedad geom�tricas de l�neas (extendido)
+
+Rasterize_vector_layer_for_mask=Rasterizar capa raster (para m�scara)
+
+Combine_mask=Combinar m�scaras
+
+NoDataValue=Valor sin-datos
+
+ChangeNoDataValue=Cambiar valor sin-datos
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_en.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_en.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_en.properties	(revision 369)
@@ -0,0 +1,2367 @@
+3D_Interpolation=3D Interpolation
+3D_Profile=3D Profile
+Profile_line=Profile line
+3D_Layer_from_function=3D Raster layer from function
+3DLineFromTable=3D line from table
+LessThanTwoPointsInTable=There are less than two points in the table. Could not create 3D LineTime=Time
+
+Woody_fuel_moisture=Woody fuel moisture
+
+Herb_fuel_moisture=Herb fuel moisture
+
+Dead_fuel_moisture_100=Dead fuel moisture 100
+
+Dead_fuel_moisture_10H=Dead fuel moisture 10H
+
+Dead_fuel_moisture_1H=Dead fuel moisture 1H
+
+Wind_direction=Wind direction
+
+Wind_speed_m-s=Wind speed [m/s]
+
+Ignition_points=Ignition points
+
+Fuel_model=Fuel model
+
+Elevation=Elevation
+
+Fire_modeling=Fire modeling
+
+Fire_simulation=Fire simulation
+
+Modified_cells=Modified cells
+
+Classification=Classification
+
+Clusters=Clusters
+
+Statistics=Statistics
+
+Number_of_classes=Number of classes
+
+Bands=Bands
+
+Raster_layer_analysis=Raster layer analysis
+
+Unsupervised_classification__clustering=Unsupervised classification (clustering)
+
+Angle=Angle
+
+Distance=Distance
+
+Y=Y
+
+X=X
+
+Cost_distances_and_routes=Cost, distances and routes
+
+Cartesian_to_polar=Cartesian to polar
+
+Closest_points=Closest points
+
+Accumulated_cost=Accumulated cost
+
+K=K
+
+Origin-destination_points=Origin/destination points
+
+Direction_of_maximum_cost_[degrees]=Direction of maximum cost [deg]
+
+Anisotropic_cost=Anisotropic cost
+
+Isotropic_cost=Isotropic cost
+
+Accumulated_cost__combined=Accumulated cost (combined)
+
+Type_of_distance=Type of distance
+
+Threshold_for_route_separation=Threshold for route separation
+
+Unitary_cost=Unitary cost
+
+Accumulated_cost__isotropic=Accumulated cost (isotropic)
+
+Manhattan=Manhattan
+
+Chessboard=Chessboard
+
+Euclidean=Euclidean
+
+Maximum_unitary_cost=Maximum unitary cost
+
+Accumulated_cost__anisotropic=Accumulated cost (anisotropic)
+
+Routes=Routes
+
+Cost=Cost
+
+Routes_and_cost=Routes and cost
+
+Cost_for_predefined_routes=Cost for predefined routes
+
+Classes=Classes
+
+Calculating_spectral_signatures=Calculating spectral signatures
+
+Name=Name
+
+Method=Method
+
+Field_with_class_value=Field with class value
+
+Polygons=Polygons
+
+Supervised_classification=Supervised classification
+
+Maximum_likelihood=Maximum likelihood
+
+Minimum_distance=Minimum distance
+
+Parallelepiped=Parallelepiped
+
+[fuzzy]=(fuzzy)
+
+Result=Result
+
+Control_point_D=Control point D
+
+Control_point_C=Control point C
+
+Control_point_B=Control point B
+
+Control_point_A=Control point A
+
+Member_function=Member function
+
+Input_Layer=Input Layer
+
+Fuzzy_logic=Fuzzy logic
+
+Fuzzify=Fuzzify
+
+J-shaped=J-shaped
+
+Sigmoidal=Sigmoidal
+
+Linear=Linear
+
+Calculating_statistical_values=Calculating statistical values
+
+Calculating_distances=Calculating distances
+
+Suitability=Suitability
+
+Cutoff__BIOCLIM=Cutoff (BIOCLIM)
+
+Presence_points=Presence points
+
+Predictors=Predictors
+
+Predictive_models=Predictive models
+
+BIOCLIM=BIOCLIM
+
+Mahalanobis_distance=Mahalanobis distance
+
+Distance_to_mean_value=Distance to mean value
+
+ROC_curve=ROC curve
+
+Profile=Profile
+
+Presence-abscence_field=Presence/abscence field
+
+Observed_points=Observed points
+
+OWA_Invalid_weight=OWA Invalid weight
+
+OWA=OWA
+
+Weights=Weights
+
+Layers=Layers
+
+Ordered_Weighted_Averaging__OWA=Ordered Weighted Averaging (OWA)
+
+Cost_variation_factors=Cost variation factors
+
+Cost_for_predefined_routes__anisotropic=Cost for predefined routes (anisotropic)
+
+Factor=Factor
+
+Difference=Difference
+
+Modulus=Modulus
+
+Layer_2__final=Layer 2 (final)
+
+Layer_1__final=Layer 1 (final)
+
+Layer_2__init=Layer 2 (init)
+
+Layer_1__init=Layer 1 (init)
+
+Change_Vector_Analysis=Change Vector Analysis
+
+Polar_to_Cartesian=Polar to Cartesian
+
+Sum_of_cost_to_all_points=Sum of cost to all points
+
+Error_reading_table=Error reading table
+
+Warning_Inconsistent_weighting_values=Warning Inconsistent weighting values
+
+Analytical_Hierarchy_Process_Weights=Analytical Hierarchy Process. weights
+
+Analytical_Hierarchy_Process=Analytical Hierarchy Process
+
+Error_wrong_number_of_layers=Error wrong number of layers
+
+Pairwise_comparisons=Pairwise comparisons
+
+Analytical_Hierarchy_Process__AHP=Analytical Hierarchy Process (AHP)
+
+area_under_the_curve=Area under the curve
+
+Chamfer_3-4=Chamfer 3-4
+
+Grid_from_function=Grid from function
+
+Formula=Formula
+
+Raster_creation_tools=Raster creation tools
+
+Wrong_formula=Wrong formula
+
+Layer_from_function=Layer from function
+
+Elevation=Elevation
+
+Iterations=Iterations
+
+Radius_[cells]=Radius [cells]
+
+Random_DEM=Random DEM
+
+Constant_grid=Constant grid
+
+Value=Value
+
+Volume=Volume
+
+Calculated_volume=Calculated volume
+
+Volumes=Volumes
+
+Method=Method
+
+Base_level=Base level
+
+Basic_tools_for_raster_layers=Basic tools for raster layers
+
+Volume_calculation=Volume calculation
+
+Add_volumes_both_over_and_below_base_level=Add volumes both over and below base level
+
+Add_volumes_over_base_level_and_substract_volumes_below_it=Add volumes over base level and substract volumes below it
+
+Only_volumes_below_base_level=Only volumes below base level
+
+Only_volumes_over_base_level=Only volumes over base level
+
+Normalized=Normalized
+
+Layer_to_normalize=Layer to normalize
+
+Normalize=Normalize
+
+Standard_deviation=Standard deviation
+
+[normalized]=(normalized)
+
+Result=Result
+
+Layer=Layer
+
+Calculus_tools_for_raster_layer=Calculus tools for raster layer
+
+Probability=Probability
+
+Max_value=Max value\:
+
+Min_value=Min value\:
+
+Random_grid__uniform=Random grid (uniform)
+
+New_layer=New layer
+
+Functions]=Functions]
+
+ELEMENTS=ELEMENTS
+
+Constants]=Constants]
+
+Constants=Constants
+
+Operators=Operators
+
+Functions=Functions
+
+unchecked=unchecked
+
+Layers=Layers
+
+from=from
+
+[Save_to_temporary_file]=[Save to temporary file]
+
+Cell_size_[=Cell size [
+
+Raster_layers=Raster layers
+
+Raster_calculator=Raster calculator
+
+Syntax_error=Syntax error
+
+Total_volume=Total volume
+
+Volume_-=Volume(-)
+
+Volume_+=Volume(+)
+
+Upper_layer=Upper layer
+
+Lower_layer=Lower layer
+
+Volumen_between_two_layers=Volume between two layers
+
+Probability__%=Probability [%]
+
+Random_grid__Bernouilli=Random grid (Bernoulli)
+
+Mean=Mean
+
+Random_grid__normal=Random grid (normal)
+
+Filter_kernel=Filter kernel
+
+User-defined_3_X_3_filter=User-defined 3 X 3 filter
+
+[reclassified]=(reclassified)
+
+Reclassify=Reclassify
+
+Class_area_[cells]=Class area [cells]
+
+Layer=Layer
+
+Reclassify_raster_layers=Reclassify raster layers
+
+Divide_into_n_classes_of_equal_area=Divide into n classes of equal area
+
+Look-up_table=Look-up table
+
+Method=Method
+
+Layer_to_reclassify=Layer to reclassify
+
+New_value=New value
+
+Max_value=Max. value
+
+Number_of_classes=Number of classes
+
+Divide_into_n_classes_of_equal_amplitude=Divide into n classes of equal amplitude
+
+Metrics=Metrics
+
+Modified_Simpson_uniformity_index=Modified Simpson uniformity index
+
+Simpson_uniformity_index=Simpson uniformity index
+
+Shannon_uniformity_index=Shannon uniformity index
+
+Modified_Simpson_index=Modified Simpson index
+
+Simpson_index=Simpson index
+
+Shannon_index=Shannon index
+
+Relative_richness=Relative richness
+
+Patch_Richness_Density=Patch Richness Density
+
+Richness=Richness
+
+Landscape_metrics=Landscape metrics
+
+Diversity_metrics=Diversity metrics
+
+Maximum_number_of_different_classes=Maximum number of different classes
+
+Raster_categories_analysis=Raster categories analysis
+
+Fragstats__diversity_metrics=Fragstats (diversity metrics)
+
+Grid_combination=Grid combination
+
+Grid_2=Grid 2
+
+Grid_1=Grid 1
+
+Combine_grids=Combine grids
+
+Valor_in_grid_2=Valor in grid 2
+
+Valor_in_grid_1=Valor in grid 1
+
+Reclassify_into_ordered_classes=Reclassify into ordered classes
+
+Cross_checking=Cross checking
+
+Index_of_agreement=Index of agreement
+
+Kappa_for_class=Kappa for class
+
+Global_kappa=Global kappa
+
+Cross_classification=Cross classification
+
+Cross_checking_Kappa_index=Cross checking (Kappa index)
+
+Tabulate_Area=Tabulate Area
+
+Compact_output=Compact output
+
+Values_Grid=Values Grid
+
+Zones_Grid=Zones Grid
+
+Profile=Profile
+
+Window_size=Window size
+
+Lacunarity=Lacunarity
+
+Largest_window_size=Largest window size
+
+Input_Layer=Input Layer
+
+Class_statistics_[=Class statistics [
+
+Min_area=Min. area
+
+Max_area=Max. area
+
+Variance_of_area=Variance of area
+
+Mean_area=Mean area
+
+Number_of_patches=Number of patches
+
+total_area_Total=total area Total
+
+Class_ID=Class ID
+
+Class_statistics=Class statistics
+
+Filtered_layer=Filtered layer
+
+Min_area_[cells]=Min. area [cells]
+
+Filter_clumps=Filter clumps
+
+Reclassify_into_disjoint_classes=Reclassify into disjoint classes
+
+Largest_patch_index=Largest patch index
+
+Landscape_shape_index=Landscape shape index
+
+Edge_Density=Edge Density
+
+Total_perimeter=Total perimeter
+
+Patch_Density=Patch Density
+
+Total_area=Total area
+
+Percentage_of_Landscape=Percentage of Landscape
+
+Class=Class
+
+Class_metrics=Class metrics
+
+Radius_of_gyration=Radius of gyration
+
+Perimeter=Perimeter
+
+Area=Area
+
+Patch_metrics=Patch metrics
+
+area-density-edge_metrics=area/density/edge metrics
+
+Fragstats__area-density-edge_metrics=Fragstats (area/density/edge metrics)
+
+Aggregation_index_[=Aggregation index [
+
+Aggregation_index=Aggregation index
+
+Area[%]=Area [%]
+
+Area_cells=Area [cells]
+
+Processing_time=Processing time
+
+Local_statistics=Local statistics
+
+Larger_values_count=Larger values count
+
+Mean=Mean
+
+Focal_statistics=Focal statistics
+
+Equal_values_count__neighbourhood=Equal values count (neighborhood)
+
+Equal_values_count=Equal values count
+
+Range__neighbourhood=Range (neighborhood)
+
+Maximum_value_layer=Maximum value layer
+
+Lower_values_count__neighbourhood=Lower values count (neighborhood)
+
+Minimum_value_layer=Minimum value layer
+
+Skewness=Skewness
+
+Pattern_analysis=Pattern analysis
+
+Fragmentation=Fragmentation
+
+Variance=Variance
+
+Median__neighbourhood=Median (neighborhood)
+
+Range=Range
+
+Kurtosis__neighbourhood=Kurtosis (neighborhood)
+
+Force_no-data_value=Force no-data value
+
+Value=Value
+
+Radius=Radius
+
+Layer=Layer
+
+Layers=Layers
+
+Cells=Cells
+
+Minimum=Minimum
+
+Median=Median
+
+Maximum__neighbourhood=Maximum (neighborhood)
+
+Diversity=Diversity
+
+Kurtosis=Kurtosis
+
+Semivariances[=Semivariances[
+
+Semivar__Vert=Semivar. (Vert)
+
+Semivar__Horz=Semivar. (Horz)
+
+Distance=Distance
+
+Semivariances=Semivariances
+
+Maximum_distance__pixels=Maximum distance [pixels]
+
+Geostatistics=Geostatistics
+
+Semivariances__raster=Semivariances (raster)
+
+Mayority=Majority
+
+Mean__neighbourhood=Mean (neighborhood)
+
+Variance__neighbourhood=Variance (neighborhood)
+
+Minimum__neighbourhood=Minimum (neighborhood)
+
+Lower_values_count=Lower values count
+
+Larger_values_count__neighbourhood=Larger values count (neighborhood)
+
+Minority=Minority
+
+Mayority__neighbourhood=Majority (neighborhood)
+
+Maximum=Maximum
+
+Units=Units
+
+Standard_deviation=Standard deviation
+
+Maximum_radius__cells=Maximum radius [cells]
+
+Radius_of_variance=Radius of variance
+
+Map_units=Map units
+
+Number_of_different_classes=Number of different classes
+
+Dominance=Dominance
+
+Minority__neighbourhood=Minority (neighborhood)
+
+Skeweness__neighbourhood=Skewness (neighborhood)
+
+Regression_values=Regression values
+
+Regression=Regression
+
+Function_type=Function type
+
+Layer_2=Layer 2
+
+Layer_1=Layer 1
+
+Basic_tools_for_raster_layers=Basic tools for raster layers
+
+Correlation_between_layers=Correlation between layers
+
+Best_fit=Best fit
+
+Merged_grids=Merged grids
+
+Layers_to_be_merged_have_different_number_of_bands=Layers to be merged have different number of bands
+
+Interpolation_method=Interpolation method
+
+Layers=Layers
+
+Merge_grids=Merge grids
+
+B-spline=B-spline
+
+Cubic_spline=Cubic spline
+
+Inverse_distance=Inverse distance
+
+Bilinear=Bilinear
+
+Nearest_neighbour=Nearest neighbor
+
+[Inverted]=(Inverted)
+
+[mirrored]=(mirrored)
+
+Result=Result
+
+Metodo=Method
+
+Layer=Layer
+
+Mirror-flip=Mirror/flip
+
+Invert=Invert
+
+Mirror_vertically=Mirror vertically
+
+Mirror_horizontally=Mirror horizontally
+
+Create_grid_bounding_box=Create grid bounding box
+
+Max_values=Max values
+
+Polygons=Polygons
+
+Locate_max_values=Locate max values
+
+Buffer=Buffer
+
+Absolute=Absolute
+
+Threshold=Threshold
+
+Threshold_values=Threshold values
+
+Threshold_parameter=Threshold parameter
+
+Buffers=Buffers
+
+Threshold_buffer=Threshold buffer
+
+Relative_to_cell_value=Relative to cell value
+
+Cropped_layer=Cropped layer
+
+Layer_to_crop=Layer to crop
+
+Crop_grid_with_polygon_layer=Crop grid with polygon layer
+
+Inverted_mask=Inverted mask
+
+Invert_mask=Invert mask
+
+[density]=(density)
+
+Density=Density
+
+Search_radius=Search radius
+
+Field=Field
+
+Vector_layer=Vector layer
+
+Rasterization_and_interpolation=Rasterization and interpolation
+
+Histogram=Histogram
+
+Raster_layer=Raster layer
+
+[filled]=(filled)
+
+Filled_layer=Filled layer
+
+Void_filling_[nearest_neighbour]=Void filling (nearest neighbor)
+
+Statistics=Statistics
+
+No_data_cells=No data cells
+
+Valid_data_cells=Valid data cells
+
+Coefficient_of_variation=Coefficient of variation
+
+Total_sum=Total sum
+
+Variance=Variance
+
+Maximum_value=Maximum value
+
+Minimum_value=Minimum value
+
+Mean_squared_value=Mean squared value
+
+Mean_value=Mean value
+
+Basic_statistics=Basic statistics
+
+Tension_threshold=Tension threshold
+
+Void_filling=Void filling
+
+[cropped]=(cropped)
+
+Crop_to_valid_data_cells=Crop to valid data cells
+
+[gradient]=(gradient)
+
+Aspect=Aspect
+
+Slope=Slope
+
+Gradient_lines=Gradient lines
+
+Interval=Interval
+
+Maximum_size=Maximum size
+
+Minimum_size=Minimum size
+
+Density__kernel=Density (kernel)
+
+[sorted]=(sorted)
+
+Sorted_raster_layer=Sorted raster layer
+
+Sort=Sort
+
+[completed]=(completed)
+
+Additional_layer=Additional layer
+
+Base_layer=Base layer
+
+Complete_grid=Complete grid
+
+Distance=Distance
+
+Raster_buffer=Raster buffer
+
+Use_cell_value_as_distance=Use cell value as distance
+
+Fixed_distance=Fixed distance
+
+[aggregated]=(aggregated)
+
+Aggregated_layer=Aggregated layer
+
+Aggregation_factor=Aggregation factor
+
+Aggregate=Aggregate
+
+Minimum=Minimum
+
+Maximum=Maximum
+
+Moda=Mode
+
+Sum=Sum
+
+Look-up_table=Look-up table
+
+Raster_categories_analysis=Raster categories analysis
+
+Grids_from_table_and_classified_grid=Grids from table and classified grid
+
+Data_type=Data type
+
+Change_data_type=Change data type
+
+Clip_grid_with_bbox_of_polygons=Clip grid with bbox
+
+Layer_to_clip=Layer to clip
+
+Clipped_layer=Clipped layer
+
+INPUT_LAYER=Input layer
+LS_factor=LS factor
+
+Stream_Power_Index=Stream Power Index
+
+Topographic_Wetness_Index__TWI=Topographic Wetness Index (TWI)
+
+Flow_accumulation=Flow accumulation
+
+Slope=Slope
+
+Indices_and_other_hydrological_parameters=Indices and other hydrological parameters
+
+Topographic_indices=Topographic indices
+
+Mean_value_uphill=Mean value uphill
+
+Parameter=Parameter
+
+Elevation=Elevation
+
+Calculando_hidrograma=Computing hydrograph...
+
+Intervalo_en_hietogramas__minutos=Hyetograph interval [minutes]
+
+Intervalo_en_hidrogramas__minutos=Hydrograph interval [minutes]
+
+Tables=Tables
+
+Nombre_de_tabla_con_hietograma=Hyetograph data table
+
+N\u00famero_de_Curva=Curve number
+
+Time_to_outlet=Time to outlet
+
+A_simple_hydrological_model=A simple hydrological model
+
+Hyetographs_are_not_consistent=Hyetographs are not consistent
+
+C_factor_from_NDVI=C factor from NDVI
+
+Distance_to_channel_network=Distance to channel network
+
+Channel_network=Channel network
+
+Watersheds=Watersheds
+
+Basic_hydrological_analysis=Basic hydrological analysis
+
+Watersheds_by_area=Watersheds by area
+
+Interval__minutes=Interval [minutes]
+
+Average_water_velocity__Km-h=Average water velocity [km/h]
+
+Area=Area
+
+Next_reach_downslope=Next reach downslope
+
+Length=Length
+
+Order=Order
+
+Geomorphological_instantaneous_Unit_Hydrograph=Geomorphological Instantaneous Unit Hydrograph
+
+Max_value_uphill=Max. value uphill
+
+Minimum_watershed_size__cells=Minimum watershed size [cells]
+
+Slope_length=Slope length
+
+Use_threshold=Use threshold
+
+Slope_change_threshold=Slope change threshold
+
+[preprocessed]=(preprocessed)
+
+Preprocessed=Preprocessed
+
+Min_angle_between_cells_[degrees]=Min. angle between cells [deg]
+
+Sink_filling=Sink filling
+
+Outlet_point=Outlet point
+
+speed_ratio__channel_-_overland=speed ratio (channel/overland)
+
+Time_to_outlet__h=Time to outlet [h]
+
+Standard_deviation=Standard deviation
+
+Rainfall_mean=Rainfall mean
+
+Time_to_peak__minutes=Time to peak [minutes]
+
+Total_length__minutes=Total length [minutes]
+
+Return_periods=Return periods
+
+Create_synthetic_hyetograph=Create synthetic hyetograph
+
+Upslope_area=Upslope area
+
+Zona_de_salida=Outlet zone
+
+Upslope_area_from_outlet_zone=Upslope area from outlet zone
+
+Prevailing_erosion_type=Prevailing erosion type
+
+Sheet_erosion=Sheet erosion
+
+Rill_erosion=Rill erosion
+
+Edge_contamination=Edge contamination
+
+Strahler_Order=Strahler Order
+
+Upslope_area_from_a_single_point=Upslope area from a single point
+
+Elevation_over_channel_network=Elevation over channel network
+
+Tension_threshold=Tension threshold
+
+Convergence_factor__MFD=Convergence factor (MFD)
+
+Method=Method
+
+Weight=Weight
+
+MFD__Multiple_Flow_Directions=MFD (Multiple Flow Directions)
+
+DInfinity=DInfinity
+
+Rho8=Rho8
+
+D8=D8
+
+Net_balance=Net balance
+
+Creating_vector_layer=Creating vector layer...
+
+Next=Next
+
+ID=ID
+
+Calculating_orders=Calculating orders...
+
+Delineating_channel_network=Delineating channel network...
+
+Threshold=Threshold
+
+Criteria=Criteria
+
+Threshold_layer=Threshold layer
+
+Lower_than=Lower than
+
+Greater_than=Greater than
+
+Outlet_zone=Outlet zone
+
+Modified_DEM=Modified DEM
+
+Burn_streams=River burning
+
+Depth=Depth
+
+Iteration=Iteration
+
+Thinned_image=Thinned image
+
+Image=Image
+
+Image_processing=Image processing
+
+Thinning=Thinning
+
+Upper_percentile=Upper percentile
+
+Lower_percentile=Lower percentile
+
+Contrast_stretching=Contrast stretching
+
+Equalize=Equalize
+
+Calibrated_image=Calibrated image
+
+Offset=Offset
+
+Gain=Gain
+
+Resulting_average=Resulting average
+
+Resulting_standard_deviation=Resulting standard deviation
+
+Method=Method
+
+Image_to_calibrate=Image to calibrate
+
+Calibrate_an_image=Calibrate an image
+
+Gain_and_offset=Gain and offset
+
+Average_and_standard_deviation=Average and standard deviation
+
+B_band=B band
+
+B_layer=B layer
+
+G_band=G band
+
+G_layer=G layer
+
+R_band=R band
+
+R_layer=R layer
+
+Processing=Processing...
+
+Result=Result
+
+S_band=S band
+
+S_layer=S layer
+
+I_band=I band
+
+I_layer=I layer
+
+H_band=H band
+
+H_layer=H layer
+
+Radius=Radius
+
+Operation=Operation
+
+Erosion-Dilation=Erosion/dilation
+
+Dilation=Dilation
+
+Erosion=Erosion
+
+Reference_image=Reference image
+
+Calibrate_an_image__regression=Calibrate an image (regression)
+
+Classifying=Classifying
+
+Calculating_spectral_signatures=Calculating spectral signatures
+
+Vectorizing=Vectorizing
+
+Trees=Trees
+
+Tolerance_[size]=Tolerance (size)
+
+Tolerance=Tolerance
+
+Sample_trees=Sample trees
+
+Bands=Bands
+
+Detect_and_vectorize_individual_trees=Detect and vectorize individual trees
+
+Quantization_[4_bits]=Quantization [4 bits]
+
+Texture_ASM=Texture analysis (ASM)
+
+Texture_Contrast=Texture analysis (Contrast)
+
+Texture_Dissimilarity=Texture analysis (Dissimilarity)
+
+Texture_Entropy=Texture analysis (Entropy)
+
+Texture_Homogeneity=Texture analysis (Homogeneity)
+
+Line_of_sight=Line of sight
+
+Visibility_and_lighting=Visibility and lighting
+
+Height_of_point=Height of point
+
+point=Point
+
+Elevation=Elevation
+
+RF_Line_of_sight=RF line of sight
+
+Wavelength=Wavelength
+
+Distance=Distance
+
+Angle=Angle
+
+Horizon=Horizon
+
+Radius=Radius
+
+Height_of_emitter-receiver=Height of emitter/receiver
+
+Coordinates_of_emitter-receiver=Coordinates of emitter/receiver
+
+Horizon_blockage=Horizon blockage
+
+Visibility=Visibility
+
+Height_of_mobile_receiver-emitter=Height of mobile receiver/emitter
+
+Method=Method
+
+Lighting=Lighting
+
+Visual_exposure=Visual exposure
+
+Weight=Weight
+
+Elements=Elements
+
+Colect_values=Collect values
+
+Irradiate=Irradiate
+
+Exposure=Exposure
+
+de=of
+
+Calculating_day=Calculating day
+
+Insolation_time=Insolation time
+
+Solar_radiation=Solar radiation
+
+Ending_day=Ending day
+
+Ending_month=Ending month
+
+Starting_day=Starting day
+
+Starting_month=Starting month
+
+Interval_for_global_insolation_[days]=Interval for global insolation [days]
+
+Interval_for_daily_insolation_[h]=Interval for daily insolation [h]
+
+Latitude=Latitude
+
+Dust_[ppm]=Dust [ppm]
+
+Atmospheric_water_content_[cm]=Atmospheric water content [cm]
+
+Atmospheric_pressure_[mb]=Atmospheric pressure [mb]
+
+Global_transmittance=Global transmittance
+
+Solar_constant_[W-m\u00b2]=Solar constant [W/m\u00b2]
+
+December=December
+
+November=November
+
+October=October
+
+September=September
+
+August=August
+
+July=July
+
+June=June
+
+May=May
+
+April=April
+
+March=March
+
+February=February
+
+January=January
+
+Calculate_components_separately=Calculate components separately
+
+Global_atmospheric_transmittance=Global atmospheric transmittance
+
+Shaded_relief=Shaded relief
+
+Exaggeration=Exaggeration
+
+Sun_azimuthal_angle_[degrees]=Sun azimuthal angle [deg]
+
+Sun_elevation_angle_[degrees]=Sun elevation angle [deg]
+
+Combined=Combined
+
+Standard_max_90\u00b0=Standard (max 90\u00b0)
+
+Standard=Standard
+
+Approximated_Viewshed=Approximated viewshed
+
+Approximated_viewshed_threshold =Approx. threshold (usually 0.1-0.0001)
+
+Viewshed_output=Visibility Map
+
+R2_Viewshed=R2 Viewshed
+
+Height=HeightStatistics=Statistics
+
+Coefficient_of_variation=Coefficient of variation
+
+Sum_of_distances=Sum of distances
+
+Variance=Variance
+
+Maximum_distance=Maximum distance
+
+Min_distance=Min. distance
+
+Mean_squared_distance=Mean squared distance
+
+Mean_distance=Mean distance
+
+Objective_function=Objective function
+
+Statistics_of_global_solution=Statistics of global solution
+
+Resultado=Result
+
+Candidate=Candidate
+
+Preexistent=Preexistent
+
+Connections=Connections
+
+Distance=Distance
+
+Y_resource=Y resource
+
+X_resource=X resource
+
+Resource=Resource
+
+Y_demand=Y demand
+
+X_demand=X demand
+
+Demand_point=Demand point
+
+ID=ID
+
+Invalid_or_insufficient_data=Invalid or insufficient data
+
+Number_of_resources_to_allocate=Number of resources to allocate
+
+Method=Method
+
+Type_of_distance=Type of distance
+
+Candidate_points=Candidate points
+
+Preexistent_resources=Preexistent resources
+
+Field=Field
+
+Demand_points=Demand points
+
+Location-allocation=Location/allocation
+
+Minimum_coverage=Minimum coverage
+
+Maximum_sum=Maximum sum
+
+Maximum_coverage=Maximum coverage
+
+Minimize_maximum_distance=Minimize maximum distance
+
+Minimum_standard_deviation=Minimum standard deviation
+
+Minimum_sum_with_restrictions=Minimum sum with restrictions
+
+Minimum_sum=Minimum sum
+
+Manhattan=Manhattan
+
+Euclidean=Euclidean
+
+Wrong_data_in_table=Wrong data in table
+
+Demand_offer_distance_table=Distance table (demand-offer)
+
+Demand_candidates_distance_table=Distance table (demand-candidates)
+
+Location-allocation_table_distance=Location-allocation (with distance table)
+
+Elevation-relief_ratio=Elevation-relief ratio
+
+Elevation=Elevation
+
+Geomorphometry_and_terrain_analysis=Geomorphometry and terrain analysis
+
+Real_area=Real area
+
+Slope=Slope
+
+Units=Units
+
+Method=Method
+
+Percentage=Percentage
+
+Degrees=Degrees
+
+Radians=Radians
+
+Fit_3_Degree_Polynom__Haralick_1983=Fit 3rd degree polynom (Haralick 1983)
+
+Fit_2_Degree_Polynom__Zevenbergen_&_Thorne_1987=Fit 2nd degree polynom (Zevenbergen & Thorne 1987)
+
+Fit_2_Degree_Polynom__Heerdegen_&_Beran_1982=Fit 2nd degree polynom (Heerdegen & Beran 1982)
+
+Fit_2_Degree_Polynom__Bauer_Rohdenburg_Bork_1985=Fit 2nd degree polynom (Bauer, Rohdenburg, Bork 1985)
+
+Plane_fitting__Costa-Cabral_&_Burgess_1996=Plane fitting (Costa-Cabral & Burgess 1996)
+
+Maximum_Triangle_Slope__Tarboton_1997=Maximum triangle Slope (Tarboton 1997)
+
+M\u00e1ximum_slope__Travis_et_al_1975=Maximum slope (Travis et al. 1975)
+
+Classification=Classification
+
+Curvature=Curvature
+
+Vertical_curvature=Vertical curvature
+
+Horizontal_curvature=Horizontal curvature
+
+Curvatures=Curvatures
+
+Result=Result
+
+Threshold__Peucker_&_Douglas=Threshold (Peucker & Douglas)
+
+Landform_classification=Landform classification
+
+Peucker_&_Douglas=Peucker & Douglas
+
+Flow_direction=Flow direction
+
+Opposite_neighbours=Opposite neighbors
+
+Mark_Highest_Neighbour=Mark Highest Neighbor
+
+Aspect=Aspect
+
+Protection_index=Protection index
+
+Radius=Radius
+
+Convergence=Convergence
+
+Convergence_index=Convergence index
+
+Gradient=Gradient
+
+Calculating_derivatives=Calculating derivatives
+
+Anisotropic_coefficient_of_variation=Anisotropic coefficient of variation
+
+Calculating_coefficient=Calculating coefficient
+
+Hypsometry=Hypsometry
+
+Hypsometry_[=Hypsometry [
+
+Absolute_area=Absolute area
+
+Absolute_elevation=Absolute elevation
+
+Relative_area=Relative area
+
+Relative_elevation=Relative elevation
+
+Reading_input_data=Reading input data
+
+computing_elevation_values=Computing elevation values
+
+Contour_lines=Contour lines
+
+equidistance=Equidistance
+
+Uphill_lines=Uphill lines
+
+Elevation_field=Elevation field
+
+Interval_field=Interval field
+
+Wrong_field_types=Wrong field types
+
+Reading_input_data=Reading input data
+
+computing_elevation_values=Computing elevation values
+
+Fill_elevation_values=Fill elevation values
+
+nonSpatial = Non-spatial
+
+Calculator=Calculator
+Numerical_values=Numerical variables
+
+Ripley_K=Ripley K
+
+Points=Points
+
+Tools_for_point_layers=Tools for point layers
+
+L=L
+
+K_Poisson=K Poisson
+
+K=K
+
+Distance=Distance
+
+Distance_matrix=Distance matrix
+
+Distance_matrix_[=Distance matrix [
+
+Median_center=Median center
+
+Method=Method
+
+Weights=Weights
+
+Weighted_median_center=Weighted median center
+
+Coord=Coord
+
+Iteration=Iteration
+
+Statistics=Statistics
+
+Critical_value__at_5%=Critical value (at 5%)
+
+D_value__Kolmogorov-Smirnov=D value (Kolmogorov-Smirnov)
+
+Coefficient_of_variation_[~0=Coefficient of variation [~0
+
+Variance=Variance
+
+Mean=Mean
+
+Quadrant_analysis=Quadrant analysis
+
+Analyzing_quadrants=Analyzing quadrants.
+
+Creating_quadrants=Creating quadrants
+
+Mean_center_and_standard_distance=Mean center and standard distance
+
+Weighted_mean_center=Weighted mean center
+
+Mean_center=Mean center
+
+Radius__standard_deviation=Radius (standard deviation)
+
+Standard_distance=Standard distance
+
+Spatial_autocorrelation=Spatial autocorrelation
+
+Distance_interval=Distance interval
+
+Field=Field
+
+Variogram_cloud_[=Variogram cloud [
+
+Semivariance=Semivariance
+
+Spatial_autocorrelation_[=Spatial autocorrelation [
+
+Geary_c=Geary's C
+
+Moran_I=Moran's I
+
+ERROR_Spatial_autocorrelation_Invalid_value_in_table=ERROR Spatial autocorrelation - Invalid value in table
+
+Nearest_neighbour_analysis=Nearest neighbor analysis
+
+Corrected_Z_value=Corrected Z value
+
+Z_value=Z value
+
+Corrected_nearest_neighbour_index=Corrected nearest neighbor index
+
+Nearest_neighbour_index=Nearest neighbor index
+
+Edge-corrected_variance=Edge-corrected variance
+
+Edge-corrected_expected_distance=Edge-corrected expected distance
+
+Expected_distance=Expected distance
+
+Mean_distance=Mean distance
+
+Nearest_neighbour=Nearest neighbor
+
+Point_series_analysis=Point series analysis
+
+Time=Time
+
+Coefficient_of_variation=Coefficient of variation
+
+Total_sum=Total sum
+
+Mean_squared_value=Mean squared value
+
+Mean_value=Mean value
+
+Speed=Speed
+
+Basic_statistics=Basic statistics
+
+Direction=Direction
+Profile=Profile
+
+Profile_[line]=Profile (line)
+
+Profile_[points]=Profile (points)
+
+Starting_point=Starting point
+
+Additional_layers=Additional layers
+
+Elevation=Elevation
+
+Profiles=Profiles
+
+Flow_line_profile=Flow line profile
+
+Profile_route=Profile route
+
+RealDist=RealDist
+
+ProjDist=ProjDist
+
+Cross_sections=Cross sections
+
+Number_of_points__on_each_side=Number of points (on each side)
+
+Section_width__to_each_side=Section width (to each side)
+
+Distance_between_sections=Distance between sections
+
+Route=Route
+
+Route_[line]=Route (line)
+
+Route_[points]=Route (points)
+
+Accumulated_cost=Accumulated cost
+
+Cost_distances_and_routes=Cost, distances and routes
+
+Least_cost_path=Least cost path
+
+Zero_lines_in_layer=Zero lines in input layer
+
+Creating_index=Creating index...
+
+Creating_cross_validation=Creating cross validation
+
+Cross_validation_[=Cross validation [
+
+Diference=Difference
+
+Estimated_value=Estimated value
+
+Real_value=Real value
+
+Interpolating=Interpolating...
+
+[interpolated]=(interpolated)
+
+Result=Result
+
+Search_radius=Search radius
+
+Field=Field
+
+Point_layer=Point layer
+
+[rasterizedo]=(rasterized)
+
+Vector_layer=Vector layer
+
+Rasterization_and_interpolation=Rasterization and interpolation
+
+Rasterize_vector_layer=Rasterize vector layer
+
+Cross_validation=Cross validation
+
+Exponent=Exponent
+
+Linear_decrease=Linear decrease
+
+[variances]=(variances)
+
+Variances=Variances
+
+Range=Range
+
+Sill=Sill
+
+Nugget=Nugget
+
+Model=Model
+
+Max_number_of_points=Max. number of points
+
+Mino_number_of_points=Min. number of points
+
+Gaussian=Gaussian
+
+Exponential=Exponential
+
+Spherical=Spherical
+
+Kriging=Kriging
+
+Maximum_number_of_points=Maximum number of points
+
+Minimum_number_of_points=Minimum number of points
+
+Predictors=Predictors
+
+Universal_Kriging=Universal Kriging
+
+Euclidean_distance=Euclidean distance
+
+Cost_distances_and_routes=Cost, distances and routes
+
+Inverse_Distance_Weighting__IDW=Inverse Distance Weighting (IDW)
+
+Nearest_neighbour=Nearest neighbour
+
+Direction_to_closest_point=Direction to closest point
+
+Calculating=Calculating
+Probability__binomial=Probability (binomial)
+
+Result=Result
+
+Accumulated_probability=Accumulated probability
+
+Number_of_trials=Number of trials
+
+Success_probability=Success probability
+
+Raster_layer=Raster layer
+
+Statistical_methods=Statistical methods
+
+Bernouilli_probability_distribution=Bernoulli probability distribution
+
+Probabilidty__Student's_t=Probability (Student's t)
+
+Degrees_of_freedom=Degrees of freedom
+
+Student's_t_probability_distribution=Student's t probability distribution
+
+Probability__chi_squared=Probability (chi squared)
+
+Chi_squared_probability_distribution=Chi squared probability distribution
+
+Covariance_matrix=Covariance matrix
+
+Input_layers=Input layers
+
+Probability__normal=Probability (normal)
+
+Standard_deviation=Standard deviation
+
+Mean=Mean
+
+Normal_probability_distribution=Normal probability distribution
+
+Regression_values=Regression values
+
+Correlation=Correlation
+
+Multiple_regression=Multiple regression
+
+Could_not_calculate_regression=Could not calculate regression
+
+Calculating_regression=Calculating regression...
+
+Residuals=Residuals
+
+Invalid_input_data=Invalid input data
+
+Diference=Diference
+
+Estimated_value=Estimated value
+
+Real_value=Real value
+
+Predictors=Predictors
+
+Field=Field
+
+Points=Points
+
+Regression=Regression
+
+Variance=Variance
+
+Predictor_value=Predictor value
+
+Equation=Equation
+
+Principal_Components_Analysis=Principal Components Analysis
+
+Error_not_enough_bands_selected=Error. Not enough bands selected
+
+Input_bands=Input bands
+
+Probability__exponential=Probability (exponential)
+
+Exponential_probability_distribution=Exponential probability distribution
+
+Bands_number=Number of bands
+
+Iteration=IterationStatistics=Statistics
+
+Field=Field
+
+Table=Table
+
+Table_tools=Table tools
+
+Basic_statistics=Basic statistics
+
+Coefficient_of_variation=Coefficient of variation
+
+Total_sum=Total sum
+
+Variance=Variance
+
+Mean_squared_value=Mean squared value
+
+Mean_value=Mean value
+
+Result=Result
+
+Formula=Formula
+
+Layer=Layer
+
+Tools_for_vector_layers=Tools for vector layers
+
+Field_calculator=Field calculator
+
+[Save_to_temporary_file]=[Save to temporary file]
+
+Functions]=Functions]
+
+ELEMENTS=ELEMENTS
+
+Constants]=Constants]
+
+Constants=Constants
+
+Operators=Operators
+
+Functions=Functions
+
+Fields=Fields
+
+Vector_layer=Vector layer
+
+Histogram=Histogram
+
+Normality_test=Normality test
+
+Shapiro-Wilk_W=Shapiro-Wilk W
+
+At_least_three_features_are_needed_for_using_this_algorithm=At least three features are needed for using this algorithm
+
+Regression_values=Regression values
+
+Regression=Regression
+
+Equation=Equation
+
+Correlation_between_fields=Correlation between fields
+
+Best_fit=Best fit
+
+Input_layer=Input layer
+
+name_for_new_field=Name for new field
+
+Class_field=Class field
+
+Create_equivalent_numerical_class=Create equivalent numerical class
+
+field_to_rename=Field to rename
+
+Rename_field=Rename field
+
+Filter_vector=Filter vector layer
+Extract_isolines=Extract isolines
+Equidistance=Equidistance
+Level_of_detail=Level of Detail
+Cluster_tolerance=Cluster tolerance
+Smoothing_coef=Smoothing coeficient (0.1-1)
+Bezier_surface=Smooth using Bezier interpolation
+Create_tin=Create TIN from points
+Height_field=Height field
+Create_tin_with_break_lines=Create TIN using break lines
+Use_hard_lines=Use hard lines
+Use_soft_lines=Use soft lines
+hard_break_lines=Hard break lines
+soft_break_lines=Soft break lines
+Use_Z_value=Use Z value from geometry of point
+Result=Result
+Points_layer=Points layer
+Wrong_values_in_elevation_field=Wrong values in elevation field
+Create_tin_with_breaklines=Create TIN with breaklines
+Breaklines=BreaklinesNodes=Nodes
+
+Topology=Topology
+
+Extract_Nodes=Extract nodes
+
+Endpoints=Endpoints
+
+Result=Result
+
+Input_Layer=Input layer
+
+Extract_endpoints_of_lines=Extract endpoints of lines
+
+Join_near_lines=Join adjacent lines
+
+Lines=Lines
+
+Node_lines=Node lines
+
+Result=Result
+
+Input_layer=Input layer
+
+Vectorization=Vectorization
+
+Vectorize_raster_layer__lines=Vectorize raster layer (lines)
+
+Vectorize_raster_layer__polygons=Vectorize raster layer (polygons)
+
+Contour_lines=Contour lines
+
+Equidistance=Equidistance
+
+Points=Points
+
+Raster_layer_to_points_layer=Raster layer to points layer
+
+Result=Result
+
+Field_for_labeling=Field for labeling
+
+Layer=Layer
+
+Tools_for_vector_layers=Tools for vector layers
+
+Separate_entities=Separate entities
+
+Centroids=Centroids
+
+Vector_layer=Vector layer
+
+Tools_for_polygon_layers=Tools for polygon layers
+
+Modified_classes=Modified classes
+
+Number_of_classes=Number of classes
+
+Tools_for_point_layers=Tools for point layers
+
+Spatial_cluster=Spatial cluster
+
+Class=Class
+
+Field=Field
+
+Points=Points
+
+Polygons=Polygons
+
+Point_statistics_in_polygons=Point statistics in polygons
+
+Maximum=Maximum
+
+Minimum=Minimum
+
+Variance=Variance
+
+Mean=Mean
+
+Sum=Sum
+
+Preserve_topology=Preserve topology
+
+Tolerance=Tolerance
+
+Lines=Lines
+
+Input_layer=Input layer
+
+Geometries_to_points=Geometries to points
+
+fields=Fields
+
+Cluster=Cluster
+
+File=File
+
+Save_geometries_as_WKT=Save geometries as WKT
+
+Smoothed_lines=Smoothed lines
+
+Curve_type=Curve type
+
+Intermediate_points=Intermediate points
+
+Tools_for_line_layers=Tools for line layers
+
+Smooth_lines=Smooth lines
+
+smoothed=smoothed
+
+Clean_vector_layer=Clean vector layer
+
+Polygons_to_polylines=Polygons to polylines
+
+Standard_deviation=Standard deviation
+
+Points_layer=Points layer
+
+Perturbate_points_layer=Perturbate points layer
+
+Graticule=Graticule
+
+Type=Type
+
+Y_interval=Y interval
+
+X_interval=X interval
+
+Rectangles=Rectangles
+
+Create_graticule=Create graticule
+
+Snapped_points=Snapped points
+
+Snap_points_to_layer=Snap points to layer
+
+Creating_index=Creating index...
+
+Change_line_direction=Change line direction
+
+Count_points_in_polygons=Count points in polygons
+
+Inner_points=Inner points
+
+Use_interpolation=Use interpolation
+
+Raster_layers=Raster layers
+
+Sample_raster_layers=Sample raster layers
+
+Splitted_lines=Split lines
+
+Method=Method
+
+Add_data_after_point=Add data after point
+
+Add_data_before_point=Add data before point
+
+Split_lines_with_points_layer=Split lines with points layer
+
+Bounding_Box=Bounding Box
+
+Symmetric_difference=Symmetric difference
+
+Lines_Dist_Angles=Distances and Angles
+
+ConvexHull_of_Layer_2=Convex hull of layer 2
+
+Layer_2=Layer 2
+
+ConvexHull_of_layer_1=Convex hull of layer 1
+
+Layer_1=Layer 1
+
+ID1_FIELDNAME=ID attribute 1
+
+ID2_FIELDNAME=ID attribute 2
+
+Distances_and_Angles=Distances and angles
+
+Clipped_Layer=Clipped layer
+
+Clipping_layer=Clipping layer
+
+Layer_to_clip=Layer to clip
+
+Clip=Clip
+
+Clipped_layer=Clipped layer
+
+Summary_statistics=Summary statistics
+
+Field_with_class_name=Field with class name
+
+Dissolve=Dissolve
+
+[Save_to_temporary_file]=[Save to temporary file]
+
+MAX=MAX
+
+MIN=MIN
+
+VAR=VAR
+
+AVG=AVG
+
+Grids=Grids
+
+Grid_statistics_in_polygons=Grid statistics in polygons
+
+Separate_multi-part_features=Separate multi-part features
+
+Export_vector_layer=Export vector layer
+
+Polylines=Polylines
+
+Polylines_to_polygons=Polylines to polygons
+
+Number_of_features_to_create=Number of features to create
+
+Create_random_vector_layer=Create random vector layer
+
+Autoincrement_Value=Autoincrement Value
+
+Unique_Geometries=Unique geometries
+
+Remove_repeated_geometries=Remove duplicate geometries
+
+Number_of_points=Number of points
+
+Field_for_number_of_points=Field for number of points
+
+Adjust_n_point_to_polygon=Adjust n point to polygon
+
+Take_from_table_field=Take from table field
+
+Fixed_number=Fixed number
+
+Random=Random
+
+Regular_grid=Regular grid
+
+Clip_by_rectangle=Clip by rectangle
+
+sampled=sampled
+
+Sampled_lines=Sampled lines
+
+Sample_lines_extreme_points=Sample extreme points of lines
+
+Intersection=Intersection
+
+Clean_points_layer=Clean points layer
+
+Additional_layers=Additional layers
+
+Main_layer=Main layer
+
+Merge=Merge
+
+Anchor_point_Y=Anchor point Y
+
+Anchor_point_X=Anchor point X
+
+Scale_Factor__Y=Scale Factor (Y)
+
+Scale_factor__X=Scale factor (X)
+
+Rotation_angle=Rotation angle
+
+Translation_Y=Translation Y
+
+Translation_X=Translation X
+
+Transform=Transform
+
+Generalized_lines=Generalized lines
+
+Simplify_lines=Simplify lines
+
+Simplify_polygons=Simplify polygons
+
+Simplified_polygons=Simplified polygons
+
+Minimum_enclosing_shape=Minimum enclosing shape
+
+Create_one_polygon_for_each_class=Create one polygon for each class
+
+Enclosing_shape=Enclosing shape
+
+Minimum_enclosing_rectangle=Minimum enclosing rectangle
+
+Minimum_enclosing_circle=Minimum enclosing circle
+
+Convex_hull=Convex hull
+
+Minimum_enclosing_shapes=Minimum enclosing shapes
+
+[Enclosing_shape]=(enclosing shape)
+
+Directional_mean=Directional mean
+
+Vector_mean=Vector mean
+
+Circular_variance=Circular variance
+
+Angle=Angle
+
+Mean_distance=Mean distance
+
+Polylines_to_single_segments=Polylines to single segments
+
+Geometric_properties_of_polygons=Geometric properties of polygons
+
+PERIMETER=PERIMETER
+
+AREA=AREA
+
+Grouped_Layer=Grouped_Layer
+
+Group_near_features=Group near features
+
+Difference=Difference
+
+Alternative_routes=Alternative routes
+
+Routes=Routes
+
+Use_base_route_sinuosity=Use base route sinuosity
+
+Sinuosity=Sinuosity
+
+Recombination=Recombination
+
+Constrained_brownian_motion=Constrained brownian motion
+
+Number_of_new_routes=Number of new routes
+
+Original_route=Original route
+
+Cost_distances_and_routes=Cost, distances and routes
+
+Generate_alternative_routes=Generate alternative routes
+
+Distance_between_points=Distance between points
+
+Lines_to_equispaced_points=Lines to equispaced points
+
+Direction=Direction
+
+Average_angle=Average angle
+
+Straight_length=Straight length
+
+Length=Length
+
+Geometric_properties_of_lines=Geometric properties of lines
+
+Remove_holes=Remove holes
+
+Buffer=Buffer
+
+Do_not_round_resulting_polygons=Do not round resulting polygons
+
+Number_of_concentric_rings=Number of concentric rings
+
+Buffer_type=Buffer type
+
+Distance=Distance
+
+Buffers=Buffers
+
+Fixed_distance_buffer=Fixed distance buffer
+
+Both=Both
+
+Inner_buffer=Inner buffer
+
+Outer_buffer=Outer buffer
+
+Y=Y
+
+X=X
+
+Table=Table
+
+Points_layer_from_table=Points layer from table
+
+Layer_from_table=Layer from table
+
+triangulated=triangulated
+
+Delaunay_triangulation=Delaunay triangulation
+
+Add_coordinates_to_points=Add coordinates to points
+
+Distance_field=Distance field
+
+Variable_distance_buffer=Variable distance buffer
+
+Distance_from_table_field=Distance from table field
+
+Fixed_distance=Fixed distance
+
+Split_polylines_at_nodes=Split polylines at nodes
+
+Union=Union
+
+Copying_entities=Copying entities
+
+Add_field=Add field
+
+Field_name=Field name
+
+Field_type=Field type
+
+Field_precision_Double_only=Field precision (double only)
+
+Default_value=Default value\:
+
+Delete_field=Delete field
+
+Polygonize=Polygonize
+
+Distance_to_closest_geometry=Distance to closest geometry
+
+No_Elements_In_Distance_List=No valid elements in distance list
+
+Wrong_Field_Name=Wrong field name
+
+At_Least_One_Field_Needed=At least one field is needed to dissolve
+
+Fields=Fields
+
+NN_Spatial_Join=Spatial Join (nearest neighbour)
+
+Additional_layer=Additional layer
+
+Multiple_buffer=Multiple buffer
+
+Distances_table=Distance table
+
+Medial_Axis=Medial axis
+
+Voronoi_polygons=Voronoi tesellation
+
+Constrained_Delaunay_triangulation=Constrained Delaunay triangulation
+
+InPolygonSpatialJoin=In-polygon spatial join
+
+Dissolve_multiple=Dissolve[multiple fields]
+
+Place_point_on_line_at_distance=Place points on lines at a given distance
+
+Line=Line
+
+Points_to_line=Points to line
+
+ResolvePolygonHoles=Resolve polygon holes
+
+Result=Result
+
+Soil_line_intercept=Soil line intercept
+
+Soil_line_slope=Soil line slope
+
+Near_infrared_band=Near infrared band
+
+Near_infrared_layer=Near infrared layer
+
+Red_band=Red band
+
+Red_layer=Red layer
+
+Vegetation_indices=Vegetation indices
+
+Cannot_construct_line_with_less_than_2_points=Cannot create line with less than 2 points
+
+global_threshold=Global threshold
+
+CheckLineDirectionCoherence=Check line direction coherence
+
+Lines_layer=Lines layer
+
+Secondary_layer=Secondary layer
+
+Selected_points=Selected points
+
+InPolygonSpatialJoinB=In-polygon spatial join(B)
+
+Processing=Processing
+
+Average_slope_line=Average slope of lines
+
+Geometric_properties_of_lines_b=Geometric properties of lines (extended)
+
+Rasterize_vector_layer_for_mask=Rasterize vector layer(for mask)
+
+Combine_mask=Combine masks
+
+NoDataValue=No-data value
+
+ChangeNoDataValue=Change no-data value
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_fr.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_fr.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_fr.properties	(revision 369)
@@ -0,0 +1,1169 @@
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Wed Feb 16 10:46:03 CET 2011
+LessThanTwoPointsInTable=Il y a moins de deux points dans la table. La ligne 3D ne peut pas \u00EAtre cr\u00E9\u00E9e
+Profile_line=Profil en long
+3D_Interpolation=Interpolation 3D
+3D_Profile=Profil 3D
+3DLineFromTable=Ligne 3D \u00E0 partir d'une table
+3D_Layer_from_function=Couche raster 3D \u00E0 partir d'une fonction
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Wed Feb 16 10:46:03 CET 2011
+Dead_fuel_moisture_10H=Humidit\u00E9 du combustible mort 10 heures
+Fire_modeling=Mod\u00E9lisation des incendies
+Fire_simulation=Simulation d'incendies
+Elevation=Hauteur
+Dead_fuel_moisture_100=Humidit\u00E9 du combustible mort 100 heures
+Wind_direction=Direction du vent
+Herb_fuel_moisture=Humidit\u00E9 du combustible herbac\u00E9
+Woody_fuel_moisture=Humidit\u00E9 du combustible vivant ligneux
+Wind_speed_m-s=Vitesse du vent (m/s)
+Ignition_points=Points d'ignition
+Fuel_model=Mod\u00E8le de combustible
+Time=Temps
+Dead_fuel_moisture_1H=Humidit\u00E9 du combustible mort 1 heure
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 11:30:32 CET 2011
+area_under_the_curve=Surface sous la courbe
+Analytical_Hierarchy_Process__AHP=Processus d'analyse hi\u00E9rachique (AHP)
+Factor=Facteur
+OWA=OWA
+Accumulated_cost=Co\u00FBt accumul\u00E9
+Chessboard=\u00C9chiquier
+Warning_Inconsistent_weighting_values=ATTENTION les valeurs de comparaison sont incorrectes
+Direction_of_maximum_cost_[degrees]=Direction du co\u00FBt maximum [degr\u00E9s]
+Parallelepiped=Parall\u00E9l\u00E9pip\u00E8de
+Method=M\u00E9thode
+Layer_2__init=Couche 2 (initiale)
+Predictors=Estimateurs
+Polar_to_Cartesian=Polaire \u00E0 Cart\u00E9sien
+Chamfer_3-4=Chanfrein 3-4
+Suitability=Pertinence
+Isotropic_cost=Co\u00FBt unitaire isotropique
+Change_Vector_Analysis=Changer analyse vectorielle
+Layer_2__final=Couche 2 (finale)
+Sum_of_cost_to_all_points=Somme des co\u00FBts vers tous les points
+Calculating_statistical_values=Calcul des valeurs statistiques en cours
+Accumulated_cost__anisotropic=Co\u00FBt accumul\u00E9 (anisotropique)
+Routes=Itin\u00E9raires
+ROC_curve=Courbe ROC
+Type_of_distance=Type de distance
+Warning=AVERTISSEMENT
+Polygons=Polygones
+Origin-destination_points=Points d'origine et de destination
+Pairwise_comparisons=Comparaison des poids deux \u00E0 deux
+Angle=Angle
+Clusters=Agr\u00E9gats spatiaux
+Cost_for_predefined_routes=Co\u00FBt pour des itin\u00E9raires pr\u00E9d\u00E9finis
+Unitary_cost=Co\u00FBt unitaire
+Cartesian_to_polar=Cart\u00E9sien \u00E0 polaire
+Calculating_spectral_signatures=Calcul des signatures spectrales en cours
+Number_of_classes=Nombre de classes
+Linear=Lin\u00E9aire
+Modified_cells=Cellule modifi\u00E9e
+Weights=Pond\u00E9ration
+Layer_1__init=Couche 1 (initiale)
+Layers=Couche
+Euclidean=Euclidien
+Control_point_D=Point de contr\u00F4le D
+Error_wrong_number_of_layers=Erreur \: nombre de couches incorrect
+Control_point_C=Point de contr\u00F4le C
+Control_point_B=Point de contr\u00F4le B
+Control_point_A=Point de contr\u00F4le A
+Difference=Ecart
+Fuzzify=Pr\u00E9paration pour la logique diffuse (FUZZY)
+Presence-abscence_field=Colonne de pr\u00E9sence / absence
+Distance=Distance
+Y=Y
+X=X
+Observed_points=Points observ\u00E9s
+Accumulated_cost__isotropic=Co\u00FBt accumul\u00E9 (isotropique)
+Fuzzy_logic=Logique diffuse (FUZZY)
+Field_with_class_value=Couche contenant la valeur de la classe
+K=Facteur K
+Mahalanobis_distance=Distance de Mahalanobis
+Classification=Classification
+Minimum_distance=Distance minimale
+Statistics=Statistiques
+Ordered_Weighted_Averaging__OWA=Moyenne pond\u00E9r\u00E9e ordonn\u00E9e (OWA)
+Cost_distances_and_routes=Co\u00FBts, distances et itin\u00E9raires
+Predictive_models=Mod\u00E8les d'estimation
+Input_Layer=Couche en entr\u00E9e
+Cost_for_predefined_routes__anisotropic=Co\u00FBt pour des itin\u00E9raires pr\u00E9d\u00E9finsi (anisotropique)
+Error_reading_table=Erreur \u00E0 la lecture de la table
+Cost_variation_factors=Facteurs de variation du co\u00FBt
+Unsupervised_classification__clustering=Classification non-dirig\u00E9e
+Closest_points=Point le plus proche
+Analytical_Hierarchy_Process_Weights=Processus d'analyse hi\u00E9rachique. Pond\u00E9ration
+Name=Nombre
+Raster_layer_analysis=Outils d'analyse pour couches matricielles (raster)
+Manhattan=Manhattan
+Error=Erreur
+Modulus=Module
+Maximum_unitary_cost=Co\u00FBt unitaire maximum
+Layer_1__final=Couche 1 (finale)
+[fuzzy]=[fuzzy]
+Routes_and_cost=Itin\u00E9raires et co\u00FBts
+Bands=Bandes pour la classification
+BIOCLIM=BIOCLIM
+Accumulated_cost__combined=Co\u00FBt accumul\u00E9 (combin\u00E9)
+Sigmoidal=Sigmo\u00EFdale
+Calculating_distances=Calcul des distances en cours
+Profile=Profil
+Cutoff__BIOCLIM=Seuil limite (BIOCLIM)
+Supervised_classification=Classification dirig\u00E9e
+J-shaped=En forme de J
+OWA_Invalid_weight=OWA Poids non valable
+Result=R\u00E9sultat
+Anisotropic_cost=Co\u00FBt unitaire anisotropique
+Analytical_Hierarchy_Process=Processus d'analyse hi\u00E9rachique
+Member_function=Type de fonction d'appartenance
+Classes=Classes
+Presence_points=Points de pr\u00E9sence
+Maximum_likelihood=Maximum de vraisemblance
+Threshold_for_route_separation=Seuil de diff\u00E9renciation d'itin\u00E9raire
+Distance_to_mean_value=Distance \u00E0 la moyenne
+Cost=Co\u00FBt
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Thu Feb 17 18:37:25 CET 2011
+Raster_layers=Couches matricielles (raster)
+Layer_to_normalize=Couche \u00E0 normaliser
+Mean=Moyenne
+Min_value=Valeur minimale
+Constants=Constantes
+Only_volumes_over_base_level=Seulement les volumes au dessus du niveau de base
+ELEMENTS=\u00C9l\u00E9ments
+Normalized=Normalis\u00E9
+Volume=Volume
+Volumes=Volumes
+Formula=Formule
+User-defined_3_X_3_filter=Filtre 3x3 d\u00E9fini par l'utilisateur
+Normalize=Normaliser
+[normalized]=Normalis\u00E9
+Iterations=It\u00E9rations
+Lower_layer=Couche inf\u00E9rieure
+Layers=Couches
+Syntax_error=Erreur de syntaxe
+Radius_[cells]=Rayon [en cellule]
+Add_volumes_both_over_and_below_base_level=Ajouter les volumes en dessous et au dessus du niveau de base
+from=de
+Volume_-=Volume (-)
+Operators=Op\u00E9rateurs
+Wrong_formula=Formule incorrecte
+Layer_from_function=Couche \u00E0 partir d'une fonction
+Volume_+=Volume (+)
+Upper_layer=Couche sup\u00E9rieure
+Method=M\u00E9thode
+Calculus_tools_for_raster_layer=Outils de calcul pour couches matricielles (raster)
+Random_DEM=Cr\u00E9er un MNT al\u00E9atoire
+Base_level=Niveau de base
+Max_value=Valeur maximale
+Total_volume=Volume total
+Random_grid__Bernouilli=Cr\u00E9er une couche matricielle al\u00E9atoire (Bernouilli)
+Elevation=Altitude
+Value=Valeur
+New_layer=Nouvelle couche
+Standard_deviation=\u00C9cart type
+Random_grid__uniform=Cr\u00E9er une couche matricielle al\u00E9atoire (uniforme)
+Only_volumes_below_base_level=Seulement les volumes en dessous du niveau de base
+Constant_grid=Grille constante
+Constants]=Constantes]
+Filter_kernel=Filtre par matrice multiplicative (kernel)
+Functions]=Fonctions]
+Volume_calculation=Calcul de volumes
+Probability=Probabilit\u00E9
+Calculated_volume=Volume calcul\u00E9
+Random_grid__normal=Cr\u00E9er une couche matricielle al\u00E9atoire (normale)
+Functions=Fonctions
+[Save_to_temporary_file]=Sauvegarder dans une fichier temporaire
+Grid_from_function=Grille \u00E0 partir d'une fonction
+Layer=Couche
+Result=R\u00E9sultat
+Add_volumes_over_base_level_and_substract_volumes_below_it=Ajouter les volumes au dessus du niveau de base et soustraire ceux en dessous
+Raster_calculator=Calculatrice matricielle
+Basic_tools_for_raster_layers=Outils de base pour couches matricielles (raster)
+Volumen_between_two_layers=Volume entre deux couches
+Probability__%=Probabilit\u00E9 (%)
+unchecked=Non v\u00E9rifi\u00E9
+Cell_size_[=Taile de la cellule
+Raster_creation_tools=Outils de cr\u00E9ation de couches matricielles (raster)
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 13:28:15 CET 2011
+Patch_metrics=M\u00E9trique des agr\u00E9gats
+Largest_window_size=Taille de fen\u00EAtre maximale
+Lacunarity=Lacunarit\u00E9
+Fragstats__area-density-edge_metrics=Fragstats (m\u00E9triques de superficie/densit\u00E9/bordure)
+Perimeter=P\u00E9rim\u00E8tre
+Fragstats__diversity_metrics=Fragstats (m\u00E9triques de diversit\u00E9)
+Metrics=M\u00E9trique
+Index_of_agreement=Indices de concordance entre couches
+Method=Crit\u00E8re
+Max_value=Valeur maximale
+Values_Grid=Couche indiquant la valeur des cellules
+Shannon_index=Indice de Shannon
+Reclassify_into_disjoint_classes=Reclasser en classes disjointes
+Area=Superficie
+Percentage_of_Landscape=Pourcentage du paysage
+Landscape_shape_index=Indice de forme de paysage
+Diversity_metrics=M\u00E9trique de diversit\u00E9
+Mean_area=Superfice moyenne par zone
+Class_ID=Identifiant de la classe
+Aggregation_index=Indice d'agr\u00E9gation
+Reclassify_raster_layers=Reclasser des couches matricielles (raster)
+Total_area=Superficie totale
+Edge_Density=Densit\u00E9 de bordures
+Global_kappa=Kappa global
+Cross_classification=Classification crois\u00E9e
+Area[%]=Superficie [%]
+Class_metrics=M\u00E9trique par classe
+Window_size=Taille de la fen\u00EAtre
+Radius_of_gyration=Rayon de pivot
+Cross_checking_Kappa_index=Validation crois\u00E9e (indice de Kappa)
+Valor_in_grid_2=Valeur dans la couche 2
+Valor_in_grid_1=Valeur dans la couche 1
+Total_perimeter=P\u00E9rim\u00E8tre total
+Number_of_classes=Nombre de classes
+area-density-edge_metrics=M\u00E9trique (superficie/densit\u00E9/bordure)
+Variance_of_area=Variance de la superficie
+Landscape_metrics=M\u00E9trique du paysage 
+Cross_checking=Validation crois\u00E9e
+Compact_output=Compresser le fichier en sortie
+Patch_Richness_Density=Densit\u00E9 de richesse en agr\u00E9gats
+Layer=Couche
+Layer_to_reclassify=Couche \u00E0 reclasser
+Shannon_uniformity_index=Indice d'uniformit\u00E9 de Shannon
+Look-up_table=Table de correspondance
+Largest_patch_index=Indice du plus grand agr\u00E9gat
+Max_area=Superficie maximale des zones
+Min_area_[cells]=Superfice minimale (cellules)
+Min_area=Superfice minimale des zones
+Modified_Simpson_uniformity_index=Indice d'uniformit\u00E9 de Simpson modifi\u00E9
+Raster_categories_analysis=Outils pour les couches matricielles class\u00E9es en cat\u00E9gories
+Simpson_index=Indice de Simpson
+Modified_Simpson_index=Indice de Simpson modifi\u00E9
+Grid_2=Couche matricielle 2
+Grid_1=Couche matricielle 1
+Number_of_patches=Nombres de zones
+Filter_clumps=Filtrer les agr\u00E9gats par leur taille
+Min_value=Valeur minimale
+Reclassify=Reclasser
+Input_Layer=Couches en entr\u00E9e
+Kappa_for_class=Kappa de classe
+Aggregation_index_[=Indice d'agr\u00E9gation [
+Divide_into_n_classes_of_equal_amplitude=Diviser en n classes d'\u00E9gale amplitude
+Class_statistics_[=Statistiques des classes [
+Patch_Density=Densit\u00E9 d'agr\u00E9gats
+New_value=Nouvelle valeur
+Zones_Grid=Couche des zones (cellules de m\u00EAme valeur)
+Relative_richness=Richesse relative
+Class_area_[cells]=Superficie de chaque classe (cellule)
+Simpson_uniformity_index=Indice d'uniformit\u00E9 de Simpson
+Grid_combination=Combinaision de couches matricielles
+Richness=Richesse
+total_area_Total=Superficie totale
+Tabulate_Area=Cr\u00E9er une table crois\u00E9e entre deux couches matricielles
+Reclassify_into_ordered_classes=Reclasser en classes ordonn\u00E9es contigu\u00EBs
+Class=Classes
+Combine_grids=Combiner des couches matricielles
+Processing_time=Temps d'attente
+Divide_into_n_classes_of_equal_area=Diviser en n classes d'\u00E9gale superficie
+Profile=Profil
+Area_cells=Superficie [cellule]
+Maximum_number_of_different_classes=Nombre maximum de classes distinctes
+Filtered_layer=Couche filtr\u00E9e
+[reclassified]=[reclass\u00E9]
+Class_statistics=Statistiques des classes
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Thu Feb 17 19:43:47 CET 2011
+Minimum__neighbourhood=Minimum (par voisinage)
+Mean__neighbourhood=Moyenne (par voisinage)
+Kurtosis=Kurtosis
+Skewness=Asym\u00E9trie
+Mean=Moyenne
+Lower_values_count__neighbourhood=Nombre de valeurs minimales (par voisinage)
+Maximum_distance__pixels=Distance maximale (pixels)
+Median__neighbourhood=M\u00E9diane (par voisinage)
+Cells=Cellules
+Median=M\u00E9diane
+Minority=Minorit\u00E9
+Maximum_value_layer=Couche de valeur maximale
+Radius_of_variance=Rayon de la variance
+Minority__neighbourhood=Minorit\u00E9 (par voisinage)
+Fragmentation=Fragmentation
+Layers=Couches
+Radius=Rayon
+Semivariances=Semivariances
+Maximum_radius__cells=Rayon maximal (cellules)
+Number_of_different_classes=Nombre de classes distinctes
+Diversity=Diversit\u00E9
+Semivariances[=Semivariances[
+Semivar__Vert=Semivar. (Vert)
+Semivar__Horz=Semivar. (Horz)
+Variance__neighbourhood=Variance (par voisinage)
+Range__neighbourhood=Etendue (par voisinage)
+Minimum=Minimum
+Geostatistics=G\u00E9ostatistiques
+Larger_values_count__neighbourhood=Nombre de valeurs maximales (par voisinage)
+Maximum__neighbourhood=Maximum (par voisinage)
+Value=Valeur
+Standard_deviation=\u00C9cart type
+Maximum=Maximum
+Map_units=Unit\u00E9s de la carte
+Local_statistics=Statistiques locales
+Equal_values_count=Nombre de valeurs \u00E9gales
+Units=Unit\u00E9s
+Skeweness__neighbourhood=Asym\u00E9trie (voisinage)
+Dominance=Dominance
+Equal_values_count__neighbourhood=Nombre de valeurs \u00E9gales (plus proche voisin)
+Variance=Variance
+Mayority__neighbourhood=Majorit\u00E9 (par voisinage)
+Minimum_value_layer=Couche de valeur minimale
+Force_no-data_value=Forcer valeurs sans donn\u00E9es
+Layer=Couche
+Mayority=Majorit\u00E9
+Kurtosis__neighbourhood=Kurtosis (par voisinage)
+Focal_statistics=Statistiques focale
+Lower_values_count=Nombre de valeurs minimales
+Pattern_analysis=Analyse des formes et des agencements spatiaux
+Distance=Distance
+Semivariances__raster=Semivariances (couche matricielle)
+Larger_values_count=Nombre de valeurs maximales
+Range=Port\u00E9e
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 00:20:44 CET 2011
+Create_grid_bounding_box=Cr\u00E9er une polygone correspondant \u00E0 l'emprise d'une couche matricielle
+INPUT_LAYER=Couche en entr\u00E9e
+[gradient]=[Gradient]
+Raster_layer=Couche matricielle (raster)
+Function_type=Type de fonction
+Void_filling=Remplir les cellules sans valeurs
+[Inverted]=[Invers\u00E9]
+Inverse_distance=Inverse de la distance
+Cropped_layer=Couche d\u00E9coup\u00E9e
+Grids_from_table_and_classified_grid=Couches matricielles issues d'une table et couches class\u00E9es
+Mirror_vertically=R\u00E9flexion verticale
+Locate_max_values=Localiser les valeurs maximales
+Aggregate=Combiner
+Density=Densit\u00E9
+[completed]=[termin\u00E9]
+Layer_2=Couche 2
+Interpolation_method=M\u00E9thode d'interpolation
+Layer_1=Couche 1
+Rasterization_and_interpolation=Rasterisation et interpolation
+Change_data_type=Changer le type des valeurs des cellules (entiers, r\u00E9els, etc..)
+Relative_to_cell_value=Fonction de la valeur de la cellule
+Crop_to_valid_data_cells=Ajuster \u00E0 l'emprise avec de valeurs valables
+Raster_buffer=Zone d'influence [raster]
+Histogram=Histogramme
+[filled]=[rempli]
+Search_radius=Rayon de recherche
+Data_type=Type de donn\u00E9es
+Clipped_layer=Couche d\u00E9coup\u00E9e
+Mean_squared_value=Valeur quadratique moyenne
+Base_layer=Couche de base
+Clip_grid_with_bbox_of_polygons=D\u00E9couper la couche matricielle sur l'emprise d'une couche vectorielle
+Variance=Variance
+Polygons=Polygones
+Field=Colonne
+Sorted_raster_layer=Couche matricielle ordonn\u00E9e
+Basic_statistics=Statistiques de base
+Inverted_mask=Masque invers\u00E9
+Valid_data_cells=Cellules avec des valeurs valables
+Minimum_value=Valeur minimale
+Threshold_parameter=Param\u00E8tre du seuil
+Filled_layer=Couche remplie
+Tension_threshold=Seuil de tension
+Merged_grids=Couches matricielles fusionn\u00E9es
+Invert=Inverser
+Layer=Couche source
+Layers=Couches
+Interval=Intervalle entre les cellules analys\u00E9es
+Look-up_table=Tableau de correspondance
+Maximum_value=Valeur maximale
+Bilinear=Bilin\u00E9aire
+Maximum=Maximum
+Merge_grids=Fusionner des couches matricielles
+Aggregation_factor=Facteur de combinaison
+Use_cell_value_as_distance=Utiliser la valeur de cellule comme distance
+Distance=Distance
+Raster_categories_analysis=Outils pour couches matricielles class\u00E9es en cat\u00E9gories
+Max_values=Valeurs maximales
+Best_fit=Meilleur ajustement possible
+Cubic_spline=Spline cubique
+Fixed_distance=Distance fixe
+Gradient_lines=Lignes de d\u00E9grad\u00E9
+Basic_tools_for_raster_layers=Outils de base pour les couches matricielles (raster)
+Sort=Trier
+Total_sum=Somme totale
+Threshold_values=Valeurs du seuil
+Aspect=Orientation
+Layers_to_be_merged_have_different_number_of_bands=Les couches \u00E0 combiner n'ont pas le m\u00EAme nombre de bandes
+Regression=R\u00E9gression
+Minimum=Minimum
+Statistics=Statistiques
+Nearest_neighbour=Plus proche voisin
+Correlation_between_layers=Corr\u00E9lation entre des couches
+Aggregated_layer=Couche combin\u00E9e
+Regression_values=Param\u00E8tres de r\u00E9gression
+Buffers=Zones tampon [buffers]
+Metodo=M\u00E9thode
+Absolute=Seuil absolu
+Additional_layer=Couche suppl\u00E9mentaire
+Layer_to_crop=Couche \u00E0 couper
+Minimum_size=Taille minimale
+[cropped]=[coup\u00E9]
+No_data_cells=Les cellules sans valeurs
+Mirror-flip=Miroir / inverser
+B-spline=B-spline
+Moda=Mode
+Buffer=Zone tampon (buffer)
+Threshold=Type de seuil
+[density]=[densit\u00E9]
+M\u00E9todo=M\u00E9thode
+Mirror_horizontally=R\u00E9flexion horizontale
+Invert_mask=Inverser le masque
+Sum=Somme
+Vector_layer=Couche vectorielle
+Maximum_size=Taille maximale
+[mirrored]=[Miroir]
+Layer_to_clip=Couche \u00E0 couper
+Void_filling_[nearest_neighbour]=Remplir les cellules sans valeurs (plus proche voisin)
+Crop_grid_with_polygon_layer=D\u00E9couper un couche matricielle avec une couche de polygones
+Mean_value=Valeur moyenne
+Result=R\u00E9sultat
+Density__kernel=Densit\u00E9 (noyau)
+[aggregated]=[Agr\u00E9g\u00E9e]
+[sorted]=[tri\u00E9]
+Coefficient_of_variation=Coefficient de variation
+Complete_grid=Remplir les cellules sans valeurs d'une couche par interpolation avec une autre couche
+Slope=Pente
+Threshold_buffer=Zone d'influence par seuil
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Criteria=Crit\u00E8re
+Calculando_hidrograma=Calcul de l'hydrogramme
+Calculating_orders=Calcul des ordres en cours
+Strahler_Order=Ordre de Strahler
+C_factor_from_NDVI=Facteur C issu du NDVI
+Elevation=Altitude
+Length=Longueur
+Lower_than=Plus petit que
+Parameter=Param\u00E8tre
+Intervalo_en_hietogramas__minutos=Intervalle dans hy\u00E9togramme (en minutes)
+Time_to_outlet__h=Temps vers sortie (h)
+Total_length__minutes=Dur\u00E9e totale (minutes)
+Return_periods=P\u00E9riode de retour
+Rill_erosion=\u00C9rosion par ravinement
+Creating_vector_layer=Cr\u00E9ation d'une couche vectorielle en cours ...
+Flow_accumulation=Accumulation des \u00E9coulements
+A_simple_hydrological_model=Un mod\u00E8le hydrologique simple
+Method=M\u00E9thode
+Upslope_area_from_a_single_point=Superficie en amont d'un point donn\u00E9
+Topographic_indices=Indices topographiques
+Standard_deviation=\u00C9cart type
+Time_to_peak__minutes=Temps pour la crue (minutes)
+Sheet_erosion=\u00C9rosion de versant
+Area=Superficie
+Watersheds_by_area=Bassins versants par taille
+Intervalo_en_hidrogramas__minutos=Intervalle dans hydrogramme (en minutes)
+Zona_de_salida=Zone de sortie
+Convergence_factor__MFD=Facteur de convergence (MFD)
+Greater_than=Plus de
+LS_factor=Facteur LS
+Outlet_zone=Zone de sortie
+Min_angle_between_cells_[degrees]=Angle minimum entre cellules [degr\u00E9s]
+Prevailing_erosion_type=\u00C9rosion pr\u00E9dominante
+Outlet_point=Exutoire
+Delineating_channel_network=D\u00E9limitation du r\u00E9seau de drainage en cours ...
+Preprocessed=Pr\u00E9trait\u00E9
+Topographic_Wetness_Index__TWI=Indice d'humidit\u00E9 topographique
+[preprocessed]=[Pr\u00E9trait\u00E9]
+speed_ratio__channel_-_overland=Rapport de vitesses (rivi\u00E8re / sur terre) 
+Edge_contamination=Contamination de bordures
+Tension_threshold=Seuil de tension
+MFD__Multiple_Flow_Directions=MFD (Directions d'\u00E9coulement multiple)
+Watersheds=Bassins versants
+Stream_Power_Index=Indice de puissance du courant
+Elevation_over_channel_network=Altitude au-dessus du r\u00E9seau de drainage
+Burn_streams=Ajuster un r\u00E9seau hydrologique dans un MNT
+Next_reach_downslope=Tron\u00E7on aval
+Weight=Pond\u00E9ration 
+Create_synthetic_hyetograph=Cr\u00E9er un hy\u00E9togramme synth\u00E9tique
+Rho8=Rho8
+Use_threshold=Utiliser seuil
+DInfinity=DInfinity
+Mean_value_uphill=Valeur moyenne en aval
+Indices_and_other_hydrological_parameters=Indices et autres param\u00E8tres hydrologiques
+Hyetographs_are_not_consistent=Les hy\u00E9togrammes ne sont pas coh\u00E9rents
+D8=D8
+Nombre_de_tabla_con_hietograma=Nom de la table avec hy\u00E9togramme
+Net_balance=Solde net
+Upslope_area=Superficie en amont 
+Basic_hydrological_analysis=Analyse hydrologique de base
+Geomorphological_instantaneous_Unit_Hydrograph=Hydrogramme g\u00E9omorphologique instantan\u00E9 unitaire
+N\u00FAmero_de_Curva=Nombre de m\u00E9andres
+Next=Suivant
+Average_water_velocity__Km-h=Vitesse moyenne de l'eau (km/h)
+Slope_change_threshold=Seuil de rupture de pente
+ID=ID
+Threshold=Seuil
+Minimum_watershed_size__cells=Taille minimale des bassins versants (cellules)
+Time_to_outlet=Temps vers sortie
+Rainfall_mean=Moyenne des pr\u00E9cipitations
+Channel_network=R\u00E9seau de drainage
+Modified_DEM=MNT modifi\u00E9
+Lower_que=Plus petit que
+Distance_to_channel_network=Distance au r\u00E9seau de drainage
+Interval__minutes=Intervalle (minutes)
+Sink_filling=Remplir les d\u00E9pressions
+Max_value_uphill=Valeur maximale en amont
+Threshold_layer=Couche de seuil
+Order=Ordre
+Tables=Tables
+Upslope_area_from_outlet_zone=Superficie en amont d'une zone
+Slope=Pente
+Slope_length=Longueur de pente
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Thu Feb 17 23:29:06 CET 2011
+Operation=Op\u00E9ration
+Lower_percentile=Centile inf\u00E9rieur
+B_band=Bande B
+Classifying=Classification en cours
+Vectorizing=Vectoriser
+Image_to_calibrate=Image \u00E0 calibrer
+Image_processing=Traitement et analyse des images
+Bands=Bandes
+Texture_Entropy=Analyse de texture (Entropie)
+Upper_percentile=Centile sup\u00E9rieur 
+H_band=Bande H
+Offset=D\u00E9calage
+Radius=Rayon
+B_layer=Couche C
+Resulting_standard_deviation=Ecart type des r\u00E9sultats
+G_layer=Couche G
+I_layer=Couche I
+H_layer=Couche H
+Erosion=\u00C9rosion
+S_layer=Couche S
+Contrast_stretching=\u00C9talement du contraste
+R_layer=Couche R
+Sample_trees=Arbre d'\u00E9chantillonnage
+Gain_and_offset=Amplification et d\u00E9calage
+R_band=Bande R
+Tolerance=Tol\u00E9rance
+Method=M\u00E9thode
+Texture_Dissimilarity=Analyse de texture (Dissimilarit\u00E9)
+Gain=Amplification
+Calculating_spectral_signatures=Calculer les signatures spectrales
+Calibrate_an_image__regression=Calibrer une image (r\u00E9gression)
+Reference_image=Image de r\u00E9f\u00E9rence
+Calibrated_image=Image calibr\u00E9e
+Erosion-Dilation=\u00C9rosion/Dilatation
+Texture_Homogeneity=Analyse de texture (Homog\u00E9n\u00E9it\u00E9)
+Average_and_standard_deviation=Moyenne et \u00E9cart type
+Calibrate_an_image=Calibrer une image
+Tolerance_[size]=Tol\u00E9rance [taille]
+G_band=Bande G
+Quantization_[4_bits]=R\u00E9duire la profondeur \u00E0 4 bits
+I_band=Bande I
+Thinned_image=Image squelettis\u00E9e
+Detect_and_vectorize_individual_trees=D\u00E9tecter et vectoriser les arbres individuels
+Iteration=It\u00E9ration
+Equalize=\u00C9galiser
+Processing=Traitement enc ours...
+Image=Image
+Dilation=Dilatation
+Result=R\u00E9sultat
+S_band=Bande S
+Texture_ASM=Analyse de texture (ASM)
+Thinning=Squelettisation
+Trees=Arbres
+Texture_Contrast=Analyse de texture (Contraste)
+Resulting_average=Moyenne des r\u00E9sultats
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Calculating_day=Calcul du jour en cours
+Interval_for_daily_insolation_[h]=Intervalle d'ensoleillement quotidien [h]
+Visual_exposure=Exposition visuelle
+Insolation_time=Dur\u00E9e d'ensoleillement
+Angle=Angle
+March=Mars
+May=Mai
+Calculate_components_separately=Calculer les composants s\u00E9par\u00E9mment
+Coordinates_of_emitter-receiver=Coordonn\u00E9es de l'\u00E9metteur / r\u00E9cepteur
+Height_of_emitter-receiver=Hauteur \u00E9metteur / r\u00E9cepteur
+Wavelength=Longueur d'onde
+December=D\u00E9cembre
+Weight=Pond\u00E9ration
+Radius=Rayon
+Height_of_mobile_receiver-emitter=Hauteur r\u00E9cepteur / \u00E9metteur mobile
+Standard=Standard
+de=de
+Combined=Combin\u00E9
+Exaggeration=Exag\u00E9ration
+July=Juillet
+Solar_radiation=Rayonnement solaire
+Colect_values=Collecter des valeurs
+Ending_day=Jour final
+R2_Viewshed=R2 champ de visibilit\u00E9
+Lighting=Illumination
+Height_of_point=Hauteur du point
+Method=M\u00E9thode
+Global_transmittance=Transmittance globale
+February=F\u00E9vrier
+Sun_azimuthal_angle_[degrees]=Azimut du soleil [degr\u00E9s]
+January=Janvier
+Horizon_blockage=Horizon invisible
+August=Ao\u00FBt
+Starting_day=Jour initial
+Elevation=Altitude
+Viewshed_output=Carte de visibilit\u00E9
+Exposure=Exposition
+Interval_for_global_insolation_[days]=Intervalle d'ensoleillement global [jours]
+Height=Hauteur
+April=Avril
+October=Octobre
+point=Point
+Elements=\u00C9l\u00E9ments
+Ending_month=Mois final
+Starting_month=Mois initial
+Latitude=Latitude
+Visibility=Visibilit\u00E9
+RF_Line_of_sight=Ligne de mire (radio-fr\u00E9quence)
+Shaded_relief=Repr\u00E9sentation du relief par estompage (illumination)
+Sun_elevation_angle_[degrees]=Inclinaison du soleil [degr\u00E9s]
+Solar_constant_[W-m\u00B2]=Constante solaire [W / m\u00B2]
+Atmospheric_pressure_[mb]=Pression atmosph\u00E9rique [mb]
+Dust_[ppm]=Poussi\u00E8re [ppm]
+Approximated_viewshed_threshold=Seuil pour le champ de visibilit\u00E9 [normalement 0.1-0.0001]
+Line_of_sight=Ligne de mire
+November=Novembre
+June=Juin
+Horizon=Horizon
+Standard_max_90\u00B0=Standard (max 90\u00B0)
+Visibility_and_lighting=Visibilit\u00E9 et illumination
+Distance=Distance
+Atmospheric_water_content_[cm]=Teneur en eau dans l'atmosph\u00E9rique [cm]
+Global_atmospheric_transmittance=Transmittance atmosph\u00E9rique globale
+Irradiate=Irradier
+Approximated_Viewshed=Champ de visibilit\u00E9 approximatif
+September=Septembre
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 00:01:41 CET 2011
+Demand_offer_distance_table=Distancier (demande-offre)
+Min_distance=Distance minimale
+Minimum_standard_deviation=\u00C9cart type minimal
+Resource=Ressources
+Minimum_coverage=Couverture minimale
+Invalid_or_insufficient_data=Donn\u00E9es non valables ou insuffisantes
+Manhattan=Manhattan
+Wrong_data_in_table=Donn\u00E9es incorrectes dans la table
+Statistics=Statistiques
+Candidate=Candidat
+Demand_point=Point de demande
+Maximum_sum=Somme maximale
+Mean_squared_distance=Distance moyenne au carr\u00E9
+X_resource=Ressource X
+Euclidean=Euclidien
+Preexistent=Pr\u00E9existent
+Number_of_resources_to_allocate=Nombre de ressources \u00E0 allouer
+Method=M\u00E9thode
+Sum_of_distances=Somme des distances
+ID=ID
+Mean_distance=Distance moyenne
+Demand_points=Points de demande
+Location-allocation=Localisation optimale des \u00E9l\u00E9ments
+Connections=Connexions
+Maximum_coverage=Couverture maximale
+Y_resource=Y ressource
+Resultado=R\u00E9sultat
+Coefficient_of_variation=Coefficient de variation
+Minimum_sum_with_restrictions=Somme minimale avec restrictions
+Objective_function=Fonction de l'objectif
+X_demand=Demande X
+Minimum_sum=Somme minimale
+Candidate_points=Points candidats
+Y_demand=Demande Y
+Demand_candidates_distance_table=Distancier (demande-candidats)
+Statistics_of_global_solution=Statistiques de la solution globale
+Variance=Variance
+Maximum_distance=Distance maximale
+Location-allocation_table_distance=Localisation optimale des \u00E9l\u00E9ments (avec le distancier)
+Minimize_maximum_distance=Minimiser la distance maximale
+Distance=Distance
+Type_of_distance=Type de distance
+Conexions=Connexions
+Preexistent_resources=Ressources pr\u00E9existentes
+Field=Colonne
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 00:20:20 CET 2011
+Z_value=Valeur Z\:
+Median_center=Centre m\u00E9dian
+Distance_matrix_[=Matrice de distances [
+ERROR_Spatial_autocorrelation_Invalid_value_in_table=ERREUR Corr\u00E9lation spatiale - Valeurs incorrectes dans la table d'attributs
+Mean=Moyenne
+Min_value=Valeur minimale
+Coord=Coord
+Statistics=Statistiques
+L=L
+Corrected_Z_value=valeur Z corrig\u00E9e
+K=K
+Points=Points
+Standard_distance=Distance type
+Mean_center_and_standard_distance=Centre moyen et distance type
+D_value__Kolmogorov-Smirnov=Valeur D du test Kolmogorov-Smirnov
+Edge-corrected_expected_distance=Distance attendue apr\u00E8s correction de l'effet de bord
+Weighted_mean_center=Centre moyen pond\u00E9r\u00E9
+Mean_squared_value=Valeur quadratique moyenne
+Nearest_neighbour_analysis=Avalyse du plus proche voisin
+Point_series_analysis=Analyse de semis de points
+Distance_matrix=Matrice de distances
+Method=M\u00E9thode
+Radius__standard_deviation=Rayon (\u00E9cart type)
+Nearest_neighbour_index=Indice du plus proche voisin
+Coefficient_of_variation_[~0=Coefficient de variation [~0
+Distance_interval=Intervalle de distance
+Analyzing_quadrants=Analyse des quadrants en cours
+Corrected_nearest_neighbour_index=Indice du plus proche voisin corrig\u00E9
+Mean_distance=Distance moyenne
+Semivariance=Semivariance
+Max_value=Valeur maximale
+Geary_c=c de Geary
+Variogram_cloud_[=Nuage de points du variogramme [
+Expected_distance=Distance attendue
+Speed=Vitesse
+Quadrant_analysis=Analsyse par quadrants
+Coefficient_of_variation=Coefficient de variation
+Ripley_K=K de Ripley
+Direction=Orientation
+Moran_I=I de Moran
+Total_sum=Somme totale
+ERROR=ERREUR
+K_Poisson=K Poisson
+Time=Temps
+Mean_value=Valeur moyenne
+Creating_quadrants=Cr\u00E9ation de quadrants
+Edge-corrected_variance=Variance apr\u00E8s correction de l'effet de bord
+Weights=Pond\u00E9ration
+Variance=Variance
+Spatial_autocorrelation_[=Autocorrelation spatiale [
+Mean_center=Centre moyen
+Iteration=It\u00E9ration
+Nearest_neighbour=Plus proche voision
+Basic_statistics=Statistiques de base
+Distance=Distance
+Field=Colonne
+Weighted_median_center=Centre m\u00E9dian pond\u00E9r\u00E9
+Spatial_autocorrelation=Autocorrelation spatiale
+Critical_value__at_5%=Valeur critique (\u00E0 5%)
+Tools_for_point_layers=Outils pour couches de points
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 10:23:04 CET 2011
+Section_width__to_each_side=Largeur de section (vers chaque c\u00F4t\u00E9)
+Additional_layers=Couches suppl\u00E9mentaires
+Distance_between_sections=Distance entre sections
+Route_[line]=Itin\u00E9raire [ligne]
+Profile_route=Profil d'itin\u00E9raire
+Route=Itin\u00E9raire ou chemin
+Cost_distances_and_routes=Co\u00FBts, distances et itin\u00E9raires
+Cross_sections=Sections transversales
+Zero_lines_in_layer=La couche ne contient aucune ligne
+Starting_point=Point de d\u00E9part
+Accumulated_cost=Co\u00FBt accumul\u00E9
+Profile_[line]=Profil [ligne]
+Profiles=Profils
+ProjDist=Distance Horizontale
+Profile=Profil en long
+Least_cost_path=Itin\u00E9raire au plus faible co\u00FBt
+Elevation=MNT
+RealDist=Distance r\u00E9ellel
+Flow_line_profile=Profil le long d'une ligne d'\u00E9coulement
+Number_of_points__on_each_side=Nombre de points (de chaque c\u00F4t\u00E9)
+Profile_[points]=Profil [points]
+Route_[points]=Itin\u00E9raire [points]
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 10:34:10 CET 2011
+Inverse_Distance_Weighting__IDW=Pond\u00E9ration inverse \u00E0 la distance (IDW)
+Estimated_value=Valeur estim\u00E9ee
+Direction_to_closest_point=Direction vers le point le plus proche
+Calculating=Calcul en cours
+[variances]=[variances].
+Spherical=Sph\u00E9rique
+Mino_number_of_points=Nombre minimum de points
+Interpolating=Interpolation en cours...
+Exponential=Exponentiel
+Nugget=P\u00E9pite
+Kriging=Krigeage
+Cost_distances_and_routes=Co\u00FBts, distances et itin\u00E9raires
+Universal_Kriging=Krigeage universel 
+Rasterize_vector_layer=Rasteriser une couche vectorielle
+Exponent=Exposant
+Max_number_of_points=Nombre maximum de points
+Vector_layer=Couche vectorielle
+Maximum_number_of_points=Nombre maximum de points
+Sill=Palier
+[rasterizedo]=[rasteris\u00E9]
+Creating_cross_validation=Calcul de la validation crois\u00E9e en cours...
+Variances=Variances
+Linear_decrease=Diminution lin\u00E9aire
+Diference=Diff\u00E9rence
+Real_value=Valeur r\u00E9elle
+Point_layer=Semis de points
+Predictors=Estimateurs
+Cross_validation=Validation crois\u00E9e
+Model=Mod\u00E8le
+Euclidean_distance=Distance euclidienne
+Cross_validation_[=Validation crois\u00E9e [
+Nearest_neighbour=Plus proche voisin
+Creating_index=Calcul de l'indice en cours...
+Result=R\u00E9sultat
+Minimum_number_of_points=Nombre minimum de points
+Gaussian=Gaussien
+Field=Colonne
+Range=Port\u00E9e
+[interpolated]=[Interpol\u00E9]
+Search_radius=Rayon de recherche
+Rasterization_and_interpolation=Rasterisation et interpolation
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 11:59:37 CET 2011
+Estimated_value=Valeur estim\u00E9e
+Statistical_methods=M\u00E9thodes statistiques
+Mean=Moyenne
+Multiple_regression=R\u00E9gression multiple
+Raster_layer=Couche matricielle (raster)
+Points=Points
+Number_of_trials=Nombre d'essais
+Probability__binomial=Probabilit\u00E9 (binomiale)
+Probability__chi_squared=Probabilit\u00E9 (chi\u00B2)
+Residuals=R\u00E9sidus
+Error=Erreur 
+Probability__normal=Probabilit\u00E9 (normale)
+Input_bands=Bandes en entr\u00E9e
+Correlation=Corr\u00E9lation
+Student's_t_probability_distribution=Distribution de probabilit\u00E9 de Student
+Predictor_value=Valeur de l'estimateur
+Normal_probability_distribution=Distribution de probabilit\u00E9 normale
+Calculating_regression=Calcul de r\u00E9gression en cours...
+Success_probability=Probabilit\u00E9 de succ\u00E8s
+Accumulated_probability=Probabilit\u00E9s accumul\u00E9es
+Chi_squared_probability_distribution=Distribution des probabilit\u00E9s Chi\u00B2
+Probability__exponential=Probabilit\u00E9 (exponentielle)
+Input_layers=Couches en entr\u00E9e
+Standard_deviation=\u00C9cart type
+Bands_number=Nombre de bandes
+Equation=\u00C9quation
+Probabilidty__Student's_t=Probabilit\u00E9 (t de Student)
+Invalid_input_data=Donn\u00E9e en entr\u00E9e incorrectes
+Error_not_enough_bands_selected=Erreur \: pas assez de bandes s\u00E9lectionn\u00E9es
+Regression=R\u00E9gression
+Diference=Diff\u00E9rence
+Principal_Components_Analysis=Analyse en composantes principales
+Real_value=Valeur r\u00E9elle
+Regression_values=Valeurs de r\u00E9gression
+Bernouilli_probability_distribution=Distribution des probabilit\u00E9s binomiale (Bernouilli)
+Variance=Variance
+Predictors=Estimateurs
+Iteration=It\u00E9ration
+Could_not_calculate_regression=Impossible de calculer la r\u00E9gression
+Result=R\u00E9sultat
+Degrees_of_freedom=Degr\u00E9s de libert\u00E9
+Field=Colonne
+Covariance_matrix=Matrice de covariance
+Exponential_probability_distribution=Distribution de probabilit\u00E9s exponentielles
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Normality_test=Test de normalit\u00E9
+Correlation_between_fields=Corr\u00E9lation entre les colonnes
+Min_value=Valeur minimale
+Constants=Constantes
+Filter_vector=Filtre vecteur
+ELEMENTS=\u00C9L\u00C9MENTS
+Table=Table
+Statistics=Statistiques
+field_to_rename=Champs \u00E0 renommer
+Formula=Formule
+Operators=Op\u00E9rateurs
+Mean_squared_value=Valeur quadratique moyenne
+Create_equivalent_numerical_class=Cr\u00E9er des classes num\u00E9riques \u00E9quivalentes
+Rename_field=Renommer champ
+Fields=Colonnes
+Max_value=Valeur maximale
+Vector_layer=Couches vectorielles
+Class_field=Champs des classes
+Coefficient_of_variation=Coefficient de variation
+name_for_new_field=Nom pour nouveau champ
+At_least_three_features_are_needed_for_using_this_algorithm=Au moins trois \u00E9l\u00E9ments sont n\u00E9cessaires pour ex\u00E9cuter cet algorithme
+Field_calculator=Calculatrice de champ
+Equation=\u00C9quation
+Total_sum=Somme totale
+Constants]=Constantes]
+Tools_for_vector_layers=Outils pour les couches vectorielles
+Functions]=Functions]
+Mean_value=Valeur moyenne
+Best_fit=Meilleur ajustement possible
+Regression=R\u00E9gression
+Functions=Functions
+Regression_values=Valeurs de r\u00E9gression
+Variance=Variance
+Table_tools=Outils pour les tables
+[Save_to_temporary_file]=[Sauvegarder dans fichier temporaire]
+Layer=Couche
+Result=R\u00E9sultats
+Basic_statistics=Statistiques de base
+Histogram=Histogramme
+Field=Colonne
+tatistics=Statistiques
+Shapiro-Wilk_W=W de Shapiro-Wilk
+Input_layer=Couche en entr\u00E9e
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 12:09:56 CET 2011
+Use_Z_value=Utilisez la valeur Z de la g\u00E9om\u00E9trie du point
+Height_field=Colonne de l'altitude
+Wrong_values_in_elevation_field=Valeurs erron\u00E9es dans le champ \u00E9l\u00E9vation
+Use_hard_lines=Utiliser des lignes de rupture de pente dures
+Smoothing_coef=Coefficient de lissage (0.1 - 1)
+Create_tin=Cr\u00E9er un maillage trigonal irr\u00E9gulier (TIN) \u00E0 partir de points
+Use_soft_lines=Utiliser des lignes de rupture de pente mall\u00E9ables
+Result=R\u00E9sultat
+Create_tin_with_breaklines=Cr\u00E9er un maillage trigonal irr\u00E9gulier (TIN) avec des lignes de rupture de pente
+Cluster_tolerance=Tol\u00E9rance d'agr\u00E9gats
+Extract_isolines=Extraire isolignes
+Create_tin_with_break_lines=Cr\u00E9er un maillage trigonal irr\u00E9gulier (TIN) \u00E0 partir de lignes de rupture de pente
+hard_break_lines=Lignes de rupture de pente dures
+Points_layer=Couche de points
+soft_break_lines=Lignes de rupture de pente mall\u00E9able
+Level_of_detail=Niveau de d\u00E9tail
+Breaklines=Lignes de rupture de pente
+Equidistance=\u00C9quidistance
+Bezier_surface=Lissage \u00E0 l'aide de l'interpolation de B\u00E9zier
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Vectorization=Vectorisation
+Input_layer=Couche en entr\u00E9e
+Points=Points
+Min_value=Valeur minimale
+Result=R\u00E9sultats
+Raster_layer_to_points_layer=Convertir couche matricielle en couche de points
+Vectorize_raster_layer__polygons=Transtypage \: vectoriser couche matricielle en polygones
+Vectorize_raster_layer__lines=Vectoriser couche matricielle en lignes
+Contour_lines=Courbes de niveau
+Max_value=Valeur maximale
+Equidistance=\u00C9quidistance
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 14:00:43 CET 2011
+Remove_repeated_geometries=Supprimer entit\u00E9s dupliqu\u00E9es
+Autoincrement_Value=Valeur autoincr\u00E9mentale
+Rectangles=Rectangles
+Add_field=Ajouter Colonne
+Adjust_n_point_to_polygon=Ajouter n points au polygone
+Clip_by_rectangle=D\u00E9couper par rectangle
+Directional_mean=Direction moyenne
+Use_interpolation=Utiliser interpolation
+Straight_length=Longueur rectiligne
+Alternative_routes=Chemins alternatifs
+Number_of_features_to_create=Nombre d'entit\u00E9s \u00E0 cr\u00E9er
+Create_graticule=Cr\u00E9er un carroyage (maillage vectoriel r\u00E9gulier)
+Angle=Angle
+Tools_for_vector_layers=Outils pour couches vectorielles
+Snap_points_to_layer=Ajuster points \u00E0 une autre couche
+Minimum_enclosing_circle=Cercle englobant minimal
+Clipped_layer=Couche d\u00E9coup\u00E9e
+Buffers=Zones d'influence [buffers]
+Inner_points=Points internes
+Lines_to_equispaced_points=Convertir lignes en points espac\u00E9s r\u00E9guli\u00E8rement
+Clipping_layer=Couche pour le d\u00E9coupage
+Voronoi_polygons=Polygones de Voronoi (tessellation)
+Intersection=Intersection
+Number_of_points=Nombre de points
+Clipped_Layer=Couche d\u00E9coup\u00E9e
+Do_not_round_resulting_polygons=Ne pas g\u00E9n\u00E9raliser les polygones en sortie
+Constrained_Delaunay_triangulation=Triangulation de Delaunay
+Mean=Moyenne
+Delete_field=Supprimer colonne
+Both=Int\u00E9rieur et ext\u00E9rieur
+Buffer_type=Type de zone tampon
+Regular_grid=Carroyage r\u00E9gulier
+Modified_classes=Classes modifi\u00E9es
+Union=Union
+Generate_alternative_routes=Calculer des chemins alternatifs
+Field_for_number_of_points=Colonne pour nombre de points
+Spatial_cluster=Agr\u00E9gats spatiaux
+Additional_layer=Couche suppl\u00E9mentaire
+fields=Colonnes
+Variance=Variance
+Unique_Geometries=Couche sans doublon
+Polylines_to_single_segments=Convertir polylignes en segments simples
+ConvexHull_of_layer_1=Enveloppe convexe de Hull couche 1
+Variable_distance_buffer=Zone tampon \u00E0 largeur variable
+Distance_to_closest_geometry=Distance au plus proche voisin
+Layer_2=Couche 2
+Layer_1=Couche 1
+smoothed=Liss\u00E9es
+Medial_Axis=Axe m\u00E9dian
+Distance_from_table_field=Distance issue d'une colonne 
+Fixed_number=Nombre fixe
+Mean_distance=Distance moyenne
+Change_line_direction=Inverser le sens des lignes
+Field_type=Type de colonne
+Type=Type
+Method=M\u00E9thode
+Scale_factor__X=Facteur d'\u00E9chelle (X)
+MAX=MAX
+Main_layer=Couche principale
+Clean_points_layer=Nettoyer couche de points
+Convex_hull=Enveloppe convexe de Hull
+Group_near_features=Regrouper entit\u00E9s voisines
+Polygonize=Convertir lignes en polygones
+Remove_holes=Supprimer trous
+Points=Points
+Vector_layer=Couche vectorielle
+Add_data_before_point=Ajouter valeurs avant le point
+Generalized_lines=Lignes g\u00E9n\u00E9ralis\u00E9es
+Smoothed_lines=Lignes liss\u00E9es
+Standard_deviation=\u00C9cart type
+Polygons_to_polylines=Convertir polygones en polylignes
+Graticule=Carroyage
+Simplify_polygons=Simplifier polygones
+Enclosing_shape=Forme de l'enveloppe
+Tools_for_point_layers=Outils pour couches de points
+Translation_Y=Translation Y
+Random=Al\u00E9atoire
+Inner_buffer=Zone tampon vers l'int\u00E9rieur
+Circular_variance=Variance circulaire
+Translation_X=Translation X
+Tools_for_polygon_layers=Outils pour couches de polygones
+Save_geometries_as_WKT=Sauvegarder g\u00E9om\u00E9tries en  WKT
+Grid_statistics_in_polygons=Statistiques de cellules par polygones d'appartenance
+Smooth_lines=Lisser lignes
+ID1_FIELDNAME=Colonne ID 1 
+Field_name=Nom colonne
+Distances_table=Distancier
+Table=Table
+Preserve_topology=Conserver topologie
+Create_one_polygon_for_each_class=Cr\u00E9er un polygone par classe
+Lines_Dist_Angles=Lignes_distances_Angles
+Sample_lines_extreme_points=G\u00E9n\u00E9raliser les lignes (lissage)
+Transform=Transformation
+Tools_for_line_layers=Outils pour couches de lignes
+Splitted_lines=Lignes fragment\u00E9es
+PERIMETER=P\u00C9RIM\u00C8TRE
+At_Least_One_Field_Needed=Un champ minimun est requis pour ex\u00E9cuter la fonction de fusion (Dissolve)
+Original_route=Chemin d'origine
+Wrong_Field_Name=Nom de champs erron\u00E9es
+Layer=Couche
+Class=Classe
+Dissolve=Fusionner
+ID2_FIELDNAME=Colonne ID 2
+Merge=Assembler des couches
+Points_layer_from_table=Cr\u00E9er une couche de points \u00E0 partir de champs XY d'une table
+Perturbate_points_layer=Perturber couche de points
+Average_angle=Angle moyen
+sampled=\u00C9chantillon
+AREA=AREA
+Layer_from_table=Cr\u00E9er une couche de points \u00E0 partir de champs XY
+Distances_and_Angles=Distances et angles
+Field=Colonne
+Field_precision_Double_only=Pr\u00E9cision (seulement pour r\u00E9els)
+Summary_statistics=R\u00E9sum\u00E9 statistique des variables
+Constrained_brownian_motion=Mouvement brownien restreint
+Layer_to_clip=Couche \u00E0 d\u00E9couper
+Number_of_classes=Nombre de classes
+Export_vector_layer=Exporter couche vectorielle
+Raster_layers=Couches matricielle
+Routes=Chemins
+Input_layer=Couche en entr\u00E9e
+Geometries_to_points=Convertir geom\u00E9tries en points
+Delaunay_triangulation=Triangulation de Delaunay
+No_Elements_In_Distance_List=La liste des distances ne contient pas de valeurs valables
+X_interval=Intervalle X
+Use_base_route_sinuosity=Utiliser sinuosit\u00E9 du chemin de base
+Geometric_properties_of_polygons=Propri\u00E9t\u00E9s g\u00E9om\u00E9triques des polygones
+MIN=MIN
+Centroids=Centro\u00EFdes
+Direction=Direction
+Cluster=Agr\u00E9gats spatiaux
+Copying_entities=Copie des entit\u00E9s en cours
+Cost_distances_and_routes=Co\u00FBt, distances et itin\u00E9raires
+Grouped_Layer=Couche_group\u00E9e
+Number_of_concentric_rings=Nombre d'anneaux concentriques
+File=Fichier
+Rotation_angle=Angle de rotation
+Distance=Distance
+Minimum_enclosing_shapes=Formes englobantes minimales
+Count_points_in_polygons=D\u00E9nombrer points dans polygones
+Take_from_table_field=Prendre dans la colonne
+[Enclosing_shape]=[Enveloppe]
+Recombination=Recombinaison
+VAR=VAR
+Clip=D\u00E9couper
+Multiple_buffer=Zone tampon multiple
+Sinuosity=Sinuosit\u00E9
+[Save_to_temporary_file]=[Sauvegarder dans fichier temporaire]
+Point_statistics_in_polygons=Statistiques de points par polygones d'appartenance
+AVG=MOY
+Y_interval=Intervalle Y
+Symmetric_difference=Diff\u00E9rence sym\u00E9trique
+Y=Y
+Buffer=Zone tampon
+X=X
+Simplified_polygons=Polygones simplifi\u00E9s
+Minimum_enclosing_rectangle=Rectangle englobant minimal
+Fixed_distance=Distance fixe
+Clean_vector_layer=Nettoyer couche vectorielle
+Simplify_lines=Simplifier lignes
+Minimum=Minimum
+Additional_layers=Couches suppl\u00E9mentaires
+Separate_entities=S\u00E9parer entit\u00E9s
+Curve_type=Type de courbe
+Intermediate_points=Points interm\u00E9diaires
+Number_of_new_routes=Nombre de nouveaux chemins
+Separate_multi-part_features=S\u00E9parer les entit\u00E9s multiples (d\u00E9grouper)
+Anchor_point_Y=Point de pivot Y
+Length=Longueur
+Anchor_point_X=Point de pivot X
+Distance_field=Colonne des distances
+Grids=Couches matricielles
+Default_value=Valeur par d\u00E9faut
+Lines=Lignes
+Split_lines_with_points_layer=Fragmenter lignes avec couche de points
+Difference=Diff\u00E9rence
+Polylines_to_polygons=Convertir polylignes en polygones
+Polygons=Polygones
+Scale_Factor__Y=Facteur d'\u00E9chelle (Y)
+Minimum_enclosing_shape=Forme englobante minimale
+Field_for_labeling=Colonne des \u00E9tiquettes
+triangulated=triangul\u00E9
+Snapped_points=Points ajust\u00E9s
+Points_layer=Couche de points
+Field_with_class_name=Colonne avec nom des classes
+Maximum=Maximum
+Distance_between_points=Distance entre points
+ConvexHull_of_Layer_2=Enveloppe convexe de Hull couche 2
+Creating_index=Calcul de l'indice en cours...
+Split_polylines_at_nodes=Fragmenter polylignes aux noeuds
+Outer_buffer=Zone tampon vers l'ext\u00E9rieur
+Vector_mean=Moyenne vectorielle
+Sampled_lines=Lignes simplifi\u00E9es
+NN_Spatial_Join=Jointure spatiale (plus proche voisin)
+Tolerance=Tol\u00E9rance
+Result=R\u00E9sultats
+Add_data_after_point=Ajouter valeurs apr\u00E8s le point
+Sample_raster_layers=R\u00E9-\u00E9chantillonner couche matricielle
+Add_coordinates_to_points=Ajouter coordonn\u00E9es aux points
+Bounding_Box=Emprise spatiale
+Create_random_vector_layer=Cr\u00E9er couche avec entit\u00E9s distribu\u00E9es al\u00E9atoirement
+Polylines=Polylignes
+Sum=Somme
+Fixed_distance_buffer=Zone tampon \u00E0 largeur fixe
+Fields=Colonnes
+Geometric_properties_of_lines=Propri\u00E9t\u00E9s g\u00E9om\u00E9triques des lignes
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 13:22:55 CET 2011
+Red_layer=Couche rouge
+Vegetation_indices=Indices de v\u00E9g\u00E9tation
+Soil_line_intercept=Origine de la ligne de pente au sol
+Near_infrared_layer=Couche proche-infrarouge
+Soil_line_slope=Ligne de pente au sol
+Near_infrared_band=Bande proche-infrarouge
+Red_band=Bande rouge
+Result=R\u00E9sultat
+
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/resources/org/gvsig/toolbox/algorithm/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/meanValueUphill/MeanValueUphillAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/meanValueUphill/MeanValueUphillAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/meanValueUphill/MeanValueUphillAlgorithm.java	(revision 369)
@@ -0,0 +1,154 @@
+package es.unex.sextante.hydrology.meanValueUphill;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class MeanValueUphillAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private static final double NOT_VISITED  = -1.0;
+
+   public static final String  DEM          = "DEM";
+   public static final String  PARAM        = "PARAM";
+   public static final String  RESULT       = "RESULT";
+
+   private int                 m_iNX, m_iNY;
+   private IRasterLayer        m_DEM        = null;
+   private IRasterLayer        m_Param      = null;
+   private IRasterLayer        m_AccFlow;
+   private IRasterLayer        m_MeanValue;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iCells;
+      double dValue;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Param = m_Parameters.getParameterValueAsRasterLayer(PARAM);
+
+      m_MeanValue = getNewRasterLayer(RESULT, Sextante.getText("Mean_value_uphill"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_AccFlow = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, m_MeanValue.getWindowGridExtent());
+
+      m_MeanValue.assign(NOT_VISITED);
+      m_AccFlow.assign(NOT_VISITED);
+
+      final AnalysisExtent extent = m_MeanValue.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+      m_Param.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateAccFlows();
+
+      m_MeanValue.setNoDataValue(NOT_VISITED);
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_MeanValue.getCellValueAsDouble(x, y);
+            iCells = m_AccFlow.getCellValueAsInt(x, y);
+            if (!m_MeanValue.isNoDataValue(dValue) && (iCells != 0)) {
+               m_MeanValue.setCellValue(x, y, dValue / iCells);
+            }
+            else {
+               m_MeanValue.setNoData(x, y);
+            }
+         }
+      }
+
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Mean_value_uphill"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(PARAM, Sextante.getText("Parameter"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Mean_value_uphill"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateAccFlows() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            getFlow(x, y);
+         }
+
+      }
+
+   }
+
+
+   private void getFlow(final int x,
+                        final int y) {
+
+      int i, ix, iy;
+      int iDirection;
+      double dValue;
+      double dParamValue;
+
+      if (m_AccFlow.getCellValueAsDouble(x, y) != NOT_VISITED) {
+         return;
+      }
+
+      dParamValue = m_Param.getCellValueAsDouble(x, y);
+      dValue = m_DEM.getCellValueAsDouble(x, y);
+      if (!m_DEM.isNoDataValue(dValue) /*&& !m_Param.isNoDataValue(dParamValue)*/) {
+         if (!m_Param.isNoDataValue(dParamValue)) {
+            m_AccFlow.setCellValue(x, y, 1);
+            m_MeanValue.setCellValue(x, y, dParamValue);
+         }
+         else {
+            m_AccFlow.setCellValue(x, y, 0);
+            m_MeanValue.setCellValue(x, y, 0);
+         }
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            dValue = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+               if (iDirection >= 0) {
+                  if ((i + 4) % 8 == iDirection) {
+                     getFlow(ix, iy);
+                     //dParamValue = m_Param.getCellValueAsDouble(ix, iy);
+                     //if (!m_Param.isNoDataValue(dParamValue)){
+                     m_AccFlow.addToCellValue(x, y, m_AccFlow.getCellValueAsDouble(ix, iy));
+                     m_MeanValue.addToCellValue(x, y, m_MeanValue.getCellValueAsDouble(ix, iy));
+                     //}
+                  }
+               }
+            }
+         }
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/meanValueUphill/MeanValueUphillAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/setLinesDirectionsWithDEM/SetLinesDirectionsWithDEMAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/setLinesDirectionsWithDEM/SetLinesDirectionsWithDEMAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/setLinesDirectionsWithDEM/SetLinesDirectionsWithDEMAlgorithm.java	(revision 369)
@@ -0,0 +1,118 @@
+
+
+package es.unex.sextante.hydrology.setLinesDirectionsWithDEM;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SetLinesDirectionsWithDEMAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LINES  = "LINES";
+   public static final String DEM    = "DEM";
+
+   private IVectorLayer       m_Output;
+   private ArrayList          m_Lines;
+   private IRasterLayer       m_DEM;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Change_line_direction"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE, LINES);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, lines.getFieldTypes(),
+               lines.getFieldNames());
+
+      int i = 0;
+      final int iShapeCount = lines.getShapesCount();
+      final IFeatureIterator iter = lines.iterator();
+      final GeometryFactory gf = new GeometryFactory();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         m_Lines = new ArrayList();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry line = geom.getGeometryN(j);
+            addLine(line);
+         }
+         final LineString[] lineStrings = new LineString[m_Lines.size()];
+         for (int j = 0; j < lineStrings.length; j++) {
+            lineStrings[j] = (LineString) m_Lines.get(j);
+         }
+         m_Output.addFeature(gf.createMultiLineString(lineStrings), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addLine(final Geometry line) {
+
+
+      final Coordinate[] coords = line.getCoordinates();
+      final double z = m_DEM.getValueAt(coords[0].x, coords[0].y);
+      final double z2 = m_DEM.getValueAt(coords[coords.length - 1].x, coords[coords.length - 1].y);
+
+      if (z2 > z) {
+         final Coordinate[] newCoords = new Coordinate[coords.length];
+         for (int i = 0; i < coords.length; i++) {
+            newCoords[i] = coords[coords.length - i - 1];
+         }
+         final GeometryFactory gf = new GeometryFactory();
+         m_Lines.add(gf.createLineString(newCoords));
+      }
+      else {
+         m_Lines.add(line);
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/setLinesDirectionsWithDEM/SetLinesDirectionsWithDEMAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromArea/UpslopeAreaFromAreaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromArea/UpslopeAreaFromAreaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromArea/UpslopeAreaFromAreaAlgorithm.java	(revision 369)
@@ -0,0 +1,132 @@
+package es.unex.sextante.hydrology.upslopeAreaFromArea;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class UpslopeAreaFromAreaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private static final double NOT_VISITED  = 0.0;
+   private static final double VISITED      = 1.0;
+
+   public static final String  DEM          = "DEM";
+   public static final String  INITZONES    = "INITZONES";
+   public static final String  RESULT       = "RESULT";
+
+   private int                 m_iNX, m_iNY;
+
+   private IRasterLayer        m_DEM        = null;
+   private IRasterLayer        m_InitZone   = null;
+   private IRasterLayer        m_Result;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_InitZone = m_Parameters.getParameterValueAsRasterLayer(INITZONES);
+
+
+      m_DEM.setFullExtent();
+      final AnalysisExtent extent = m_DEM.getWindowGridExtent();
+      m_InitZone.setWindowExtent(extent);
+      m_InitZone.setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Upslope_area"), IRasterLayer.RASTER_DATA_TYPE_BYTE, extent);
+      m_Result.assign(NOT_VISITED);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateUpslopeArea();
+
+      m_Result.setNoDataValue(NOT_VISITED);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+
+      setName(Sextante.getText("Upslope_area_from_outlet_zone"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM,
+
+         Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(INITZONES, Sextante.getText("Outlet_zone"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Upslope_area"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateUpslopeArea() {
+
+      int x, y;
+      double dValue;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_InitZone.getCellValueAsDouble(x, y);
+            if (!m_InitZone.isNoDataValue(dValue)) {
+               calculateUpslopeAreaFromPoint(x, y);
+            }
+         }
+
+      }
+
+   }
+
+
+   private void calculateUpslopeAreaFromPoint(final int x,
+                                              final int y) {
+
+      int i, ix, iy;
+      double dValue;
+      int iDirection;
+
+      if ((m_Result.getCellValueAsDouble(x, y) != NOT_VISITED) || m_Task.isCanceled()) {
+         return;
+      }
+
+      dValue = m_DEM.getCellValueAsDouble(x, y);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return;
+      }
+
+      m_Result.setCellValue(x, y, VISITED);
+      for (i = 0; i < 8; i++) {
+         ix = x + m_iOffsetX[i];
+         iy = y + m_iOffsetY[i];
+         dValue = m_DEM.getCellValueAsDouble(ix, iy);
+         if (!m_DEM.isNoDataValue(dValue)) {
+            iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+            if (iDirection >= 0) {
+               if ((i + 4) % 8 == iDirection) {
+                  calculateUpslopeAreaFromPoint(ix, iy);
+               }
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromArea/UpslopeAreaFromAreaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/fillSinks/FillSinksAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/fillSinks/FillSinksAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/fillSinks/FillSinksAlgorithm.java	(revision 369)
@@ -0,0 +1,289 @@
+package es.unex.sextante.hydrology.fillSinks;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class FillSinksAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[]   = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[]   = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private final static double INIT_ELEVATION = 50000D;
+   public static final String  DEM            = "DEM";
+   public static final String  MINSLOPE       = "MINSLOPE";
+   public static final String  RESULT         = "RESULT";
+
+   private int                 depth;
+   private int                 m_iNX, m_iNY;
+   private final double        dEpsilon[]     = new double[8];
+   private int                 R, C;
+   private final int[]         R0             = new int[8];
+   private final int[]         C0             = new int[8];
+   private final int[]         dR             = new int[8];
+   private final int[]         dC             = new int[8];
+   private final int[]         fR             = new int[8];
+   private final int[]         fC             = new int[8];
+   private IRasterLayer        m_DEM          = null;
+   private IRasterLayer        m_Border;
+   private IRasterLayer        m_PreprocessedDEM;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Sink_filling"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      super.setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(MINSLOPE, Sextante.getText("Min_angle_between_cells_[degrees]"), 0.01,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Preprocessed"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iValue;
+      int x, y;
+      int ix, iy;
+      int scan;
+      int it;
+      double z, z2, wz, wzn;
+      double dMinSlope;
+      boolean something_done = false;
+
+      depth = 0;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      dMinSlope = Math.tan(Math.toRadians(m_Parameters.getParameterValueAsDouble(MINSLOPE)));
+
+      final AnalysisExtent ge = new AnalysisExtent(m_DEM);
+      m_PreprocessedDEM = getNewRasterLayer(RESULT, m_DEM.getName() + Sextante.getText("[preprocessed]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, ge);
+      m_Border = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, ge);
+
+      m_DEM.setFullExtent();
+
+      m_iNX = ge.getNX();
+      m_iNY = ge.getNY();
+
+      for (i = 0; i < 8; i++) {
+         dEpsilon[i] = dMinSlope * m_DEM.getDistToNeighborInDir(i);
+      }
+
+      R0[0] = 0;
+      R0[1] = m_iNY - 1;
+      R0[2] = 0;
+      R0[3] = m_iNY - 1;
+      R0[4] = 0;
+      R0[5] = m_iNY - 1;
+      R0[6] = 0;
+      R0[7] = m_iNY - 1;
+      C0[0] = 0;
+      C0[1] = m_iNX - 1;
+      C0[2] = m_iNX - 1;
+      C0[3] = 0;
+      C0[4] = m_iNX - 1;
+      C0[5] = 0;
+      C0[6] = 0;
+      C0[7] = m_iNX - 1;
+      dR[0] = 0;
+      dR[1] = 0;
+      dR[2] = 1;
+      dR[3] = -1;
+      dR[4] = 0;
+      dR[5] = 0;
+      dR[6] = 1;
+      dR[7] = -1;
+      dC[0] = 1;
+      dC[1] = -1;
+      dC[2] = 0;
+      dC[3] = 0;
+      dC[4] = -1;
+      dC[5] = 1;
+      dC[6] = 0;
+      dC[7] = 0;
+      fR[0] = 1;
+      fR[1] = -1;
+      fR[2] = -m_iNY + 1;
+      fR[3] = m_iNY - 1;
+      fR[4] = 1;
+      fR[5] = -1;
+      fR[6] = -m_iNY + 1;
+      fR[7] = m_iNY - 1;
+      fC[0] = -m_iNX + 1;
+      fC[1] = m_iNX - 1;
+      fC[2] = -1;
+      fC[3] = 1;
+      fC[4] = m_iNX - 1;
+      fC[5] = -m_iNX + 1;
+      fC[6] = 1;
+      fC[7] = -1;
+
+      initAltitude();
+
+      setProgressText("Fase 1");
+      
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+    	  for (x = 0; (x < m_iNX); x++) {
+            iValue = m_Border.getCellValueAsInt(x, y);
+            if (iValue == 1) {
+               dryUpwardCell(x, y);
+            }
+         }
+
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      for (it = 0; it < 1000; it++) {
+         setProgressText("fase 2. Iteracion " + Integer.toString(it));
+         for (scan = 0; scan < 8; scan++) {
+            R = R0[scan];
+            C = C0[scan];
+            something_done = false;
+            if (!setProgress(scan, 8)) {
+               return false;
+            }
+            do {
+               z = m_DEM.getCellValueAsDouble(C, R);
+               wz = m_PreprocessedDEM.getCellValueAsDouble(C, R);
+               if (!m_DEM.isNoDataValue(z) && (wz > z)) {
+                  for (i = 0; i < 8; i++) {
+                     ix = C + m_iOffsetX[i];
+                     iy = R + m_iOffsetY[i];
+                     z2 = m_DEM.getCellValueAsDouble(ix, iy);
+                     if (!m_DEM.isNoDataValue(z2)) {
+                        wzn = m_PreprocessedDEM.getCellValueAsDouble(ix, iy) + dEpsilon[i];
+                        if (z >= wzn) {
+                           m_PreprocessedDEM.setCellValue(C, R, z);
+                           something_done = true;
+                           dryUpwardCell(C, R);
+                           break;
+                        }
+                        if (wz > wzn) {
+                           m_PreprocessedDEM.setCellValue(C, R, wzn);
+                           something_done = true;
+                        }
+                     }
+                  }
+               }
+            }
+            while (nextCell(scan));
+
+            if (!something_done) {
+               break;
+            }
+         }
+         if (!something_done) {
+            break;
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean nextCell(final int i) {
+
+      R = R + dR[i];
+      C = C + dC[i];
+
+      if ((R < 0) || (C < 0) || (R >= m_iNY) || (C >= m_iNX)) {
+         R = R + fR[i];
+         C = C + fC[i];
+
+         if ((R < 0) || (C < 0) || (R >= m_iNY) || (C >= m_iNX)) {
+            return false;
+         }
+      }
+
+      return true;
+   }
+
+
+   private void dryUpwardCell(final int x,
+                              final int y) {
+
+      final int MAX_DEPTH = 32000;
+      int ix, iy, i;
+      double zn, zw;
+
+      depth += 1;
+
+      if (depth <= MAX_DEPTH) {
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            zw = m_PreprocessedDEM.getCellValueAsDouble(ix, iy);
+            zn = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(zn) && (zw == INIT_ELEVATION)) {
+               zw = m_PreprocessedDEM.getCellValueAsDouble(x, y) + dEpsilon[i];
+               if (zn >= zw) {
+                  m_PreprocessedDEM.setCellValue(ix, iy, zn);
+                  dryUpwardCell(ix, iy);
+               }
+            }
+         }
+      }
+      depth -= 1;
+
+   }
+
+
+   private void initAltitude() {
+
+      boolean border;
+      int x, y, i, ix, iy;
+      double dValue;
+
+      m_Border.assignNoData();
+      m_PreprocessedDEM.assignNoData();
+
+      for (y = 0; y < m_iNY; y++) {
+    	  for (x = 0; x < m_iNX; x++) {
+            border = false;
+            dValue = m_DEM.getCellValueAsDouble(x, y);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               for (i = 0; i < 8; i++) {
+                  ix = x + m_iOffsetX[i];
+                  iy = y + m_iOffsetY[i];
+                  dValue = m_DEM.getCellValueAsDouble(ix, iy);
+                  if (m_DEM.isNoDataValue(dValue)) {
+                     border = true;
+                     break;
+                  }
+               }
+               if (border) {
+                  m_Border.setCellValue(x, y, 1);
+                  m_PreprocessedDEM.setCellValue(x, y, m_DEM.getCellValueAsDouble(x, y));
+               }
+               else {
+                  m_PreprocessedDEM.setCellValue(x, y, INIT_ELEVATION);
+               }
+            }
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/fillSinks/FillSinksAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watershedsBySize/WatershedsBySizeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watershedsBySize/WatershedsBySizeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watershedsBySize/WatershedsBySizeAlgorithm.java	(revision 369)
@@ -0,0 +1,199 @@
+package es.unex.sextante.hydrology.watershedsBySize;
+
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.hydrology.accFlow.AccFlowAlgorithm;
+import es.unex.sextante.hydrology.watersheds.WatershedsAlgorithm;
+import es.unex.sextante.outputs.Output;
+
+public class WatershedsBySizeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String WATERSHEDS   = "WATERSHEDS";
+   public static final String SIZE         = "SIZE";
+   public static final String DEM          = "DEM";
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private int                m_iNX, m_iNY;
+   private double             m_dSize;
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Outlets;
+   private IRasterLayer       m_FlowAcc;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Watersheds_by_area"));
+      setUserCanDefineAnalysisExtent(false);
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(SIZE, Sextante.getText("Tamano"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  10000., 0, Double.MAX_VALUE);
+
+         addOutputRasterLayer(WATERSHEDS, Sextante.getText("Watersheds"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+
+      m_dSize = m_Parameters.getParameterValueAsDouble(SIZE);
+
+      m_Outlets = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, m_DEM.getWindowGridExtent());
+
+      m_Outlets.setNoDataValue(0);
+      m_Outlets.assignNoData();
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      if (!calculateAccFlow()) {
+         return false;
+      }
+
+      calculateOutlets();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         return calculateWatersheds();
+      }
+
+   }
+
+
+   private boolean calculateWatersheds() throws GeoAlgorithmExecutionException {
+
+      try {
+         setProgress(0, 100);
+         setProgressText("3/3");
+         final WatershedsAlgorithm alg = new WatershedsAlgorithm();
+         final ParametersSet params = alg.getParameters();
+         params.getParameter(WatershedsAlgorithm.DEM).setParameterValue(m_DEM);
+         params.getParameter(WatershedsAlgorithm.NETWORK).setParameterValue(m_Outlets);
+
+         final OutputObjectsSet oo = alg.getOutputObjects();
+         Output output = oo.getOutput(WatershedsAlgorithm.WATERSHEDS);
+         output.setOutputChannel(getOutputChannel(WATERSHEDS));
+
+         final boolean bSucess = alg.execute(m_Task, m_OutputFactory);
+
+         if (bSucess) {
+            output = oo.getOutput(WatershedsAlgorithm.WATERSHEDS);
+            m_OutputObjects.getOutput(WATERSHEDS).setOutputObject(output.getOutputObject());
+            m_OutputObjects.getOutput(WATERSHEDS).setOutputChannel(output.getOutputChannel());
+            return true;
+         }
+         else {
+            return false;
+         }
+
+
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+
+   private boolean calculateAccFlow() throws GeoAlgorithmExecutionException {
+
+      try {
+         setProgressText("1/3");
+         final AccFlowAlgorithm alg = new AccFlowAlgorithm();
+         final ParametersSet params = alg.getParameters();
+         params.getParameter(AccFlowAlgorithm.METHOD).setParameterValue(AccFlowAlgorithm.D8);
+         params.getParameter(AccFlowAlgorithm.DEM).setParameterValue(m_DEM);
+         if (alg.execute(m_Task, m_OutputFactory)) {
+            m_FlowAcc = (IRasterLayer) alg.getOutputObjects().getOutput(AccFlowAlgorithm.FLOWACC).getOutputObject();
+            m_FlowAcc.open();
+            m_FlowAcc.setFullExtent();
+            m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+            m_DEM.open();
+            m_DEM.setFullExtent();
+            return true;
+         }
+         else {
+            return false;
+         }
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+
+   private void calculateOutlets() {
+
+      double dValue;
+
+      setProgressText("2/3");
+      for (int x = 0; (x < m_iNX) && setProgress(x, m_iNX); x++) {
+         for (int y = 0; y < m_iNY; y++) {
+            dValue = m_FlowAcc.getCellValueAsDouble(x, y);
+            if (!m_FlowAcc.isNoDataValue(dValue)) {
+               setOutlet(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void setOutlet(final int x,
+                          final int y) {
+
+      int i;
+      int ix, iy;
+      int iDirection;
+      int iValue, iValue2;
+      double dValue;
+
+      dValue = m_FlowAcc.getCellValueAsDouble(x, y);
+      iValue = (int) (dValue / m_dSize);
+
+      for (i = 0; i < 8; i++) {
+         ix = x + m_iOffsetX[i];
+         iy = y + m_iOffsetY[i];
+         dValue = m_DEM.getCellValueAsDouble(ix, iy);
+         if (!m_DEM.isNoDataValue(dValue)) {
+            iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+            if (iDirection >= 0) {
+               if ((i + 4) % 8 == iDirection) {
+                  iValue2 = (int) (m_FlowAcc.getCellValueAsDouble(ix, iy) / m_dSize);
+                  if (iValue != iValue2) {
+                     m_Outlets.setCellValue(ix, iy, -1);
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watershedsBySize/WatershedsBySizeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/maxValueUphill/MaxValueUphillAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/maxValueUphill/MaxValueUphillAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/maxValueUphill/MaxValueUphillAlgorithm.java	(revision 369)
@@ -0,0 +1,144 @@
+package es.unex.sextante.hydrology.maxValueUphill;
+
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class MaxValueUphillAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private static final double NOT_VISITED  = -1.0;
+
+   public static final String  DEM          = "DEM";
+   public static final String  PARAM        = "PARAM";
+   public static final String  RESULT       = "RESULT";
+
+   private int                 m_iNX, m_iNY;
+   private IRasterLayer        m_DEM        = null;
+   private IRasterLayer        m_Param      = null;
+   private IRasterLayer        m_MaxValue;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Param = m_Parameters.getParameterValueAsRasterLayer(PARAM);
+
+      m_MaxValue = getNewRasterLayer(RESULT, Sextante.getText("Max_value_uphill"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+
+      m_MaxValue.assign(NOT_VISITED);
+
+      final AnalysisExtent extent = m_MaxValue.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+      m_Param.setWindowExtent(extent);
+
+      m_MaxValue.setNoDataValue(m_Param.getNoDataValue());
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateMaxValues();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Max_value_uphill"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(PARAM, Sextante.getText("Parameter"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Max_value_uphill"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateMaxValues() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            getMaxValue(x, y);
+         }
+
+      }
+
+   }
+
+
+   private void getMaxValue(final int x,
+                            final int y) {
+
+      int i, ix, iy;
+      int iDirection;
+      double dValue;
+      double dParamValue;
+      double dMaxValue;
+
+
+      if (m_Task.isCanceled()) {
+         return;
+      }
+
+
+      if (m_MaxValue.getCellValueAsDouble(x, y) != NOT_VISITED) {
+         return;
+      }
+
+      dValue = m_DEM.getCellValueAsDouble(x, y);
+      if (!m_DEM.isNoDataValue(dValue)) {
+         dParamValue = m_Param.getCellValueAsDouble(x, y);
+         if (!m_Param.isNoDataValue(dParamValue)) {
+            m_MaxValue.setCellValue(x, y, dParamValue);
+         }
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            dValue = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+               if (iDirection >= 0) {
+                  if ((i + 4) % 8 == iDirection) {
+                     getMaxValue(ix, iy);
+                     dMaxValue = m_MaxValue.getCellValueAsDouble(x, y);
+                     if (m_MaxValue.isNoDataValue(dMaxValue)) {
+                        m_MaxValue.setCellValue(x, y, m_MaxValue.getCellValueAsDouble(ix, iy));
+                     }
+                     else {
+                        m_MaxValue.setCellValue(x, y, Math.max(m_MaxValue.getCellValueAsDouble(x, y),
+                                 m_MaxValue.getCellValueAsDouble(ix, iy)));
+                     }
+                  }
+               }
+            }
+         }
+      }
+      else {
+         m_MaxValue.setNoData(x, y);
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/maxValueUphill/MaxValueUphillAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/isocrones/IsocronesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/isocrones/IsocronesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/isocrones/IsocronesAlgorithm.java	(revision 369)
@@ -0,0 +1,191 @@
+package es.unex.sextante.hydrology.isocrones;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class IsocronesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String NETWORK      = "NETWORK";
+   public static final String OUTLET       = "OUTLET";
+   public static final String TIME         = "TIME";
+   public static final String RATIO        = "RATIO";
+
+   private int                m_iNX, m_iNY;
+   private double             m_dSpeed;
+   private double             m_dRatio;
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Network    = null;
+   private IRasterLayer       m_TimeOut;
+   private GridCell           m_Outlet;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Network = m_Parameters.getParameterValueAsRasterLayer(NETWORK);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(OUTLET);
+
+      final AnalysisExtent gridExtent = new AnalysisExtent(m_DEM);
+      m_DEM.setWindowExtent(gridExtent);
+      m_TimeOut = getNewRasterLayer(TIME, Sextante.getText("Time_to_outlet__h"), IRasterLayer.RASTER_DATA_TYPE_FLOAT, gridExtent);
+
+      m_TimeOut.assign(0.0);
+
+      m_Outlet = gridExtent.getGridCoordsFromWorldCoords(pt);
+
+      if (m_Network != null) {
+         m_Network.setWindowExtent(gridExtent);
+      }
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      m_dSpeed = 1.0;
+      m_dRatio = 1.0;
+      calculateTimeOfConcentration();
+
+      m_dRatio = m_Parameters.getParameterValueAsDouble(RATIO);
+      calculateTimeOut();
+
+      m_TimeOut.setNoDataValue(0.0);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Time_to_outlet"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(NETWORK, Sextante.getText("Channel_network"), false);
+         m_Parameters.addNumericalValue(RATIO, Sextante.getText("speed_ratio__channel_-_overland"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addPoint(OUTLET, Sextante.getText("Outlet_point"));
+         addOutputRasterLayer(TIME, Sextante.getText("Time_to_outlet"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateTimeOfConcentration() {
+
+      int x, y;
+      double dValue;
+      final GridCell highestCell = new GridCell(0, 0, Double.NEGATIVE_INFINITY);
+
+      writeTimeOut(m_Outlet.getX(), m_Outlet.getY(), m_Outlet.getX(), m_Outlet.getY());
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_TimeOut.getCellValueAsDouble(x, y);
+            if (!m_TimeOut.isNoDataValue(dValue)) {
+               if (dValue > highestCell.getValue()) {
+                  highestCell.setX(x);
+                  highestCell.setY(y);
+                  highestCell.setValue(dValue);
+               }
+            }
+         }
+      }
+
+      final double dH1 = m_DEM.getCellValueAsDouble(m_Outlet.getX(), m_Outlet.getY());
+      final double dH2 = m_DEM.getCellValueAsDouble(highestCell.getX(), highestCell.getY());
+      final double dConcTime = Math.pow(0.87 * Math.pow(highestCell.getValue() / 1000., 3) / (dH2 - dH1), 0.385);
+      m_dSpeed = highestCell.getValue() / dConcTime;
+
+   }
+
+
+   private void calculateTimeOut() {
+
+      m_TimeOut.assign(0.0);
+
+      writeTimeOut(m_Outlet.getX(), m_Outlet.getY(), m_Outlet.getX(), m_Outlet.getY());
+
+   }
+
+
+   private void writeTimeOut(final int iX1,
+                             final int iY1,
+                             final int iX2,
+                             final int iY2) {
+
+      int i;
+      int ix, iy;
+      int iDirection;
+      double dDist = 1;
+      double dTime;
+      double dValue;
+
+
+      if (m_Task.isCanceled()) {
+         return;
+      }
+
+      dValue = m_DEM.getCellValueAsDouble(iX1, iY1);
+
+      if (!m_DEM.isNoDataValue(dValue)) {
+         if ((iX1 == iX2) && (iY1 == iY2)) {
+            dDist = 0;
+         }
+         else if (Math.abs(iX1 - iX2 + iY1 - iY2) == 1) {
+            dDist = m_DEM.getDistToNeighborInDir(0);
+         }
+         else {
+            dDist = m_DEM.getDistToNeighborInDir(1);
+         }
+         dTime = dDist / m_dSpeed;
+
+         if (m_Network != null) {
+            dValue = m_Network.getCellValueAsDouble(iX1, iY1);
+            if (m_Network.isNoDataValue(dValue) || (dValue == 0)) {
+               dTime *= m_dRatio;
+            }
+         }
+
+         dTime += m_TimeOut.getCellValueAsDouble(iX2, iY2);
+         m_TimeOut.setCellValue(iX1, iY1, dTime);
+
+         for (i = 0; i < 8; i++) {
+            ix = iX1 + m_iOffsetX[i];
+            iy = iY1 + m_iOffsetY[i];
+            dValue = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+               if (iDirection >= 0) {
+                  if ((i + 4) % 8 == iDirection) {
+                     writeTimeOut(ix, iy, iX1, iY1);
+                  }
+               }
+            }
+         }
+
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/isocrones/IsocronesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/burnStreams/BurnStreamsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/burnStreams/BurnStreamsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/burnStreams/BurnStreamsAlgorithm.java	(revision 369)
@@ -0,0 +1,172 @@
+
+
+package es.unex.sextante.hydrology.burnStreams;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class BurnStreamsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  STREAMS          = "STREAMS";
+   public static final String  DEM              = "DEM";
+   public static final String  RESULT           = "RESULT";
+   public static final String  DEPTH            = "DEPTH";
+
+   private static final double SMALL_DIFFERENCE = 0.05;
+
+   private IRasterLayer        m_DEM;
+   private IRasterLayer        m_Result;
+   private double              m_dLastZ;
+   private double              m_dDepth;
+   private boolean             m_bFoundValidCell;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_dDepth = m_Parameters.getParameterValueAsDouble(DEPTH);
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(STREAMS);
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+      final AnalysisExtent extent = m_DEM.getWindowGridExtent();
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Modified_DEM"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE, extent);
+
+      m_Result.assign(m_DEM);
+
+      int iShape = 0;
+      final int iShapeCount = lines.getShapesCount();
+      final IFeatureIterator iterator = lines.iterator();
+      while (iterator.hasNext() && setProgress(iShape, iShapeCount)) {
+         final Geometry line = iterator.next().getGeometry();
+         for (int i = 0; i < line.getNumGeometries(); i++) {
+            processLine(line.getGeometryN(i));
+         }
+         iShape++;
+      }
+      iterator.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Burn_streams"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputVectorLayer(STREAMS, Sextante.getText("Channel_network"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(DEPTH, Sextante.getText("Depth"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  10, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Modified_DEM"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void processLine(final Geometry line) {
+
+      double x, y, x2, y2;
+      final Coordinate[] coords = line.getCoordinates();
+
+      m_bFoundValidCell = false;
+      for (int i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         processSegment(x, y, x2, y2);
+      }
+
+   }
+
+
+   private void processSegment(double x,
+                               double y,
+                               final double x2,
+                               final double y2) {
+
+
+      double dx, dy, d, n;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_DEM.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_DEM.getWindowCellSize();
+         }
+         else {
+            dy /= m_DEM.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_DEM.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            addPoint(x, y);
+         }
+      }
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+
+      final GridCell cell = m_DEM.getWindowGridExtent().getGridCoordsFromWorldCoords(x, y);
+      final int iX = cell.getX();
+      final int iY = cell.getY();
+      final double z = m_DEM.getCellValueAsDouble(iX, iY) /*- m_dDepth*/;
+      if (m_DEM.isNoDataValue(z)) {
+         return;
+      }
+      if (!m_bFoundValidCell) {
+         m_dLastZ = z - m_dDepth;
+         m_bFoundValidCell = true;
+      }
+      //if (z >= m_dLastZ) {
+      m_dLastZ -= SMALL_DIFFERENCE;
+      //}
+
+      m_Result.setCellValue(iX, iY, m_dLastZ);
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/burnStreams/BurnStreamsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/hydroModel/HydroModelAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/hydroModel/HydroModelAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/hydroModel/HydroModelAlgorithm.java	(revision 369)
@@ -0,0 +1,442 @@
+package es.unex.sextante.hydrology.hydroModel;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.hydrology.modelling.Hydrograph;
+import es.unex.sextante.hydrology.modelling.Hyetograph;
+
+public class HydroModelAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TABLES               = "TABLES";
+   public static final String TIMEOUT              = "TIMEOUT";
+   public static final String CN                   = "CN";
+   public static final String INTERVALHYDRO        = "INTERVALHYDRO";
+   public static final String INTERVALHYETO        = "INTERVALHYETO";
+   public static final String FIELD                = "FIELD";
+   public static final String STATIONS             = "STATIONS";
+
+   private int                m_iNX, m_iNY;
+   private int                m_iIntervalHydro;
+   private int                m_iIntervalHyeto;
+   private IRasterLayer       m_TimeOut            = null;
+   private IRasterLayer       m_CN                 = null;
+   private ArrayList          m_Hydrographs;
+   private Hyetograph         m_Hyetogram[][];
+   private ArrayList          m_Tables;
+   private int                m_iTableNameField;
+   private boolean            m_bHyetoNamesCreated = false;
+   private String[]           m_sHyetoNames;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+
+      m_TimeOut = m_Parameters.getParameterValueAsRasterLayer(TIMEOUT);
+      m_CN = m_Parameters.getParameterValueAsRasterLayer(CN);
+      m_iIntervalHydro = m_Parameters.getParameterValueAsInt(INTERVALHYDRO) * 60;
+      m_iIntervalHyeto = m_Parameters.getParameterValueAsInt(INTERVALHYETO) * 60;
+      m_iTableNameField = m_Parameters.getParameterValueAsInt(FIELD);
+      m_TimeOut.setFullExtent();
+      m_CN.setWindowExtent(m_TimeOut.getWindowGridExtent());
+
+      m_iNX = m_TimeOut.getNX();
+      m_iNY = m_TimeOut.getNY();
+
+      if (createHyetographs()) {
+         calculateHydrographs();
+         documentHydrographs();
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Hyetographs_are_not_consistent"));
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("A_simple_hydrological_model"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(TIMEOUT, Sextante.getText("Time_to_outlet"), true);
+         m_Parameters.addInputRasterLayer(CN, Sextante.getText("N\u00famero_de_Curva"), true);
+         m_Parameters.addInputVectorLayer(STATIONS, Sextante.getText("Estaciones"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Nombre_de_tabla_con_hietograma"), STATIONS);
+         m_Parameters.addMultipleInput(TABLES, Sextante.getText("Tables"), AdditionalInfoMultipleInput.DATA_TYPE_TABLE, true);
+         m_Parameters.addNumericalValue(INTERVALHYDRO, Sextante.getText("Intervalo_en_hidrogramas__minutos"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 1, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(INTERVALHYETO, Sextante.getText("Intervalo_en_hietogramas__minutos"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 30, 1, Integer.MAX_VALUE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean createHyetographs() {
+
+      int iPoint = 0;
+
+      try {
+         final IVectorLayer stations = m_Parameters.getParameterValueAsVectorLayer(STATIONS);
+         m_Hyetogram = new Hyetograph[stations.getShapesCount()][];
+         final IFeatureIterator iter = stations.iterator();
+         while (iter.hasNext()) {
+            final IFeature feature = iter.next();
+            final String sTableName = feature.getRecord().getValue(m_iTableNameField).toString();
+            final Coordinate c = feature.getGeometry().getCoordinate();
+            m_Hyetogram[iPoint] = getHyetogramsFromTable(c.x, c.y, sTableName);
+            iPoint++;
+         }
+         iter.close();
+
+         return checkHyetogramsConsistency();
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private boolean checkHyetogramsConsistency() {
+
+      try {
+         final int iIntervals = m_Hyetogram[0][0].getIntervals();
+         for (int i = 0; i < m_Hyetogram.length; i++) {
+            if (m_Hyetogram[i].length != m_Hyetogram[0].length) {
+               return false;
+            }
+            if (iIntervals != m_Hyetogram[i][0].getIntervals()) {
+               return false;
+            }
+            for (final Hyetograph[] element : m_Hyetogram) {
+               if (element[i] == null) {
+                  return false;
+               }
+            }
+         }
+         return true;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+   private Hyetograph[] getHyetogramsFromTable(final double x,
+                                               final double y,
+                                               final String sName) {
+
+      try {
+         final ITable table = getTableFromName(sName);
+         if (table != null) {
+            final int iCount = table.getFieldCount();
+
+            if (iCount <= 0) {
+               return null;
+            }
+
+            if (!m_bHyetoNamesCreated) {
+               m_bHyetoNamesCreated = true;
+               m_sHyetoNames = new String[iCount];
+               for (int i = 0; i < iCount; i++) {
+                  m_sHyetoNames[i] = table.getFieldName(i);
+               }
+            }
+
+            final Hyetograph hyetos[] = new Hyetograph[iCount];
+            for (int i = 0; i < iCount; i++) {
+               final double dHyeto[] = new double[(int) table.getRecordCount()];
+               final IRecordsetIterator iter = table.iterator();
+               int j = 0;
+               while (iter.hasNext()) {
+                  final IRecord record = iter.next();
+                  String s = record.getValue(i).toString();
+                  s = s.replaceAll("'", "");
+                  try {
+                     dHyeto[j] = Double.parseDouble(s);
+                  }
+                  catch (final NumberFormatException nfe) {
+                     dHyeto[j] = 0;
+                  }
+                  j++;
+               }
+               hyetos[i] = new Hyetograph(dHyeto, this.m_iIntervalHyeto);
+               hyetos[i].setName(sName + table.getFieldName(i));
+               hyetos[i].setCoords(new Point2D.Double(x, y));
+            }
+
+            return hyetos;
+         }
+         else {
+            return null;
+         }
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+
+   private ITable getTableFromName(final String sName) {
+
+      for (int i = 0; i < m_Tables.size(); i++) {
+         final ITable table = (ITable) m_Tables.get(i);
+         if (table.getName().equals(sName)) {
+            return table;
+         }
+      }
+
+      return null;
+
+   }
+
+
+   private void calculateHydrographs() throws UnsupportedOutputChannelException {
+
+      int i, j, k;
+      int x, y;
+      int iLength;
+      int iRatio;
+      int iIndex;
+      int iIntervalsHyeto, iIntervalsHydro;
+      double hydData[];
+      double dRain;
+      double dTimeOut;
+      double dRunoff;
+      double dAccRunoff;
+      final double dRunoff2Volume = m_TimeOut.getWindowCellSize() * m_TimeOut.getWindowCellSize() / 1000.0;
+      IRasterLayer swap;
+      IRasterLayer accRainGrid;
+      IRasterLayer accRunoffGrid;
+      IRasterLayer runoffGrid;
+
+      m_Hydrographs = new ArrayList();
+
+      final AnalysisExtent extent = m_TimeOut.getWindowGridExtent();
+
+      accRainGrid = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      accRunoffGrid = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      runoffGrid = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+
+      iLength = m_Hyetogram[0][0].getDuration();
+      iIntervalsHyeto = m_Hyetogram[0][0].getIntervals();
+      iRatio = m_iIntervalHyeto / m_iIntervalHydro;
+      iIntervalsHydro = (int) ((iLength + m_TimeOut.getMaxValue() * 3600) / m_iIntervalHydro) + 1;
+
+
+      for (i = 0; i < m_Hyetogram[0].length; i++) {//for each return period
+
+         accRainGrid.assign(0.0);
+         accRunoffGrid.assign(0.0);
+         runoffGrid.assign(0.0);
+
+         hydData = new double[iIntervalsHydro];
+         for (j = 0; j < iIntervalsHydro; j++) {
+            hydData[j] = 0;
+         }
+
+         this.setProgressText(Sextante.getText("Calculando_hidrograma") + "(" + m_sHyetoNames[i] + ")");
+         for (j = 0; j < iIntervalsHyeto; j++) {
+            for (y = 0; y < m_iNY; y++) {
+               for (x = 0; x < m_iNX; x++) {
+                  dTimeOut = m_TimeOut.getCellValueAsDouble(x, y);
+                  if (!m_TimeOut.isNoDataValue(dTimeOut) && (dTimeOut > 0)) {
+                     dRain = getRainfall(i, extent.getWorldCoordsFromGridCoords(x, y), j * m_iIntervalHyeto, m_iIntervalHyeto);
+                     if (dRain > 0) {
+                        accRainGrid.addToCellValue(x, y, dRain);
+                     }
+                  }
+               }
+            }
+
+            calculateRunoffGrid(runoffGrid, accRainGrid);
+
+            for (y = 1; y < m_iNY; y++) {
+               for (x = 0; x < m_iNX; x++) {
+                  dTimeOut = m_TimeOut.getCellValueAsDouble(x, y);
+                  if (!m_TimeOut.isNoDataValue(dTimeOut) && (dTimeOut > 0)) {
+                     iIndex = (int) ((dTimeOut * 3600 + j * m_iIntervalHyeto) / m_iIntervalHydro);
+                     dRunoff = runoffGrid.getCellValueAsDouble(x, y);
+                     dAccRunoff = accRunoffGrid.getCellValueAsDouble(x, y);
+                     dRunoff -= dAccRunoff;
+                     if (dRunoff > 0) {
+                        for (k = 0; k < iRatio; k++) {
+                           hydData[iIndex] += dRunoff;
+                        }
+                     }
+                  }
+               }
+            }
+
+            swap = runoffGrid;
+            runoffGrid = accRunoffGrid;
+            accRunoffGrid = swap;
+
+            setProgress(j, iIntervalsHyeto);
+
+         }
+
+         for (j = 0; j < iIntervalsHydro; j++) {
+            hydData[j] = hydData[j] * dRunoff2Volume / iRatio / m_iIntervalHydro;
+         }
+
+         final Hydrograph hyd = new Hydrograph(hydData, m_iIntervalHydro);
+         hyd.setName(m_Hyetogram[0][i].getName());
+         m_Hydrographs.add(hyd);
+
+      }
+
+   }
+
+
+   private double getRainfall(final int iSerie,
+                              final Point2D pt,
+                              final int iInitTime,
+                              final int iInterval) {
+
+      double dTotalRainfall = 0;
+      double dTotalWeight = 0;
+
+      for (final Hyetograph[] element : m_Hyetogram) {
+         final Point2D coords = element[iSerie].getCoords();
+         final double dWeight = 1. / Math.pow(coords.distance(pt), 2.);
+         final double dRainfall = element[iSerie].getRainfall(iInitTime, iInterval) * dWeight;
+         dTotalRainfall += dRainfall;
+         dTotalWeight += dWeight;
+      }
+
+      return dTotalRainfall / dTotalWeight;
+
+   }
+
+
+   private void documentHydrographs() throws UnsupportedOutputChannelException {
+
+      int i, j;
+      double flow[];
+      Hydrograph hydro;
+      String sTableDescription;
+      String sTableName;
+      final String sFields[] = { "T", "Q" };
+      final Object[] values = new Object[2];
+      final Class[] types = { Integer.class, Double.class };
+      ITable driver;
+
+      for (i = 0; i < m_Hydrographs.size(); i++) {
+         hydro = (Hydrograph) m_Hydrographs.get(i);
+         sTableName = "HYDROGRAPH" + Integer.toString(i);
+         sTableDescription = "Hidrograma (" + m_sHyetoNames[i] + ")";
+         driver = getNewTable(sTableName, sTableDescription, types, sFields);
+         flow = hydro.getFlowArray();
+         for (j = 0; j < hydro.getLengthInIntervals(); j++) {
+            values[0] = new Integer(j * hydro.getTimeInterval());
+            values[1] = new Double(flow[j]);
+            driver.addRecord(values);
+         }
+         setProgress(i, m_Hydrographs.size());
+      }
+
+   }
+
+
+   private double getRunoff(final double dRainfall, //in mm
+                            final double dCN) {
+
+      double dS;
+      double dRunoff;
+
+      dS = (25400.0 / dCN) - 254.0;
+
+      if (dRainfall < (0.2 * dS)) {
+         return 0;
+      }
+
+      dRunoff = Math.pow(dRainfall - 0.2 * dS, 2.0) / (dRainfall + 0.8 * dS);
+
+      return dRunoff;
+
+   }
+
+
+   private void calculateRunoffGrid(final IRasterLayer runoff,
+                                    final IRasterLayer rainfall) {
+
+      int x, y;
+      double dCN;
+      double dRunoff;
+      double dRainfall;
+
+      double dMean = 0;
+      int i = 0;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dCN = m_CN.getCellValueAsDouble(x, y);
+            dRainfall = rainfall.getCellValueAsDouble(x, y);
+            if (!m_CN.isNoDataValue(dCN) && (dRainfall != 0.0)) {
+               i++;
+               dRunoff = getRunoff(dRainfall, dCN);
+               runoff.setCellValue(x, y, dRunoff);
+               dMean += dRunoff;
+            }
+         }
+      }
+      dMean /= (i);
+
+      dMean += 1;
+
+   }
+
+
+   @Override
+   public boolean isSuitableForModelling() {
+
+      return false;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/hydroModel/HydroModelAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/heightOverChannelNetwork/HeightOverChannelNetworkAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/heightOverChannelNetwork/HeightOverChannelNetworkAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/heightOverChannelNetwork/HeightOverChannelNetworkAlgorithm.java	(revision 369)
@@ -0,0 +1,128 @@
+package es.unex.sextante.hydrology.heightOverChannelNetwork;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gridTools.closeGaps.CloseGapsAlgorithm;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class HeightOverChannelNetworkAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM        = "DEM";
+   public static final String NETWORK    = "NETWORK";
+   public static final String HEIGHTOVER = "HEIGHTOVER";
+   public static final String THRESHOLD  = "THRESHOLD";
+
+   private int                m_iNX, m_iNY;
+
+   private IRasterLayer       m_DEM      = null;
+   private IRasterLayer       m_Network  = null;
+   private IRasterLayer       m_Diff;
+   private double             m_dThreshold;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Network = m_Parameters.getParameterValueAsRasterLayer(NETWORK);
+      m_dThreshold = m_Parameters.getParameterValueAsDouble(THRESHOLD);
+
+      m_Diff = getNewRasterLayer(HEIGHTOVER, Sextante.getText("Elevation_over_channel_network"),
+               IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      m_Diff.setNoDataValue(-1.0);
+      //m_Diff.assignNoData();
+
+      final AnalysisExtent extent = m_Diff.getWindowGridExtent();
+      m_DEM.setWindowExtent(extent);
+      m_Network.setWindowExtent(extent);
+      m_Network.setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      return interpolateSurfaceAndSubstract();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Elevation_over_channel_network"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(NETWORK, Sextante.getText("Channel_network"), true);
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Tension_threshold"), 0.1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(HEIGHTOVER, Sextante.getText("Elevation_over_channel_network"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean interpolateSurfaceAndSubstract() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue, dValue2;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Network.getCellValueAsDouble(x, y);
+            if ((dValue != 0) && !m_Network.isNoDataValue(dValue)) {
+               dValue = m_DEM.getCellValueAsDouble(x, y);
+               m_Diff.setCellValue(x, y, dValue);
+            }
+            else {
+               m_Diff.setNoData(x, y);
+            }
+         }
+      }
+
+      final CloseGapsAlgorithm alg = new CloseGapsAlgorithm();
+      final ParametersSet ps = alg.getParameters();
+
+      //IRasterLayer layer = m_Diff.getRasterLayer(" ",  getAlgorithmProjection());
+      ps.getParameter(CloseGapsAlgorithm.INPUT).setParameterValue(m_Diff);
+      ps.getParameter(CloseGapsAlgorithm.THRESHOLD).setParameterValue(new Double(m_dThreshold));
+      if (alg.execute(this.m_Task, this.m_OutputFactory)) {
+         final OutputObjectsSet output = alg.getOutputObjects();
+         final IRasterLayer networkHeight = (IRasterLayer) output.getOutput("RESULT").getOutputObject();
+         networkHeight.open();
+         for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+            for (x = 0; x < m_iNX; x++) {
+               dValue = m_DEM.getCellValueAsDouble(x, y);
+               dValue2 = networkHeight.getCellValueAsDouble(x, y);
+               if (m_DEM.isNoDataValue(dValue) || networkHeight.isNoDataValue(dValue2)) {
+                  m_Diff.setNoData(x, y);
+               }
+               else {
+                  m_Diff.setCellValue(x, y, dValue - dValue2);
+               }
+            }
+         }
+         networkHeight.close();
+         return !m_Task.isCanceled();
+      }
+      else {
+         return false;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/heightOverChannelNetwork/HeightOverChannelNetworkAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watersheds/WatershedsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watersheds/WatershedsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watersheds/WatershedsAlgorithm.java	(revision 369)
@@ -0,0 +1,230 @@
+package es.unex.sextante.hydrology.watersheds;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class WatershedsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   NO_BASIN     = -1;
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String NETWORK      = "NETWORK";
+   public static final String MINSIZE      = "MINSIZE";
+   public static final String WATERSHEDS   = "WATERSHEDS";
+
+   private int                m_iBasins;
+   private int                m_iNX, m_iNY;
+   private int                m_iMinSize;
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Network    = null;
+   private IRasterLayer       m_Basins;
+   private IRasterLayer       m_Directions;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Network = m_Parameters.getParameterValueAsRasterLayer(NETWORK);
+      m_iMinSize = m_Parameters.getParameterValueAsInt(MINSIZE);
+
+      m_Basins = getNewRasterLayer(WATERSHEDS, Sextante.getText("Watersheds"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Basins.setNoDataValue(NO_BASIN);
+      m_Basins.assignNoData();
+
+      final AnalysisExtent extent = m_Basins.getWindowGridExtent();
+      m_DEM.setFullExtent();
+      m_Network.setWindowExtent(extent);
+
+      m_Directions = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateBasins();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Watersheds"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(NETWORK, Sextante.getText("Channel_network"), true);
+         m_Parameters.addNumericalValue(MINSIZE, Sextante.getText("Minimum_watershed_size__cells"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER);
+         addOutputRasterLayer(WATERSHEDS, Sextante.getText("Watersheds"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateBasins() {
+
+      int i;
+      int x, y;
+      int iBasins;
+      prepareDirectionsLayer();
+      final ArrayList outletsArrayList = getOutlets();
+      final Object[] outlets = outletsArrayList.toArray();
+      Arrays.sort(outlets);
+
+      m_iBasins = 0;
+      for (i = outlets.length - 1; (i >= 0) && setProgress(outlets.length - i, outlets.length); i--) {
+         m_iBasins++;
+         x = ((GridCell) outlets[i]).getX();
+         y = ((GridCell) outlets[i]).getY();
+         if (getBasin(x, y) < m_iMinSize) {
+            iBasins = m_iBasins - 1;
+            m_iBasins = NO_BASIN;
+            getBasin(x, y);
+            m_iBasins = iBasins;
+         }
+      }
+
+   }
+
+
+   private void prepareDirectionsLayer() {
+
+      int x, y;
+      int iDir;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            iDir = m_DEM.getDirToNextDownslopeCell(x, y, false);
+            if (iDir < 0) {
+               m_Directions.setCellValue(x, y, -1.0);
+            }
+            else {
+               m_Directions.setCellValue(x, y, ((iDir + 4) % 8));
+            }
+         }
+      }
+
+   }
+
+
+   private ArrayList getOutlets() {
+
+      int x, y;
+      final ArrayList outlets = new ArrayList();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            addOutlet(x, y, outlets);
+         }
+
+      }
+
+      return outlets;
+
+   }
+
+
+   private void addOutlet(final int x,
+                          final int y,
+                          final ArrayList outlets) {
+
+      int i;
+      int ix, iy;
+      int iUpslopeX = 0, iUpslopeY = 0;
+      int iUpslopeRiverCells = 0;
+      double dUpslopeZ = 0;
+      int iNetwork = m_Network.getCellValueAsInt(x, y);
+      final int iDir = m_Directions.getCellValueAsInt(x, y);
+      final double dZ = m_DEM.getCellValueAsDouble(x, y);
+      final int iNextCellX = x + m_iOffsetX[(iDir + 4) % 8];
+      final int iNextCellY = y + m_iOffsetY[(iDir + 4) % 8];
+      final int iNextCellNetwork = m_Network.getCellValueAsInt(iNextCellX, iNextCellY);
+
+      if (m_Network.isNoDataValue(iNetwork) || (iNetwork == 0)) { //not a river cell
+         return;
+      }
+      if (m_Network.isNoDataValue(iNextCellNetwork) || (iNextCellNetwork == 0)) { //border river cell
+         outlets.add(new GridCell(x, y, dZ));
+      }
+      else if (iNetwork < 0) { // user defined outlet
+         outlets.add(new GridCell(x, y, dZ));
+         return;
+      }
+      else if ((iDir == -1) && !m_DEM.isNoDataValue(dZ)) { //border cell, limits with no data or with grid boundaries
+         outlets.add(new GridCell(x, y, dZ));
+      }
+      else {
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            if (m_Directions.getCellValueAsInt(ix, iy) == i) {
+               iNetwork = m_Network.getCellValueAsInt(ix, iy);
+               if ((iNetwork > 0) && !m_Network.isNoDataValue(iNetwork)) {
+                  if (iUpslopeRiverCells > 0) {
+                     if (iUpslopeRiverCells == 1) {
+                        outlets.add(new GridCell(iUpslopeX, iUpslopeY, dUpslopeZ));
+                     }
+                     outlets.add(new GridCell(ix, iy, m_DEM.getCellValueAsDouble(ix, iy)));
+                  }
+                  else {
+                     iUpslopeX = ix;
+                     iUpslopeY = iy;
+                     dUpslopeZ = m_DEM.getCellValueAsDouble(x, y);
+                  }
+                  iUpslopeRiverCells++;
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private int getBasin(final int x,
+                        final int y) {
+
+      int i, ix, iy, nCells = 1;
+
+      final int iBasin = m_Basins.getCellValueAsInt(x, y);
+      final int iDir = m_Directions.getCellValueAsInt(x, y);
+      if ((iBasin == NO_BASIN) && !m_Directions.isNoDataValue(iDir)) {
+
+         m_Basins.setCellValue(x, y, m_iBasins);
+
+         for (i = 0, nCells = 1; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            if ((m_Directions.getCellValueAsInt(ix, iy) == i) && (m_Basins.getCellValueAsInt(ix, iy) == NO_BASIN)) {
+               nCells += getBasin(ix, iy);
+            }
+         }
+         return nCells;
+      }
+
+      return 0;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/watersheds/WatershedsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createExclusionAreas/CreateExclusionAreasAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createExclusionAreas/CreateExclusionAreasAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createExclusionAreas/CreateExclusionAreasAlgorithm.java	(revision 369)
@@ -0,0 +1,138 @@
+
+
+package es.unex.sextante.hydrology.createExclusionAreas;
+
+import java.awt.Point;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class CreateExclusionAreasAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String RESULT       = "RESULT";
+   public static final String OUTLET_POINT = "OUTLET_POINT";
+   public static final String INPUT        = "INPUT";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Grid;
+   boolean                    m_IsCellAlreadyVisited[][];
+   private IRasterLayer       m_ExclusionAreas;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("CreateExclusionAreas"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addPoint(OUTLET_POINT, Sextante.getText("Outlet_point"));
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"), 0);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Grid.setFullExtent();
+      m_Grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      m_IsCellAlreadyVisited = new boolean[m_iNX][m_iNY];
+
+      m_ExclusionAreas = getNewRasterLayer(RESULT, Sextante.getText("ExclusionAreas"), IRasterLayer.RASTER_DATA_TYPE_INT,
+               m_Grid.getLayerGridExtent());
+
+      m_ExclusionAreas.assign(m_Grid);
+      m_ExclusionAreas.setNoDataValue(0.0);
+
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(OUTLET_POINT);
+      final GridCell cell = m_Grid.getLayerGridExtent().getGridCoordsFromWorldCoords(pt);
+
+      exclude(cell.getX(), cell.getY());
+
+      m_ExclusionAreas.setNoData(cell.getX(), cell.getY());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void exclude(int x,
+                        int y) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      double dArea = 0;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      iInitClass = m_Grid.getCellValueAsInt(x, y);
+
+      centralPoints.add(new Point(x, y));
+      m_IsCellAlreadyVisited[x][y] = true;
+
+      while ((centralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            dArea += m_Grid.getWindowCellSize() * m_Grid.getWindowCellSize();
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            double dClass = m_Grid.getCellValueAsInt(x, y);
+            if (!m_Grid.isNoDataValue(dClass)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  dClass = m_Grid.getCellValueAsDouble(x2, y2);
+                  if (!m_Grid.isNoDataValue(dClass)) {
+                     iClass = (int) dClass;
+                     if (m_IsCellAlreadyVisited[x2][y2] == false) {
+                        if (iInitClass == iClass) {
+                           m_IsCellAlreadyVisited[x2][y2] = true;
+                           adjPoints.add(new Point(x2, y2));
+                           m_ExclusionAreas.setNoData(x2, y2);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         System.out.println(centralPoints.size());
+         adjPoints = new ArrayList();
+
+      }
+
+      m_ExclusionAreas.setNoData(x, y);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createExclusionAreas/CreateExclusionAreasAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/distToChannelNetwork/DistToChannelNetworkAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/distToChannelNetwork/DistToChannelNetworkAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/distToChannelNetwork/DistToChannelNetworkAlgorithm.java	(revision 369)
@@ -0,0 +1,152 @@
+package es.unex.sextante.hydrology.distToChannelNetwork;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class DistToChannelNetworkAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String NETWORK      = "NETWORK";
+   public static final String DIST         = "DIST";
+
+   private int                m_iNX, m_iNY;
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Network    = null;
+   private IRasterLayer       m_Dist;
+   private IRasterLayer       m_Directions;
+   private ArrayList          m_AdjPoints;
+   private ArrayList          m_CentralPoints;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Network = m_Parameters.getParameterValueAsRasterLayer(NETWORK);
+
+      m_Dist = getNewRasterLayer(DIST, Sextante.getText("Distance_to_channel_network"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      m_Dist.setNoDataValue(-1.0);
+      m_Dist.assignNoData();
+
+      final AnalysisExtent extent = m_Dist.getWindowGridExtent();
+      m_DEM.setWindowExtent(extent);
+      m_Network.setWindowExtent(extent);
+      m_Network.setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+
+      m_Directions = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      prepareInitData();
+
+      calculateDistance();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Distance_to_channel_network"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(NETWORK, Sextante.getText("Channel_network"), true);
+         addOutputRasterLayer(DIST, Sextante.getText("Distance_to_channel_network"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void prepareInitData() {
+
+      int x, y;
+      int iDir;
+      int iChannel;
+
+      m_AdjPoints = new ArrayList();
+      m_CentralPoints = new ArrayList();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            iDir = m_DEM.getDirToNextDownslopeCell(x, y, false);
+            iChannel = m_Network.getCellValueAsInt(x, y);
+            if (iDir < 0) {
+               m_Directions.setCellValue(x, y, -1.0);
+            }
+            else {
+               m_Directions.setCellValue(x, y, ((iDir + 4) % 8));
+            }
+            if ((iChannel != 0) && !m_Network.isNoDataValue(iChannel)) {
+               m_Dist.setCellValue(x, y, 0.0);
+               m_CentralPoints.add(new GridCell(x, y, 0));
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateDistance() {
+
+      int i;
+      int iPt;
+      int x, y, x2, y2;
+      double dDist, dDist2, dAccDist;
+      GridCell cell;
+
+      while (m_CentralPoints.size() != 0) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            dDist = m_Dist.getCellValueAsDouble(x, y);
+            for (i = 0; i < 8; i++) {
+               x2 = x + m_iOffsetX[i];
+               y2 = y + m_iOffsetY[i];
+               if (m_Directions.getCellValueAsInt(x2, y2) == i) {
+                  dAccDist = dDist + m_DEM.getDistToNeighborInDir(i);
+                  dDist2 = m_Dist.getCellValueAsDouble(x2, y2);
+                  if (m_Dist.isNoDataValue(dDist2) || (dDist2 > dAccDist)) {
+                     m_Dist.setCellValue(x2, y2, dAccDist);
+                     m_AdjPoints.add(new GridCell(x2, y2, 0));
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/distToChannelNetwork/DistToChannelNetworkAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hyetograph.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hyetograph.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hyetograph.java	(revision 369)
@@ -0,0 +1,274 @@
+package es.unex.sextante.hydrology.modelling;
+
+import java.awt.geom.Point2D;
+
+public class Hyetograph {
+
+   private double  m_dRainfall[];   // in mm
+   private final int     m_iTimeInterval; // in seconds
+   private Point2D m_Coords;
+   private String  m_sName;
+
+
+   public Hyetograph(final double dP24,
+                     final int iTime, // in seconds
+                     final int iTimeInterval,
+                     final int iPeakTime,
+                     final int iReturn,
+                     final int iRatioI1) {
+
+      int i;
+
+      final int iLength = (int) ((double) iTime / (double) iTimeInterval);
+      final double dRain[] = new double[iLength];
+      double dAccRain = 0;
+      double dTotalRain = 0;
+
+      for (i = 0; i < iLength; i++) {
+         dTotalRain = getIntensity((double) (iTimeInterval * (i + 1)) / 3600.0, dP24, iRatioI1)
+                      * (double) (iTimeInterval * (i + 1)) / 3600.0;
+         dRain[i] = dTotalRain - dAccRain;
+         dAccRain = dTotalRain;
+      }
+
+      m_iTimeInterval = iTimeInterval;
+
+      final int iPeakInterval = (int) ((float) iPeakTime / (float) iTimeInterval) - 1;
+      final int iMaxIntervals = Math.max(iPeakInterval, iLength - 1 - iPeakInterval);
+      m_dRainfall = new double[iLength];
+      int iInterval = 0;
+      int iRainInterval = 0;
+
+      m_dRainfall[iPeakInterval] = dRain[0];
+      for (i = 1; i < iMaxIntervals + 1; i++) {
+         iInterval = iPeakInterval + i;
+         if (iInterval < iLength) {
+            iRainInterval++;
+            m_dRainfall[iInterval] = dRain[iRainInterval];
+         }
+         iInterval = iPeakInterval - i;
+         if (iInterval >= 0) {
+            iRainInterval++;
+            m_dRainfall[iInterval] = dRain[iRainInterval];
+         }
+      }
+
+
+   }
+
+
+   public Hyetograph(final double[] dRainfall,
+                     final int iTimeInterval) {
+
+      int i;
+
+      m_dRainfall = new double[dRainfall.length];
+
+      for (i = 0; i < dRainfall.length; i++) {
+         m_dRainfall[i] = dRainfall[i];
+      }
+
+      m_iTimeInterval = iTimeInterval;
+
+   }
+
+
+   public Hyetograph(final double dP05,// in mm
+                     final double dP1,
+                     final double dP6) {
+
+      double dDelta;
+
+      dDelta = dP6 - dP1;
+      m_dRainfall = new double[12];
+      m_dRainfall[0] = dDelta * 0.15f / 2f;
+      m_dRainfall[1] = dDelta * 0.15f / 2f;
+      m_dRainfall[2] = dDelta * 0.17f / 2f;
+      m_dRainfall[3] = dDelta * 0.17f / 2f;
+      m_dRainfall[4] = dDelta * 0.19f / 2f;
+      m_dRainfall[5] = dDelta * 0.19f / 2f;
+      m_dRainfall[6] = dP05;
+      m_dRainfall[7] = dP1 - dP05;
+      m_dRainfall[8] = dDelta * 0.32f / 2f;
+      m_dRainfall[9] = dDelta * 0.32f / 2f;
+      m_dRainfall[10] = dDelta * 0.17f / 2f;
+      m_dRainfall[11] = dDelta * 0.17f / 2f;
+      m_iTimeInterval = 1800;
+
+   }
+
+
+   public int getDuration() {
+
+      return m_dRainfall.length * m_iTimeInterval;
+
+   }
+
+
+   public int getIntervals() {
+
+      return m_dRainfall.length;
+
+   }
+
+
+   public void delay(final int iTime) {//in seconds
+
+      final int iDelayIntervals = (int) ((double) iTime / (double) m_iTimeInterval);
+      final double dRainfall[] = new double[m_dRainfall.length + iDelayIntervals];
+
+      for (int i = 0; i < m_dRainfall.length; i++) {
+         dRainfall[i + iDelayIntervals] = m_dRainfall[i];
+      }
+      m_dRainfall = dRainfall;
+
+   }
+
+
+   public int getTimeInterval() {
+
+      return m_iTimeInterval;
+
+   }
+
+
+   public double[] getRainfallArray() {
+
+      return m_dRainfall;
+
+   }
+
+
+   public double getAverageRainfallIntensity() {// in mm/s
+
+      double dAverage = 0;
+
+      for (int i = 0; i < m_dRainfall.length; i++) {
+         dAverage = dAverage + m_dRainfall[i];
+      }
+      dAverage = dAverage / (m_dRainfall.length * (float) m_iTimeInterval);
+
+      return dAverage;
+
+   }
+
+
+   public double getIntensity(// in mm/s
+                              final double dInitTime,// in s
+                              final double dDuration) {// in s
+
+      return (getRainfall(dInitTime, dDuration) / dDuration);
+
+   }
+
+
+   public double getRainfall(// in mm
+                             final double dInitTime,// in s
+                             final double dDuration) {// in s
+
+      double dTotal = 0;
+
+      int iInitInterval = (int) Math.floor((dInitTime / (double) m_iTimeInterval));
+      int iEndInterval = (int) Math.floor(((dInitTime + dDuration) / (double) m_iTimeInterval));
+      iInitInterval = Math.max(iInitInterval, 0);
+      iEndInterval = Math.min(iEndInterval, m_dRainfall.length - 1);
+
+      for (int i = iInitInterval; i < iEndInterval + 1; i++) {
+         dTotal += m_dRainfall[i];
+      }
+      dTotal -= m_dRainfall[iInitInterval] * ((dInitTime / (double) m_iTimeInterval) - iInitInterval);
+      dTotal -= m_dRainfall[iEndInterval] * (1 - (((dInitTime + dDuration) / (double) m_iTimeInterval) - iEndInterval));
+
+      return dTotal;
+
+   }
+
+
+   public double getTotalRainfall() {
+
+      double dTotal = 0;
+
+      for (int i = 0; i < m_dRainfall.length; i++) {
+         dTotal += m_dRainfall[i];
+      }
+
+      return dTotal;
+
+   }
+
+
+   public void normalize() {
+
+      final double dTotal = getTotalRainfall();
+
+      for (int i = 0; i < m_dRainfall.length; i++) {
+         m_dRainfall[i] /= dTotal;
+      }
+
+   }
+
+
+   public Hyetograph getNormalized() {
+
+      final Hyetograph hyet = new Hyetograph(m_dRainfall, m_iTimeInterval);
+
+      hyet.normalize();
+
+      return hyet;
+
+   }
+
+
+   private double getIntensity(// mm/h
+                               final double dTime, // in h
+                               final double dP24,
+                               final int iRatioI1) {
+
+      final double dI = (double) ((double) dP24 / 24.0 * Math.pow((double) iRatioI1, (Math.pow(28.0, 0.1) - Math.pow(dTime, 0.1))
+                                                                               / (Math.pow(28.0, 0.1) - 1.0)));
+
+      return dI;
+
+   }
+
+
+   public void setCoords(final Point2D coords) {
+
+      m_Coords = coords;
+
+   }
+
+
+   public Point2D getCoords() {
+
+      return m_Coords;
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+   public double getRainfallAtInterval(final int iInterval) {
+
+      if (iInterval < m_dRainfall.length && iInterval > 0) {
+         return m_dRainfall[iInterval];
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hyetograph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hydrograph.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hydrograph.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hydrograph.java	(revision 369)
@@ -0,0 +1,276 @@
+package es.unex.sextante.hydrology.modelling;
+
+public class Hydrograph {
+
+   protected double m_dFlow[];       // in m3
+   protected int    m_iTimeInterval; // in seconds
+   private String   m_sName;
+
+
+   public Hydrograph(final int iInterval) {
+
+      m_dFlow = new double[1];
+      m_iTimeInterval = iInterval;
+
+   }
+
+
+   public Hydrograph(final double[] H,
+                     final int iInterval) {
+
+      m_dFlow = H;
+      m_iTimeInterval = iInterval;
+
+   }
+
+
+   public void delay(final int iTime) {//in seconds
+
+      int i;
+      final int iDelayIntervals = (int) ((double) iTime / (double) m_iTimeInterval);
+      final double dFlow[] = new double[m_dFlow.length + iDelayIntervals];
+
+      for (i = 0; i < iDelayIntervals + 1; i++) {
+         dFlow[i] = 0;
+      }
+      for (i = 0; i < m_dFlow.length; i++) {
+         dFlow[i + iDelayIntervals] = m_dFlow[i];
+      }
+      m_dFlow = dFlow;
+
+   }
+
+
+   public void add(final Hydrograph Hyd) {
+
+      double dFlow1 = 0;
+      double dFlow2 = 0;
+
+      if (Hyd.getTimeInterval() == m_iTimeInterval) {
+         final int iLength = Math.max(Hyd.getLengthInIntervals(), m_dFlow.length);
+         final double dFlow[] = new double[iLength];
+
+         for (int i = 0; i < iLength; i++) {
+            if (i >= Hyd.getLengthInIntervals()) {
+               dFlow1 = 0;
+            }
+            else {
+               dFlow1 = Hyd.getFlow(m_iTimeInterval * i);
+            }
+            if (i >= m_dFlow.length) {
+               dFlow2 = 0;
+            }
+            else {
+               dFlow2 = m_dFlow[i];
+            }
+            dFlow[i] = dFlow1 + dFlow2;
+         }
+         m_dFlow = dFlow;
+      }
+
+   }
+
+
+   public void add(final float fFlow) {
+
+      for (int i = 0; i < m_dFlow.length; i++) {
+         m_dFlow[i] += fFlow;
+      }
+
+   }
+
+
+   /*public void MuskingumRouting(
+           float fK,
+           float fX) {
+
+       ArrayList RoutedHydrograph = new ArrayList();
+       int j = 0;
+       float fFlow1 = 0;
+       float fFlow0 = 0;
+       float fRoutedFlow = 0;
+
+       float fD = m_iTimeInterval / 3600f;
+       int iReaches = 1 + (int) (fK * 2f * fX * fD);
+
+       fK /= (float) iReaches;
+       for (int i = 0; i < iReaches; i++) {
+           float fC3 = fK - fK * fX + 0.5f * fD;
+           float fC0 = (-fK * fX + 0.5f * fD) / fC3;
+           float fC1 = (fK * fX + 0.5f * fD) / fC3;
+           float fC2 = (fK - fK * fX - 0.5f * fD) / fC3;
+
+           j = 0;
+           boolean bIn = false;
+
+           fRoutedFlow = m_fFlow[0];
+           RoutedHydrograph.clear();
+           RoutedHydrograph.add(new Float(fRoutedFlow));
+           do {
+               j++;
+               if (j < m_fFlow.length) {
+                   fFlow1 = m_fFlow[j];
+               }// if
+               else {
+                   fFlow1 = 0;
+                   if (!bIn) {
+                       break;// exit if Hydrogram is null//
+                   }// if
+               }// else
+               if (j - 1 < m_fFlow.length) {
+                   fFlow0 = m_fFlow[j - 1];
+               }// if
+               else {
+                   fFlow0 = 0;
+               }// else
+               fRoutedFlow = Math.max(0,
+                       fC0 * fFlow1 + fC1 * fFlow0 + fC2 * fRoutedFlow);
+               RoutedHydrograph.add(new Float(fRoutedFlow));
+               if (fRoutedFlow > 0.25f) {
+                   bIn = true;
+               }// if
+           }while (fRoutedFlow > 0.25f || !bIn);
+           m_fFlow = new float[RoutedHydrograph.size()];
+           for (int k = 0; k < RoutedHydrograph.size(); k++) {
+               m_fFlow[k] = ((Float) RoutedHydrograph.get(k)).floatValue();
+           }// for
+       }// for
+
+   }// method*/
+
+   public double getFlow(final int iTime) {
+
+      final int iIndex = (int) ((double) iTime / (double) m_iTimeInterval);
+
+      return m_dFlow[iIndex];
+
+   }
+
+
+   public int getTimeInterval() {
+
+      return m_iTimeInterval;
+
+   }
+
+
+   public int getLengthInIntervals() {
+
+      return m_dFlow.length;
+
+   }
+
+
+   public double getTotalRunoff() {// im m3
+
+      double dRunoff = 0;
+
+      for (int i = 0; i < m_dFlow.length - 1; i++) {
+         dRunoff += (m_dFlow[i] + m_dFlow[i + 1]) / 2.0 * m_iTimeInterval;
+      }
+
+      return dRunoff;
+
+   }
+
+
+   public double getPeak() {// in m3
+
+      double dMax = Double.NEGATIVE_INFINITY;
+
+      for (int i = 0; i < m_dFlow.length; i++) {
+         if (m_dFlow[i] > dMax) {
+            dMax = m_dFlow[i];
+         }
+      }
+
+      return dMax;
+
+   }
+
+
+   public int getPeakTime() {// in seconds
+
+      double dMax = Double.NEGATIVE_INFINITY;
+      int iMaxTime = 0;
+
+      for (int i = 0; i < m_dFlow.length; i++) {
+         if (m_dFlow[i] > dMax) {
+            dMax = m_dFlow[i];
+            iMaxTime = i * m_iTimeInterval;
+         }
+      }
+
+      return iMaxTime;
+
+   }
+
+
+   public double[] getFlowArray() {
+
+      return m_dFlow;
+
+   }
+
+
+   /*public Pt[] getPtArray() {
+
+       Pt PtArray[] = new Pt[m_fFlow.length];
+
+       for (int i = 0; i < m_fFlow.length; i++) {
+           PtArray[i] = new Pt((float) (m_iTimeInterval * i), m_fFlow[i]);
+       }// for
+
+       return PtArray;
+
+   }// method*/
+
+   public void multiply(final double fFactor) {
+
+      for (int i = 0; i < m_dFlow.length; i++) {
+         m_dFlow[i] *= fFactor;
+      }
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      final StringBuffer sb = new StringBuffer();
+
+      sb.append("Caudal Punta : " + getPeak() + " m3/s\n");
+      sb.append("Tiempo al Pico : " + transformSecToHourMin(getPeakTime()) + " \n");
+      sb.append("Volumen total de escorrent�a : " + getTotalRunoff() + " m3\n");
+      sb.append("Duraci�n total del hidrograma : " + transformSecToHourMin(getLengthInIntervals() * m_iTimeInterval) + "\n");
+
+      return sb.toString();
+
+   }
+
+
+   public static String transformSecToHourMin(final int iSec) {
+
+      final int iHours = (int) ((double) iSec / 3600f);
+      final int iMin = (int) ((double) (iSec - iHours * 3600) / 60.0);
+
+      return new String(Integer.toString(iHours) + "h" + Integer.toString(iMin) + "min");
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/modelling/Hydrograph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromPoint/UpslopeAreaFromPointAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromPoint/UpslopeAreaFromPointAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromPoint/UpslopeAreaFromPointAlgorithm.java	(revision 369)
@@ -0,0 +1,113 @@
+
+
+package es.unex.sextante.hydrology.upslopeAreaFromPoint;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class UpslopeAreaFromPointAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String OUTLET       = "OUTLET";
+   public static final String RESULT       = "RESULT";
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Watershed;
+   private GridCell           m_Outlet;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(OUTLET);
+
+      final AnalysisExtent gridExtent = new AnalysisExtent(m_DEM);
+      m_DEM.setFullExtent();
+      m_Watershed = getNewRasterLayer(RESULT, Sextante.getText("Upslope_area"), IRasterLayer.RASTER_DATA_TYPE_BYTE, gridExtent);
+
+      m_Watershed.assign(0.0);
+
+      m_Outlet = gridExtent.getGridCoordsFromWorldCoords(pt);
+
+      calculateWatershed();
+
+      m_Watershed.setNoDataValue(0.0);
+
+      return true;
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Upslope_area_from_a_single_point"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addPoint(OUTLET, Sextante.getText("Outlet_point"));
+         addOutputRasterLayer(RESULT, Sextante.getText("Upslope_area"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateWatershed() {
+
+      writeCell(m_Outlet.getX(), m_Outlet.getY());
+
+   }
+
+
+   private void writeCell(final int iX,
+                          final int iY) {
+
+      int i;
+      int ix, iy;
+      int iDirection;
+      double dValue;
+
+      dValue = m_DEM.getCellValueAsDouble(iX, iY);
+
+      if (!m_DEM.isNoDataValue(dValue)) {
+
+         m_Watershed.setCellValue(iX, iY, 1);
+
+         for (i = 0; i < 8; i++) {
+            ix = iX + m_iOffsetX[i];
+            iy = iY + m_iOffsetY[i];
+            dValue = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy, false);
+               if (iDirection >= 0) {
+                  if ((i + 4) % 8 == iDirection) {
+                     writeCell(ix, iy);
+                  }
+               }
+            }
+         }
+
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/upslopeAreaFromPoint/UpslopeAreaFromPointAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/topographicIndices/TopographicIndicesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/topographicIndices/TopographicIndicesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/topographicIndices/TopographicIndicesAlgorithm.java	(revision 369)
@@ -0,0 +1,102 @@
+package es.unex.sextante.hydrology.topographicIndices;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class TopographicIndicesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final double ALMOST_ZERO = 0.0011;
+
+   public static final String  SLOPE       = "SLOPE";
+   public static final String  ACCFLOW     = "ACCFLOW";
+   public static final String  TWI         = "TWI";
+   public static final String  SPI         = "SPI";
+   public static final String  LS          = "LS";
+
+   private IRasterLayer        m_Slope     = null;
+   private IRasterLayer        m_AccFlow   = null;
+   private IRasterLayer        m_WetnessIndex;
+   private IRasterLayer        m_StreamPowerIndex;
+   private IRasterLayer        m_LSFactor;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_AccFlow = m_Parameters.getParameterValueAsRasterLayer(ACCFLOW);
+      m_Slope = m_Parameters.getParameterValueAsRasterLayer(SLOPE);
+
+      m_WetnessIndex = getNewRasterLayer(TWI, Sextante.getText("Topographic_Wetness_Index__TWI"),
+               IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_StreamPowerIndex = getNewRasterLayer(SPI, Sextante.getText("Stream_Power_Index"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_LSFactor = getNewRasterLayer(LS, Sextante.getText("LS_factor"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_WetnessIndex.getWindowGridExtent();
+      m_Slope.setWindowExtent(extent);
+      m_AccFlow.setWindowExtent(extent);
+
+      iNX = m_Slope.getNX();
+      iNY = m_Slope.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            calculateIndices(x, y);
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Topographic_indices"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(SLOPE, Sextante.getText("Slope"), true);
+         m_Parameters.addInputRasterLayer(ACCFLOW, Sextante.getText("Flow_accumulation"), true);
+         addOutputRasterLayer(TWI, Sextante.getText("Topographic_Wetness_Index__TWI"));
+         addOutputRasterLayer(SPI, Sextante.getText("Stream_Power_Index"));
+         addOutputRasterLayer(LS, Sextante.getText("LS_factor"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateIndices(final int x,
+                                 final int y) {
+
+      double dSlope = m_Slope.getCellValueAsDouble(x, y);
+      double dAccFlow = m_AccFlow.getCellValueAsDouble(x, y);
+
+      if (m_Slope.isNoDataValue(dSlope) || m_AccFlow.isNoDataValue(dAccFlow)) {
+         m_WetnessIndex.setNoData(x, y);
+         m_StreamPowerIndex.setNoData(x, y);
+         m_LSFactor.setNoData(x, y);
+      }
+      else {
+         dAccFlow /= m_AccFlow.getWindowCellSize();
+         dSlope = Math.max(Math.tan(dSlope), ALMOST_ZERO);
+         m_WetnessIndex.setCellValue(x, y, Math.log(dAccFlow / dSlope));
+         m_StreamPowerIndex.setCellValue(x, y, dAccFlow * dSlope);
+         m_LSFactor.setCellValue(x, y, (0.4 + 1) * Math.pow(dAccFlow / 22.13, 0.4) * Math.pow(Math.sin(dSlope) / 0.0896, 1.3));
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/topographicIndices/TopographicIndicesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/accFlow/AccFlowAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/accFlow/AccFlowAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/accFlow/AccFlowAlgorithm.java	(revision 369)
@@ -0,0 +1,284 @@
+package es.unex.sextante.hydrology.accFlow;
+
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class AccFlowAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final double NOT_VISITED  = -1.0;
+
+   public static final String  FLOWACC      = "FLOWACC";
+   public static final String  CONVERGENCE  = "CONVERGENCE";
+   public static final String  METHOD       = "METHOD";
+   public static final String  DEM          = "DEM";
+   public static final String  WEIGHTS      = "WEIGHTS";
+
+   public final static int     D8           = 0;
+   public final static int     RHO8         = 1;
+   public final static int     DINF         = 2;
+   public final static int     MFD          = 3;
+
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private int                 m_iMethod;
+   private int                 m_iNX, m_iNY;
+   private IRasterLayer        m_Flow[];
+   private double              m_dConvergence;
+
+   private IRasterLayer        m_DEM        = null;
+   private IRasterLayer        m_Weights    = null;
+   private IRasterLayer        m_AccFlow;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Weights = m_Parameters.getParameterValueAsRasterLayer(WEIGHTS);
+      m_dConvergence = m_Parameters.getParameterValueAsDouble(CONVERGENCE);
+
+      m_AccFlow = getNewRasterLayer(FLOWACC, Sextante.getText("Flow_accumulation"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      m_AccFlow.assign(NOT_VISITED);
+      final AnalysisExtent extent = m_AccFlow.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+      if (m_Weights != null) {
+         m_Weights.setWindowExtent(extent);
+      }
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      m_Flow = new IRasterLayer[8];
+
+      for (i = 0; i < m_Flow.length; i++) {
+         m_Flow[i] = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      }
+
+      calculateFlows();
+      calculateAccFlows();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         m_AccFlow.multiply(m_AccFlow.getWindowCellSize() * m_AccFlow.getWindowCellSize());
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("D8"), Sextante.getText("Rho8"), Sextante.getText("DInfinity"),
+               Sextante.getText("MFD__Multiple_Flow_Directions") };
+
+      setName(Sextante.getText("Flow_accumulation"));
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(WEIGHTS, Sextante.getText("Weight"), false);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(CONVERGENCE, Sextante.getText("Convergence_factor__MFD"), 1.1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(FLOWACC, Sextante.getText("Flow_accumulation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateFlows() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            switch (m_iMethod) {
+               case 0:
+                  doD8(x, y);
+                  break;
+               case 1:
+                  doRho8(x, y);
+                  break;
+               case 2:
+                  doDInf(x, y);
+                  break;
+               case 3:
+                  doMFD(x, y);
+                  break;
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateAccFlows() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            getFlow(x, y);
+         }
+
+      }
+
+   }
+
+
+   private void getFlow(final int x,
+                        final int y) {
+
+      int i, ix, iy, j;
+      double dFlow;
+      double dValue, dValue2;
+      double dWeight;
+
+      if ((m_AccFlow.getCellValueAsDouble(x, y) != NOT_VISITED) || m_Task.isCanceled()) {
+         return;
+      }
+
+      if (m_Weights != null) {
+         dWeight = m_Weights.getCellValueAsDouble(x, y);
+      }
+      else {
+         dWeight = 1.0;
+      }
+
+      dValue = m_DEM.getCellValueAsDouble(x, y);
+      if (!m_DEM.isNoDataValue(dValue)) {
+         m_AccFlow.setCellValue(x, y, dWeight);
+         for (i = 0, j = 4; i < 8; i++, j = (j + 1) % 8) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            dValue = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(dValue)) {
+               dFlow = m_Flow[j].getCellValueAsDouble(ix, iy);
+               if (dFlow > 0) {
+                  getFlow(ix, iy);
+                  dValue = m_AccFlow.getCellValueAsDouble(ix, iy) * dFlow;
+                  dValue2 = m_AccFlow.getCellValueAsDouble(x, y);
+                  m_AccFlow.setCellValue(x, y, dValue + dValue2);
+               }
+            }
+         }
+      }
+
+
+   }
+
+
+   private void doD8(final int x,
+                     final int y) {
+
+      int iDirection;
+
+      iDirection = m_DEM.getDirToNextDownslopeCell(x, y);
+
+      if (iDirection >= 0) {
+         m_Flow[iDirection % 8].setCellValue(x, y, 1.0f);
+      }
+
+   }
+
+
+   private void doRho8(final int x,
+                       final int y) {
+
+      int iDirection;
+      double dAspect;
+
+      dAspect = Math.toDegrees(m_DEM.getAspect(x, y));
+
+      if (dAspect >= 0) {
+         iDirection = (int) (dAspect / 45.0);
+
+         if ((dAspect % 45.0) / 45.0 > Math.random()) {
+            iDirection++;
+         }
+
+         iDirection %= 8;
+
+         m_Flow[iDirection].setCellValue(x, y, 1.0f);
+      }
+
+   }
+
+
+   private void doDInf(final int x,
+                       final int y) {
+
+      int iDirection;
+      double dAspect;
+
+      dAspect = Math.toDegrees(m_DEM.getAspect(x, y));
+
+      if (dAspect >= 0) {
+         iDirection = (int) (dAspect / 45.0);
+         dAspect = (dAspect % 45) / 45.0;
+
+         m_Flow[iDirection % 8].setCellValue(x, y, 1.0 - dAspect);
+         m_Flow[(iDirection + 1) % 8].setCellValue(x, y, dAspect);
+      }
+
+   }
+
+
+   private void doMFD(final int x,
+                      final int y) {
+
+      int i, ix, iy;
+      double z, z2, dDifZ, dzSum;
+      double dFlow;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+      dzSum = 0.0;
+
+      for (i = 0; i < 8; i++) {
+         ix = x + m_iOffsetX[i];
+         iy = y + m_iOffsetY[i];
+         z2 = m_DEM.getCellValueAsDouble(ix, iy);
+         if (!m_DEM.isNoDataValue(z2)) {
+            dDifZ = z - z2;
+            if (dDifZ > 0) {
+               dFlow = Math.pow(dDifZ / m_DEM.getDistToNeighborInDir(i), m_dConvergence);
+               dzSum += dFlow;
+               m_Flow[i].setCellValue(x, y, dFlow);
+            }
+         }
+      }
+
+      if (dzSum > 0.0) {
+         for (i = 0; i < 8; i++) {
+            dFlow = m_Flow[i].getCellValueAsDouble(x, y);
+            if (dFlow > 0) {
+               m_Flow[i].setCellValue(x, y, dFlow / dzSum);
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/accFlow/AccFlowAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/strahlerOrder/StrahlerOrderAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/strahlerOrder/StrahlerOrderAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/strahlerOrder/StrahlerOrderAlgorithm.java	(revision 369)
@@ -0,0 +1,119 @@
+package es.unex.sextante.hydrology.strahlerOrder;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class StrahlerOrderAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String RESULT       = "RESULT";
+
+   private int                m_iNX, m_iNY;
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_Strahler;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_Strahler = getNewRasterLayer(RESULT, Sextante.getText("Strahler_Order"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Strahler.assign(0.0);
+
+      final AnalysisExtent extent = m_Strahler.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            getStrahlerOrder(x, y);
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Strahler_Order"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Strahler_Order"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void getStrahlerOrder(final int x,
+                                 final int y) {
+
+      int i;
+      int ix, iy;
+      int iDirection;
+      int iMaxOrder = 1;
+      int iOrder = 1;
+      int iMaxOrderCells = 0;
+
+      if (m_DEM.isNoDataValue(m_DEM.getCellValueAsDouble(x, y))) {
+         return;
+      }
+
+      if (m_Strahler.getCellValueAsInt(x, y) == 0) {
+         ;
+         m_Strahler.setCellValue(x, y, iMaxOrder);
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+            if (iDirection == (i + 4) % 8) {
+               getStrahlerOrder(ix, iy);
+               iOrder = m_Strahler.getCellValueAsInt(ix, iy);
+               if (iOrder > iMaxOrder) {
+                  iMaxOrder = iOrder;
+                  iMaxOrderCells = 1;
+               }
+               else if (iOrder == iMaxOrder) {
+                  iMaxOrderCells++;
+               }
+            }
+         }
+
+         if (iMaxOrderCells > 1) {
+            iMaxOrder++;
+         }
+
+         m_Strahler.setCellValue(x, y, iMaxOrder);
+
+      }
+
+      //return iMaxOrder;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/strahlerOrder/StrahlerOrderAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/channelNetwork/ChannelNetworkAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/channelNetwork/ChannelNetworkAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/channelNetwork/ChannelNetworkAlgorithm.java	(revision 369)
@@ -0,0 +1,351 @@
+package es.unex.sextante.hydrology.channelNetwork;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class ChannelNetworkAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[]   = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]   = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String METHOD         = "METHOD";
+   public static final String DEM            = "DEM";
+   public static final String THRESHOLDLAYER = "THRESHOLDLAYER";
+   public static final String THRESHOLD      = "THRESHOLD";
+   public static final String NETWORK        = "NETWORK";
+   public static final String NETWORKVECT    = "NETWORKVECT";
+
+   private int                m_iMethod;
+   private int                m_iNX, m_iNY;
+   private double             m_dThreshold;
+
+   private IRasterLayer       m_DEM          = null;
+   private IRasterLayer       m_Threshold    = null;
+   private IRasterLayer       m_Network;
+
+   private ArrayList          m_HeadersAndJunctions;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Threshold = m_Parameters.getParameterValueAsRasterLayer(THRESHOLDLAYER);
+      m_dThreshold = m_Parameters.getParameterValueAsDouble(THRESHOLD);
+
+      m_Network = getNewRasterLayer(NETWORK, Sextante.getText("Channel_network"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Network.assign(0.0);
+
+      final AnalysisExtent extent = m_Network.getWindowGridExtent();
+      m_DEM.setWindowExtent(extent);
+      m_Threshold.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateChannelNetwork();
+
+      m_Network.setNoDataValue(0.0);
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Greater_than"), Sextante.getText("Lower_than") };
+
+      setName(Sextante.getText("Channel_network"));
+      setGroup(Sextante.getText("Basic_hydrological_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(THRESHOLDLAYER, Sextante.getText("Threshold_layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Criteria"), sMethod);
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Threshold"), 10000,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(NETWORK, Sextante.getText("Channel_network"));
+         addOutputVectorLayer(NETWORKVECT, Sextante.getText("Channel_network"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateChannelNetwork() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final ArrayList alHeaders = getHeaders();
+
+      if (alHeaders != null) {
+         m_HeadersAndJunctions = alHeaders;
+         final Object[] headers = alHeaders.toArray();
+         Arrays.sort(headers);
+
+         setProgressText(Sextante.getText("Delineating_channel_network"));
+         if (headers.length > 0) {
+            for (i = 0; (i < headers.length) && setProgress(i, headers.length); i++) {
+               traceChannel((GridCell) headers[i]);
+            }
+         }
+
+         if (!m_Task.isCanceled()) {
+            calculateOrderAndAddJunctions();
+            createVectorLayer();
+         }
+      }
+
+   }
+
+
+   private ArrayList getHeaders() {
+
+      int iDirection;
+      int x, y;
+      int ix, iy;
+      double dValue;
+      double dHeight1, dHeight2;
+      boolean bIsHeader;
+      final ArrayList headers = new ArrayList();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Threshold.getCellValueAsDouble(x, y);
+            dHeight1 = m_DEM.getCellValueAsDouble(x, y);
+            if (meetsChannelConditions(dValue)) {
+               bIsHeader = true;
+               dHeight1 = m_DEM.getCellValueAsDouble(x, y);
+               if (!m_DEM.isNoDataValue(dHeight1)) {
+                  for (iDirection = 0; iDirection < 8; iDirection++) {
+                     ix = x + m_iOffsetX[iDirection];
+                     iy = y + m_iOffsetY[iDirection];
+                     dValue = m_Threshold.getCellValueAsDouble(ix, iy);
+                     if (meetsChannelConditions(dValue)) {
+                        dHeight2 = m_DEM.getCellValueAsDouble(ix, iy);
+                        if (dHeight2 >= dHeight1) {
+                           bIsHeader = false;
+                           break;
+                        }
+                     }
+                  }
+                  if (bIsHeader) {
+                     headers.add(new GridCell(x, y, m_DEM.getCellValueAsDouble(x, y)));
+                  }
+               }
+            }
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return null;
+      }
+      else {
+         return headers;
+      }
+
+   }
+
+
+   private boolean meetsChannelConditions(final double dValue) {
+
+      if (m_iMethod == 0) {
+         return (dValue > m_dThreshold);
+      }
+      else if (m_iMethod == 1) {
+         return (dValue < m_dThreshold);
+      }
+
+      return false;
+
+   }
+
+
+   private void traceChannel(final GridCell cell) {
+
+      int iDirection;
+      int x, y;
+      boolean bContinue = true;
+
+      x = cell.getX();
+      y = cell.getY();
+
+      do {
+         m_Network.setCellValue(x, y, -1);
+         iDirection = m_DEM.getDirToNextDownslopeCell(x, y);
+         if (iDirection >= 0) {
+            x = x + m_iOffsetX[iDirection];
+            y = y + m_iOffsetY[iDirection];
+         }
+         else {
+            bContinue = false;
+         }
+      }
+      while (bContinue && !m_Task.isCanceled());
+
+   }
+
+
+   private void calculateOrderAndAddJunctions() {
+
+      int x, y;
+
+      setProgressText(Sextante.getText("Calculating_orders"));
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            getStrahlerOrder(x, y);
+         }
+      }
+
+   }
+
+
+   private int getStrahlerOrder(final int x,
+                                final int y) {
+
+      int i;
+      int ix, iy;
+      int iDirection;
+      int iMaxOrder = 1;
+      int iOrder = 1;
+      int iMaxOrderCells = 0;
+      int iUpslopeChannelCells = 0;
+
+      if (m_Network.getCellValueAsInt(x, y) == -1) {
+         ;
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            iDirection = m_DEM.getDirToNextDownslopeCell(ix, iy);
+            if ((iDirection == (i + 4) % 8) && ((iOrder = m_Network.getCellValueAsInt(ix, iy)) != 0)) {
+               iUpslopeChannelCells++;
+               iOrder = m_Network.getCellValueAsInt(ix, iy);
+               if (iOrder == -1) {
+                  iOrder = getStrahlerOrder(ix, iy);
+               }
+               if (iOrder > iMaxOrder) {
+                  iMaxOrder = iOrder;
+                  iMaxOrderCells = 1;
+               }
+               else if (iOrder == iMaxOrder) {
+                  iMaxOrderCells++;
+               }
+            }
+         }
+
+         if (iMaxOrderCells > 1) {
+            iMaxOrder++;
+         }
+
+         if (iUpslopeChannelCells > 1) {
+            m_HeadersAndJunctions.add(new GridCell(x, y, m_DEM.getCellValueAsDouble(x, y)));
+         }
+
+         m_Network.setCellValue(x, y, iMaxOrder);
+
+      }
+
+      return iMaxOrder;
+
+   }
+
+
+   private void createVectorLayer() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int ix, iy;
+      int iDirection;
+      int iIndexDownslope = -1;
+      int iOrder;
+      boolean bContinue;
+      double dLength;
+      Point2D pt;
+      GridCell cell;
+      ArrayList coordsList;
+      final AnalysisExtent extent = m_DEM.getWindowGridExtent();
+      final Object[] values = new Object[4];
+
+      final String sNames[] = { Sextante.getText("ID"), Sextante.getText("Length"), Sextante.getText("Order"),
+               Sextante.getText("Next") };
+      final Class[] types = { Integer.class, Double.class, Integer.class, Integer.class };
+
+      final IVectorLayer network = getNewVectorLayer(NETWORKVECT, Sextante.getText("Channel_network"),
+               IVectorLayer.SHAPE_TYPE_LINE, types, sNames);
+      final Object[] headers = m_HeadersAndJunctions.toArray();
+      Arrays.sort(headers);
+
+      setProgressText(Sextante.getText("Creating_vector_layer"));
+      for (i = headers.length - 1; (i > -1) && setProgress(headers.length - i, headers.length); i--) {
+         cell = (GridCell) headers[i];
+         x = cell.getX();
+         y = cell.getY();
+         coordsList = new ArrayList();
+         pt = extent.getWorldCoordsFromGridCoords(cell);
+         coordsList.add(new Coordinate(pt.getX(), pt.getY()));
+         dLength = 0;
+         iOrder = m_Network.getCellValueAsInt(x, y);
+         bContinue = true;
+         do {
+            iDirection = m_DEM.getDirToNextDownslopeCell(x, y);
+            if (iDirection >= 0) {
+               ix = x + m_iOffsetX[iDirection];
+               iy = y + m_iOffsetY[iDirection];
+               cell = new GridCell(ix, iy, m_DEM.getCellValueAsDouble(ix, iy));
+               pt = extent.getWorldCoordsFromGridCoords(cell);
+               coordsList.add(new Coordinate(pt.getX(), pt.getY()));
+               dLength += m_DEM.getDistToNeighborInDir(iDirection);
+               iIndexDownslope = m_HeadersAndJunctions.indexOf(cell);
+               if (iIndexDownslope != -1) {
+                  bContinue = false;
+               }
+               x = ix;
+               y = iy;
+            }
+            else {
+               bContinue = false;
+            }
+
+         }
+         while (bContinue && !m_Task.isCanceled());
+
+         values[0] = new Integer(i);
+         values[1] = new Double(dLength);
+         values[2] = new Integer(iOrder);
+         values[3] = new Integer(iIndexDownslope);
+
+         final Coordinate coords[] = new Coordinate[coordsList.size()];
+         for (int j = 0; j < coords.length; j++) {
+            coords[j] = (Coordinate) coordsList.get(j);
+         }
+         final Geometry geom = new GeometryFactory().createLineString(coords);
+         network.addFeature(geom, values);
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/channelNetwork/ChannelNetworkAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createHyetogram/CreateHyetogramAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createHyetogram/CreateHyetogramAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createHyetogram/CreateHyetogramAlgorithm.java	(revision 369)
@@ -0,0 +1,139 @@
+package es.unex.sextante.hydrology.createHyetogram;
+
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.hydrology.modelling.Hyetograph;
+
+public class CreateHyetogramAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RETURNS          = "RETURNS";
+   public static final String HYETOGRAPHLENGTH = "HYETOGRAPHLENGTH";
+   public static final String TIMETOPEAK       = "TIMETOPEAK";
+   public static final String INTERVAL         = "INTERVAL";
+   public static final String AVERAGE          = "AVERAGE";
+   public static final String STDDEV           = "STDDEV";
+   public static final String HYETOGRAPH       = "HYETOGRAPH";
+
+   private int                m_iInterval;
+   private int                m_iPeakTime;
+   private int                m_iHyetoLength;
+   private final int          m_iRatioI1       = 10;                //TODO cambiar esto
+   private ArrayList          m_Returns;
+   private double             m_dMean;
+   private double             m_dStdDev;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_iInterval = m_Parameters.getParameterValueAsInt(INTERVAL) * 60;
+      m_iHyetoLength = m_Parameters.getParameterValueAsInt(HYETOGRAPHLENGTH) * 60;
+      m_iPeakTime = m_Parameters.getParameterValueAsInt(TIMETOPEAK) * 60;
+      m_dMean = m_Parameters.getParameterValueAsDouble(AVERAGE);
+      m_dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+
+      m_Returns = new ArrayList();
+      final String sReturns = m_Parameters.getParameterValueAsString(RETURNS);
+      final StringTokenizer st = new StringTokenizer(sReturns);
+      while (st.hasMoreTokens()) {
+         try {
+            final String token = st.nextToken();
+            final Integer value = Integer.valueOf(token);
+            m_Returns.add(value);
+         }
+         catch (final NumberFormatException e) {}
+      }
+
+      createTable();
+
+      return true;
+   }
+
+
+   private void createTable() throws UnsupportedOutputChannelException {
+
+      int i, j;
+      int iReturn;
+      final String sFields[] = new String[m_Returns.size() + 1];
+      final Object values[] = new Object[m_Returns.size() + 1];
+      final Class types[] = new Class[m_Returns.size() + 1];
+      final Hyetograph hyetos[] = new Hyetograph[m_Returns.size()];
+      ITable driver;
+
+      types[0] = Double.class;
+      sFields[0] = "T";
+      for (i = 0; i < m_Returns.size(); i++) {
+         types[i + 1] = Double.class;
+         sFields[i + 1] = "P_" + ((Integer) m_Returns.get(i)).toString();
+      }
+
+      driver = getNewTable(HYETOGRAPH, Sextante.getText("Hietograma"), types, sFields);
+
+      for (i = 0; i < m_Returns.size(); i++) {
+         iReturn = ((Integer) m_Returns.get(i)).intValue();
+         hyetos[i] = getHyetograph(iReturn);
+      }
+
+      for (j = 0; j < hyetos[0].getIntervals(); j++) {
+         values[0] = new Double(j * hyetos[0].getTimeInterval());
+         for (int k = 0; k < hyetos.length; k++) {
+            values[k + 1] = new Double(hyetos[k].getRainfallAtInterval(j));
+         }
+         driver.addRecord(values);
+      }
+
+   }
+
+
+   private Hyetograph getHyetograph(final int iReturn) {
+
+      final double dAlpha = Math.sqrt(Math.pow(3.141592, 2.0) / 6.0 / m_dStdDev);
+      final double dMu = m_dMean - (0.5772 / dAlpha);
+
+      final double dFx = 1.0 - (1.0 / iReturn);
+      double dP24 = (float) -Math.log(Math.log(1.0 / dFx));
+      dP24 = dP24 / dAlpha + dMu;
+
+      return new Hyetograph(dP24, m_iHyetoLength, m_iInterval, m_iPeakTime, iReturn, m_iRatioI1);
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_synthetic_hyetograph"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addString(RETURNS, Sextante.getText("Return_periods"), "5 10 25 50 100");
+         m_Parameters.addNumericalValue(HYETOGRAPHLENGTH, Sextante.getText("Total_length__minutes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 180, Integer.MIN_VALUE, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(TIMETOPEAK, Sextante.getText("Time_to_peak__minutes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 120, Integer.MIN_VALUE, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(INTERVAL, Sextante.getText("Interval__minutes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 1, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(AVERAGE, Sextante.getText("Rainfall_mean"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, 0, Double.MAX_VALUE);
+         addOutputTable(HYETOGRAPH, Sextante.getText("Hietograma"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/createHyetogram/CreateHyetogramAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/slopeLength/SlopeLengthAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/slopeLength/SlopeLengthAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/slopeLength/SlopeLengthAlgorithm.java	(revision 369)
@@ -0,0 +1,174 @@
+package es.unex.sextante.hydrology.slopeLength;
+
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class SlopeLengthAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String USETHRESHOLD = "USETHRESHOLD";
+   public static final String THRESHOLD    = "THRESHOLD";
+   public static final String SLOPELENGTH  = "SLOPELENGTH";
+
+   private int                m_iNX, m_iNY;
+
+   private IRasterLayer       m_DEM        = null;
+   private IRasterLayer       m_SlopeLength;
+   private IRasterLayer       m_Slope;
+   private double             m_dThreshold;
+   private boolean            m_bUseThreshold;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_bUseThreshold = m_Parameters.getParameterValueAsBoolean(USETHRESHOLD);
+      m_dThreshold = Math.abs(m_Parameters.getParameterValueAsDouble(THRESHOLD));
+
+      m_SlopeLength = getNewRasterLayer(SLOPELENGTH, Sextante.getText("Slope_length"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      m_SlopeLength.assign(0.0);
+
+      final AnalysisExtent extent = m_SlopeLength.getWindowGridExtent();
+
+      m_Slope = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+
+      m_DEM.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      if (m_bUseThreshold) {
+         createSlopeLayer();
+      }
+
+      final GridCell[] cells = getSortedArrayOfCells(m_DEM);
+      final int iCells = cells.length;
+
+      for (i = iCells - 1; (i > -1) && setProgress(iCells - i, iCells); i--) {
+         setLength(cells[i].getX(), cells[i].getY());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Slope_length"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Slope_change_threshold"), 0.5,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addBoolean(USETHRESHOLD, Sextante.getText("Use_threshold"), true);
+         addOutputRasterLayer(SLOPELENGTH, Sextante.getText("Slope_length"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void createSlopeLayer() {
+
+      int x, y;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            m_Slope.setCellValue(x, y, m_DEM.getSlope(x, y));
+         }
+      }
+
+   }
+
+
+   private void setLength(final int x,
+                          final int y) {
+
+      int i, ix, iy;
+      double dSlope, dSlope2;
+      double dLength;
+      double dValue;
+
+      dValue = m_DEM.getCellValueAsDouble(x, y);
+      if (!m_DEM.isNoDataValue(dValue) && ((i = m_DEM.getDirToNextDownslopeCell(x, y)) >= 0)) {
+         ix = x + m_iOffsetX[i];
+         iy = y + m_iOffsetY[i];
+         dValue = m_DEM.getCellValueAsDouble(ix, iy);
+         if (!m_DEM.isNoDataValue(dValue)) {
+            if (m_bUseThreshold) {
+               dSlope = m_Slope.getCellValueAsDouble(x, y);
+               dSlope2 = m_Slope.getCellValueAsDouble(ix, iy);
+               if (Math.abs(dSlope2) > m_dThreshold * Math.abs(dSlope)) {
+                  dLength = m_SlopeLength.getCellValueAsDouble(x, y) + m_DEM.getDistToNeighborInDir(i);
+               }
+               else {
+                  dLength = m_DEM.getDistToNeighborInDir(i);
+               }
+               if (dLength > m_SlopeLength.getCellValueAsDouble(ix, iy)) {
+                  m_SlopeLength.setCellValue(ix, iy, dLength);
+               }
+            }
+            else {
+               dLength = m_SlopeLength.getCellValueAsDouble(x, y) + m_DEM.getDistToNeighborInDir(i);
+               if (dLength > m_SlopeLength.getCellValueAsDouble(ix, iy)) {
+                  m_SlopeLength.setCellValue(ix, iy, dLength);
+               }
+            }
+         }
+      }
+      else {
+         m_SlopeLength.setNoData(x, y);
+      }
+
+   }
+
+
+   public GridCell[] getSortedArrayOfCells(final IRasterLayer layer) {
+
+      int i;
+      int iX, iY;
+      final int iNX = layer.getNX();
+      final int iCells = layer.getNX() * layer.getNY();
+      GridCell[] cells;
+      GridCell cell;
+
+      cells = new GridCell[iCells];
+
+      for (i = 0; i < iCells; i++) {
+         iX = i % iNX;
+         iY = i / iNX;
+         cell = new GridCell(iX, iY, layer.getCellValueAsDouble(iX, iY));
+         cells[i] = cell;
+      }
+
+      Arrays.sort(cells);
+
+      return cells;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/slopeLength/SlopeLengthAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cellBalance/CellBalanceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cellBalance/CellBalanceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cellBalance/CellBalanceAlgorithm.java	(revision 369)
@@ -0,0 +1,215 @@
+package es.unex.sextante.hydrology.cellBalance;
+
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CellBalanceAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final double RAD_TO_DEG   = 180.0 / Math.PI;
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String  METHOD       = "METHOD";
+   public static final String  DEM          = "DEM";
+   public static final String  WEIGHTS      = "WEIGHTS";
+   public static final String  CONVERGENCE  = "CONVERGENCE";
+   public static final String  CELLBALANCE  = "CELLBALANCE";
+
+   private int                 m_iMethod;
+   private int                 m_iNX, m_iNY;
+   private double              m_dConvergence;
+
+   private IRasterLayer        m_DEM        = null;
+   private IRasterLayer        m_Weights    = null;
+   private IRasterLayer        m_CellBalance;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Weights = m_Parameters.getParameterValueAsRasterLayer(WEIGHTS);
+      m_dConvergence = m_Parameters.getParameterValueAsDouble(CONVERGENCE);
+
+      m_CellBalance = getNewRasterLayer(CELLBALANCE, Sextante.getText("Net_balance"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_CellBalance.getWindowGridExtent();
+      m_DEM.setWindowExtent(extent);
+      m_Weights.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      calculateInFlows();
+      substractOutFlows();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("D8"), Sextante.getText("DInfinity"),
+               Sextante.getText("MFD__Multiple_Flow_Directions") };
+
+      setName(Sextante.getText("Net_balance"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer("WEIGHTS", Sextante.getText("Weight"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(CONVERGENCE, Sextante.getText("Convergence_factor__MFD"), 1.1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(CELLBALANCE, Sextante.getText("Net_balance"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateInFlows() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            switch (m_iMethod) {
+               case 0:
+                  doD8(x, y);
+                  break;
+               case 1:
+                  doDInf(x, y);
+                  break;
+               case 2:
+                  doMFD(x, y);
+                  break;
+            }
+         }
+      }
+
+   }
+
+
+   private void substractOutFlows() {
+
+      int x, y;
+      double dOut;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dOut = m_Weights.getCellValueAsDouble(x, y);
+            if (!m_Weights.isNoDataValue(dOut)) {
+               m_CellBalance.addToCellValue(x, y, -dOut);
+            }
+            else {
+               m_CellBalance.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void doD8(final int x,
+                     final int y) {
+
+      int iDirection;
+      double dWeight;
+      int ix, iy;
+
+      dWeight = m_Weights.getCellValueAsDouble(x, y);
+      if (!m_Weights.isNoDataValue(dWeight)) {
+         iDirection = m_DEM.getDirToNextDownslopeCell(x, y);
+         if (iDirection >= 0) {
+            ix = x + m_iOffsetX[iDirection];
+            iy = y + m_iOffsetY[iDirection];
+            m_CellBalance.addToCellValue(ix, iy, dWeight);
+         }
+      }
+
+   }
+
+
+   private void doDInf(final int x,
+                       final int y) {
+
+      int iDirection;
+      double dWeight;
+      double dAspect;
+      int ix, iy;
+
+      dWeight = m_Weights.getCellValueAsDouble(x, y);
+      if (!m_Weights.isNoDataValue(dWeight)) {
+         dAspect = m_DEM.getAspect(x, y);
+         dAspect *= RAD_TO_DEG;
+         if (dAspect >= 0) {
+            iDirection = (int) (dAspect / 45.0);
+            dAspect = (dAspect % 45) / 45.0;
+
+            iDirection = iDirection % 8;
+            ix = x + m_iOffsetX[iDirection];
+            iy = y + m_iOffsetY[iDirection];
+            m_CellBalance.addToCellValue(ix, iy, dWeight * (1.0 - dAspect));
+
+            iDirection = (iDirection + 1) % 8;
+            ix = x + m_iOffsetX[iDirection];
+            iy = y + m_iOffsetY[iDirection];
+            m_CellBalance.addToCellValue(ix, iy, dWeight * dAspect);
+         }
+      }
+
+   }
+
+
+   private void doMFD(final int x,
+                      final int y) {
+
+      int i, ix, iy;
+      double z, z2, dDifZ, dzSum;
+      double Flow[];
+      double dWeight;
+
+      dWeight = m_Weights.getCellValueAsDouble(x, y);
+      if (!m_Weights.isNoDataValue(dWeight)) {
+         z = m_DEM.getCellValueAsDouble(x, y);
+         dzSum = 0.0;
+         Flow = new double[8];
+         for (i = 0; i < 8; i++) {
+            ix = x + m_iOffsetX[i];
+            iy = y + m_iOffsetY[i];
+            z2 = m_DEM.getCellValueAsDouble(ix, iy);
+            if (!m_DEM.isNoDataValue(z2)) {
+               dDifZ = z - z2;
+               if (dDifZ > 0) {
+                  dzSum += Flow[i] = Math.pow(dDifZ / m_DEM.getDistToNeighborInDir(i), m_dConvergence);
+               }
+            }
+         }
+
+         if (dzSum > 0.0) {
+            for (i = 0; i < 8; i++) {
+               ix = x + m_iOffsetX[i];
+               iy = y + m_iOffsetY[i];
+               if (Flow[i] > 0) {
+                  m_CellBalance.addToCellValue(ix, iy, Flow[i] / dzSum * dWeight);
+               }
+            }
+         }
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cellBalance/CellBalanceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cFactorFromNDVI/CFactorFromNDVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cFactorFromNDVI/CFactorFromNDVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cFactorFromNDVI/CFactorFromNDVIAlgorithm.java	(revision 369)
@@ -0,0 +1,77 @@
+package es.unex.sextante.hydrology.cFactorFromNDVI;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CFactorFromNDVIAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ALPHA   = "ALPHA";
+   public static final String BETA    = "BETA";
+   public static final String NDVI    = "NDVI";
+   public static final String CFACTOR = "CFACTOR";
+
+   private IRasterLayer       m_NDVI  = null;
+   private IRasterLayer       m_CFactor;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dNDVI;
+      double dAlpha, dBeta;
+
+      m_NDVI = m_Parameters.getParameterValueAsRasterLayer(NDVI);
+      m_CFactor = getNewRasterLayer(CFACTOR, "C", IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      dAlpha = m_Parameters.getParameterValueAsDouble(ALPHA);
+      dBeta = m_Parameters.getParameterValueAsDouble(BETA);
+
+      m_NDVI.setWindowExtent(m_AnalysisExtent);
+
+      iNX = m_NDVI.getNX();
+      iNY = m_NDVI.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dNDVI = m_NDVI.getCellValueAsDouble(x, y);
+            if (m_NDVI.isNoDataValue(dNDVI)) {
+               m_CFactor.setNoData(x, y);
+            }
+            else {
+               m_CFactor.setCellValue(x, y, Math.exp(-dAlpha * dNDVI / (dBeta - dNDVI)));
+            }
+         }
+      }
+
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("C_factor_from_NDVI"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(NDVI, "NDVI", true);
+         m_Parameters.addNumericalValue(ALPHA, "Alpha", 1., AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(BETA, "Beta", 2., AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(CFACTOR, Sextante.getText("C"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/cFactorFromNDVI/CFactorFromNDVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/edgeContamination/EdgeContaminationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/edgeContamination/EdgeContaminationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/edgeContamination/EdgeContaminationAlgorithm.java	(revision 369)
@@ -0,0 +1,81 @@
+package es.unex.sextante.hydrology.edgeContamination;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.hydrology.accFlow.AccFlowAlgorithm;
+import es.unex.sextante.outputs.Output;
+
+public class EdgeContaminationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String EDGECONT = "EDGECONT";
+   public static final String DEM      = "DEM";
+   private int                m_iNX, m_iNY;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      IRasterLayer weights;
+
+      final IRasterLayer dem = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      weights = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, new AnalysisExtent(dem));
+
+      weights.assign(0.0);
+
+      m_iNX = weights.getWindowGridExtent().getNX();
+      m_iNY = weights.getWindowGridExtent().getNY();
+
+      for (y = 0; y < m_iNY; y++) {
+         weights.setCellValue(1, y, 1);
+         weights.setCellValue(m_iNX - 2, y, 1);
+      }
+      for (x = 0; x < m_iNX; x++) {
+         weights.setCellValue(x, 1, 1);
+         weights.setCellValue(x, m_iNY - 2, 1);
+      }
+
+      final AccFlowAlgorithm alg = new AccFlowAlgorithm();
+      final ParametersSet ps = alg.getParameters();
+      ps.getParameter(AccFlowAlgorithm.WEIGHTS).setParameterValue(weights);
+      ps.getParameter(AccFlowAlgorithm.DEM).setParameterValue(dem);
+      ps.getParameter(AccFlowAlgorithm.METHOD).setParameterValue(new Integer(3));
+      final Output flowacc = alg.getOutputObjects().getOutput(AccFlowAlgorithm.FLOWACC);
+      flowacc.setOutputChannel(getOutputChannel(EDGECONT));
+      if (alg.execute(this.m_Task, this.m_OutputFactory)) {
+         final Output out = m_OutputObjects.getOutput(EDGECONT);
+         out.setOutputObject(flowacc.getOutputObject());
+      }
+      else {
+         return false;
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Edge_contamination"));
+      setGroup(Sextante.getText("Indices_and_other_hydrological_parameters"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         addOutputRasterLayer(EDGECONT, Sextante.getText("Edge_contamination"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/hydrology/edgeContamination/EdgeContaminationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/other/localiza/LocalizaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/other/localiza/LocalizaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/other/localiza/LocalizaAlgorithm.java	(revision 369)
@@ -0,0 +1,86 @@
+package es.unex.sextante.other.localiza;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.HashMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class LocalizaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName("localiza");
+      setGroup("localiza");
+
+      try {
+         m_Parameters.addFilepath("FILEPATH", "filepath", true, false, false, "txt");
+         addOutputVectorLayer("LAYER", "Resultado");
+      }
+      catch (final RepeatedParameterNameException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final String sFolder = m_Parameters.getParameterValueAsString("FILEPATH");
+      final HashMap<String, Point> map = new HashMap<String, Point>();
+      boolean bFirstLine = true;
+      String sID = null;
+      final Class[] types = new Class[] { String.class, String.class };
+      final String[] sFields = new String[] { "ID", "Población" };
+      final IVectorLayer layer = getNewVectorLayer("LAYER", "Resultado", OutputVectorLayer.SHAPE_TYPE_POINT, types, sFields);
+
+      BufferedReader input;
+      try {
+         input = new BufferedReader(new FileReader(sFolder + File.separator + "SECCION.txt"));
+         String sLine = null;
+         while ((sLine = input.readLine()) != null) {
+            final String[] sTokens = sLine.split(" ");
+            if (bFirstLine) {
+               sID = sTokens[0];
+            }
+            else {
+               final Point pt = gf.createPoint(new Coordinate(Double.parseDouble(sTokens[1]), Double.parseDouble(sTokens[3])));
+               map.put(sID, pt);
+            }
+            bFirstLine = !bFirstLine;
+         }
+         input.close();
+
+         input = new BufferedReader(new FileReader(sFolder + File.separator + "poblacion.txt"));
+         while ((sLine = input.readLine()) != null) {
+            final String[] sTokens = sLine.split(" ");
+            sID = sLine.substring(0, 3).trim();
+            final String sPop = sLine.substring(4).trim();
+            layer.addFeature(map.get(sID), new Object[] { sID, sPop });
+         }
+         input.close();
+      }
+      catch (final IOException e) {
+         e.printStackTrace();
+      }
+
+
+      return true;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/other/localiza/LocalizaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/LowerThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/LowerThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/LowerThanAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class LowerThanAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("<");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if (m_dValue < m_dValue2) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/LowerThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/PlusAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/PlusAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/PlusAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class PlusAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("+");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return m_dValue + m_dValue2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/PlusAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/DivideAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/DivideAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/DivideAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class DivideAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("/");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return m_dValue / m_dValue2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/DivideAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/GreaterThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/GreaterThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/GreaterThanAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class GreaterThanAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName(">");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if (m_dValue > m_dValue2) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/GreaterThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/EqAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/EqAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/EqAlgorithm.java	(revision 369)
@@ -0,0 +1,30 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+
+public class EqAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("==");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if (m_dValue == m_dValue2) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/EqAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/NotEqAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/NotEqAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/NotEqAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class NotEqAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("!=");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if (m_dValue != m_dValue2) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/NotEqAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/XorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/XorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/XorAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class XorAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("XOR");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if ((m_dValue != 0) ^ (m_dValue2 != 0)) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/XorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MinusAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MinusAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MinusAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class MinusAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("-");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return m_dValue - m_dValue2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MinusAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/ModAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/ModAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/ModAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class ModAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("Mod");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return m_dValue % m_dValue2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/ModAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MultiplyAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MultiplyAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MultiplyAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class MultiplyAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("*");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return m_dValue * m_dValue2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/MultiplyAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/BinaryOperatorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/BinaryOperatorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/BinaryOperatorAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+
+
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public abstract class BinaryOperatorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String LAYER2 = "LAYER2";
+   public static final String RESULT = "RESULT";
+
+   //protected final double     NO_DATA = -99999.0;
+
+   private IRasterLayer       m_window;
+   private IRasterLayer       m_window2;
+
+   protected double           m_dValue;
+   protected double           m_dValue2;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setGroup(Sextante.getText("Calculus_tools_for_raster_layer"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addInputRasterLayer(LAYER2, Sextante.getText("Layer") + " 2", true);
+
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"), 1);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_window2 = m_Parameters.getParameterValueAsRasterLayer(LAYER2);
+
+      m_window.setWindowExtent(m_AnalysisExtent);
+      m_window2.setWindowExtent(m_AnalysisExtent);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_window.getWindowGridExtent());
+
+      result.setNoDataValue(m_OutputFactory.getDefaultNoDataValue());
+      result.assignNoData();
+
+      iNX = m_window.getNX();
+      iNY = m_window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            m_dValue = m_window.getCellValueAsDouble(x, y);
+            m_dValue2 = m_window2.getCellValueAsDouble(x, y);
+            if (!m_window.isNoDataValue(m_dValue) && !m_window2.isNoDataValue(m_dValue2)) {
+               result.setCellValue(x, y, getProcessedValue());
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected abstract double getProcessedValue();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/BinaryOperatorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/OrAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/OrAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/OrAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class OrAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("OR");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if ((m_dValue != 0) || (m_dValue2 != 0)) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/OrAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/AndAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/AndAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/AndAlgorithm.java	(revision 369)
@@ -0,0 +1,29 @@
+package es.unex.sextante.gridCalculus.binaryOperators;
+
+public class AndAlgorithm
+         extends
+            BinaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("AND");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      if ((m_dValue != 0) && (m_dValue2 != 0)) {
+         return 1.0;
+      }
+      else {
+         return 0.0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/binaryOperators/AndAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomNormal/GenerateRandomNormalAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomNormal/GenerateRandomNormalAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomNormal/GenerateRandomNormalAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.gridCalculus.generateRandomNormal;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GenerateRandomNormalAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String PROB   = "PROB";
+   public static final String STDDEV = "STDDEV";
+   public static final String MEAN   = "MEAN";
+
+   private IRasterLayer       m_Result;
+   private double             m_dMean, m_dStdDev;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+
+      m_dMean = m_Parameters.getParameterValueAsDouble(MEAN);
+      m_dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+
+      m_Result = getNewRasterLayer(PROB, Sextante.getText("New_layer"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = m_Result.getWindowGridExtent().getNX();
+      iNY = m_Result.getWindowGridExtent().getNY();
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = getValue();
+            m_Result.setCellValue(x, y, dValue);
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Random_grid__normal"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(MEAN, Sextante.getText("Mean"), 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(PROB, Sextante.getText("Probability"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   double getValue() {
+
+
+      double x1, x2, w, y1;
+
+      do {
+         x1 = 2.0 * Math.random() - 1.0;
+         x2 = 2.0 * Math.random() - 1.0;
+
+         w = x1 * x1 + x2 * x2;
+      }
+      while (w >= 1.0);
+
+      w = Math.sqrt((-2.0 * Math.log(w)) / w);
+
+      y1 = x1 * w;
+
+      return (m_dMean + m_dStdDev * y1);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomNormal/GenerateRandomNormalAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/kernelFilter/KernelFilterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/kernelFilter/KernelFilterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/kernelFilter/KernelFilterAlgorithm.java	(revision 369)
@@ -0,0 +1,128 @@
+package es.unex.sextante.gridCalculus.kernelFilter;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.FixedTableModel;
+
+public class KernelFilterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String KERNEL = "KERNEL";
+   public static final String LAYER  = "LAYER";
+
+   private IRasterLayer       m_Window;
+   protected double           m_dValues[];
+   private double             m_dNoData;
+   private double             m_dCoeffs[];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sColumnNames[] = { "1", "2", "3" };
+      setUserCanDefineAnalysisExtent(false);
+      setName(Sextante.getText("User-defined_3_X_3_filter"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addFixedTable(KERNEL, Sextante.getText("Filter_kernel"), sColumnNames, 3, true);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      final FixedTableModel kernel = (FixedTableModel) m_Parameters.getParameterValueAsObject(KERNEL);
+      m_Window.setFullExtent();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_Window.getLayerGridExtent());
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      m_dValues = new double[9];
+      m_dCoeffs = new double[9];
+      m_dNoData = m_Window.getNoDataValue();
+
+      result.setNoDataValue(m_dNoData);
+
+      int i, j;
+      int iCell = 0;
+
+      for (i = 0; i < 3; i++) {
+         for (j = 0; j < 3; j++) {
+            try {
+               m_dCoeffs[iCell] = Double.parseDouble(kernel.getValueAt(i, j).toString());
+            }
+            catch (final NumberFormatException e) {
+               m_dCoeffs[iCell] = 1;
+            }
+            iCell++;
+         }
+      }
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            setNeighborhoodValues(x, y);
+            result.setCellValue(x, y, processValues());
+         }
+         setProgress(y, iNY);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void setNeighborhoodValues(final int iX,
+                                      final int iY) {
+
+      int x, y;
+      int iCell = 0;
+
+      for (y = -1; y < 2; y++) {
+         for (x = -1; x < 2; x++) {
+            m_dValues[iCell] = m_Window.getCellValueAsDouble(iX + x, iY + y);
+            iCell++;
+         }
+      }
+
+   }
+
+
+   protected double processValues() {
+
+      int i = 0;
+      double dResult = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         if (m_dValues[i] != m_dNoData) {
+            dResult += (m_dCoeffs[i] * m_dValues[i]);
+         }
+         else {
+            return m_dNoData;
+         }
+      }
+
+      return dResult;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/kernelFilter/KernelFilterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomBernoulli/GenerateRandomBernoulliAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomBernoulli/GenerateRandomBernoulliAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomBernoulli/GenerateRandomBernoulliAlgorithm.java	(revision 369)
@@ -0,0 +1,71 @@
+package es.unex.sextante.gridCalculus.generateRandomBernoulli;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GenerateRandomBernoulliAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String PROB   = "PROB";
+
+   private IRasterLayer       m_Result;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iValue;
+      double dValue;
+
+      final double dProb = m_Parameters.getParameterValueAsDouble(PROB) / 100.;
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("New_layer"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      iNX = m_Result.getWindowGridExtent().getNX();
+      iNY = m_Result.getWindowGridExtent().getNY();
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = Math.random();
+            if (dValue < dProb) {
+               iValue = 1;
+            }
+            else {
+               iValue = 0;
+            }
+            m_Result.setCellValue(x, y, iValue);
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Random_grid__Bernouilli"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(PROB, Sextante.getText("Probability__%"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 50, 0, 100);
+         addOutputRasterLayer(RESULT, Sextante.getText("Probability"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomBernoulli/GenerateRandomBernoulliAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volume/VolumeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volume/VolumeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volume/VolumeAlgorithm.java	(revision 369)
@@ -0,0 +1,129 @@
+package es.unex.sextante.gridCalculus.volume;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class VolumeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String BASE                                           = "BASE";
+   public static final String METHOD                                         = "METHOD";
+   public static final String GRID                                           = "GRID";
+   public static final String VOL                                            = "VOL";
+
+   public static final int    METHOD_ONLY_OVER_BASE_LEVEL                    = 0;
+   public static final int    METHOD_ONLY_UNDER_BASE_LEVEL                   = 1;
+   public static final int    SUM_OVER_BASE_LEVEL_SUBSTRACT_UNDER_BASE_LEVEL = 2;
+   public static final int    SUM_VOLUMES_BOTH_OVER_AND_UNDER_BASE_LEVEL     = 3;
+
+   private int                m_iNX, m_iNY;
+   private double             m_BaseLevel;
+   private IRasterLayer       m_Grid                                         = null;
+   private int                m_iMethod;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_BaseLevel = m_Parameters.getParameterValueAsDouble(BASE);
+
+      m_Grid.setWindowExtent(m_AnalysisExtent);
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      return calculateVolumes();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Only_volumes_over_base_level"),
+               Sextante.getText("Only_volumes_below_base_level"),
+               Sextante.getText("Add_volumes_over_base_level_and_substract_volumes_below_it"),
+               Sextante.getText("Add_volumes_both_over_and_below_base_level") };
+
+      setName(Sextante.getText("Volume_calculation"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(BASE, Sextante.getText("Base_level"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1000, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputText(VOL, Sextante.getText("Volume"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean calculateVolumes() {
+
+      int x, y;
+      double z;
+      double dVolume = 0;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_Grid.getCellValueAsDouble(x, y);
+            if (!m_Grid.isNoDataValue(z)) {
+               z = z - m_BaseLevel;
+               switch (m_iMethod) {
+                  case 0:
+                     if (z > 0.0) {
+                        dVolume += z;
+                     }
+                     break;
+                  case 1:
+                     if (z < 0.0) {
+                        dVolume -= z;
+                     }
+                     break;
+                  case 2:
+                     dVolume += z;
+                     break;
+
+                  case 3:
+                     dVolume += Math.abs(z);
+                     break;
+               }
+            }
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         dVolume *= (m_Grid.getWindowCellSize() * m_Grid.getWindowCellSize());
+
+         final DecimalFormat df = new DecimalFormat("##.##");
+         final HTMLDoc doc = new HTMLDoc();
+         doc.open(Sextante.getText("Volumes"));
+         doc.addHeader(Sextante.getText("Volumes"), 2);
+         doc.startUnorderedList();
+         doc.addListElement(Sextante.getText("Calculated_volume") + ": " + df.format(dVolume));
+         doc.close();
+         addOutputText(VOL, Sextante.getText("Volume") + "[" + m_Grid.getName() + "]", doc.getHTMLCode());
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volume/VolumeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volumeBetweenGrids/VolumeBetweenGridsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volumeBetweenGrids/VolumeBetweenGridsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volumeBetweenGrids/VolumeBetweenGridsAlgorithm.java	(revision 369)
@@ -0,0 +1,110 @@
+package es.unex.sextante.gridCalculus.volumeBetweenGrids;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class VolumeBetweenGridsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String VOL   = "VOL";
+   public static final String LGRID = "LGRID";
+   public static final String UGRID = "UGRID";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_LowerGrid, m_UpperGrid;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_LowerGrid = m_Parameters.getParameterValueAsRasterLayer(LGRID);
+      m_UpperGrid = m_Parameters.getParameterValueAsRasterLayer(UGRID);
+
+      m_LowerGrid.setWindowExtent(m_AnalysisExtent);
+      m_UpperGrid.setWindowExtent(m_AnalysisExtent);
+
+      m_iNX = m_LowerGrid.getNX();
+      m_iNY = m_LowerGrid.getNY();
+
+      return calculateVolumes();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Volumen_between_two_layers"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LGRID, Sextante.getText("Lower_layer"), true);
+         m_Parameters.addInputRasterLayer(UGRID, Sextante.getText("Upper_layer"), true);
+         addOutputText(VOL, Sextante.getText("Volume"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean calculateVolumes() {
+
+      int x, y;
+      double z, z2;
+      double dVolumePos = 0;
+      double dVolumeNeg = 0;
+      double dVolume = 0;
+      double dDif;
+      final double dArea = m_LowerGrid.getWindowCellSize() * m_LowerGrid.getWindowCellSize();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_LowerGrid.getCellValueAsDouble(x, y);
+            z2 = m_UpperGrid.getCellValueAsDouble(x, y);
+            if (!m_LowerGrid.isNoDataValue(z) && !m_UpperGrid.isNoDataValue(z2)) {
+               dDif = (z2 - z);
+               dVolume += Math.abs(dDif);
+               if (dDif > 0) {
+                  dVolumePos += dDif;
+               }
+               else {
+                  dVolumeNeg += -dDif;
+               }
+            }
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         dVolume *= dArea;
+         dVolumePos *= dArea;
+         dVolumeNeg *= dArea;
+
+         final DecimalFormat df = new DecimalFormat("##.##");
+         final HTMLDoc doc = new HTMLDoc();
+         doc.open(Sextante.getText("Volumes"));
+         doc.addHeader(Sextante.getText("Volumes"), 2);
+         doc.startUnorderedList();
+         doc.addListElement(Sextante.getText("Volume_+") + df.format(dVolumePos));
+         doc.addListElement(Sextante.getText("Volume_-") + df.format(dVolumeNeg));
+         doc.addListElement(Sextante.getText("Total_volume") + df.format(dVolume));
+         doc.close();
+         addOutputText(VOL, Sextante.getText("Volume"), doc.getHTMLCode());
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/volumeBetweenGrids/VolumeBetweenGridsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomUniform/GenerateRandomUniformAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomUniform/GenerateRandomUniformAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomUniform/GenerateRandomUniformAlgorithm.java	(revision 369)
@@ -0,0 +1,67 @@
+package es.unex.sextante.gridCalculus.generateRandomUniform;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GenerateRandomUniformAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String PROB = "PROB";
+   public static final String MAX  = "MAX";
+   public static final String MIN  = "MIN";
+
+   private IRasterLayer       m_Result;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+
+      final double dMin = m_Parameters.getParameterValueAsDouble(MIN);
+      final double dMax = m_Parameters.getParameterValueAsDouble(MAX);
+
+      m_Result = getNewRasterLayer(PROB, Sextante.getText("New_layer"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      iNX = m_Result.getWindowGridExtent().getNX();
+      iNY = m_Result.getWindowGridExtent().getNY();
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = Math.random() * (dMax - dMin) + dMin;
+            m_Result.setCellValue(x, y, dValue);
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Random_grid__uniform"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(MIN, Sextante.getText("Min_value"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAX, Sextante.getText("Max_value"), 1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(PROB, Sextante.getText("Probability"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateRandomUniform/GenerateRandomUniformAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/CeilAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/CeilAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/CeilAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class CeilAlgorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("ceil()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.ceil(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/CeilAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/FloorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/FloorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/FloorAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class FloorAlgorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("floor()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.floor(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/FloorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/Log10Algorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/Log10Algorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/Log10Algorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class Log10Algorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("log10()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.log(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/Log10Algorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/AbsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/AbsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/AbsAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class AbsAlgorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("abs()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.abs(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/AbsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/LnAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/LnAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/LnAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class LnAlgorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("ln()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.log(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/LnAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/SqrtAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/SqrtAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/SqrtAlgorithm.java	(revision 369)
@@ -0,0 +1,24 @@
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+public class SqrtAlgorithm
+         extends
+            UnaryOperatorAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("sqrt()");
+
+   }
+
+
+   @Override
+   protected double getProcessedValue() {
+
+      return Math.sqrt(m_dValue);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/SqrtAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/UnaryOperatorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/UnaryOperatorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/UnaryOperatorAlgorithm.java	(revision 369)
@@ -0,0 +1,82 @@
+
+
+package es.unex.sextante.gridCalculus.unaryOperators;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public abstract class UnaryOperatorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   //protected final double     NO_DATA = -99999.0;
+
+   private IRasterLayer       m_window;
+
+   protected double           m_dValue;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setGroup(Sextante.getText("Calculus_tools_for_raster_layer"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_window.setWindowExtent(m_AnalysisExtent);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_window.getWindowGridExtent());
+
+      result.setNoDataValue(m_OutputFactory.getDefaultNoDataValue());
+      result.assignNoData();
+
+      iNX = m_window.getNX();
+      iNY = m_window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            m_dValue = m_window.getCellValueAsDouble(x, y);
+            if (!m_window.isNoDataValue(m_dValue)) {
+               result.setCellValue(x, y, getProcessedValue());
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected abstract double getProcessedValue();
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/unaryOperators/UnaryOperatorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/constantGrid/ConstantGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/constantGrid/ConstantGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/constantGrid/ConstantGridAlgorithm.java	(revision 369)
@@ -0,0 +1,53 @@
+package es.unex.sextante.gridCalculus.constantGrid;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ConstantGridAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String VALUE     = "VALUE";
+   public static final String CONSTGRID = "CONSTGRID";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Constant_grid"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(VALUE, Sextante.getText("Value"), 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(CONSTGRID, Sextante.getText("Constant_grid"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      double dValue;
+
+      final IRasterLayer result = getNewRasterLayer(CONSTGRID, Sextante.getText("Constant_grid"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      dValue = m_Parameters.getParameterValueAsDouble(VALUE);
+
+      result.assign(dValue);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/constantGrid/ConstantGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateTerrain/GenerateTerrainAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateTerrain/GenerateTerrainAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateTerrain/GenerateTerrainAlgorithm.java	(revision 369)
@@ -0,0 +1,96 @@
+package es.unex.sextante.gridCalculus.generateTerrain;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GenerateTerrainAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RADIUS     = "RADIUS";
+   public static final String ITERATIONS = "ITERATIONS";
+   public static final String DEM        = "DEM";
+
+   private int                m_iNX, m_iNY;
+   private int                m_iRadius, m_iRadius2;
+
+   private IRasterLayer       m_DEM;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      final int iIterations = m_Parameters.getParameterValueAsInt(ITERATIONS);
+      m_iRadius = m_Parameters.getParameterValueAsInt(RADIUS);
+      m_iRadius2 = (int) Math.pow(m_iRadius, 2.0);
+
+      m_DEM = getNewRasterLayer(DEM, Sextante.getText("Elevation"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      m_iNX = m_DEM.getWindowGridExtent().getNX();
+      m_iNY = m_DEM.getWindowGridExtent().getNY();
+
+      m_DEM.assign(0.0);
+
+      for (i = 0; i < iIterations; i++) {
+         addBump();
+         setProgress(i, iIterations);
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Random_DEM"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius_[cells]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 0, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(ITERATIONS, Sextante.getText("Iterations"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 50, 0, Integer.MAX_VALUE);
+         addOutputRasterLayer(DEM, Sextante.getText("Elevation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void addBump() {
+
+      int i, j;
+      int x, y, x2, y2;
+      int iDist;
+      double dOffset;
+
+      x = (int) (-m_iRadius + (Math.random() * (m_iNX + 2 * m_iRadius)));
+      y = (int) (-m_iRadius + (Math.random() * (m_iNY + 2 * m_iRadius)));
+
+      for (i = -m_iRadius; i < m_iRadius; i++) {
+         for (j = -m_iRadius; j < m_iRadius; j++) {
+            x2 = x + i;
+            y2 = y + j;
+            if (m_DEM.getWindowGridExtent().containsCell(x2, y2)) {
+               iDist = ((i) * (i) + (j) * (j));
+               if (iDist <= m_iRadius2) {
+                  dOffset = Math.sqrt(m_iRadius2 - iDist);
+                  m_DEM.addToCellValue(x2, y2, dOffset);
+               }
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/generateTerrain/GenerateTerrainAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorAlgorithm.java	(revision 369)
@@ -0,0 +1,203 @@
+package es.unex.sextante.gridCalculus.gridCalculator;
+
+import java.awt.image.DataBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+
+public class GridCalculatorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERS  = "LAYERS";
+   public static final String FORMULA = "FORMULA";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      double dValue;
+
+      IRasterLayer layer;
+      RasterLayerAndBand layerAndBand;
+      final List<String> names = new ArrayList<String>();
+      final ArrayList layers = m_Parameters.getParameterValueAsArrayList(LAYERS);
+      String sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+      final List<RasterLayerAndBand> bands = FormulaParser.getBandsFromFormula(sFormula, layers);
+
+      if (bands == null) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Syntax_error"));
+      }
+
+      final IRasterLayer m_Result = getNewRasterLayer(RESULT, Sextante.getText("Result"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final IRasterLayer window[] = new IRasterLayer[bands.size()];
+      final String sVariable[] = new String[bands.size()];
+      final int iBands[] = new int[bands.size()];
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+      final int iNX = m_Result.getWindowGridExtent().getNX();
+      final int iNY = m_Result.getWindowGridExtent().getNY();
+
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      for (i = 0; i < bands.size(); i++) {
+         layerAndBand = (RasterLayerAndBand) bands.get(i);
+         layer = layerAndBand.getRasterLayer();
+         iBands[i] = layerAndBand.getBand();
+         String layerName = layer.getName();
+         String normalizedName = FormulaParser.getNormalizedName(layerName);
+         sFormula = FormulaParser.replaceVariables(sFormula, layerName, normalizedName);
+         names.add(normalizedName);
+         window[i] = layer;
+         window[i].setWindowExtent(extent);
+         if ((layer.getDataType() == DataBuffer.TYPE_FLOAT) || (layer.getDataType() == DataBuffer.TYPE_DOUBLE)) {
+            window[i].setInterpolationMethod(GridWrapper.INTERPOLATION_BSpline);
+         }
+         else {
+            window[i].setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+         }
+
+         sVariable[i] = layer.getName() + " Band " + Integer.toString(iBands[i] + 1);
+         sVariable[i] = sVariable[i].toLowerCase();
+         sVariable[i] = sVariable[i].replaceAll(" ", "");
+         sVariable[i] = sVariable[i].replaceAll("\\[", "_");
+         sVariable[i] = sVariable[i].replaceAll("\\]", "_");
+         sVariable[i] = FormulaParser.replaceDots(sVariable[i]);
+         sVariable[i] = FormulaParser.getNormalizedName(sVariable[i]);
+         
+         jep.addVariable(sVariable[i], 0.0);
+
+      }
+
+      sFormula = FormulaParser.prepareFormula(sFormula, names);
+      sFormula = sFormula.toLowerCase().replaceAll(" ", "");
+      sFormula = sFormula.replaceAll("\\[", "_");
+      sFormula = sFormula.replaceAll("\\]", "_");
+      sFormula = FormulaParser.replaceDots(sFormula);
+      jep.parseExpression(sFormula);
+
+      if (!jep.hasError()) {
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               for (i = 0; i < bands.size(); i++) {
+                  dValue = window[i].getCellValueAsDouble(x, y, iBands[i]);
+                  if (!window[i].isNoDataValue(dValue)) {
+                     jep.addVariable(sVariable[i], dValue);
+                  }
+                  else {
+                     m_Result.setNoData(x, y);
+                     break;
+                  }
+               }
+               if (i == bands.size()) {
+                  dValue = jep.getValue();
+                  if (!Double.isNaN(dValue)) {
+                     m_Result.setCellValue(x, y, dValue);
+                  }
+                  else {
+                     m_Result.setNoData(x, y);
+                  }
+               }
+            }
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(jep.getErrorInfo());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Raster_calculator"));
+      setGroup(Sextante.getText("Calculus_tools_for_raster_layer"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(LAYERS, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean preprocessForModeller(final Object obj) throws GeoAlgorithmExecutionException {
+
+      final ModelAlgorithm model = (ModelAlgorithm) obj;
+      try {
+         String sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+         String sKey = model.getInputAsignment(LAYERS, this);
+         final HashMap inputs = model.getInputs();
+         final ArrayList array = (ArrayList) inputs.get(sKey);
+         final ArrayList<String> variables = new ArrayList<String>();
+         for (int i = 0; i < array.size(); i++) {
+            sKey = (String) array.get(i);
+            final IRasterLayer layer = (IRasterLayer) inputs.get(sKey);
+            String sVariableName = layer.getName();
+            if (variables.contains(sVariableName)) {
+               final char c = (char) ('a' + i);
+               sVariableName = Character.toString(c) + "_" + sVariableName;
+               layer.setName(sVariableName);
+            }
+            variables.add(sVariableName);
+            sFormula = sFormula.replace(sKey.toLowerCase(), sVariableName);
+         }
+         final Set set = inputs.keySet();
+         final Iterator iter = set.iterator();
+         while (iter.hasNext()) {
+            final Object key = iter.next();
+            final Object input = inputs.get(key);
+            if (input instanceof Double) {
+               if (sFormula.contains(((String) key).toLowerCase())) {
+                  sFormula = sFormula.replace(((String) key).toLowerCase(), input.toString());
+               }
+            }
+            if (input instanceof ModelElementNumericalValue) {
+               if (sFormula.contains(((String) key).toLowerCase())) {
+                  return false;
+               }
+            }
+         }
+         m_Parameters.getParameter(FORMULA).setParameterValue(sFormula);
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Syntax_error"));
+      }
+
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,339 @@
+
+
+package es.unex.sextante.gridCalculus.gridCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongOutputIDException;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.gui.modeler.OutputLayerSettingsPanel;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementRasterLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+
+public class GridCalculatorModelerParametersPanel
+         extends
+            GeoAlgorithmModelerParametersPanel {
+
+   private static final int         MAX_BANDS = 3;
+
+   private JTextArea                jTextExpression;
+   private JScrollPane              jScrollPane;
+   private JTree                    jTree;
+   private JScrollPane              jScrollPane1;
+   private CalculatorKeysPanel      m_KeysPanel;
+   private HashMap                  m_Constants;
+
+   private OutputLayerSettingsPanel m_OutputLayerSettingsPanel;
+
+
+   public GridCalculatorModelerParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 50.0, 5.0,
+                        10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            jTextExpression = new JTextArea();
+            jScrollPane.setViewportView(jTextExpression);
+            jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+            jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            try {
+               final Parameter param = m_Algorithm.getParameters().getParameter(GridCalculatorAlgorithm.FORMULA);
+               final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(param));
+               if (oad != null) {
+                  final String sFormula = (String) oad.getObject();
+                  jTextExpression.setText(sFormula);
+               }
+            }
+            catch (final Exception e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jScrollPane1 = new JScrollPane();
+         this.add(jScrollPane1, "1, 1, 2, 3");
+         {
+            jTree = new JTree();
+            jScrollPane1.setViewportView(jTree);
+            jScrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+            jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            final MouseListener ml = new MouseAdapter() {
+               @Override
+               public void mousePressed(MouseEvent e) {
+                  int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+                  TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+                  if ((iRow != -1) && (e.getClickCount() == 2)) {
+                     insertTextFromTree(path);
+                  }
+               }
+            };
+            jTree.addMouseListener(ml);
+            try {
+               populateTree();
+            }
+            catch (final Exception e) {
+               e.printStackTrace();
+            }
+         }
+      }
+      {
+         final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+         m_OutputLayerSettingsPanel = new OutputLayerSettingsPanel();
+         String sDescription = Sextante.getText("Result");
+         final String sKey = GridCalculatorAlgorithm.RESULT;
+
+         if (!oosetGlobal.containsKey(sKey + this.m_sAlgorithmName)) {
+            sDescription = "\"" + sDescription + "\" " + Sextante.getText("from") + " " + m_sAlgorithmDescription;
+            m_OutputLayerSettingsPanel.setKeepAsFinalResult(false);
+         }
+         else {
+            Output out;
+            try {
+               out = oosetGlobal.getOutput(sKey + this.m_sAlgorithmName);
+               sDescription = out.getDescription();
+               m_OutputLayerSettingsPanel.setKeepAsFinalResult(true);
+            }
+            catch (final WrongOutputIDException e) {
+               //cannot reach this
+            }
+
+         }
+         m_OutputLayerSettingsPanel.setName(sDescription);
+
+         this.add(m_OutputLayerSettingsPanel, "2, 6, 4, 6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i, j;
+
+      jTree.setModel(null);
+
+      //layers
+      final ObjectAndDescription[] layers = getElementsOfClass(ModelElementRasterLayer.class, false);
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Layers"));
+      DefaultMutableTreeNode child;
+      for (i = 0; i < layers.length; i++) {
+         final ObjectAndDescription oad = (ObjectAndDescription) m_DataObjects.get(layers[i].getObject());
+         final ModelElementRasterLayer merl = (ModelElementRasterLayer) oad.getObject();
+         int iBands = merl.getNumberOfBands();
+         if (iBands == ModelElementRasterLayer.NUMBER_OF_BANDS_UNDEFINED) {
+            iBands = MAX_BANDS;
+         }
+         for (j = 0; j < iBands; j++) {
+            final String sName = layers[i].getDescription() + " Band " + Integer.toString(j + 1);
+            final String sVariableName = layers[i].getObject() + " Band " + Integer.toString(j + 1);
+            if ((iBands == MAX_BANDS) && (j != 0)) {
+               child = new DefaultMutableTreeNode(new ObjectAndDescription(sName + "[" + Sextante.getText("unchecked") + "]",
+                        sVariableName));
+            }
+            else {
+               child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+            }
+            node.add(child);
+         }
+      }
+      main.add(node);
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         final String s = " " + sOperators[i] + " ";
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+      main.add(node);
+
+      final ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      node = new DefaultMutableTreeNode(Sextante.getText("Numerical_values"));
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+      m_Constants.put("NODATA", " " + Double.toString(SextanteGUI.getOutputFactory().getDefaultNoDataValue()) + " ");
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final String s = (String) iter.next();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         String s = (String) ((ObjectAndDescription) node.getUserObject()).getObject();
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public boolean assignParameters(final HashMap map) {
+
+      final ObjectAndDescription[] layers = getElementsOfClass(ModelElementRasterLayer.class, false);
+      final ObjectAndDescription[] numerical = getElementsOfClass(ModelElementNumericalValue.class, false);
+      final ArrayList layersList = new ArrayList();
+
+      final String sFormula = jTextExpression.getText();
+      final List<String> array = FormulaParser.getBandsFromFormulaForModeler(sFormula, layers, numerical);
+
+      if (array == null) {
+         return false;
+      }
+
+      layersList.clear();
+
+      for (int i = 0; i < array.size(); i++) {
+         final String sKey = (String) array.get(i);
+         if (!layersList.contains(sKey)) {
+            layersList.add(sKey);
+         }
+      }
+
+      final ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      for (int i = 0; i < values.length; i++) {
+         if (sFormula.contains(values[i].getObject().toString())) {
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+
+      final String sArrayKey = getInnerParameterKey();
+      map.put(GridCalculatorAlgorithm.LAYERS, sArrayKey);
+      m_DataObjects.put(sArrayKey, new ObjectAndDescription("Multiple Input", layersList));
+
+      final String sFormulaKey = getInnerParameterKey();
+      map.put(GridCalculatorAlgorithm.FORMULA, sFormulaKey);
+      m_DataObjects.put(sFormulaKey, new ObjectAndDescription("String", jTextExpression.getText()));
+
+      final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+      final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+      final String sName = GridCalculatorAlgorithm.RESULT + this.m_sAlgorithmName;
+      if (m_OutputLayerSettingsPanel.getKeepAsFinalResult()) {
+         try {
+            final Output out = ooset.getOutput(GridCalculatorAlgorithm.RESULT);
+            final Output outToAdd = out.getClass().newInstance();
+            outToAdd.setName(sName);
+            outToAdd.setDescription(m_OutputLayerSettingsPanel.getName());
+            oosetGlobal.add(outToAdd);
+         }
+         catch (final Exception e) {
+         }
+      }
+      else {
+         oosetGlobal.remove(sName);
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/FormulaParser.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/FormulaParser.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/FormulaParser.java	(revision 369)
@@ -0,0 +1,227 @@
+package es.unex.sextante.gridCalculus.gridCalculator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+public class FormulaParser {
+
+   private static final int MAX_BANDS = 256;
+
+
+   public static String prepareFormula(final String sFormula,
+                                       final List<String> names) {
+
+      int i;
+      int iIndex;
+      String sName;
+      String sSubstring;
+      final StringBuffer sb = new StringBuffer(sFormula);
+      iIndex = 0;
+      while ((iIndex = sb.indexOf("|", iIndex)) != -1) {
+         if ((sb.indexOf("|", iIndex - 1) == -1) && (sb.indexOf("|", iIndex + 1) == -1)) {
+            sb.delete(iIndex, iIndex + 1);
+            sb.insert(iIndex, " Band ");
+            iIndex = 0;
+         }
+         else {
+            iIndex++;
+         }
+      }
+      iIndex = 0;
+      for (i = 0; i < names.size(); i++) {
+         sName = ((String) names.get(i)).toLowerCase();
+         while ((iIndex = sb.indexOf(sName, iIndex)) != -1) {
+            sSubstring = sb.substring(iIndex, Math.min(iIndex + sName.length() + " band ".length(), sb.length()));
+            if (!sSubstring.toLowerCase().equals(sName + " band ")) {
+               sb.delete(iIndex, iIndex + sName.length());
+               sb.insert(iIndex, sName + " Band 1");
+               iIndex = 0;
+            }
+            else {
+               iIndex++;
+            }
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+   /**
+    * Converts the name of a layer in a normalized name. 
+    * @param name
+    * @return
+    */
+   public static String getNormalizedName(String name) {
+	   //If the name starts with a number adds a prefix
+	   String pattern = "^[\\d].*";
+	   if(name != null && name.matches(pattern)) {
+      	 name = "prefix_" + name; 
+       }
+	   return name;
+   }
+   
+   /**
+    * Replace all variables in a formula by a normalized name
+    * @param formula
+    * @param layerName
+    * @param normalizedName
+    * @return
+    */
+   public static String replaceVariables(String formula, String layerName, String normalizedName) {
+	   if(!normalizedName.equals(layerName)) {
+		   return formula.replaceAll(layerName, normalizedName);
+       }
+	   return formula;
+   }
+
+   public static List<RasterLayerAndBand> getBandsFromFormula(String sFormula,
+                                               final List<IRasterLayer> layers) {
+
+      int i, j;
+
+      IRasterLayer layer;
+      String sLayerName;
+      final List<RasterLayerAndBand> array = new ArrayList<RasterLayerAndBand>();
+      final List<String> names = new ArrayList<String>();
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+      
+      for (i = 0; i < layers.size(); i++) {
+         layer = (IRasterLayer) layers.get(i);
+         String layerName = layer.getName();
+         String normalizedLayerName = getNormalizedName(layerName);
+         sFormula = replaceVariables(sFormula, layerName, normalizedLayerName);
+         names.add(normalizedLayerName);
+      }
+      
+      sFormula = FormulaParser.prepareFormula(sFormula.toLowerCase(), names);
+      sFormula = sFormula.toLowerCase().replaceAll(" ", "");
+      sFormula = sFormula.replaceAll("\\[", "_");
+      sFormula = sFormula.replaceAll("\\]", "_");
+      sFormula = FormulaParser.replaceDots(sFormula);
+      for (i = 0; i < layers.size(); i++) {
+         layer = (IRasterLayer) layers.get(i);
+         for (j = 0; j < layer.getBandsCount(); j++) {
+            sLayerName = layer.getName() + " Band " + Integer.toString(j + 1);
+            sLayerName = sLayerName.toLowerCase();
+            sLayerName = sLayerName.replaceAll(" ", "");
+            sLayerName = sLayerName.replaceAll("\\[", "_");
+            sLayerName = sLayerName.replaceAll("\\]", "_");
+            sLayerName = FormulaParser.replaceDots(sLayerName);
+            sLayerName = getNormalizedName(sLayerName);
+            if (sFormula.lastIndexOf(sLayerName) != -1) {
+               array.add(new RasterLayerAndBand(layer, j));
+               jep.addVariable(sLayerName, 0.0);
+            }
+         }
+
+      }
+
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         Sextante.addErrorToLog(jep.getErrorInfo());
+         return null;
+      }
+
+      if (array.size() == 0) {
+         return null;
+      }
+
+      return array;
+   }
+
+
+   public static List<String> getBandsFromFormulaForModeler(String sFormula,
+                                                         final ObjectAndDescription[] layers,
+                                                         final ObjectAndDescription[] numerical) {
+      int i, j;
+
+      ObjectAndDescription oad;
+      String sLayerName, sName;
+      final List<String> array = new ArrayList<String>();
+      final List<String> names = new ArrayList<String>();
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      for (i = 0; i < layers.length; i++) {
+         oad = layers[i];
+         String layerName = (String) oad.getObject();
+         String normalizedLayerName = getNormalizedName(layerName);
+         sFormula = replaceVariables(sFormula, layerName, normalizedLayerName);
+         names.add(layerName);
+      }
+
+      for (i = 0; i < numerical.length; i++) {
+         jep.addVariable(((String) numerical[i].getObject()).toLowerCase(), 0.0);
+      }
+
+      sFormula = FormulaParser.prepareFormula(sFormula.toLowerCase(), names);
+      sFormula = sFormula.toLowerCase().replaceAll(" ", "");
+      sFormula = sFormula.replaceAll("\\[", "_");
+      sFormula = sFormula.replaceAll("\\]", "_");
+      sFormula = sFormula.replaceAll("\\:", "_");
+      sFormula = sFormula.replaceAll("\"", "_");
+      sFormula = FormulaParser.replaceDots(sFormula);
+      for (i = 0; i < names.size(); i++) {
+         sName = names.get(i);
+         for (j = 0; j < MAX_BANDS; j++) {
+            sLayerName = sName + " Band " + Integer.toString(j + 1);
+            sLayerName = sLayerName.toLowerCase();
+            sLayerName = sLayerName.replaceAll(" ", "");
+            sLayerName = sLayerName.replaceAll("\\[", "_");
+            sLayerName = sLayerName.replaceAll("\\]", "_");
+            sLayerName = sLayerName.replaceAll("\\:", "_");
+            sLayerName = sLayerName.replaceAll("\"", "_");
+            sLayerName = FormulaParser.replaceDots(sLayerName);
+            sLayerName = getNormalizedName(sLayerName);
+            if (sFormula.lastIndexOf(sLayerName) != -1) {
+               array.add((String) layers[i].getObject());
+               jep.addVariable(sLayerName, 0.0);
+            }
+         }
+
+      }
+
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         return null;
+      }
+
+      if (array.size() == 0) {
+         return null;
+      }
+
+      return array;
+
+   }
+
+
+   public static String replaceDots(final String s) {
+
+      char c, c2;
+      StringBuffer sb = new StringBuffer(s);
+      for (int i = 0; i < sb.length() - 1; i++) {
+         c = sb.charAt(i);
+         c2 = sb.charAt(i + 1);
+         if ((c == '.') && !Character.isDigit(c2)) {
+            sb = sb.deleteCharAt(i);
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/FormulaParser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorParametersPanel.java	(revision 369)
@@ -0,0 +1,290 @@
+
+
+package es.unex.sextante.gridCalculus.gridCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+
+public class GridCalculatorParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private JTextArea                   jTextExpression;
+   private JScrollPane                 jScrollPane;
+   private JTree                       jTree;
+   private JScrollPane                 jScrollPane1;
+   private CalculatorKeysPanel         m_KeysPanel;
+   private TreeMap                     m_Constants;
+   private GeoAlgorithm                m_Algorithm;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+
+
+   public GridCalculatorParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 20.0, 5, 20,
+                        10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jTextExpression = new JTextArea();
+         jTextExpression.setLineWrap(true);
+         jScrollPane = new JScrollPane(jTextExpression);
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+         jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jScrollPane1 = new JScrollPane();
+         this.add(jScrollPane1, "1, 1, 2, 3");
+         {
+            jTree = new JTree();
+            jScrollPane1.setViewportView(jTree);
+            jScrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+            jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            final MouseListener ml = new MouseAdapter() {
+               @Override
+               public void mousePressed(MouseEvent e) {
+                  int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+                  TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+                  if ((iRow != -1) && (e.getClickCount() == 2)) {
+                     insertTextFromTree(path);
+                  }
+               }
+            };
+            jTree.addMouseListener(ml);
+            populateTree();
+         }
+      }
+      try {
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         final Output out = ooSet.getOutput(GridCalculatorAlgorithm.RESULT);
+         outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+         this.add(outputChannelSelectionPanel, "3,6,4,6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i, j;
+      double dCellsize;
+      String sName;
+
+      jTree.setModel(null);
+
+      //layers
+      final IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Layers"));
+      DefaultMutableTreeNode child;
+      for (i = 0; i < layers.length; i++) {
+         for (j = 0; j < layers[i].getBandsCount(); j++) {
+            sName = layers[i].getName() + " Band " + Integer.toString(j + 1);
+            child = new DefaultMutableTreeNode(sName);
+            node.add(child);
+         }
+      }
+      main.add(node);
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sOperators[i] + " ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new TreeMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+      m_Constants.put("NODATA", " " + Double.toString(SextanteGUI.getOutputFactory().getDefaultNoDataValue()) + " ");
+      for (i = 0; i < layers.length; i++) {
+         sName = Sextante.getText("Cell_size_[") + layers[i].getName() + "]";
+         dCellsize = layers[i].getLayerCellSize();
+         m_Constants.put(sName, " " + Double.toString(dCellsize) + " ");
+      }
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         child = new DefaultMutableTreeNode(iter.next());
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         String s = path.getLastPathComponent().toString();
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException {
+
+      final IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+      final ArrayList layersList = new ArrayList();
+      for (final IRasterLayer element : layers) {
+         layersList.add(element);
+      }
+      final List<RasterLayerAndBand> array = FormulaParser.getBandsFromFormula(jTextExpression.getText(), layersList);
+
+      if (array == null) {
+         throw new WrongInputException();
+      }
+
+      layersList.clear();
+
+      for (int i = 0; i < array.size(); i++) {
+         final RasterLayerAndBand rlab = (RasterLayerAndBand) array.get(i);
+         final IRasterLayer layer = rlab.getRasterLayer();
+         if (!layersList.contains(layer)) {
+            layersList.add(layer);
+         }
+      }
+
+      try {
+         m_Algorithm.getParameters().getParameter(GridCalculatorAlgorithm.LAYERS).setParameterValue(layersList);
+         m_Algorithm.getParameters().getParameter(GridCalculatorAlgorithm.FORMULA).setParameterValue(jTextExpression.getText());
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         final Output out = ooSet.getOutput(GridCalculatorAlgorithm.RESULT);
+         out.setOutputChannel(outputChannelSelectionPanel.getOutputChannel());
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         throw new WrongInputException();
+      }
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String outputName,
+                              final String value) {
+
+
+      outputChannelSelectionPanel.setText(value);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+
+      if (parameterName.equals(GridCalculatorAlgorithm.FORMULA)) {
+         jTextExpression.setText(value);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/GridCalculatorParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/CalculatorKeysPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/CalculatorKeysPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/CalculatorKeysPanel.java	(revision 369)
@@ -0,0 +1,186 @@
+package es.unex.sextante.gridCalculus.gridCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+
+public class CalculatorKeysPanel
+         extends
+            JPanel {
+
+   private JTextArea m_TextExpression = null;
+   private JButton   jButtonMinus;
+   private JButton   jButtonDivide;
+   private JButton   jButton2;
+   private JButton   jButtonDot;
+   private JButton   jButtonBrackets;
+   private JButton   jButton0;
+   private JButton   jButton9;
+   private JButton   jButton8;
+   private JButton   jButton7;
+   private JButton   jButton6;
+   private JButton   jButton5;
+   private JButton   jButton4;
+   private JButton   jButton3;
+   private JButton   jButton1;
+   private JButton   jButtonMultiply;
+   private JButton   jButtonPlus;
+
+
+   public CalculatorKeysPanel(final JTextArea textExpression) {
+
+      super();
+
+      m_TextExpression = textExpression;
+
+      initialize();
+
+   }
+
+
+   private void initialize() {
+
+      final ActionListener listener = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            addText(evt.getSource());
+         }
+      };
+
+      final ActionListener listenerBrackets = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            m_TextExpression.insert(" ()", m_TextExpression.getCaretPosition());
+            m_TextExpression.setCaretPosition(m_TextExpression.getCaretPosition() - 1);
+         }
+      };
+
+      final TableLayout thisLayout = new TableLayout(
+               new double[][] {
+                        { TableLayoutConstants.FILL, 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL },
+                        { TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(284, 239));
+      {
+         jButtonPlus = new JButton();
+         this.add(jButtonPlus, "0, 0");
+         jButtonPlus.setText("+");
+         jButtonPlus.addActionListener(listener);
+      }
+      {
+         jButtonMinus = new JButton();
+         this.add(jButtonMinus, "0, 1");
+         jButtonMinus.setText("-");
+         jButtonMinus.addActionListener(listener);
+      }
+      {
+         jButtonMultiply = new JButton();
+         this.add(jButtonMultiply, "0, 2");
+         jButtonMultiply.setText("*");
+         jButtonMultiply.addActionListener(listener);
+      }
+      {
+         jButtonDivide = new JButton();
+         this.add(jButtonDivide, "0, 3");
+         jButtonDivide.setText("/");
+         jButtonDivide.addActionListener(listener);
+      }
+      {
+         jButton1 = new JButton();
+         this.add(jButton1, "2, 2");
+         jButton1.setText("1");
+         jButton1.addActionListener(listener);
+      }
+      {
+         jButton2 = new JButton();
+         this.add(jButton2, "3, 2");
+         jButton2.setText("2");
+         jButton2.addActionListener(listener);
+      }
+      {
+         jButton3 = new JButton();
+         this.add(jButton3, "4, 2");
+         jButton3.setText("3");
+         jButton3.addActionListener(listener);
+      }
+      {
+         jButton4 = new JButton();
+         this.add(jButton4, "2, 1");
+         jButton4.setText("4");
+         jButton4.addActionListener(listener);
+      }
+      {
+         jButton5 = new JButton();
+         this.add(jButton5, "3, 1");
+         jButton5.setText("5");
+         jButton5.addActionListener(listener);
+      }
+      {
+         jButton6 = new JButton();
+         this.add(jButton6, "4, 1");
+         jButton6.setText("6");
+         jButton6.addActionListener(listener);
+      }
+      {
+         jButton7 = new JButton();
+         this.add(jButton7, "2, 0");
+         jButton7.setText("7");
+         jButton7.addActionListener(listener);
+      }
+      {
+         jButton8 = new JButton();
+         this.add(jButton8, "3, 0");
+         jButton8.setText("8");
+         jButton8.addActionListener(listener);
+      }
+      {
+         jButton9 = new JButton();
+         this.add(jButton9, "4, 0");
+         jButton9.setText("9");
+         jButton9.addActionListener(listener);
+      }
+      {
+         jButton0 = new JButton();
+         this.add(jButton0, "2, 3");
+         jButton0.setText("0");
+         jButton0.addActionListener(listener);
+      }
+      {
+         jButtonDot = new JButton();
+         this.add(jButtonDot, "4, 3");
+         jButtonDot.setText(".");
+         jButtonDot.addActionListener(listener);
+      }
+      {
+         jButtonBrackets = new JButton();
+         this.add(jButtonBrackets, "3, 3");
+         jButtonBrackets.setText("( )");
+         jButtonBrackets.addActionListener(listenerBrackets);
+      }
+   }
+
+
+   private void addText(final Object source) {
+
+      if (source instanceof JButton) {
+         String s = ((JButton) source).getText();
+         try {
+            final int i = Integer.parseInt(s);
+         }
+         catch (final NumberFormatException e) {
+            s = " " + s + " ";
+         }
+         m_TextExpression.insert(s, m_TextExpression.getCaretPosition());
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridCalculator/CalculatorKeysPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridFromFunction/GridFromFunctionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridFromFunction/GridFromFunctionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridFromFunction/GridFromFunctionAlgorithm.java	(revision 369)
@@ -0,0 +1,101 @@
+package es.unex.sextante.gridCalculus.gridFromFunction;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GridFromFunctionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String MINX    = "MINX";
+   public static final String MINY    = "MINY";
+   public static final String MAXX    = "MAXX";
+   public static final String MAXY    = "MAXY";
+   public static final String FORMULA = "FORMULA";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dx, dy;
+      double dMinX, dMinY, dMaxX, dMaxY;
+      double dRangeX, dRangeY;
+      double dValue;
+
+      String sFormula;
+      final JEP jep = new JEP();
+      IRasterLayer result;
+
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+      jep.addVariable("x", 0);
+      jep.addVariable("y", 0);
+
+      dMinX = m_Parameters.getParameterValueAsInt(MINX);
+      dMinY = m_Parameters.getParameterValueAsInt(MINY);
+      dMaxX = m_Parameters.getParameterValueAsInt(MAXX);
+      dMaxY = m_Parameters.getParameterValueAsInt(MAXY);
+      sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+
+      dRangeX = dMaxX - dMinX;
+      dRangeY = dMaxY - dMinY;
+
+      result = getNewRasterLayer(RESULT, Sextante.getText("Layer_from_function"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = result.getWindowGridExtent().getNX();
+      iNY = result.getWindowGridExtent().getNY();
+
+      jep.parseExpression(sFormula);
+      if (!jep.hasError()) {
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            dy = dMinY + dRangeY * ((double) y / (double) iNY);
+            jep.addVariable("y", dy);
+            for (x = 0; x < iNX; x++) {
+               dx = dMinX + dRangeX * ((double) x / (double) iNX);
+               jep.addVariable("x", dx);
+               dValue = jep.getValue();
+               result.setCellValue(x, y, dValue);
+            }
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_formula"));
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Grid_from_function"));
+      setGroup(Sextante.getText("Raster_creation_tools"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(MINX, "X min", -1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAXX, "X Max", 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MINY, "Y Min", -1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAXY, "Y Max", 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutputRasterLayer(RESULT, Sextante.getText("Grid_from_function"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/gridFromFunction/GridFromFunctionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/normalize/NormalizeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/normalize/NormalizeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/normalize/NormalizeAlgorithm.java	(revision 369)
@@ -0,0 +1,105 @@
+package es.unex.sextante.gridCalculus.normalize;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class NormalizeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String GRID               = "GRID";
+   public static final String METHOD             = "METHOD";
+   public static final String RESULT             = "RESULT";
+
+   public static final int    METHOD_NORMALIZE   = 0;
+   public static final int    METHOD_FROM_0_TO_1 = 1;
+
+   private int                m_iNX, m_iNY;
+   private int                m_iMethod;
+
+   private IRasterLayer       m_Grid             = null;
+   private IRasterLayer       m_NormalizedGrid;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+
+      m_NormalizedGrid = getNewRasterLayer(RESULT, m_Grid.getName() + Sextante.getText("[normalized]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      m_Grid.setWindowExtent(getAnalysisExtent());
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      return normalize();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Standard_deviation"), "0 < x < 1" };
+
+      setName(Sextante.getText("Normalize"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Layer_to_normalize"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Normalized"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean normalize() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double z;
+      double dValue1 = 0, dValue2 = 0;
+
+      switch (m_iMethod) {
+         case 0:
+            dValue1 = m_Grid.getMeanValue();
+            dValue2 = Math.sqrt(m_Grid.getVariance());
+            break;
+         case 1:
+         default:
+            dValue1 = m_Grid.getMinValue();
+            dValue2 = m_Grid.getMaxValue() - dValue1;
+            break;
+      }
+
+      if (dValue2 == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Cannot normalize layer. Wrong values"));
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_Grid.getCellValueAsDouble(x, y);
+            if (!m_Grid.isNoDataValue(z)) {
+               m_NormalizedGrid.setCellValue(x, y, (z - dValue1) / dValue2);
+            }
+            else {
+               m_NormalizedGrid.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCalculus/normalize/NormalizeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rTree/SextanteRTree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rTree/SextanteRTree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rTree/SextanteRTree.java	(revision 369)
@@ -0,0 +1,85 @@
+package es.unex.sextante.rTree;
+
+import java.util.Properties;
+
+import com.infomatiq.jsi.Point;
+import com.infomatiq.jsi.Rectangle;
+import com.infomatiq.jsi.rtree.RTree;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class SextanteRTree {
+
+   private final RTree  m_Tree;
+   private final int    m_iPoints;
+   private final double m_dX[];
+   private final double m_dY[];
+   private final double m_dZ[];
+
+
+   public SextanteRTree(final IVectorLayer layer,
+                        final int iField,
+                        final ITaskMonitor task) {
+
+      int i;
+      float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+      m_Tree = new RTree();
+      m_Tree.init(new Properties());
+      m_iPoints = layer.getShapesCount();
+      m_dX = new double[m_iPoints];
+      m_dY = new double[m_iPoints];
+      m_dZ = new double[m_iPoints];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         IFeature feature;
+         try {
+            feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Coordinate coord = geom.getCoordinate();
+            x = (float) coord.x;
+            y = (float) coord.y;
+            final Rectangle rectangle = new Rectangle(x, y, x, y);
+            m_Tree.add(rectangle, i);
+            m_dX[i] = x;
+            m_dY[i] = y;
+            try {
+               m_dZ[i] = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            }
+            catch (final Exception e) {
+               m_dZ[i] = 0;
+            }
+            if (i % 50 == 0) {
+               task.setProgress(i, m_iPoints);
+            }
+            i++;
+         }
+         catch (final IteratorException e1) {
+            //skip point
+         }
+      }
+
+   }
+
+
+   public Point3D getClosestPoint(final double x,
+                                  final double y) {
+
+      final Point pt = new Point((float) x, (float) y);
+      final int iIdx = m_Tree.nearest(pt);
+      return new Point3D(m_dX[iIdx], m_dY[iIdx], m_dZ[iIdx]);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rTree/SextanteRTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/profile/Profile3DAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/profile/Profile3DAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/profile/Profile3DAlgorithm.java	(revision 369)
@@ -0,0 +1,250 @@
+/**
+ *
+ * Ported from
+ * B.Pendleton.  line3d - 3D Bresenham's (a 3D line drawing algorithm)
+ * ftp://ftp.isc.org/pub/usenet/comp.sources.unix/volume26/line3d, 1992
+ *
+ */
+
+package es.unex.sextante.tridimensional.profile;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYDataset;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.Grid3DCell;
+
+public class Profile3DAlgorithm
+         extends
+            GeoAlgorithm {
+
+
+   public static final String LINE          = "LINE";
+   public static final String RASTER_LAYER  = "RASTER_LAYER";
+   public static final String PROFILEPOINTS = "PROFILEPOINTS";
+   public static final String GRAPH         = "GRAPH";
+
+   private I3DRasterLayer     m_RasterLayer;
+   private XYDataset          dataset;
+   private IVectorLayer       m_Profile;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("3D_Profile"));
+      setGroup(Sextante.getText("3D"));
+
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInput3DRasterLayer(RASTER_LAYER, Sextante.getText("3D_Raster_Layer"), true);
+         m_Parameters.addInputVectorLayer(LINE, Sextante.getText("Profile_line"), IVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(PROFILEPOINTS, Sextante.getText("Profile_[points]"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputChart(GRAPH, Sextante.getText("Profile"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINE);
+      m_RasterLayer = m_Parameters.getParameterValueAs3DRasterLayer(RASTER_LAYER);
+
+      if (lines.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Zero_lines_in_layer"));
+      }
+
+      final String[] sFieldNames = new String[] { "X", "Y", "Z", m_RasterLayer.getName() };
+      final Class[] types = new Class[] { Double.class, Double.class, Double.class, Double.class };
+
+      m_Profile = getNewVectorLayer(PROFILEPOINTS, Sextante.getText("Profile_[points]"), IVectorLayer.SHAPE_TYPE_POINT, types,
+               sFieldNames);
+
+      final IFeatureIterator iterator = lines.iterator();
+      final Geometry line = iterator.next().getGeometry().getGeometryN(0);
+      processLine(line);
+      iterator.close();
+
+      final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, true,
+               true);
+
+      final ChartPanel jPanelChart = new ChartPanel(chart);
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart(GRAPH, Sextante.getText("Profile"), jPanelChart);
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processLine(final Geometry line) {
+
+      final Coordinate[] coords = line.getCoordinates();
+
+      for (int i = 0; (i < coords.length - 1) && setProgress(i, coords.length - 1); i++) {
+         processSegment(coords[i], coords[i + 1]);
+      }
+
+   }
+
+
+   private void processSegment(final Coordinate coord,
+                               final Coordinate coord2) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final AnalysisExtent extent = m_RasterLayer.getLayerExtent();
+
+      final Grid3DCell cell = extent.getGridCoordsFromWorldCoords(coord.x, coord.y, coord.z);
+
+      final int x1 = cell.getX();
+      final int y1 = cell.getY();
+      final int z1 = cell.getZ();
+
+      final Grid3DCell cell2 = extent.getGridCoordsFromWorldCoords(coord2.x, coord2.y, coord2.z);
+
+      final int x2 = cell2.getX();
+      final int y2 = cell2.getY();
+      final int z2 = cell2.getZ();
+
+      final int dx = x2 - x1;
+      final int dy = y2 - y1;
+      final int dz = z2 - z1;
+
+      final int ax = Math.abs(dx) * 2;
+      final int ay = Math.abs(dy) * 2;
+      final int az = Math.abs(dz) * 2;
+
+      final int sx = (int) Math.signum(dx);
+      final int sy = (int) Math.signum(dy);
+      final int sz = (int) Math.signum(dz);
+
+      int x = x1;
+      int y = y1;
+      int z = z1;
+      int idx = 1;
+
+      if (ax >= Math.max(ay, az)) { // x dominant
+         double yd = ay - ax / 2;
+         double zd = az - ax / 2;
+
+         while (true) {
+            final Coordinate newCoord = extent.getWorldCoordsFromGridCoords(x, y, z);
+            final double dValue = m_RasterLayer.getCellValueAsDouble(x, y, z);
+            if (!m_RasterLayer.isNoDataValue(dValue)) {
+               final Point pt = gf.createPoint(newCoord);
+               m_Profile.addFeature(pt, new Object[] { new Double(x), new Double(y), new Double(z), new Double(dValue) });
+            }
+            idx++;
+
+            if (x == x2) { // end
+               break;
+            }
+
+            if (yd >= 0) { // move along y
+               y = y + sy;
+               yd = yd - ax;
+            }
+
+            if (zd >= 0) { // move along z
+               z = z + sz;
+               zd = zd - ax;
+            }
+
+            x = x + sx; // move along x
+            yd = yd + ay;
+            zd = zd + az;
+         }
+      }
+      else if (ay >= Math.max(ax, az)) { // y dominant
+         double xd = ax - ay / 2;
+         double zd = az - ay / 2;
+
+         while (true) {
+            final Coordinate newCoord = extent.getWorldCoordsFromGridCoords(x, y, z);
+            final double dValue = m_RasterLayer.getCellValueAsDouble(x, y, z);
+            if (!m_RasterLayer.isNoDataValue(dValue)) {
+               final Point pt = gf.createPoint(newCoord);
+               m_Profile.addFeature(pt, new Object[] { new Double(x), new Double(y), new Double(z), new Double(dValue) });
+            }
+            idx++;
+
+            if (y == y2) { //end
+               break;
+            }
+
+            if (xd >= 0) { // move along x
+               x = x + sx;
+               xd = xd - ay;
+            }
+
+            if (zd >= 0) { // move along z
+               z = z + sz;
+               zd = zd - ay;
+            }
+
+            y = y + sy; // move along y
+            xd = xd + ax;
+            zd = zd + az;
+         }
+      }
+      else if (az >= Math.max(ax, ay)) { // z dominant
+         double xd = ax - az / 2;
+         double yd = ay - az / 2;
+
+         while (true) {
+            final Coordinate newCoord = extent.getWorldCoordsFromGridCoords(x, y, z);
+            final double dValue = m_RasterLayer.getCellValueAsDouble(x, y, z);
+            if (!m_RasterLayer.isNoDataValue(dValue)) {
+               final Point pt = gf.createPoint(newCoord);
+               m_Profile.addFeature(pt, new Object[] { new Double(x), new Double(y), new Double(z), new Double(dValue) });
+            }
+            idx++;
+
+            if (z == z2) { // end
+               break;
+            }
+
+            if (xd >= 0) { // move along x
+               x = x + sx;
+               xd = xd - az;
+            }
+
+            if (yd >= 0) { // move along y
+               y = y + sy;
+               yd = yd - az;
+            }
+
+            z = z + sz; // move along z
+            xd = xd + ax;
+            yd = yd + ay;
+         }
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/profile/Profile3DAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/grid3DFromFunction/Grid3DFromFunctionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/grid3DFromFunction/Grid3DFromFunctionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/grid3DFromFunction/Grid3DFromFunctionAlgorithm.java	(revision 369)
@@ -0,0 +1,135 @@
+
+
+package es.unex.sextante.tridimensional.grid3DFromFunction;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class Grid3DFromFunctionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String MINX    = "MINX";
+   public static final String MINY    = "MINY";
+   public static final String MINZ    = "MINZ";
+   public static final String MAXX    = "MAXX";
+   public static final String MAXY    = "MAXY";
+   public static final String MAXZ    = "MAXZ";
+   public static final String FORMULA = "FORMULA";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y, z;
+      int iNX, iNY, iNZ;
+      double dx, dy, dz;
+      double dMinX, dMinY, dMinZ, dMaxX, dMaxY, dMaxZ;
+      double dRangeX, dRangeY;
+      final double dRangeZ;
+      double dValue;
+
+      String sFormula;
+      final JEP jep = new JEP();
+      I3DRasterLayer result;
+
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+      jep.addVariable("x", 0);
+      jep.addVariable("y", 0);
+      jep.addVariable("z", 0);
+
+      dMinX = m_Parameters.getParameterValueAsInt(MINX);
+      dMinY = m_Parameters.getParameterValueAsInt(MINY);
+      dMinZ = m_Parameters.getParameterValueAsInt(MINY);
+      dMaxX = m_Parameters.getParameterValueAsInt(MAXX);
+      dMaxY = m_Parameters.getParameterValueAsInt(MAXY);
+      dMaxZ = m_Parameters.getParameterValueAsInt(MAXZ);
+      sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+
+      dRangeX = dMaxX - dMinX;
+      dRangeY = dMaxY - dMinY;
+      dRangeZ = dMaxZ - dMinZ;
+
+      result = getNew3DRasterLayer(RESULT, Sextante.getText("3D_Layer_from_function"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      iNX = result.getLayerExtent().getNX();
+      iNY = result.getLayerExtent().getNY();
+      iNZ = result.getLayerExtent().getNZ();
+
+      jep.parseExpression(sFormula);
+      if (!jep.hasError()) {
+         for (z = 0; (z < iNZ) && setProgress(z, iNZ); z++) {
+            dz = dMinZ + dRangeZ * ((double) z / (double) iNZ);
+            jep.addVariable("z", dz);
+            for (y = 0; (y < iNY) && !m_Task.isCanceled(); y++) {
+               dy = dMinY + dRangeY * ((double) y / (double) iNY);
+               jep.addVariable("y", dy);
+               for (x = 0; x < iNX; x++) {
+                  dx = dMinX + dRangeX * ((double) x / (double) iNX);
+                  jep.addVariable("x", dx);
+                  dValue = jep.getValue();
+                  result.setCellValue(x, y, z, dValue);
+               }
+            }
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_formula"));
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("3D_Layer_from_function"));
+      setGroup(Sextante.getText("3D"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addNumericalValue(MINX, "X min", -1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAXX, "X Max", 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MINY, "Y Min", -1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAXY, "Y Max", 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MINZ, "Z Min", -1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAXZ, "Z Max", 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutput3DRasterLayer(RESULT, Sextante.getText("3D_Layer_from_function"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean is3D() {
+
+      return true;
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return false;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/grid3DFromFunction/Grid3DFromFunctionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/interpolation/Interpolation3DAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/interpolation/Interpolation3DAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/interpolation/Interpolation3DAlgorithm.java	(revision 369)
@@ -0,0 +1,80 @@
+
+
+package es.unex.sextante.tridimensional.interpolation;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+
+public class Interpolation3DAlgorithm
+         extends
+            GeoAlgorithm {
+
+
+   private static final String RESULT = "RESULT";
+   private static final String FIELD  = "FIELD";
+   private static final String POINTS = "POINTS";
+   private Object              m_Result;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("3D_Interpolation"));
+      setGroup(Sextante.getText("3D"));
+
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), IVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), POINTS);
+         addOutput3DRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer pointsLayer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_Result = getNew3DRasterLayer(RESULT, pointsLayer.getName(), I3DRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      //TODO: implement interpolation algorithm
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public boolean is3D() {
+
+      return true;
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return false;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/interpolation/Interpolation3DAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/line3DFromTable/Line3DFromTableAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/line3DFromTable/Line3DFromTableAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/line3DFromTable/Line3DFromTableAlgorithm.java	(revision 369)
@@ -0,0 +1,120 @@
+
+
+package es.unex.sextante.tridimensional.line3DFromTable;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class Line3DFromTableAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TABLE  = "TABLE";
+   public static final String XFIELD = "XFIELD";
+   public static final String YFIELD = "YFIELD";
+   public static final String ZFIELD = "ZFIELD";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int j;
+      int iFieldX, iFieldY, iFieldZ;
+      ITable table;
+      String[] sFields;
+      Class[] types;
+
+      table = m_Parameters.getParameterValueAsTable(TABLE);
+      iFieldX = m_Parameters.getParameterValueAsInt(XFIELD);
+      iFieldY = m_Parameters.getParameterValueAsInt(YFIELD);
+      iFieldZ = m_Parameters.getParameterValueAsInt(ZFIELD);
+
+      sFields = new String[] { "ID" };
+      types = new Class[] { Integer.class };
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("3DLineFromTable"), IVectorLayer.SHAPE_TYPE_LINE,
+               types, sFields);
+      final ArrayList<Coordinate> coordsArray = new ArrayList<Coordinate>();
+      final IRecordsetIterator iter = table.iterator();
+      final GeometryFactory geomFac = new GeometryFactory();
+      while (iter.hasNext()) {
+         try {
+            final IRecord record = iter.next();
+            final String sX = record.getValue(iFieldX).toString();
+            final String sY = record.getValue(iFieldY).toString();
+            final String sZ = record.getValue(iFieldZ).toString();
+            final double dX = Double.parseDouble(sX);
+            final double dY = Double.parseDouble(sY);
+            final double dZ = Double.parseDouble(sZ);
+            coordsArray.add(new Coordinate(dX, dY, dZ));
+         }
+         catch (final NumberFormatException e) {
+         }
+      }
+      iter.close();
+
+      if (coordsArray.size() > 1) {
+         final LineString line = geomFac.createLineString(coordsArray.toArray(new Coordinate[0]));
+         output.addFeature(line, new Object[] { new Integer(1) });
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("LessThanTwoPointsInTable"));
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("3DLineFromTable"));
+      setGroup(Sextante.getText("3D"));
+
+      try {
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Table"), true);
+         m_Parameters.addTableField(XFIELD, Sextante.getText("X"), TABLE);
+         m_Parameters.addTableField(YFIELD, Sextante.getText("Y"), TABLE);
+         m_Parameters.addTableField(ZFIELD, Sextante.getText("Z"), TABLE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean isActive() {
+
+      return false;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tridimensional/line3DFromTable/Line3DFromTableAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/FragstatsAreaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/FragstatsAreaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/FragstatsAreaAlgorithm.java	(revision 369)
@@ -0,0 +1,266 @@
+package es.unex.sextante.gridCategorical.fragstatsArea;
+
+import java.awt.Point;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class FragstatsAreaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METRICS      = "METRICS";
+   public static final String INPUT        = "INPUT";
+
+   private final int          m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final int          m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Grid;
+   private IRasterLayer       m_Visited;
+   private ArrayList          m_Patches;
+   private HashMap            m_Classes;
+   private ClassInfo          m_Landscape;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Fragstats__area-density-edge_metrics"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputText(METRICS, Sextante.getText("Metrics"), null);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      byte value;
+      int x, y;
+      Integer ClassID;
+      PatchInfo patchInfo;
+      ClassInfo classInfo;
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Grid.setFullExtent();
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      m_Patches = new ArrayList();
+      m_Classes = new HashMap();
+      m_Landscape = new ClassInfo();
+
+      m_Visited = this.getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Grid.getWindowGridExtent());
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            value = m_Visited.getCellValueAsByte(x, y);
+            if (value == 0) {
+               patchInfo = analysePatch(x, y);
+               if (patchInfo != null) {
+                  m_Patches.add(patchInfo);
+                  ClassID = new Integer(patchInfo.getClassID());
+                  classInfo = (ClassInfo) m_Classes.get(ClassID);
+                  if (classInfo == null) {
+                     classInfo = new ClassInfo();
+                     classInfo.add(patchInfo);
+                     m_Classes.put(ClassID, classInfo);
+                  }
+                  else {
+                     classInfo.add(patchInfo);
+                  }
+                  m_Landscape.add(patchInfo);
+               }
+            }
+         }
+
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         createOutput();
+         return true;
+      }
+
+   }
+
+
+   private void createOutput() {
+
+      int i;
+      Integer Class;
+      final HTMLDoc doc = new HTMLDoc();
+      PatchInfo patchInfo;
+      ClassInfo classInfo;
+      String sTable[][];
+      final DecimalFormat df = new DecimalFormat("##.##");
+
+      sTable = new String[m_Patches.size() + 1][4];
+      doc.open(Sextante.getText("area-density-edge_metrics"));
+      doc.addHeader(Sextante.getText("area-density-edge_metrics"), 1);
+      doc.addHeader(Sextante.getText("Patch_metrics"), 2);
+      sTable[0][0] = Sextante.getText("Class");
+      sTable[0][1] = Sextante.getText("Area");
+      sTable[0][2] = Sextante.getText("Perimeter");
+      sTable[0][3] = Sextante.getText("Radius_of_gyration");
+      for (i = 0; i < m_Patches.size(); i++) {
+         patchInfo = (PatchInfo) m_Patches.get(i);
+         sTable[i + 1][0] = Integer.toString(i);
+         sTable[i + 1][1] = df.format(patchInfo.getArea());
+         sTable[i + 1][2] = df.format(patchInfo.getPerimeter());
+         sTable[i + 1][3] = df.format(patchInfo.getRadiusOfGyration());
+      }
+      doc.addTable(sTable, "", true, true);
+
+      doc.addHeader(Sextante.getText("Class_metrics"), 2);
+
+      final Set set = m_Classes.keySet();
+      final Iterator iter = set.iterator();
+      sTable = new String[m_Classes.size() + 1][9];
+      int iRow = 1;
+      sTable[0][0] = Sextante.getText("Class");
+      sTable[0][1] = Sextante.getText("total_area_Total");
+      sTable[0][2] = Sextante.getText("Percentage_of_Landscape");
+      sTable[0][3] = Sextante.getText("Number_of_patches");
+      sTable[0][4] = Sextante.getText("Patch_Density");
+      sTable[0][5] = Sextante.getText("Total_perimeter");
+      sTable[0][6] = Sextante.getText("Edge_Density");
+      sTable[0][7] = Sextante.getText("Landscape_shape_index");
+      sTable[0][8] = Sextante.getText("Largest_patch_index");
+      while (iter.hasNext()) {
+         Class = (Integer) iter.next();
+         classInfo = (ClassInfo) m_Classes.get(Class);
+         classInfo.setTotalLandscapeArea(m_Landscape.getTotalArea());
+         sTable[iRow][0] = Integer.toString(Class.intValue());
+         sTable[iRow][1] = df.format(classInfo.getTotalArea());
+         sTable[iRow][2] = df.format(classInfo.getPercentageOfLandscape());
+         sTable[iRow][3] = df.format(classInfo.getPatchesCount());
+         sTable[iRow][4] = df.format(classInfo.getPatchDensity());
+         sTable[iRow][5] = df.format(classInfo.getTotalEdge());
+         sTable[iRow][6] = df.format(classInfo.getEdgeDensity());
+         sTable[iRow][7] = df.format(classInfo.getLandscapeShapeIndex());
+         sTable[iRow][8] = df.format(classInfo.getLargestPatchIndex());
+         iRow++;
+      }
+      doc.addTable(sTable, "", true, true);
+
+      m_Landscape.setTotalLandscapeArea(m_Landscape.getTotalArea());
+      doc.addHeader(Sextante.getText("Landscape_metrics"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Total_area") + ": " + df.format(m_Landscape.getTotalArea()));
+      doc.addListElement(Sextante.getText("Number_of_patches") + ": " + df.format(m_Landscape.getPatchesCount()));
+      doc.addListElement(Sextante.getText("Patch_Density") + ": " + df.format(m_Landscape.getPatchDensity()));
+      doc.addListElement(Sextante.getText("Total_perimeter") + ": " + df.format(m_Landscape.getTotalEdge()));
+      doc.addListElement(Sextante.getText("Edge_Density") + ": " + df.format(m_Landscape.getEdgeDensity()));
+      doc.addListElement(Sextante.getText("Landscape_shape_index") + ": " + df.format(m_Landscape.getLandscapeShapeIndex()));
+      doc.addListElement(Sextante.getText("Largest_patch_index") + ": " + df.format(m_Landscape.getLargestPatchIndex()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(METRICS, Sextante.getText("Metrics") + "[" + m_Grid.getName() + "]", doc.getHTMLCode());
+
+      //TODO: what about distributions of landscape and patch values!!???
+   }
+
+
+   private PatchInfo analysePatch(int x,
+                                  int y) {
+
+      int iInitX, iInitY;
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int i, n;
+      int iClass;
+      final int iVisitedValue = 1;
+      byte visited;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+      PatchInfo info;
+      iInitClass = m_Grid.getCellValueAsInt(x, y);
+
+      if (m_Grid.isNoDataValue(iInitClass)) {
+         return null;
+      }
+
+      iInitX = x;
+      iInitY = y;
+
+      info = new PatchInfo(iInitClass, m_Grid);
+
+      centralPoints.add(new Point(x, y));
+      info.add(x, y);
+      m_Visited.setCellValue(x, y, 1);
+
+      for (i = 0; i < 2; i++) {
+         while (centralPoints.size() != 0) {
+            for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+               point = (Point) centralPoints.get(iPt);
+               x = point.x;
+               y = point.y;
+               iClass = m_Grid.getCellValueAsInt(x, y);
+               if (!m_Grid.isNoDataValue(iClass)) {
+                  for (n = 0; n < 8; n++) {
+                     x2 = x + m_iOffsetX[n];
+                     y2 = y + m_iOffsetY[n];
+                     iClass = m_Grid.getCellValueAsInt(x2, y2);
+                     if (!m_Grid.isNoDataValue(iClass)) {
+                        visited = m_Visited.getCellValueAsByte(x2, y2);
+                        if (visited == i) {
+                           if (iInitClass == iClass) {
+                              m_Visited.setCellValue(x2, y2, i + 1);
+                              if (iVisitedValue == 0) {
+                                 info.add(x2, y2);
+                              }
+                              else { //1
+                                 info.addForRadiusOfGyration(x2, y2);
+                              }
+                              adjPoints.add(new Point(x2, y2));
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+            centralPoints = adjPoints;
+            adjPoints = new ArrayList();
+         }
+         centralPoints.clear();
+         centralPoints.add(new Point(iInitX, iInitY));
+         info.addForRadiusOfGyration(iInitX, iInitX);
+         if (i == 0) {
+            info.calculateCentroid();
+         }
+         /*m_Visited.setCellValue(x, y, 2);
+         iVisitedValue = 2;*/
+      }
+
+      return info;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/FragstatsAreaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/ClassInfo.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/ClassInfo.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/ClassInfo.java	(revision 369)
@@ -0,0 +1,129 @@
+package es.unex.sextante.gridCategorical.fragstatsArea;
+
+import es.unex.sextante.math.simpleStats.SimpleStats;
+
+public class ClassInfo {
+
+   private double            m_dArea               = 0;
+   private int               m_iAreaInCells        = 0;
+   private double            m_dPerimeter          = 0;
+   private int               m_iPerimeterInCells   = 0;
+   private double            m_dLargestPatchArea   = 0;
+   private double            m_dTotalLandscapeArea = 0;
+   private int               m_iPatches            = 0;
+   private final SimpleStats m_Area;
+   private final SimpleStats m_RadiusOfGyration;
+
+
+   public ClassInfo() {
+
+      m_Area = new SimpleStats();
+      m_RadiusOfGyration = new SimpleStats();
+
+   }
+
+
+   public void setTotalLandscapeArea(final double dArea) {
+
+      m_dTotalLandscapeArea = dArea;
+
+   }
+
+
+   public void add(final PatchInfo info) {
+
+      m_iPatches++;
+      m_dArea += info.getArea();
+      m_iAreaInCells += info.getAreaInCells();
+      m_dPerimeter += info.getPerimeter();
+      m_iPerimeterInCells += info.getPerimeterInCells();
+      m_dLargestPatchArea = Math.max(m_dLargestPatchArea, info.getArea());
+      m_Area.addValue(info.getArea());
+      m_RadiusOfGyration.addValue(info.getRadiusOfGyration());
+
+   }
+
+
+   public double getTotalArea() {
+
+      return m_dArea;
+
+   }
+
+
+   public double getPercentageOfLandscape() {
+
+      return m_dArea / m_dTotalLandscapeArea * 100;
+
+   }
+
+
+   public int getPatchesCount() {
+
+      return m_iPatches;
+
+   }
+
+
+   public double getPatchDensity() {
+
+      return m_iPatches * 10000. / m_dTotalLandscapeArea * 100;
+
+   }
+
+
+   public double getTotalEdge() {
+
+      return m_dPerimeter;
+
+   }
+
+
+   public double getEdgeDensity() {
+
+      return m_dPerimeter * 10000. / m_dTotalLandscapeArea;
+
+   }
+
+
+   public double getLandscapeShapeIndex() {
+
+      int min;
+      final int n = (int) Math.floor(Math.sqrt(m_dArea));
+      final double m = m_dArea - n * n;
+
+      if (m == 0) {
+         min = 4 * n;
+      }
+      else if (m_dArea > n * (n + 1)) {
+         min = 4 * n + 4;
+      }
+      else {
+         min = 4 * n + 2;
+      }
+
+      return (double) m_iPerimeterInCells / (double) min;
+   }
+
+
+   public double getLargestPatchIndex() {
+
+      return m_dLargestPatchArea / m_dTotalLandscapeArea * 100;
+
+   }
+
+
+   public SimpleStats getPatchAreaDistribution() {
+
+      return m_Area;
+
+   }
+
+
+   public SimpleStats getRadiusOfGyrationDistribution() {
+
+      return m_RadiusOfGyration;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/ClassInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/PatchInfo.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/PatchInfo.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/PatchInfo.java	(revision 369)
@@ -0,0 +1,113 @@
+package es.unex.sextante.gridCategorical.fragstatsArea;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+public class PatchInfo {
+
+   private final int          m_iOffsetX[] = { -1, 0, 0, 1 };
+   private final int          m_iOffsetY[] = { 0, -1, 1, 0 };
+
+   private final int          m_iClass;
+   private int                m_iCells;
+   private int                m_iPerimeter;
+   private int                m_iSumX, m_iSumY;
+   private double             m_dCentroidX;
+   private double             m_dCentroidY;
+   private double             m_dRadiusOfGyration;
+
+   private final IRasterLayer m_Window;
+
+
+   public PatchInfo(final int iClass,
+                    final IRasterLayer window) {
+
+      m_Window = window;
+
+      m_iCells = 0;
+      m_iPerimeter = 0;
+      m_iSumX = 0;
+      m_iSumY = 0;
+      m_iClass = iClass;
+
+   }
+
+
+   public void add(final int x,
+                   final int y) {
+
+      int n;
+      int x2, y2;
+      int iClass;
+
+      m_iCells++;
+      m_iSumX += x;
+      m_iSumY += y;
+      for (n = 0; n < 4; n++) {
+         x2 = x + m_iOffsetX[n];
+         y2 = y + m_iOffsetY[n];
+         iClass = m_Window.getCellValueAsInt(x2, y2);
+         if (m_Window.isNoDataValue(iClass) || (iClass != m_iClass)) {
+            m_iPerimeter++;
+         }
+      }
+   }
+
+
+   public void addForRadiusOfGyration(final int x,
+                                      final int y) {
+
+      m_dRadiusOfGyration += Math.sqrt(Math.pow(x - m_dCentroidX, 2.0) + Math.pow(y - m_dCentroidY, 2.0));
+
+   }
+
+
+   public double getPerimeter() {
+
+      return m_Window.getWindowCellSize() * m_iPerimeter;
+
+   }
+
+
+   public void calculateCentroid() {
+
+      m_dCentroidX = m_iSumX / (double) m_iCells;
+      m_dCentroidY = m_iSumY / (double) m_iCells;
+
+   }
+
+
+   public double getArea() {
+
+      return m_Window.getWindowCellSize() * m_Window.getWindowCellSize() * m_iCells;
+
+   }
+
+
+   public double getRadiusOfGyration() {
+
+      return m_dRadiusOfGyration / m_iCells * m_Window.getWindowCellSize();
+
+   }
+
+
+   public int getClassID() {
+
+      return m_iClass;
+
+   }
+
+
+   public int getAreaInCells() {
+
+      return m_iCells;
+
+   }
+
+
+   public int getPerimeterInCells() {
+
+      return m_iPerimeter;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsArea/PatchInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyDisjoint/ReclassifyDisjointAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyDisjoint/ReclassifyDisjointAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyDisjoint/ReclassifyDisjointAlgorithm.java	(revision 369)
@@ -0,0 +1,139 @@
+package es.unex.sextante.gridCategorical.reclassifyDisjoint;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ReclassifyDisjointAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String INPUT        = "INPUT";
+   public static final String RECLASS      = "RECLASS";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Window;
+   IRasterLayer               m_Result;
+   boolean                    m_IsCellAlreadyVisited[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Reclassify_into_disjoint_classes"));
+      setGroup(Sextante.getText("Reclassify_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RECLASS, Sextante.getText("Reclassify"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iClass = 0;
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Result = getNewRasterLayer(RECLASS, m_Window.getName() + Sextante.getText("[reclassified]"),
+               IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Result.assignNoData();
+
+      m_Window.setWindowExtent(m_Result);
+      m_Window.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      m_IsCellAlreadyVisited = new boolean[m_iNX][m_iNY];
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            final double dValue = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(dValue)) {
+               if (!m_IsCellAlreadyVisited[x][y]) {
+                  iClass++;
+                  setClass(x, y, iClass);
+               }
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void setClass(int x,
+                         int y,
+                         final int iNewClass) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      iInitClass = m_Window.getCellValueAsInt(x, y);
+
+      centralPoints.add(new Point(x, y));
+      m_IsCellAlreadyVisited[x][y] = true;
+
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            iClass = m_Window.getCellValueAsInt(x, y);
+            if (!m_Window.isNoDataValue(iClass)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  iClass = m_Window.getCellValueAsInt(x2, y2);
+                  if (!m_Window.isNoDataValue(iClass)) {
+                     if (m_IsCellAlreadyVisited[x2][y2] == false) {
+                        if (iInitClass == iClass) {
+                           m_IsCellAlreadyVisited[x2][y2] = true;
+                           m_Result.setCellValue(x2, y2, iNewClass);
+                           adjPoints.add(new Point(x2, y2));
+
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyDisjoint/ReclassifyDisjointAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/filterClumps/FilterClumpsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/filterClumps/FilterClumpsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/filterClumps/FilterClumpsAlgorithm.java	(revision 369)
@@ -0,0 +1,200 @@
+package es.unex.sextante.gridCategorical.filterClumps;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class FilterClumpsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String INPUT        = "INPUT";
+   public static final String MINAREA      = "MINAREA";
+   public static final String RESULT       = "RESULT";
+
+   int                        m_iArea;
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Grid;
+   IRasterLayer               m_Result;
+   boolean                    m_IsCellAlreadyVisited[][];
+   boolean                    m_IsCellAlreadyVisitedArea[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Filter_clumps"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(MINAREA, Sextante.getText("Min_area_[cells]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 1, Integer.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Filtered_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_iArea = m_Parameters.getParameterValueAsInt(MINAREA);
+
+      m_Result = getNewRasterLayer(RESULT, m_Grid.getName() + "[filt]", IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Grid.setWindowExtent(m_Result);
+      m_Grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      m_IsCellAlreadyVisited = new boolean[m_iNX][m_iNY];
+      m_IsCellAlreadyVisitedArea = new boolean[m_iNX][m_iNY];
+
+      m_Result.assign(m_Grid);
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            if (!m_IsCellAlreadyVisited[x][y]) {
+               int iArea = getArea(x, y);
+               if (iArea < m_iArea) {
+                  setToNoData(x, y);
+               }
+               else {
+                  iArea = iArea + 1;
+               }
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private int getArea(int x,
+                       int y) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      int iArea = 1;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      if (m_IsCellAlreadyVisitedArea[x][y]) {
+         return Integer.MAX_VALUE;
+      }
+
+      iInitClass = m_Grid.getCellValueAsInt(x, y);
+
+      centralPoints.add(new Point(x, y));
+      m_IsCellAlreadyVisitedArea[x][y] = true;
+
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            iClass = m_Grid.getCellValueAsInt(x, y);
+            if (!m_Grid.isNoDataValue(iClass)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  iClass = m_Grid.getCellValueAsInt(x2, y2);
+                  if (!m_Grid.isNoDataValue(iClass)) {
+                     if (m_IsCellAlreadyVisitedArea[x2][y2] == false) {
+                        if (iInitClass == iClass) {
+                           m_IsCellAlreadyVisitedArea[x2][y2] = true;
+                           adjPoints.add(new Point(x2, y2));
+                           iArea += 1;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return Integer.MAX_VALUE;
+         }
+
+      }
+
+      return iArea;
+
+   }
+
+
+   private void setToNoData(int x,
+                            int y) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      iInitClass = m_Result.getCellValueAsInt(x, y);
+
+      centralPoints.add(new Point(x, y));
+
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            iClass = m_Result.getCellValueAsInt(x, y);
+            if (!m_Result.isNoDataValue(iClass)) {
+               m_Result.setNoData(x, y);
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  iClass = m_Result.getCellValueAsInt(x2, y2);
+                  if (!m_Result.isNoDataValue(iClass)) {
+                     if (iInitClass == iClass) {
+                        adjPoints.add(new Point(x2, y2));
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/filterClumps/FilterClumpsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TempTableReader.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TempTableReader.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TempTableReader.java	(revision 369)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+TempTableReader.java
+Copyright (C) 2009 ETC-LUSI http://etc-lusi.eionet.europa.eu/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+package es.unex.sextante.gridCategorical.tabulateArea;
+
+import java.io.IOException;
+
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.IteratorException;
+
+/**
+ *
+ * @author Cesar Martinez Izquierdo
+ */
+public class TempTableReader {
+   private final ITable             table;
+   private IRecordsetIterator iterator    = null;
+   private boolean            initialized = false;
+   private IRecord            current     = null;
+
+
+   public TempTableReader(final ITable table) {
+      this.table = table;
+   }
+
+
+   public void init() throws IOException {
+      if (!initialized) {
+         table.open();
+         iterator = table.iterator();
+         initialized = true;
+      }
+   }
+
+
+   public IRecord getCurrent() {
+      return current;
+   }
+
+
+   public boolean hasNext() {
+      return iterator.hasNext();
+   }
+
+
+   public IRecord getNext() throws IteratorException {
+      current = iterator.next();
+      return current;
+   }
+
+
+   public void close() throws IOException {
+      if (initialized) {
+         iterator.close();
+         table.close();
+         initialized = false;
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TempTableReader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/SubAreaResult.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/SubAreaResult.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/SubAreaResult.java	(revision 369)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+SubAreaResult.java
+Copyright (C) 2009 ETC-LUSI http://etc-lusi.eionet.europa.eu/
+ *******************************************************************************/
+package es.unex.sextante.gridCategorical.tabulateArea;
+
+import java.util.Map;
+
+
+/**
+ * 
+ * @author Cesar Martinez Izquierdo
+ */
+public class SubAreaResult {
+   private TempTableReader      tmpReader   = null;
+   private boolean              isSuccessul = false;
+   private Map<Object, Integer> zones;
+
+
+   public void setReader(final TempTableReader reader) {
+      this.tmpReader = reader;
+   }
+
+
+   public TempTableReader getReader() {
+      return tmpReader;
+   }
+
+
+   public boolean isSuccessful() {
+      return isSuccessul;
+   }
+
+
+   public void setSuccessful(final boolean success) {
+      isSuccessul = success;
+   }
+
+
+   public void setZones(final Map<Object, Integer> classes) {
+      this.zones = classes;
+   }
+
+
+   public Map<Object, Integer> getZones() {
+      return this.zones;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/SubAreaResult.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateAreaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateAreaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateAreaAlgorithm.java	(revision 369)
@@ -0,0 +1,318 @@
+/*******************************************************************************
+TabulateAreaAlgorithm.java
+Copyright (C) 2009 ETC-LUSI http://etc-lusi.eionet.europa.eu/
+ *******************************************************************************/
+package es.unex.sextante.gridCategorical.tabulateArea;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeSet;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputFactory;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+/**
+ * 
+ * @author Cesar Martinez Izquierdo
+ */
+public class TabulateAreaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String GRID          = "GRID";
+   public static final String GRID2         = "GRID2";
+   public static final String TABLE         = "TABLE";
+   public static final String COMPACT       = "COMPACT";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Window, m_Window2;
+
+   private int                numAreas;                                               // number of areas (or tiles) that the input raster are divided in to process
+
+   // for logging purposes:
+   private int                absStep;
+   private int                normStep;
+   private final String       LOGGING_TEXT1 = Sextante.getText("Tabulating subzones");
+   private final String       LOGGING_TEXT2 = Sextante.getText("Merging results");
+
+   private final int          MAXTILESIZE   = 8388608;                                // max number of pixels per subArea (it will define the tile size we'll use)
+
+
+   //	private final int MAXTILESIZE = 4194304; // max number of pixels per subArea (it will define the tile size we'll use)
+   //	private final int MAXTILESIZE = 1048576; // max number of pixels per subArea (it will define the tile size we'll use)
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Tabulate_Area"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Zones_Grid"), true);
+         m_Parameters.addInputRasterLayer(GRID2, Sextante.getText("Values_Grid"), true);
+         m_Parameters.addBoolean(COMPACT, Sextante.getText("Compact_output"), false);
+         addOutputTable(TABLE, Sextante.getText("Tabulate_Area"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+      final long time1 = System.currentTimeMillis();
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      m_Window2 = m_Parameters.getParameterValueAsRasterLayer(GRID2);
+      final boolean useCompactOutput = m_Parameters.getParameterValueAsBoolean(COMPACT);
+
+      m_Window.setWindowExtent(m_AnalysisExtent);
+      m_Window.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      m_Window2.setWindowExtent(m_AnalysisExtent);
+      m_Window2.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+      final double cellArea = m_AnalysisExtent.getCellSize() * m_AnalysisExtent.getCellSize();
+
+      // compute the maximum number of rows per subarea
+      int maxRowPerArea;
+      if (MAXTILESIZE > m_iNX) {
+         maxRowPerArea = (int) Math.floor(MAXTILESIZE / m_iNX);
+      }
+      else {
+         maxRowPerArea = 1;
+      }
+      numAreas = (int) Math.ceil((float) m_iNY / (float) maxRowPerArea);
+
+      TabulateSubArea subArea = new TabulateSubArea(this, m_Window, m_Window2);
+
+      // process all the sub-areas
+      int currY = 0;
+      SubAreaResult[] result = new SubAreaResult[numAreas];
+      System.out.println("Num Areas: " + numAreas);
+      for (int curArea = 0; curArea < numAreas; curArea++) {
+         final int maxY = Math.min((currY + maxRowPerArea - 1), m_iNY - 1);
+         result[curArea] = subArea.processArea(0, currY, m_iNX - 1, maxY);
+         setProgress(LOGGING_TEXT1);
+         System.gc();
+
+         if ((result[curArea] != null) && !result[curArea].isSuccessful()) {
+            for (final SubAreaResult element : result) {
+               try {
+                  if (result[curArea].getReader() != null) {
+                     result[curArea].getReader().close();
+                  }
+               }
+               catch (final IOException e) {}
+            }
+            return false;
+         }
+         currY += maxRowPerArea;
+      }
+      subArea = null;
+      System.gc();
+
+      // we'll assign a global ID for all the zones
+      // first, we order the zones
+      final HashSet<Object> globalZonesSet = new HashSet<Object>();
+      for (int curArea = 0; curArea < numAreas; curArea++) {
+         if (result[curArea] == null) {
+            continue;
+         }
+         final Map<Object, Integer> currZonesMap = result[curArea].getZones();
+         final Iterator<Object> it = currZonesMap.keySet().iterator();
+         while (it.hasNext()) {
+            final Object o = it.next();
+            if (!globalZonesSet.contains(o)) {
+               globalZonesSet.add(o);
+            }
+         }
+      }
+
+      // according to my tests, this is quite faster than using Collections.sort or a TreeMap
+      Object[] m_ArrayZones = globalZonesSet.toArray(new Object[globalZonesSet.size()]);
+      Arrays.sort(m_ArrayZones);
+      final HashMap<Object, Integer> globalZonesMap = new HashMap<Object, Integer>();
+      for (int i = 0; i < m_ArrayZones.length; i++) {
+         globalZonesMap.put(m_ArrayZones[i], new Integer(i + 1));
+      }
+      m_ArrayZones = null;
+
+      Sextante.addInfoToLog("Total zones: " + globalZonesMap.size());
+      setProgressText(LOGGING_TEXT2);
+      setProgress(51, 100);
+
+
+      // create final output table
+      final String sTableName = Sextante.getText("Tabulate_Area");
+
+      String sFields[];
+      Class types[];
+
+      if (useCompactOutput) {
+         sFields = new String[3]; // value, zone, area
+         types = new Class[3];
+         sFields[0] = "VALUE";
+         types[0] = Integer.class;
+         sFields[1] = "ZONE";
+         types[1] = Integer.class;
+         sFields[2] = "AREA";
+         types[2] = Integer.class;
+      }
+      else {
+         sFields = new String[globalZonesMap.size() + 1];
+         types = new Class[globalZonesMap.size() + 1];
+         sFields[0] = "VALUE";
+         types[0] = Integer.class;
+         final Iterator<Object> it = globalZonesMap.keySet().iterator();
+         while (it.hasNext()) {
+            final Object zone = it.next();
+            final int idx = globalZonesMap.get(zone);
+            sFields[idx] = zone.toString();
+            types[idx] = zone.getClass(); // because different drivers might return different classes: Long, Integer...
+         }
+      }
+
+      final ITable outputTable = getNewTable(TABLE, sTableName, types, sFields);
+
+      // Merge all the sub-area results in a single table.
+      // The general strategy here is:
+      //   - there are several on-disk tables with partial results
+      //   - each table contains one record per value, and the records are ordered by value
+      //   - each record contains the value as the first fields, and then one field per zone,
+      //       which contains the count of the current value in this zone
+      //   - we will read one record from every table, and store the next available values in a TreeSet ("nextValues")
+      //   - then we will calculate the total sum for a value (summing the partial results for the value)
+      //   - after a value is calculated, it is deleted from the "nextValues" TreeSet and the result is written to the final output table
+      //   - when there are no values available in "nextValues" TreeSet, the algorithm finishes
+      try {
+         final TreeSet nextValues = new TreeSet();
+         for (int curArea = 0; curArea < numAreas; curArea++) {
+            if (result[curArea] == null) {
+               continue;
+            }
+            if (result[curArea].getReader().hasNext()) {
+               final IRecord next = result[curArea].getReader().getNext();
+               if (next != null) {
+                  nextValues.add(next.getValue(0));
+               }
+            }
+         }
+         Object[] row; // this will contain the merged row
+         final int zoneCount = 0;
+         while (nextValues.size() > 0) {
+            row = new Object[globalZonesMap.size() + 1];
+            final Object curValue = nextValues.first();
+            row[0] = curValue;
+            for (int k = 1; k < row.length; k++) {
+               row[k] = 0;
+            }
+            for (int curArea = 0; curArea < numAreas; curArea++) {
+               if (result[curArea] == null) {
+                  continue;
+               }
+               IRecord cur = result[curArea].getReader().getCurrent();
+               if ((cur != null) && cur.getValue(0).equals(curValue)) {
+                  final Map<Object, Integer> zonesMap = result[curArea].getZones();
+                  final Iterator zoneIt = zonesMap.keySet().iterator();
+                  while (zoneIt.hasNext()) {
+                     final Object theZone = zoneIt.next();
+                     final int globalIndex = globalZonesMap.get(theZone);
+                     final int localIndex = zonesMap.get(theZone);
+                     row[globalIndex] = new Long(((Number) row[globalIndex]).longValue()
+                                                 + ((Number) cur.getValue(localIndex + 1)).longValue());
+                  }
+                  if (result[curArea].getReader().hasNext()) {
+                     cur = result[curArea].getReader().getNext();
+                     if (cur != null) {
+                        nextValues.add(cur.getValue(0));
+                     }
+                  }
+                  else {
+                     // The reader has reached the end of the file,
+                     // so we can safely remove this result to speed up the process
+                     result[curArea] = null;
+                     setProgress(LOGGING_TEXT2);
+                  }
+               }
+            }
+            nextValues.remove(curValue); // this zone has been merged
+            if (useCompactOutput) {
+               final Object[] tmpRow = new Object[3];
+               final Iterator<Object> iter = globalZonesMap.keySet().iterator();
+               while (iter.hasNext()) {
+                  final Object zone = iter.next();
+                  final int globalIdx = globalZonesMap.get(zone);
+                  final int value = ((Number) row[globalIdx]).intValue();
+                  if (value > 0) {
+                     tmpRow[0] = row[0];
+                     tmpRow[1] = zone;
+                     final double areaValue = ((Number) row[globalIdx]).longValue() * cellArea;
+                     tmpRow[2] = new Long(Math.round(areaValue));
+                     outputTable.addRecord(tmpRow);
+                  }
+               }
+            }
+            else {
+               for (int i = 1; i < row.length; i++) {
+                  final double areaValue = ((Number) row[i]).longValue() * cellArea;
+                  row[i] = new Long(Math.round(areaValue));
+               }
+               outputTable.addRecord(row);
+            }
+
+         }
+         final long time2 = System.currentTimeMillis();
+         setProgress(100, 100);
+         result = null;
+         System.gc();
+         System.out.println("Processing time: " + ((time2 - time1) / 1000.0) + "secs.");
+         Sextante.addInfoToLog(Sextante.getText("Processing_time") + ((time2 - time1) / 1000.0) + "secs.");
+         System.out.println("Cell size: " + m_AnalysisExtent.getCellSize());
+         // not necessary, it is automatically performed by Sextante // outputTable.postProcess();
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   protected void setProgress(final String text) {
+      // to avoid redundant logging
+      absStep++;
+      final int curStep = absStep * 100 / (2 * numAreas);
+      if (curStep > normStep) {
+         normStep = curStep;
+         setProgressText(text);
+         setProgress(normStep, 100);
+      }
+   }
+
+
+   protected boolean isCancelled() {
+      return m_Task.isCanceled();
+   }
+
+
+   protected OutputFactory getOuputFactory() {
+      return m_OutputFactory;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateAreaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateSubArea.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateSubArea.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateSubArea.java	(revision 369)
@@ -0,0 +1,224 @@
+/*******************************************************************************
+TabulateSubArea.java
+Copyright (C) 2009 ETC-LUSI http://etc-lusi.eionet.europa.eu/
+ *******************************************************************************/
+package es.unex.sextante.gridCategorical.tabulateArea;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+import es.unex.sextante.core.OutputFactory;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+
+/**
+ * 
+ * @author Cesar Martinez Izquierdo
+ */
+public class TabulateSubArea {
+
+   public static final String   GRID         = "GRID";
+   public static final String   GRID2        = "GRID2";
+   public static final String   TABLE        = "TABLE";
+
+
+   private Map<Object, Integer> m_MapValues;
+   private Map<Object, Integer> m_MapZones;
+   private final IRasterLayer   m_Window, m_Window2;
+   TabulateAreaAlgorithm        alg;
+   private String               tmpTableName = null;
+
+
+   public TabulateSubArea(final TabulateAreaAlgorithm alg,
+                          final IRasterLayer zonesWindow,
+                          final IRasterLayer classesWindow) {
+      m_Window = zonesWindow;
+      m_Window2 = classesWindow;
+      this.alg = alg;
+   }
+
+
+   public SubAreaResult processArea(final int minX,
+                                    final int minY,
+                                    final int maxX,
+                                    final int maxY) throws GeoAlgorithmExecutionException {
+      int i, j;
+      int x, y;
+      int iZoneCount, iValueCount;
+      int iZone, iValue;
+      int iZoneIdx, iValueIdx;
+
+      SubAreaResult result = new SubAreaResult();
+      try {
+         createMaps(minX, minY, maxX, maxY);
+         iZoneCount = m_MapZones.size();
+         iValueCount = m_MapValues.size();
+
+         if ((iZoneCount == 0) || (iValueCount == 0)) {
+            // this may happen in tiles filled with noData values
+            result = null;
+            return result;
+         }
+
+         final int[][] table = new int[iZoneCount][iValueCount];
+         for (i = 0; i < iValueCount; i++) {
+            for (j = 0; j < iZoneCount; j++) {
+               table[j][i] = 0;
+            }
+         }
+
+         for (y = minY; (y <= maxY) && !alg.isCancelled(); y++) {
+            for (x = minX; x <= maxX; x++) {
+               iZone = m_Window.getCellValueAsInt(x, y);
+               iValue = m_Window2.getCellValueAsInt(x, y);
+               if (!m_Window.isNoDataValue(iZone) && !m_Window2.isNoDataValue(iValue)) {
+                  iZoneIdx = (m_MapZones.get(new Integer(iZone))).intValue();
+                  iValueIdx = (m_MapValues.get(new Integer(iValue))).intValue();
+                  table[iZoneIdx][iValueIdx]++;
+               }
+            }
+         }
+
+         if (alg.isCancelled()) {
+            result.setSuccessful(false);
+            return result;
+         }
+
+         final String sFields[] = new String[iZoneCount + 1];
+         final Class types[] = new Class[iZoneCount + 1];
+
+         sFields[0] = "VALUE";
+         types[0] = Integer.class;
+         final Iterator<Object> zonesIter = m_MapZones.keySet().iterator();
+         while (zonesIter.hasNext()) {
+            final Object obj = zonesIter.next();
+            final int idx = m_MapZones.get(obj);
+            sFields[idx + 1] = obj.toString();
+            types[idx + 1] = Integer.class;
+
+         }
+
+         ITable tmpTable = createTempTable(types, sFields);
+         Object[] values;
+         boolean emptyRow = true;
+         int value;
+
+         // iterate using the (ordered) values Map, because we'll need to have ordered values to make possible the merging
+         final Iterator<Object> valuesIter = m_MapValues.keySet().iterator();
+         while (valuesIter.hasNext()) {
+            final Object obj = valuesIter.next();
+            final Integer index = m_MapValues.get(obj);
+            values = new Object[iZoneCount + 1];
+            values[0] = obj;
+            for (j = 1; j <= iZoneCount; j++) {
+               value = table[j - 1][index];
+               if (value > 0) {
+                  values[j] = new Integer(value);
+                  emptyRow = false;
+               }
+            }
+            if (!emptyRow) { // don't add empty rows, this saves output space and speeds up merging
+               tmpTable.addRecord(values);
+               emptyRow = true;
+            }
+         }
+
+         tmpTable.postProcess();
+         tmpTable.open();
+         if (tmpTable.getRecordCount() == 0) {
+            tmpTable.close();
+            final File f = new File(tmpTableName);
+            f.delete(); // FIXME: this should be automatically done by Sextante
+            result = null;
+         }
+         else {
+            final TempTableReader tmpReader = new TempTableReader(tmpTable);
+            tmpReader.init();
+            result.setReader(tmpReader);
+            result.setSuccessful(!alg.isCancelled());
+            result.setZones(m_MapZones);
+         }
+
+         // this will help garbage collector, as the same TabulateSubArea object is reused several times
+         tmpTable = null;
+         m_MapValues = null;
+         m_MapZones = null;
+
+         return result;
+      }
+      catch (final IOException e) {
+         Sextante.getLogger().addError(e);
+         result.setSuccessful(false);
+         return result;
+      }
+      catch (final Exception e) {
+         Sextante.getLogger().addError(e);
+         result.setSuccessful(false);
+         return result;
+      }
+   }
+
+
+   private void createMaps(final int minX,
+                           final int minY,
+                           final int maxX,
+                           final int maxY) {
+      int iCellValue;
+      int x, y;
+      m_MapValues = new TreeMap<Object, Integer>();
+      m_MapZones = new HashMap<Object, Integer>();
+      Integer iClass, iID = 0;
+
+      for (y = minY; y <= maxY; y++) {
+         for (x = minX; x <= maxX; x++) {
+            iCellValue = m_Window.getCellValueAsInt(x, y);
+            iClass = new Integer(iCellValue);
+            if (!m_Window.isNoDataValue(iCellValue)) {
+               if (!m_MapZones.containsKey(iClass)) {
+                  iID = new Integer(m_MapZones.size());
+                  m_MapZones.put(iClass, iID);
+               }
+            }
+
+            iCellValue = m_Window2.getCellValueAsInt(x, y);
+            if (!m_Window2.isNoDataValue(iCellValue)) { // don't include no data values
+               iClass = new Integer(iCellValue);
+               if (!m_MapValues.containsKey(iClass)) {
+                  iID = new Integer(m_MapValues.size());
+                  m_MapValues.put(iClass, iID);
+               }
+            }
+         }
+      }
+      // according to my tests, this is quite faster than using Collections.sort or a TreeMap
+      // oops... but we need a Map to access by key
+      //		m_ArrayZones = (Integer[]) m_ListZones.toArray(new Integer[m_ListZones.size()]);
+      //		Arrays.sort(m_ArrayZones);
+      //		for (int i=0; i<m_ArrayZones.length; i++) {
+      //			m_MapZones.put(m_ArrayZones[i], new Integer(i));
+      //		}
+   }
+
+
+   private ITable createTempTable(final Class[] types,
+                                  final String[] sFields) throws IOException, UnsupportedOutputChannelException {
+      final OutputFactory factory = alg.getOuputFactory();
+      tmpTableName = factory.getTempTableFilename();
+      final File f = new File(tmpTableName);
+      //f.deleteOnExit(); // FIXME: this should be automatically done by Sextante
+      // we don't ask for removal because this causes some memory to be used
+      final IOutputChannel channel = new FileOutputChannel(tmpTableName);
+      return factory.getNewTable(tmpTableName, types, sFields, channel);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/tabulateArea/TabulateSubArea.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/lacunarity/LacunarityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/lacunarity/LacunarityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/lacunarity/LacunarityAlgorithm.java	(revision 369)
@@ -0,0 +1,155 @@
+package es.unex.sextante.gridCategorical.lacunarity;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+
+public class LacunarityAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT_CHART = "RESULT_CHART";
+   public static final String RESULT_TABLE = "RESULT_TABLE";
+   public static final String INPUT        = "INPUT";
+   public static final String MAX_SIZE     = "MAX_SIZE";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Window;
+   private int                m_iMaxSize;
+   private double[]           m_dLacunarity;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Lacunarity"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Input_Layer"), true);
+         m_Parameters.addNumericalValue(MAX_SIZE, Sextante.getText("Largest_window_size"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 4, Integer.MAX_VALUE);
+         addOutputTable(RESULT_TABLE, Sextante.getText("Lacunarity"));
+         addOutputChart(RESULT_CHART, Sextante.getText("Lacunarity"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_iMaxSize = m_Parameters.getParameterValueAsInt(MAX_SIZE);
+      m_Window.setFullExtent();
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      if (calculateLacunarity()) {
+         createTableAndGraph();
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private boolean calculateLacunarity() {
+
+      int x, y;
+
+      m_dLacunarity = new double[m_iMaxSize + 1];
+
+      for (int iSize = 2; iSize < m_dLacunarity.length; iSize++) {
+         setProgressText("Box size: " + Integer.toString(iSize));
+         final SimpleStats stats = new SimpleStats();
+         for (y = 0; (y < m_iNY - iSize) && setProgress(y, m_iNY); y++) {
+            for (x = 0; x < m_iNX - iSize; x++) {
+               final int iBoxMass = getBoxMass(x, y, iSize);
+               stats.addValue(iBoxMass);
+            }
+         }
+         m_dLacunarity[iSize] = 1 + (stats.getVariance() / Math.pow(stats.getMean(), 2.));
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private int getBoxMass(final int x,
+                          final int y,
+                          final int iSize) {
+
+      int iBoxMass = 0;
+
+      for (int i = 0; i < iSize; i++) {
+         for (int j = 0; j < iSize; j++) {
+            final double dValue = m_Window.getCellValueAsDouble(x + i, y + j);
+            if (!m_Window.isNoDataValue(dValue)) {
+               iBoxMass++;
+            }
+         }
+      }
+
+      return iBoxMass;
+
+   }
+
+
+   private void createTableAndGraph() throws UnsupportedOutputChannelException {
+
+      Object[] values;
+
+
+      final String sFields[] = { Sextante.getText("Window_size"), Sextante.getText("Lacunaridad") };
+      final Class types[] = { Integer.class, Double.class };
+      final String sTableName = Sextante.getText("Lacunaridad") + "[" + m_Window.getName() + "]";
+
+      final ITable table = getNewTable(RESULT_TABLE, sTableName, types, sFields);
+      values = new Object[2];
+
+      final XYSeriesCollection dataset = new XYSeriesCollection();
+      final XYSeries serie = new XYSeries(Sextante.getText("Profile"));
+      dataset.addSeries(serie);
+
+      for (int i = 2; i < m_dLacunarity.length; i++) {
+         values[0] = new Integer(i);
+         values[1] = new Double(m_dLacunarity[i]);
+         table.addRecord(values);
+         serie.add(i, m_dLacunarity[i]);
+      }
+
+      final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, true,
+               true);
+
+      final ChartPanel jPanelChart = new ChartPanel(chart);
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart(RESULT_CHART, Sextante.getText("Profile"), jPanelChart);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/lacunarity/LacunarityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyConsecutive/ReclassifyConsecutiveAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyConsecutive/ReclassifyConsecutiveAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyConsecutive/ReclassifyConsecutiveAlgorithm.java	(revision 369)
@@ -0,0 +1,84 @@
+package es.unex.sextante.gridCategorical.reclassifyConsecutive;
+
+import java.util.HashMap;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ReclassifyConsecutiveAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT   = "INPUT";
+   public static final String RECLASS = "RECLASS";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Reclassify_into_ordered_classes"));
+      setGroup(Sextante.getText("Reclassify_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RECLASS, Sextante.getText("Reclassify"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iClass = 1;
+      int iNX, iNY;
+      HashMap map;
+      Integer ClassID;
+
+      final IRasterLayer window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      final IRasterLayer result = getNewRasterLayer(RECLASS, window.getName() + Sextante.getText("[reclassified]"),
+               IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      window.setWindowExtent(result.getWindowGridExtent());
+      window.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      map = new HashMap();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            final double dValue = window.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dValue)) {
+               ClassID = new Integer(window.getCellValueAsInt(x, y));
+               if (map.containsKey(ClassID)) {
+                  result.setCellValue(x, y, ((Integer) map.get(ClassID)).intValue());
+               }
+               else {
+                  result.setCellValue(x, y, iClass);
+                  map.put(ClassID, new Integer(iClass));
+                  iClass++;
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyConsecutive/ReclassifyConsecutiveAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/aggregationIndex/AggregationIndexAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/aggregationIndex/AggregationIndexAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/aggregationIndex/AggregationIndexAlgorithm.java	(revision 369)
@@ -0,0 +1,175 @@
+package es.unex.sextante.gridCategorical.aggregationIndex;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+public class AggregationIndexAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT       = "RESULT";
+   public static final String INPUT        = "INPUT";
+
+   private final int          m_iOffsetX[] = { -1, 0, 0, 1 };
+   private final int          m_iOffsetY[] = { 0, -1, 1, 0 };
+
+   int                        m_iNX, m_iNY;
+   int                        m_iTotalArea;
+   IRasterLayer               m_Window;
+   HashMap                    m_Map;
+   boolean                    m_IsCellAlreadyVisited[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Aggregation_index"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputTable(RESULT, Sextante.getText("Aggregation_index"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Window.setFullExtent();
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      m_Map = new HashMap();
+
+      if (calculateIndex()) {
+         createTable();
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private boolean calculateIndex() {
+
+      int i;
+      int x, y;
+      int iClass, iClass2;
+      AggregationInfo info;
+
+      m_iTotalArea = 0;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            iClass = m_Window.getCellValueAsInt(x, y);
+            info = (AggregationInfo) m_Map.get(new Integer(iClass));
+            if (info != null) {
+               m_iTotalArea++;
+               info.iArea++;
+               for (i = 0; i < 4; i++) {
+                  iClass2 = m_Window.getCellValueAsInt(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+                  if (iClass2 == iClass) {
+                     info.iAggregation++;
+                  }
+               }
+            }
+            else {
+               info = new AggregationInfo(iClass);
+               m_iTotalArea++;
+               info.iArea++;
+               for (i = 0; i < 4; i++) {
+                  iClass2 = m_Window.getCellValueAsInt(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+                  if (iClass2 == iClass) {
+                     info.iAggregation++;
+                  }
+               }
+               m_Map.put(new Integer(iClass), info);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createTable() throws UnsupportedOutputChannelException {
+
+      int iLargestInt;
+      int iRemainder;
+      int iMaxEii;
+      Object[] values;
+      AggregationInfo info;
+      final Set set = m_Map.keySet();
+      final Iterator iter = set.iterator();
+
+      final String sFields[] = { Sextante.getText("Class"), Sextante.getText("Area_cells"), Sextante.getText("Area[%]"),
+               Sextante.getText("Aggregation_index") };
+      final Class types[] = { Integer.class, Integer.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Aggregation_index_[") + m_Window.getName() + "]";
+
+      final ITable table = getNewTable(RESULT, sTableName, types, sFields);
+      values = new Object[4];
+
+      while (iter.hasNext()) {
+         info = (AggregationInfo) m_Map.get(iter.next());
+         values[0] = new Integer(info.iClass);
+         values[1] = new Integer(info.iArea);
+         values[2] = new Double((double) info.iArea / (double) m_iTotalArea * 100.);
+         iLargestInt = (int) Math.floor(Math.sqrt(info.iArea));
+         iRemainder = (info.iArea - (iLargestInt * iLargestInt));
+         if (iRemainder != 0) {
+            if (iRemainder < iLargestInt) {
+               iMaxEii = 2 * iLargestInt * (iLargestInt - 1) + 2 * iRemainder - 1;
+            }
+            else {
+               iMaxEii = 2 * iLargestInt * (iLargestInt - 1) + 2 * iRemainder - 2;
+            }
+         }
+         else {
+            iMaxEii = 2 * iLargestInt * (iLargestInt - 1);
+         }
+         values[3] = new Double((double) info.iAggregation / (double) iMaxEii / 2.0);
+         table.addRecord(values);
+      }
+
+   }
+
+   private class AggregationInfo {
+
+      public int iClass;
+      public int iArea;
+      public int iAggregation;
+
+
+      public AggregationInfo(final int i) {
+
+         iClass = i;
+         iArea = 0;
+         iAggregation = 0;
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/aggregationIndex/AggregationIndexAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatistics.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatistics.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatistics.java	(revision 369)
@@ -0,0 +1,81 @@
+package es.unex.sextante.gridCategorical.classStatistics;
+
+public class ClassStatistics {
+
+   private final int    m_iClass;
+   private int    m_iZonesCount = 0;
+   private double m_dSum        = 0;
+   private double m_dVar        = 0;
+   private double m_dMin        = Double.MAX_VALUE;
+   private double m_dMax        = 0;
+
+
+   ClassStatistics(final int iClass) {
+
+      m_iClass = iClass;
+
+   }
+
+
+   public void add(final double dArea) {
+
+      m_iZonesCount++;
+      m_dSum += dArea;
+      m_dVar += (dArea * dArea);
+      m_dMax = Math.max(m_dMax, dArea);
+      m_dMin = Math.min(m_dMin, dArea);
+
+   }
+
+
+   public int getClassID() {
+
+      return m_iClass;
+
+   }
+
+
+   public double getTotalArea() {
+
+      return m_dSum;
+
+   }
+
+
+   public double getMinArea() {
+
+      return m_dMin;
+
+   }
+
+
+   public double getMaxArea() {
+
+      return m_dMax;
+
+   }
+
+
+   public double getMeanArea() {
+
+      return (m_dSum / (double) m_iZonesCount);
+
+   }
+
+
+   public double getVarianceArea() {
+
+      final double dMean = getMeanArea();
+
+      return (m_dVar / (double) m_iZonesCount - dMean * dMean);
+
+   }
+
+
+   public int getZonesCount() {
+
+      return m_iZonesCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatistics.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatisticsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatisticsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatisticsAlgorithm.java	(revision 369)
@@ -0,0 +1,184 @@
+package es.unex.sextante.gridCategorical.classStatistics;
+
+import java.awt.Point;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+public class ClassStatisticsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String RESULT       = "RESULT";
+
+   public static final String INPUT        = "INPUT";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Grid;
+   HashMap                    m_Map;
+   boolean                    m_IsCellAlreadyVisited[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Class_statistics"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputTable(RESULT, Sextante.getText("Class_statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iClass;
+      double dArea;
+      ClassStatistics stats = null;
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Grid.setWindowExtent(m_AnalysisExtent);
+      m_Grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      m_IsCellAlreadyVisited = new boolean[m_iNX][m_iNY];
+      m_Map = new HashMap();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            if (!m_IsCellAlreadyVisited[x][y]) {
+               iClass = m_Grid.getCellValueAsInt(x, y);
+               dArea = getClassArea(x, y);
+               stats = (ClassStatistics) m_Map.get(new Integer(iClass));
+               if (stats != null) {
+                  stats.add(dArea);
+               }
+               else {
+                  stats = new ClassStatistics(iClass);
+                  stats.add(dArea);
+                  m_Map.put(new Integer(iClass), stats);
+               }
+            }
+         }
+
+      }
+
+      if (!m_Task.isCanceled()) {
+         createTable();
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private void createTable() throws UnsupportedOutputChannelException {
+
+      Object[] values;
+      ClassStatistics stats;
+      final Set set = m_Map.keySet();
+      final Iterator iter = set.iterator();
+
+      final String sFields[] = { Sextante.getText("Class_ID"), Sextante.getText("total_area_Total"),
+               Sextante.getText("Number_of_patches"), Sextante.getText("Mean_area"), Sextante.getText("Variance_of_area"),
+               Sextante.getText("Max_area"), Sextante.getText("Min_area") };
+      final Class types[] = { Integer.class, Double.class, Integer.class, Double.class, Double.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Class_statistics_[") + m_Grid.getName() + "]";
+
+      final ITable table = getNewTable(RESULT, sTableName, types, sFields);
+      values = new Object[7];
+
+      while (iter.hasNext()) {
+         stats = (ClassStatistics) m_Map.get(iter.next());
+         values[0] = new Integer(stats.getClassID());
+         values[1] = new Double(stats.getTotalArea());
+         values[2] = new Integer(stats.getZonesCount());
+         values[3] = new Double(stats.getMeanArea());
+         values[4] = new Double(stats.getVarianceArea());
+         values[5] = new Double(stats.getMaxArea());
+         values[6] = new Double(stats.getMinArea());
+         table.addRecord(values);
+      }
+
+   }
+
+
+   private double getClassArea(int x,
+                               int y) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      double dArea = 0;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      iInitClass = m_Grid.getCellValueAsInt(x, y);
+
+      centralPoints.add(new Point(x, y));
+      m_IsCellAlreadyVisited[x][y] = true;
+
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            dArea += m_Grid.getWindowCellSize() * m_Grid.getWindowCellSize();
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            double dClass = m_Grid.getCellValueAsInt(x, y);
+            if (!m_Grid.isNoDataValue(dClass)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  dClass = m_Grid.getCellValueAsDouble(x2, y2);
+                  if (!m_Grid.isNoDataValue(dClass)) {
+                     iClass = (int) dClass;
+                     if (m_IsCellAlreadyVisited[x2][y2] == false) {
+                        if (iInitClass == iClass) {
+                           m_IsCellAlreadyVisited[x2][y2] = true;
+                           adjPoints.add(new Point(x2, y2));
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+
+      }
+
+      return dArea;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/classStatistics/ClassStatisticsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/PatchInfo.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/PatchInfo.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/PatchInfo.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.gridCategorical.fragstatsDiversity;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+public class PatchInfo {
+
+   private final int          m_iClass;
+   private int          m_iCells;
+   private final IRasterLayer m_Window;
+
+
+   public int getClassID() {
+
+      return m_iClass;
+
+   }
+
+
+   public PatchInfo(final int iClass,
+                    final IRasterLayer window) {
+
+      m_iClass = iClass;
+      m_Window = window;
+      m_iCells = 0;
+
+   }
+
+
+   public void addCell() {
+
+      m_iCells++;
+
+   }
+
+
+   public double getArea() {
+
+      return m_Window.getWindowCellSize() * m_Window.getWindowCellSize() * m_iCells;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/PatchInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/ClassInfo.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/ClassInfo.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/ClassInfo.java	(revision 369)
@@ -0,0 +1,56 @@
+package es.unex.sextante.gridCategorical.fragstatsDiversity;
+
+public class ClassInfo {
+
+   private double m_dArea    = 0;
+   private int    m_iPatches = 0;
+   private double m_dTotalLandscapeArea;
+
+
+   public ClassInfo() {}
+
+
+   public void setTotalLandscapeArea(final double dArea) {
+
+      m_dTotalLandscapeArea = dArea;
+
+   }
+
+
+   public void add(final PatchInfo info) {
+
+      m_iPatches++;
+      m_dArea += info.getArea();
+
+
+   }
+
+
+   public double getTotalArea() {
+
+      return m_dArea;
+
+   }
+
+
+   public double getPercentageOfLandscape() {
+
+      return m_dArea / m_dTotalLandscapeArea * 100;
+
+   }
+
+
+   public int getPatchesCount() {
+
+      return m_iPatches;
+
+   }
+
+
+   public double getPatchDensity() {
+
+      return m_iPatches / m_dTotalLandscapeArea * 100;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/ClassInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/FragstatsDiversityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/FragstatsDiversityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/FragstatsDiversityAlgorithm.java	(revision 369)
@@ -0,0 +1,228 @@
+package es.unex.sextante.gridCategorical.fragstatsDiversity;
+
+import java.awt.Point;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+;
+
+public class FragstatsDiversityAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METRICS      = "METRICS";
+   public static final String INPUT        = "INPUT";
+   public static final String MAX          = "MAX";
+
+   private final int          m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final int          m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private int                m_iNX, m_iNY;
+   private int                m_iMax;
+   private double             m_dLandscapeArea;
+   private IRasterLayer       m_Grid;
+   private IRasterLayer       m_Visited;
+   private ArrayList          m_Patches;
+   private HashMap            m_Classes;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Fragstats__diversity_metrics"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(MAX, Sextante.getText("Maximum_number_of_different_classes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 0, Integer.MAX_VALUE);
+         addOutputText(METRICS, Sextante.getText("Metrics"), null);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      byte value;
+      int x, y;
+      Integer ClassID;
+      PatchInfo patchInfo;
+      ClassInfo classInfo;
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_iMax = m_Parameters.getParameterValueAsInt(MAX);
+
+      m_Grid.setFullExtent();
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      m_Patches = new ArrayList();
+      m_Classes = new HashMap();
+
+      m_Visited = this.getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Grid.getWindowGridExtent());
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            value = m_Visited.getCellValueAsByte(x, y);
+            if (value == 0) {
+               patchInfo = analysePatch(x, y);
+               if (patchInfo != null) {
+                  m_Patches.add(patchInfo);
+                  ClassID = new Integer(patchInfo.getClassID());
+                  classInfo = (ClassInfo) m_Classes.get(ClassID);
+                  if (classInfo == null) {
+                     classInfo = new ClassInfo();
+                     classInfo.add(patchInfo);
+                     m_Classes.put(ClassID, classInfo);
+                  }
+                  else {
+                     classInfo.add(patchInfo);
+                  }
+                  m_dLandscapeArea += patchInfo.getArea();
+               }
+            }
+         }
+
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         createOutput();
+         return true;
+      }
+
+   }
+
+
+   private void createOutput() {
+
+      Integer Class;
+      final HTMLDoc doc = new HTMLDoc();
+      ClassInfo classInfo;
+      final DecimalFormat df = new DecimalFormat("##.##");
+      double dPercentage;
+      double dShannon = 0;
+      double dSimpson = 0;
+      double dSimpsonMod = 0;
+      double dShannonEvenness;
+      double dSimpsonEvenness;
+      double dSimpsonEvennessMod;
+
+      final Set set = m_Classes.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         Class = (Integer) iter.next();
+         classInfo = (ClassInfo) m_Classes.get(Class);
+         classInfo.setTotalLandscapeArea(m_dLandscapeArea);
+         dPercentage = classInfo.getPercentageOfLandscape();
+         dShannon -= (dPercentage * Math.log(dPercentage));
+         dSimpson += (dPercentage * dPercentage);
+      }
+
+      dSimpsonMod = -Math.log(dSimpson);
+      dSimpson = 1 - dSimpson;
+      dShannonEvenness = dShannon / Math.log(m_iMax);
+      dSimpsonEvenness = dSimpson / (1 - (1 / (double) m_iMax));
+      dSimpsonEvennessMod = dSimpsonMod / Math.log(m_iMax);
+
+      doc.open(Sextante.getText("Diversity_metrics"));
+      doc.addHeader(Sextante.getText("Diversity_metrics"), 1);
+      doc.addHeader(Sextante.getText("Landscape_metrics"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Richness") + ": " + Integer.toString(m_Classes.size()));
+      doc.addListElement(Sextante.getText("Patch_Richness_Density") + ": "
+                         + df.format(m_Classes.size() * 10000. * 100. / m_dLandscapeArea));
+      doc.addListElement(Sextante.getText("Relative_richness") + ": " + df.format(m_Classes.size() / (double) m_iMax * 100));
+      doc.addListElement(Sextante.getText("Shannon_index") + ": " + df.format(dShannon));
+      doc.addListElement(Sextante.getText("Simpson_index") + ": " + df.format(dSimpson));
+      doc.addListElement(Sextante.getText("Modified_Simpson_index") + ": " + df.format(dSimpsonMod));
+      doc.addListElement(Sextante.getText("Shannon_uniformity_index") + ": " + df.format(dShannonEvenness));
+      doc.addListElement(Sextante.getText("Simpson_uniformity_index") + ": " + df.format(dSimpsonEvenness));
+      doc.addListElement(Sextante.getText("Modified_Simpson_uniformity_index") + ": " + df.format(dSimpsonEvennessMod));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(METRICS, Sextante.getText("Metrics") + "[" + m_Grid.getName() + "]", doc.getHTMLCode());
+
+   }
+
+
+   private PatchInfo analysePatch(int x,
+                                  int y) {
+
+      int x2, y2;
+      int iInitClass;
+      int iPt;
+      int n;
+      int iClass;
+      byte visited;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+      PatchInfo info;
+      iInitClass = m_Grid.getCellValueAsInt(x, y);
+
+      if (m_Grid.isNoDataValue(iInitClass)) {
+         return null;
+      }
+
+      centralPoints.add(new Point(x, y));
+
+      info = new PatchInfo(iInitClass, m_Grid);
+
+      while (centralPoints.size() != 0) {
+         //int iout = 0;
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            iClass = m_Grid.getCellValueAsInt(x, y);
+            if (!m_Grid.isNoDataValue(iClass)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  iClass = m_Grid.getCellValueAsInt(x2, y2);
+                  if (!m_Grid.isNoDataValue(iClass)) {
+                     visited = m_Visited.getCellValueAsByte(x2, y2);
+                     if (visited != 1) {
+                        if (iInitClass == iClass) {
+                           m_Visited.setCellValue(x2, y2, 1);
+                           info.addCell();
+                           adjPoints.add(new Point(x2, y2));
+                        }
+                     }
+                  }
+               }
+            }
+         }
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+      }
+
+
+      return info;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/fragstatsDiversity/FragstatsDiversityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualAmplitude/ReclassifyEqualAmplitudeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualAmplitude/ReclassifyEqualAmplitudeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualAmplitude/ReclassifyEqualAmplitudeAlgorithm.java	(revision 369)
@@ -0,0 +1,84 @@
+package es.unex.sextante.gridCategorical.reclassifyEqualAmplitude;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ReclassifyEqualAmplitudeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String CLASSCOUNT = "CLASSCOUNT";
+   public static final String RECLASS    = "RECLASS";
+   public static final String INPUT      = "INPUT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Divide_into_n_classes_of_equal_amplitude"));
+      setGroup(Sextante.getText("Reclassify_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(CLASSCOUNT, Sextante.getText("Number_of_classes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 2, Integer.MAX_VALUE);
+         addOutputRasterLayer(RECLASS, Sextante.getText("Reclassify"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iClass;
+      double dValue;
+      double dClassAmplitude;
+
+      final IRasterLayer grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final int iClasses = m_Parameters.getParameterValueAsInt(CLASSCOUNT);
+
+      final IRasterLayer result = getNewRasterLayer(RECLASS, grid.getName() + Sextante.getText("[reclassified]"),
+               IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      grid.setWindowExtent(result.getWindowGridExtent());
+
+      final double dMax = grid.getMaxValue();
+      final double dMin = grid.getMinValue();
+
+      if (dMax != dMin) {
+         dClassAmplitude = (dMax - dMin) / iClasses;
+
+         iNX = grid.getNX();
+         iNY = grid.getNY();
+
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dValue = grid.getCellValueAsDouble(x, y);
+               if (!grid.isNoDataValue(dValue)) {
+                  iClass = (int) Math.floor(Math.min((dValue - dMin) / dClassAmplitude, iClasses - 1));
+                  result.setCellValue(x, y, iClass + 1);
+               }
+               else {
+                  result.setNoData(x, y);
+               }
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualAmplitude/ReclassifyEqualAmplitudeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassify/ReclassifyAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassify/ReclassifyAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassify/ReclassifyAlgorithm.java	(revision 369)
@@ -0,0 +1,126 @@
+package es.unex.sextante.gridCategorical.reclassify;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.FixedTableModel;
+
+
+public class ReclassifyAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT                      = "INPUT";
+   public static final String METHOD                     = "METHOD";
+   public static final String RECLASS                    = "RECLASS";
+   public static final String LUT                        = "LUT";
+
+   public static final int    METHOD_LOWER_THAN          = 0;
+   public static final int    METHOD_LOWER_THAN_OR_EQUAL = 1;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sColumnNames = { Sextante.getText("Min_value"), Sextante.getText("Max_value"), Sextante.getText("New_value") };
+      final String[] sMethod = { "Min < x < Max", "Min < x <= Max" };
+
+      this.setName(Sextante.getText("Reclassify"));
+      setGroup(Sextante.getText("Reclassify_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer_to_reclassify"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addFixedTable(LUT, Sextante.getText("Look-up_table"), sColumnNames, 1, false);
+         addOutputRasterLayer(RECLASS, Sextante.getText("Reclassify"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iNX, iNY;
+      int iMethod;
+      double dCellValue;
+      double dMinValue, dMaxValue, dNewValue;
+      boolean bClassGroupNotFound = false;
+      IRasterLayer grid;
+
+      grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+
+      final IRasterLayer result = getNewRasterLayer(RECLASS, grid.getName() + Sextante.getText("[reclassified]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final FixedTableModel lut = (FixedTableModel) m_Parameters.getParameterValueAsObject(LUT);
+
+      grid.setWindowExtent(result.getWindowGridExtent());
+      grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      iNX = grid.getNX();
+      iNY = grid.getNY();
+
+      if (iMethod == 0) {
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dCellValue = grid.getCellValueAsDouble(x, y);
+               for (i = 0; i < lut.getRowCount(); i++) {
+                  dMinValue = Double.parseDouble(lut.getValueAt(i, 0).toString());
+                  if (dCellValue > dMinValue) {
+                     dMaxValue = Double.parseDouble(lut.getValueAt(i, 1).toString());
+                     if (dCellValue < dMaxValue) {
+                        dNewValue = Double.parseDouble(lut.getValueAt(i, 2).toString());
+                        result.setCellValue(x, y, dNewValue);
+                        break;
+                     }
+                  }
+               }
+               if (i >= lut.getRowCount()) {
+                  result.setCellValue(x, y, dCellValue);
+                  bClassGroupNotFound = true;
+               }
+            }
+         }
+      }
+      else {
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dCellValue = grid.getCellValueAsDouble(x, y);
+               for (i = 0; i < lut.getRowCount(); i++) {
+                  dMinValue = Double.parseDouble(lut.getValueAt(i, 0).toString());
+                  if (dCellValue > dMinValue) {
+                     dMaxValue = Double.parseDouble(lut.getValueAt(i, 1).toString());
+                     if (dCellValue <= dMaxValue) {
+                        dNewValue = Double.parseDouble(lut.getValueAt(i, 2).toString());
+                        result.setCellValue(x, y, dNewValue);
+                        break;
+                     }
+                  }
+               }
+               if (i >= lut.getRowCount()) {
+                  result.setCellValue(x, y, dCellValue);
+                  bClassGroupNotFound = true;
+               }
+            }
+            setProgress(y, iNY);
+         }
+      }
+
+      if (bClassGroupNotFound) {
+         Sextante.addWarningToLog(Sextante.getText("ClassGroupNotFound"));
+      }
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassify/ReclassifyAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/combineGrids/CombineGridsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/combineGrids/CombineGridsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/combineGrids/CombineGridsAlgorithm.java	(revision 369)
@@ -0,0 +1,96 @@
+package es.unex.sextante.gridCategorical.combineGrids;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.FixedTableModel;
+
+public class CombineGridsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String GRID   = "GRID";
+   public static final String GRID2  = "GRID2";
+   public static final String RESULT = "RESULT";
+   public static final String LUT    = "LUT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sColumnNames = { Sextante.getText("Valor_in_grid_1"), Sextante.getText("Valor_in_grid_2"),
+               Sextante.getText("New_value") };
+
+      setName(Sextante.getText("Combine_grids"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Grid_1"), true);
+         m_Parameters.addInputRasterLayer(GRID2, Sextante.getText("Grid_2"), true);
+         m_Parameters.addFixedTable(LUT, Sextante.getText("Look-up_table"), sColumnNames, 1, false);
+         addOutputRasterLayer(RESULT, Sextante.getText("Grid_combination"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iNX, iNY;
+      double dCellValue, dCellValue2;
+      double dTableValue, dTableValue2;
+      double dValue;
+
+      final IRasterLayer grid = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      final IRasterLayer grid2 = m_Parameters.getParameterValueAsRasterLayer(GRID2);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, grid.getName() + " + " + grid2.getName(),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final FixedTableModel lut = (FixedTableModel) m_Parameters.getParameterValueAsObject(LUT);
+
+      grid.setWindowExtent(result.getWindowGridExtent());
+      grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      grid2.setWindowExtent(result.getWindowGridExtent());
+      grid2.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      iNX = grid.getNX();
+      iNY = grid.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dCellValue = grid.getCellValueAsDouble(x, y);
+            dCellValue2 = grid2.getCellValueAsDouble(x, y);
+            for (i = 0; i < lut.getRowCount(); i++) {
+               dTableValue = Double.parseDouble(lut.getValueAt(i, 0).toString());
+               if (dTableValue == dCellValue) {
+                  dTableValue2 = Double.parseDouble(lut.getValueAt(i, 1).toString());
+                  if (dTableValue2 == dCellValue2) {
+                     dValue = Double.parseDouble(lut.getValueAt(i, 2).toString());
+                     result.setCellValue(x, y, dValue);
+                     break;
+                  }
+               }
+            }
+            if (i >= lut.getRowCount()) {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/combineGrids/CombineGridsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/crossClassification/CrossClassificationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/crossClassification/CrossClassificationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/crossClassification/CrossClassificationAlgorithm.java	(revision 369)
@@ -0,0 +1,206 @@
+package es.unex.sextante.gridCategorical.crossClassification;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CrossClassificationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String KAPPA      = "KAPPA";
+   public static final String CROSSCLASS = "CROSCLASS";
+   public static final String GRID       = "GRID";
+   public static final String GRID2      = "GRID2";
+   public static final String TABLE      = "TABLE";
+
+   int                        m_iNX, m_iNY;
+   HashMap                    m_Map;
+   ArrayList                  m_List;
+   IRasterLayer               m_Window, m_Window2;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cross_checking_Kappa_index"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Grid_1"), true);
+         m_Parameters.addInputRasterLayer(GRID2, Sextante.getText("Grid_2"), true);
+         addOutputTable(TABLE, Sextante.getText("Cross_classification"));
+         addOutputRasterLayer(CROSSCLASS, Sextante.getText("Cross_classification"));
+         addOutputText(KAPPA, Sextante.getText("Cross_classification"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int x, y;
+      int iValueCount;
+      int iCellValue, iCellValue2;
+      int iClass, iClass2;
+      int iValidCells = 0;
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      m_Window2 = m_Parameters.getParameterValueAsRasterLayer(GRID2);
+
+      final IRasterLayer result = getNewRasterLayer(CROSSCLASS, m_Window.getName() + " + " + m_Window2.getName(),
+               IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Window.setWindowExtent(result.getWindowGridExtent());
+      m_Window.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      m_Window2.setWindowExtent(result.getWindowGridExtent());
+      m_Window2.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      createMap();
+      iValueCount = m_Map.size();
+
+      final int[][] table = new int[iValueCount][iValueCount];
+      final int iSum[] = new int[iValueCount];
+      final int iSum2[] = new int[iValueCount];
+
+      for (i = 0; i < iValueCount; i++) {
+         iSum[i] = 0;
+         iSum2[i] = 0;
+         for (j = 0; j < iValueCount; j++) {
+            table[i][j] = 0;
+         }
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            iCellValue = m_Window.getCellValueAsInt(x, y);
+            iCellValue2 = m_Window2.getCellValueAsInt(x, y);
+            if (!m_Window.isNoDataValue(iCellValue) && !m_Window2.isNoDataValue(iCellValue2)) {
+               iClass = ((Integer) m_Map.get(new Integer(iCellValue))).intValue();
+               iClass2 = ((Integer) m_Map.get(new Integer(iCellValue2))).intValue();
+               result.setCellValue(x, y, iClass * iValueCount + iClass2);
+               table[iClass][iClass2]++;
+               iValidCells++;
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      for (i = 0; i < iValueCount; i++) {
+         for (j = 0; j < iValueCount; j++) {
+            iSum[i] += table[i][j];
+            iSum2[j] += table[i][j];
+         }
+      }
+
+      double dP0 = 0, dPc = 0, dPi, dPi2, dPi3;;
+      final double dPartialKappa[] = new double[iValueCount];
+
+      for (i = 0; i < iValueCount; i++) {
+         dP0 += table[i][i];
+         dPc += (iSum[i] * iSum2[i]);
+         dPi = table[i][i] / (double) iValidCells;
+         dPi2 = iSum[i] / (double) iValidCells;
+         dPi3 = iSum2[i] / (double) iValidCells;
+         dPartialKappa[i] = (dPi - dPi2 * dPi3) / (dPi2 - dPi2 * dPi3);
+      }
+      dP0 /= iValidCells;
+      dPc /= (iValidCells * iValidCells);
+
+      final double dKappa = (dP0 - dPc) / (1 - dPc);
+
+      final DecimalFormat df = new DecimalFormat("##.##");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Index_of_agreement"));
+      doc.addHeader(Sextante.getText("Index_of_agreement"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Global_kappa") + ": " + df.format(dKappa));
+      for (i = 0; i < iValueCount; i++) {
+         doc.addListElement(Sextante.getText("Kappa_for_class") + ": " + Integer.toString(i) + ": " + df.format(dPartialKappa[i]));
+      }
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(KAPPA, Sextante.getText("Index_of_agreement") + "[" + m_Window.getName() + "-" + m_Window2.getName() + "]",
+               doc.getHTMLCode());
+
+      final String sTableName = Sextante.getText("Cross_checking");
+      final String sFields[] = new String[iValueCount];
+      final Class types[] = new Class[iValueCount];
+      for (i = 0; i < iValueCount; i++) {
+         sFields[i] = (String) m_List.get(i);
+         types[i] = Double.class;
+      }
+      final ITable outputTable = getNewTable(TABLE, sTableName, types, sFields);
+      final Object[] values = new Object[iValueCount];
+      for (i = 0; i < iValueCount; i++) {
+         for (j = 0; j < iValueCount; j++) {
+            values[j] = new Double(table[i][j]);
+         }
+         outputTable.addRecord(values);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createMap() {
+
+      int iCellValue;
+      int x, y;
+      m_Map = new HashMap();
+      m_List = new ArrayList();
+      Integer iClass, iID;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            iCellValue = m_Window.getCellValueAsInt(x, y);
+            if (!m_Window.isNoDataValue(iCellValue)) {
+               iClass = new Integer(iCellValue);
+               if (!m_Map.containsKey(iClass)) {
+                  iID = new Integer(m_Map.size());
+                  m_Map.put(iClass, iID);
+                  m_List.add(iClass.toString());
+               }
+            }
+            iCellValue = m_Window2.getCellValueAsInt(x, y);
+            if (!m_Window2.isNoDataValue(iCellValue)) {
+               iClass = new Integer(iCellValue);
+               if (!m_Map.containsKey(iClass)) {
+                  iID = new Integer(m_Map.size());
+                  m_Map.put(iClass, iID);
+                  m_List.add(iClass.toString());
+               }
+            }
+         }
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/crossClassification/CrossClassificationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualArea/ReclassifyEqualAreaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualArea/ReclassifyEqualAreaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualArea/ReclassifyEqualAreaAlgorithm.java	(revision 369)
@@ -0,0 +1,109 @@
+package es.unex.sextante.gridCategorical.reclassifyEqualArea;
+
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class ReclassifyEqualAreaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT     = "INPUT";
+   public static final String CLASSAREA = "CLASSAREA";
+   public static final String RECLASS   = "RECLASS";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Divide_into_n_classes_of_equal_area"));
+      setGroup(Sextante.getText("Reclassify_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(CLASSAREA, Sextante.getText("Class_area_[cells]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 2, Integer.MAX_VALUE);
+         addOutputRasterLayer(RECLASS, Sextante.getText("Reclassify"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCell;
+      int iClassArea;
+      GridCell cell;
+
+      final IRasterLayer grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      iClassArea = m_Parameters.getParameterValueAsInt(CLASSAREA);
+
+      final IRasterLayer result = getNewRasterLayer(RECLASS, grid.getName() + Sextante.getText("[reclassified]"),
+               IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      grid.setWindowExtent(getAnalysisExtent());
+
+      final GridCell[] cells = getSortedArrayOfCells(grid);
+
+      result.assignNoData();
+
+      iCell = 0;
+
+      for (i = 0; i < cells.length; i++) {
+         cell = cells[i];
+         if (!grid.isNoDataValue(cell.getValue())) {
+            final int iValue = (iCell / iClassArea);
+            result.setCellValue(cell.getX(), cell.getY(), iValue);
+            if (!setProgress(iCell, cells.length)) {
+               return false;
+            }
+            iCell++;
+         }
+         else {
+            result.setNoData(cell.getX(), cell.getY());
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   public GridCell[] getSortedArrayOfCells(final IRasterLayer layer) {
+
+      int i;
+      int iX, iY;
+      final int iNX = layer.getNX();
+      final int iCells = layer.getNX() * layer.getNY();
+      GridCell[] cells;
+      GridCell cell;
+
+      cells = new GridCell[iCells];
+
+      for (i = 0; i < iCells; i++) {
+         iX = i % iNX;
+         iY = i / iNX;
+         cell = new GridCell(iX, iY, layer.getCellValueAsDouble(iX, iY));
+         cells[i] = cell;
+      }
+
+      Arrays.sort(cells);
+
+      return cells;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridCategorical/reclassifyEqualArea/ReclassifyEqualAreaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/leastCostPath/LeastCostPathAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/leastCostPath/LeastCostPathAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/leastCostPath/LeastCostPathAlgorithm.java	(revision 369)
@@ -0,0 +1,167 @@
+package es.unex.sextante.profiles.leastCostPath;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.profiles.profile.ProfileAlgorithm;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class LeastCostPathAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[]  = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]  = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String GRAPH         = "GRAPH";
+   public static final String PROFILEPOINTS = "PROFILEPOINTS";
+   public static final String POINT         = "POINT";
+   public static final String LAYERS        = "LAYERS";
+   public static final String ACCCOST       = "ACCCOST";
+   public static final String PROFILELINE   = "PROFILELINE";
+
+   private IRasterLayer       m_Cost;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iDirection;
+      boolean bContinue = true;
+      final String sNames[] = { "ID" };
+      final Class types[] = { Integer.class };
+      final Object[] value = new Object[1];
+
+      final ArrayList layers = m_Parameters.getParameterValueAsArrayList(LAYERS);
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(ACCCOST);
+      Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      m_Cost.setFullExtent();
+      final AnalysisExtent extent = m_Cost.getWindowGridExtent();
+      final GridCell cell = extent.getGridCoordsFromWorldCoords(pt);
+      final ArrayList coords = new ArrayList();
+      coords.add(new Coordinate(pt.getX(), pt.getY()));
+
+      do {
+         iDirection = getDirToNextDownslopeCell(cell.getX(), cell.getY());
+         if (iDirection >= 0) {
+            cell.setX(cell.getX() + m_iOffsetX[iDirection]);
+            cell.setY(cell.getY() + m_iOffsetY[iDirection]);
+            pt = extent.getWorldCoordsFromGridCoords(cell);
+            coords.add(new Coordinate(pt.getX(), pt.getY()));
+         }
+         else {
+            bContinue = false;
+         }
+      }
+      while (bContinue && !m_Task.isCanceled());
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      if (coords.size() > 1) {
+         final IVectorLayer lines = getNewVectorLayer(PROFILELINE, Sextante.getText("Profile"), IVectorLayer.SHAPE_TYPE_LINE,
+                  types, sNames);
+         value[0] = new Double(1);
+         final GeometryFactory gf = new GeometryFactory();
+         final Coordinate[] coordinates = new Coordinate[coords.size()];
+         for (int i = 0; i < coordinates.length; i++) {
+            coordinates[i] = (Coordinate) coords.get(i);
+         }
+         final LineString line = gf.createLineString(coordinates);
+         lines.addFeature(line, value);
+         try {
+            lines.postProcess();//we have to do this to use this as input
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+         final ProfileAlgorithm profile = new ProfileAlgorithm();
+         profile.getParameters().getParameter(ProfileAlgorithm.DEM).setParameterValue(m_Cost);
+         profile.getParameters().getParameter(ProfileAlgorithm.LAYERS).setParameterValue(layers);
+         profile.getParameters().getParameter(ProfileAlgorithm.ROUTE).setParameterValue(lines);
+         final OutputObjectsSet outputs = profile.getOutputObjects();
+         outputs.getOutput(ProfileAlgorithm.PROFILEPOINTS).setOutputChannel(getOutputChannel(PROFILEPOINTS));
+         if (profile.execute(m_Task, m_OutputFactory)) {
+            final IVectorLayer profilePts = (IVectorLayer) outputs.getOutput(ProfileAlgorithm.PROFILEPOINTS).getOutputObject();
+            m_OutputObjects.getOutput(PROFILEPOINTS).setOutputObject(profilePts);
+         }
+         else {
+            return false;
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException("zero lines in layer");
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Least_cost_path"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), true);
+         m_Parameters.addMultipleInput(LAYERS, Sextante.getText("Additional_layers"),
+                  AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+         m_Parameters.addPoint(POINT, Sextante.getText("Starting_point"));
+         addOutputVectorLayer(PROFILEPOINTS, Sextante.getText("Route_[points]"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputVectorLayer(PROFILELINE, Sextante.getText("Route_[line]"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public int getDirToNextDownslopeCell(final int x,
+                                        final int y) {
+
+      int i, iDir;
+      double z, z2, dSlope, dMaxSlope;
+
+      z = m_Cost.getCellValueAsDouble(x, y);
+
+      if (m_Cost.isNoDataValue(z)) {
+         return -1;
+      }
+
+      dMaxSlope = 0.0;
+      for (iDir = -1, i = 0; i < 8; i++) {
+         z2 = m_Cost.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+         if (!m_Cost.isNoDataValue(z2)) {
+            dSlope = (z - z2) / m_Cost.getDistToNeighborInDir(i);
+            if (dSlope > dMaxSlope) {
+               iDir = i;
+               dMaxSlope = dSlope;
+            }
+         }
+      }
+
+      return iDir;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/leastCostPath/LeastCostPathAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/flowLineProfile/FlowLineProfileAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/flowLineProfile/FlowLineProfileAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/flowLineProfile/FlowLineProfileAlgorithm.java	(revision 369)
@@ -0,0 +1,140 @@
+package es.unex.sextante.profiles.flowLineProfile;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import org.jfree.chart.ChartPanel;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.profiles.profile.ProfileAlgorithm;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class FlowLineProfileAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[]  = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]  = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String GRAPH         = "GRAPH";
+   public static final String PROFILEPOINTS = "PROFILEPOINTS";
+   public static final String POINT         = "POINT";
+   public static final String LAYERS        = "LAYERS";
+   public static final String DEM           = "DEM";
+   public static final String PROFILELINE   = "PROFILELINE";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iDirection;
+      boolean bContinue = true;
+      final String sNames[] = { "ID" };
+      final Class types[] = { Integer.class };
+      final Object[] value = new Object[1];
+
+      final ArrayList layers = m_Parameters.getParameterValueAsArrayList(LAYERS);
+      final IRasterLayer dem = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      dem.setFullExtent();
+      final AnalysisExtent extent = dem.getWindowGridExtent();
+      final GridCell cell = extent.getGridCoordsFromWorldCoords(pt);
+      final ArrayList coords = new ArrayList();
+      coords.add(new Coordinate(pt.getX(), pt.getY()));
+
+      do {
+         iDirection = dem.getDirToNextDownslopeCell(cell.getX(), cell.getY(), false);
+         if (iDirection >= 0) {
+            cell.setX(cell.getX() + m_iOffsetX[iDirection]);
+            cell.setY(cell.getY() + m_iOffsetY[iDirection]);
+            pt = extent.getWorldCoordsFromGridCoords(cell);
+            coords.add(new Coordinate(pt.getX(), pt.getY()));
+         }
+         else {
+            bContinue = false;
+         }
+      }
+      while (bContinue && !m_Task.isCanceled());
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      if (coords.size() > 1) {
+         final IVectorLayer lines = getNewVectorLayer(PROFILELINE, Sextante.getText("Profile"), IVectorLayer.SHAPE_TYPE_LINE,
+                  types, sNames);
+         value[0] = new Double(1);
+         final GeometryFactory gf = new GeometryFactory();
+         final Coordinate[] coordinates = new Coordinate[coords.size()];
+         for (int i = 0; i < coordinates.length; i++) {
+            coordinates[i] = (Coordinate) coords.get(i);
+         }
+         final LineString line = gf.createLineString(coordinates);
+         lines.addFeature(line, value);
+         try {
+            lines.postProcess();//we have to do this to use this layer as input
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+         final ProfileAlgorithm profile = new ProfileAlgorithm();
+         profile.getParameters().getParameter(ProfileAlgorithm.DEM).setParameterValue(dem);
+         profile.getParameters().getParameter(ProfileAlgorithm.LAYERS).setParameterValue(layers);
+         profile.getParameters().getParameter(ProfileAlgorithm.ROUTE).setParameterValue(lines);
+         final OutputObjectsSet outputs = profile.getOutputObjects();
+         outputs.getOutput(ProfileAlgorithm.PROFILEPOINTS).setOutputChannel(getOutputChannel(PROFILEPOINTS));
+         if (profile.execute(m_Task, m_OutputFactory)) {
+            final IVectorLayer profilePts = (IVectorLayer) outputs.getOutput(ProfileAlgorithm.PROFILEPOINTS).getOutputObject();
+            m_OutputObjects.getOutput(PROFILEPOINTS).setOutputObject(profilePts);
+            final ChartPanel cp = (ChartPanel) outputs.getOutput(ProfileAlgorithm.GRAPH).getOutputObject();
+            m_OutputObjects.getOutput(GRAPH).setOutputObject(cp);
+         }
+         else {
+            return false;
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException("zero lines in layer");
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Flow_line_profile"));
+      setGroup(Sextante.getText("Profiles"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addMultipleInput(LAYERS, Sextante.getText("Additional_layers"),
+                  AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+         m_Parameters.addPoint(POINT, Sextante.getText("Starting_point"));
+         addOutputVectorLayer(PROFILEPOINTS, Sextante.getText("Profile_[points]"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputVectorLayer(PROFILELINE, Sextante.getText("Profile_[line]"), OutputVectorLayer.SHAPE_TYPE_LINE);
+         addOutputChart(GRAPH, Sextante.getText("Profile"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/flowLineProfile/FlowLineProfileAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/profile/ProfileAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/profile/ProfileAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/profile/ProfileAlgorithm.java	(revision 369)
@@ -0,0 +1,253 @@
+
+
+package es.unex.sextante.profiles.profile;
+
+import java.util.ArrayList;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class ProfileAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ROUTE         = "ROUTE";
+   public static final String DEM           = "DEM";
+   public static final String LAYERS        = "LAYERS";
+   public static final String PROFILEPOINTS = "PROFILEPOINTS";
+   public static final String GRAPH         = "GRAPH";
+   public static final String INTERPOLATE   = "INTERPOLATE";
+
+   private IVectorLayer       m_Profile;
+   private IRasterLayer       m_DEM;
+   private IRasterLayer       m_Layer[];
+   private double             m_dDist       = 0, m_dHorzDist = 0;
+   private double             m_dLastX, m_dLastY, m_dLastZ;
+   private int                m_iPoints     = 0;
+   private XYSeries           serie;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      Class types[];
+      String sFieldNames[];
+      final XYSeriesCollection dataset = new XYSeriesCollection();
+      serie = new XYSeries(Sextante.getText("Profile"));
+      dataset.addSeries(serie);
+
+      boolean bInterpolate = m_Parameters.getParameterValueAsBoolean(INTERPOLATE);
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(ROUTE);
+
+      if (lines.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Zero_lines_in_layer"));
+      }
+
+      final ArrayList layers = m_Parameters.getParameterValueAsArrayList(LAYERS);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+      if (!bInterpolate) {
+         m_DEM.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      }
+      final AnalysisExtent extent = m_DEM.getWindowGridExtent();
+
+      m_Layer = new IRasterLayer[layers.size()];
+      for (i = 0; i < layers.size(); i++) {
+         m_Layer[i] = (IRasterLayer) layers.get(i);
+         m_Layer[i].setWindowExtent(extent);
+         if (!bInterpolate) {
+            m_Layer[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+         }
+      }
+
+      sFieldNames = new String[layers.size() + 5];
+      sFieldNames[0] = "X";
+      sFieldNames[1] = "Y";
+      sFieldNames[2] = "Z";
+      sFieldNames[3] = Sextante.getText("ProjDist");
+      sFieldNames[4] = Sextante.getText("RealDist");
+      for (i = 0; i < layers.size(); i++) {
+         sFieldNames[i + 5] = m_Layer[i].getName();
+      }
+
+      types = new Class[layers.size() + 5];
+      for (i = 0; i < types.length; i++) {
+         types[i] = Double.class;
+      }
+
+      m_Profile = getNewVectorLayer(PROFILEPOINTS, Sextante.getText("Profile_[points]"), IVectorLayer.SHAPE_TYPE_POINT, types,
+               sFieldNames);
+
+      final IFeatureIterator iterator = lines.iterator();
+      final Geometry line = iterator.next().getGeometry().getGeometryN(0);
+      processLine(line);
+      iterator.close();
+
+      final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, true,
+               true);
+
+      final ChartPanel jPanelChart = new ChartPanel(chart);
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart(GRAPH, Sextante.getText("Profile"), jPanelChart);
+
+      return true;
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Profile"));
+      setGroup(Sextante.getText("Profiles"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputVectorLayer(ROUTE, Sextante.getText("Profile_route"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+                  true);
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addMultipleInput(LAYERS, Sextante.getText("Additional_layers"),
+                  AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+         m_Parameters.addBoolean(INTERPOLATE, Sextante.getText("Use_interpolation"), false);
+         addOutputVectorLayer(PROFILEPOINTS, Sextante.getText("Profile_[points]"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputChart(GRAPH, Sextante.getText("Profile"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void processLine(final Geometry line) {
+
+      double x, y, x2, y2;
+      final Coordinate[] coords = line.getCoordinates();
+
+      for (int i = 0; (i < coords.length - 1) && setProgress(i, coords.length - 1); i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         processSegment(x, y, x2, y2);
+      }
+
+   }
+
+
+   private void processSegment(double x,
+                               double y,
+                               final double x2,
+                               final double y2) {
+
+      double dx, dy, d, n;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_DEM.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_DEM.getWindowCellSize();
+         }
+         else {
+            dy /= m_DEM.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_DEM.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            addPoint(x, y);
+         }
+      }
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+      int i;
+      double z;
+      double dDX, dDY, dDZ;
+      double dValue;
+      final Object values[] = new Object[m_Layer.length + 5];
+
+      z = m_DEM.getValueAt(x, y);
+
+      if (m_iPoints == 0) {
+         m_dDist = 0.0;
+         m_dHorzDist = 0.0;
+      }
+      else {
+         dDX = x - m_dLastX;
+         dDY = y - m_dLastY;
+         if (m_DEM.isNoDataValue(z) || m_DEM.isNoDataValue(m_dLastZ)) {
+            dDZ = 0.0;
+         }
+         else {
+            dDZ = z - m_dLastZ;
+         }
+         m_dDist += Math.sqrt(dDX * dDX + dDY * dDY);
+         m_dHorzDist += Math.sqrt(dDX * dDX + dDY * dDY + dDZ * dDZ);
+      }
+
+      m_dLastX = x;
+      m_dLastY = y;
+      m_dLastZ = z;
+      m_iPoints++;
+
+      final Point geometry = new GeometryFactory().createPoint(new Coordinate(x, y));
+      values[0] = new Double(x);
+      values[1] = new Double(y);
+      values[2] = new Double(z);
+      values[3] = new Double(m_dDist);
+      values[4] = new Double(m_dHorzDist);
+      for (i = 0; i < m_Layer.length; i++) {
+         dValue = m_Layer[i].getValueAt(x, y);
+         values[i + 5] = new Double(dValue);
+      }
+      if (!m_DEM.isNoDataValue(z)) {
+         serie.add(m_dDist, z);
+      }
+      m_Profile.addFeature(geometry, values);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/profile/ProfileAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/crossSections/CrossSectionsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/crossSections/CrossSectionsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/crossSections/CrossSectionsAlgorithm.java	(revision 369)
@@ -0,0 +1,223 @@
+
+
+package es.unex.sextante.profiles.crossSections;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class CrossSectionsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT    = "RESULT";
+   public static final String NUMPOINTS = "NUMPOINTS";
+   public static final String WIDTH     = "WIDTH";
+   public static final String DISTANCE  = "DISTANCE";
+   public static final String DEM       = "DEM";
+   public static final String ROUTE     = "ROUTE";
+
+   private IVectorLayer       m_Lines;
+   private IVectorLayer       m_Result;
+   private IRasterLayer       m_DEM;
+   private double             m_dStepX, m_dStepY;
+   private double             m_dDistance;
+   private double             m_dInterval;
+   private double             m_dSectionWidth;
+   private int                m_iPointsInSection;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      Class types[];
+      String sFieldNames[];
+
+      m_Lines = m_Parameters.getParameterValueAsVectorLayer(ROUTE);
+      if (!m_bIsAutoExtent) {
+         m_Lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      if (m_Lines.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException("zero shapes in layer");
+      }
+
+      m_dDistance = m_Parameters.getParameterValueAsDouble(DISTANCE);
+      m_dSectionWidth = m_Parameters.getParameterValueAsDouble(WIDTH);
+      m_iPointsInSection = m_Parameters.getParameterValueAsInt(NUMPOINTS);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+
+      m_dInterval = m_dSectionWidth / m_iPointsInSection;
+
+      sFieldNames = new String[m_iPointsInSection * 2 + 1];
+      types = new Class[m_iPointsInSection * 2 + 1];
+      for (i = -m_iPointsInSection, iField = 0; i < m_iPointsInSection + 1; i++, iField++) {
+         sFieldNames[iField] = Double.toString(m_dInterval * i);
+         types[iField] = Double.class;
+      }
+      sFieldNames[m_iPointsInSection] = "0";
+      types[m_iPointsInSection] = Double.class;
+
+      m_Result = getNewVectorLayer(RESULT, Sextante.getText("Cross_sections"), IVectorLayer.SHAPE_TYPE_LINE, types, sFieldNames);
+      final int iCount = m_Lines.getShapesCount();
+      final IFeatureIterator iter = m_Lines.iterator();
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geometry = feature.getGeometry();
+         for (int j = 0; j < geometry.getNumGeometries(); j++) {
+            final Geometry line = geometry.getGeometryN(j);
+            processLine(line);
+         }
+         i++;
+      }
+      iter.close();
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cross_sections"));
+      setGroup(Sextante.getText("Profiles"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(ROUTE, Sextante.getText("Route"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Distance_between_sections"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(WIDTH, Sextante.getText("Section_width__to_each_side"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(NUMPOINTS, Sextante.getText("Number_of_points__on_each_side"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 5, 0, Integer.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Cross_sections"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void processLine(final Geometry line) {
+
+      int i, j;
+      int iPoints;
+      double dX1, dX2, dY1, dY2;
+      double dAddedPointX = 0, dAddedPointY = 0;
+      double dDX, dDY;
+      double dRemainingDistFromLastSegment = 0;
+      double dDistToNextPoint;
+      double dDist;
+
+      final Coordinate[] coords = line.getCoordinates();
+      if (coords.length < 2) {
+         return;
+      }
+
+      dX1 = coords[0].x;
+      dY1 = coords[0].y;
+      dX2 = coords[1].x;
+      dY2 = coords[1].y;
+      dAddedPointX = dX1;
+      dAddedPointY = dY1;
+      computeSegmentOrientation(dX1, dY1, dX2, dY2);
+      addPoint(dX1, dY1);
+      for (i = 0; i < coords.length - 1; i++) {
+         dX1 = coords[i].x;
+         dY1 = coords[i].y;
+         dX2 = coords[i + 1].x;
+         dY2 = coords[i + 1].y;
+         dDX = dX2 - dX1;
+         dDY = dY2 - dY1;
+         dDistToNextPoint = Math.sqrt(dDX * dDX + dDY * dDY);
+         computeSegmentOrientation(dX1, dY1, dX2, dY2);
+         if (dRemainingDistFromLastSegment + dDistToNextPoint > m_dDistance) {
+            iPoints = (int) ((dRemainingDistFromLastSegment + dDistToNextPoint) / m_dDistance);
+            dDist = m_dDistance - dRemainingDistFromLastSegment;
+            for (j = 0; j < iPoints; j++) {
+               dDist = m_dDistance - dRemainingDistFromLastSegment;
+               dDist += j * m_dDistance;
+               dAddedPointX = dX1 + dDist * dDX / dDistToNextPoint;
+               dAddedPointY = dY1 + dDist * dDY / dDistToNextPoint;
+               addPoint(dAddedPointX, dAddedPointY);
+            }
+            dDX = dX2 - dAddedPointX;
+            dDY = dY2 - dAddedPointY;
+            dRemainingDistFromLastSegment = Math.sqrt(dDX * dDX + dDY * dDY);
+         }
+         else {
+            dRemainingDistFromLastSegment += dDistToNextPoint;
+         }
+
+      }
+
+   }
+
+
+   private void computeSegmentOrientation(final double x,
+                                          final double y,
+                                          final double x2,
+                                          final double y2) {
+
+      double dx, dy;
+      double dDistance;
+
+      dx = x2 - x;
+      dy = y2 - y;
+
+      dDistance = Math.sqrt(dx * dx + dy * dy);
+      m_dStepX = dy / dDistance * m_dInterval;
+      m_dStepY = -dx / dDistance * m_dInterval;
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+      int i;
+      int iField;
+      double x2, y2;
+      double dElevation;
+      final Object value[] = new Object[m_iPointsInSection * 2 + 1];
+
+      final Coordinate[] coords = new Coordinate[2];
+      coords[0] = new Coordinate(x + m_iPointsInSection * m_dStepX, y + m_iPointsInSection * m_dStepY);
+      coords[1] = new Coordinate(x - m_iPointsInSection * m_dStepX, y - m_iPointsInSection * m_dStepY);
+
+      for (i = -m_iPointsInSection, iField = 0; i < m_iPointsInSection + 1; i++, iField++) {
+         x2 = x - i * m_dStepX;
+         y2 = y - i * m_dStepY;
+         dElevation = m_DEM.getValueAt(x2, y2);
+         value[iField] = new Double(dElevation);
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+      m_Result.addFeature(gf.createLineString(coords), value);
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/profiles/crossSections/CrossSectionsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointsToLine/PointsToLineAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointsToLine/PointsToLineAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointsToLine/PointsToLineAlgorithm.java	(revision 369)
@@ -0,0 +1,94 @@
+package es.unex.sextante.vectorTools.pointsToLine;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class PointsToLineAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Points_to_line"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Line"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      m_Output = getNewVectorLayer(RESULT, m_Layer.getName(), IVectorLayer.SHAPE_TYPE_LINE, m_Layer.getFieldTypes(),
+               m_Layer.getFieldNames());
+
+      final ArrayList<Coordinate> array = new ArrayList<Coordinate>();
+      final GeometryFactory gf = new GeometryFactory();
+      iShapeCount = m_Layer.getShapesCount();
+      if (iShapeCount < 2) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Cannot_construct_line_with_less_than_2_points"));
+      }
+
+      final IFeatureIterator iter = m_Layer.iterator();
+      IFeature feature = iter.next();
+      Geometry geom = feature.getGeometry();
+      for (int j = 0; j < geom.getNumGeometries(); j++) {
+         final Geometry subgeom = geom.getGeometryN(j);
+         final Coordinate coord = subgeom.getCoordinate();
+         array.add(coord);
+      }
+      final Object[] values = feature.getRecord().getValues();
+      i = 1;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         feature = iter.next();
+         geom = feature.getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            final Coordinate coord = subgeom.getCoordinate();
+            array.add(coord);
+         }
+         i++;
+      }
+
+      m_Output.addFeature(gf.createLineString(array.toArray(new Coordinate[0])), values);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointsToLine/PointsToLineAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyLines/SimplifyLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyLines/SimplifyLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyLines/SimplifyLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,99 @@
+
+
+package es.unex.sextante.vectorTools.simplifyLines;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.simplify.DouglasPeuckerSimplifier;
+import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SimplifyLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT    = "RESULT";
+   public static final String PRESERVE  = "PRESERVE";
+   public static final String TOLERANCE = "TOLERANCE";
+   public static final String LAYER     = "LAYER";
+   private boolean            m_bPreserve;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final double dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+      m_bPreserve = m_Parameters.getParameterValueAsBoolean(PRESERVE);
+
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Generalized_lines"), IVectorLayer.SHAPE_TYPE_LINE,
+               layerIn.getFieldTypes(), layerIn.getFieldNames());
+      final IFeatureIterator iter = layerIn.iterator();
+      int i = 0;
+      final int iCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry simpleGeom = getSimpleLine(feature.getGeometry(), dTolerance);
+         output.addFeature(simpleGeom, feature.getRecord().getValues());
+         i++;
+      }
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Simplify_lines"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+         m_Parameters.addBoolean(PRESERVE, Sextante.getText("Preserve_topology"), false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Generalized_lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private Geometry getSimpleLine(final Geometry geometry,
+                                  final double dTolerance) {
+
+      Geometry simple;
+      if (m_bPreserve) {
+         simple = TopologyPreservingSimplifier.simplify(geometry, dTolerance);
+      }
+      else {
+         simple = DouglasPeuckerSimplifier.simplify(geometry, dTolerance);
+      }
+
+      return simple;
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyLines/SimplifyLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/union/UnionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/union/UnionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/union/UnionAlgorithm.java	(revision 369)
@@ -0,0 +1,288 @@
+
+
+package es.unex.sextante.vectorTools.union;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class UnionAlgorithm extends GeoAlgorithm {
+
+   public static final String LAYER1 = "LAYER1";
+   public static final String LAYER2 = "LAYER2";
+   public static final String RESULT = "RESULT";
+
+   private Geometry           m_ClipGeometry;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer1 = m_Parameters.getParameterValueAsVectorLayer(LAYER1);
+      final IVectorLayer layer2 = m_Parameters.getParameterValueAsVectorLayer(LAYER2);
+
+      if (!m_bIsAutoExtent) {
+         layer1.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layer2.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] fieldTypes = new Class[layer1.getFieldCount() + layer2.getFieldCount()];
+      final String[] sFieldNames = new String[fieldTypes.length];
+
+      for (int i = 0; i < layer1.getFieldCount(); i++) {
+
+    	  Class fieldType = layer1.getFieldType(i);
+    		  fieldTypes[i] = fieldType;
+    		  sFieldNames[i] = layer1.getFieldName(i);
+      }
+      for (int i = 0; i < layer2.getFieldCount(); i++) {
+    	  Class fieldType = layer2.getFieldType(i);
+    	  int targetIndex = i + layer1.getFieldCount() ;
+    	  fieldTypes[targetIndex] = fieldType;
+    	  sFieldNames[targetIndex] = checkAttrName(layer2.getFieldName(i), targetIndex, sFieldNames);
+      }
+
+      final IVectorLayer intersection = getTempVectorLayer(IVectorLayer.SHAPE_TYPE_POLYGON, fieldTypes, sFieldNames);
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Union"), IVectorLayer.SHAPE_TYPE_POLYGON,
+               fieldTypes, sFieldNames);
+
+      //first we do an intersection
+
+      setProgressText(Sextante.getText("Intersection") + "(1/4)");
+      IFeatureIterator iter = layer1.iterator();
+
+      int i = 0;
+      int iShapeCount = layer1.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Object[] values = feature.getRecord().getValues();
+         final Geometry g = feature.getGeometry();
+         final IFeatureIterator iter2 = layer2.iterator();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            final Geometry g2 = feature2.getGeometry();
+            if (g2.intersects(g)) {
+               final Object[] values2 = feature2.getRecord().getValues();
+               final Geometry inter = g.intersection(g2);
+               final Object[] resultValues = new Object[values.length + values2.length];
+
+				// Inicializo values con unos valores por defecto porque
+				// DBFStoreProvider no admite valores null para estos
+				// tipos. Si se arregla/cambia DBFStoreProvider
+				// para que en caso de llegarle un valor null
+				// ponga el valor por defecto, esto se
+				// podr�a eliminar
+               initializeDefaultValues(fieldTypes, resultValues);
+
+               System.arraycopy(values, 0, resultValues, 0, values.length);
+               System.arraycopy(values2, 0, resultValues, values.length, values2.length);
+               intersection.addFeature(inter, resultValues);
+            }
+         }
+         iter2.close();
+         i++;
+      }
+
+
+      iter.close();
+
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      //copy the resulting features to the final layer
+      setProgressText(Sextante.getText("Copying_entities") + "(2/4)");
+      //intersection.close();
+      try {
+         intersection.postProcess();
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+      intersection.open();
+      iter = intersection.iterator();
+
+      i = 0;
+      iShapeCount = intersection.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         output.addFeature(feature);
+      }
+      iter.close();
+
+      //Now we calculate difference between layer 1 and intersection
+      //and add the resulting entities to the final layer
+      m_ClipGeometry = computeJtsClippingPoly(intersection);
+      setProgressText(Sextante.getText("Copying_entities") + "(3/4)");
+      iter = layer1.iterator();
+      i = 0;
+      iShapeCount = layer1.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry g = difference(feature.getGeometry());
+         if (g != null && !g.isEmpty()) {
+            final Object[] values = feature.getRecord().getValues();
+            final Object[] resultValues = new Object[output.getFieldCount()];
+            initializeDefaultValues(fieldTypes, resultValues);
+            System.arraycopy(values, 0, resultValues, 0, values.length);
+            output.addFeature(g, resultValues);
+         }
+         i++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      //And now the same difference but with layer2
+      setProgressText(Sextante.getText("Copying_entities") + "(4/4)");
+      iter = layer2.iterator();
+      i = 0;
+      iShapeCount = layer1.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry g = difference(feature.getGeometry());
+         if (g != null && !g.isEmpty()) {
+
+            final Object[] values = feature.getRecord().getValues();
+            final Object[] resultValues = new Object[output.getFieldCount()];
+            initializeDefaultValues(fieldTypes, resultValues);
+            System.arraycopy(values, 0, resultValues, resultValues.length-values.length, values.length);
+            output.addFeature(g, resultValues);
+         }
+         i++;
+      }
+      iter.close();
+
+      intersection.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   public Geometry difference(final Geometry g) throws GeoAlgorithmExecutionException {
+
+      if (g == null) {
+         return null;
+      }
+
+      final Geometry env = g.getEnvelope();
+      if (env == null || m_ClipGeometry == null) {
+         return null;
+      }
+      if (!env.intersects(m_ClipGeometry.getEnvelope())) {
+         return null;
+      }
+      if (g.intersects(m_ClipGeometry)) {
+         try {
+            final Geometry newGeom = g.difference(m_ClipGeometry);
+            return newGeom;
+         }
+         catch (final com.vividsolutions.jts.geom.TopologyException e) {
+            if (!g.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong input geometry");
+            }
+            if (!m_ClipGeometry.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong clipping geometry");
+            }
+         }
+      }
+      return null;
+   }
+
+
+   private Geometry computeJtsClippingPoly(final IVectorLayer layer) throws IteratorException {
+
+      Geometry currentGeometry;
+      Geometry geometry = null;
+      final GeometryFactory geomFact = new GeometryFactory();
+
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         currentGeometry = feature.getGeometry();
+         if (geometry == null) {
+            geometry = currentGeometry;
+         }
+         else {
+            final Geometry[] geoms = new Geometry[2];
+            geoms[0] = geometry;
+            geoms[1] = currentGeometry;
+            final GeometryCollection gc = geomFact.createGeometryCollection(geoms);
+            geometry = gc.buffer(0d);
+         }
+      }
+      iter.close();
+
+      return geometry;
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Union"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER1, Sextante.getText("Layer_1"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addInputVectorLayer(LAYER2, Sextante.getText("Layer_2"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Capa_union"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public Geometry clipGeometry(final Geometry g) throws GeoAlgorithmExecutionException {
+
+      if (g == null) {
+         return null;
+      }
+
+      final Geometry env = g.getEnvelope();
+      if (env == null) {
+         return null;
+      }
+      if (!env.intersects(m_ClipGeometry.getEnvelope())) {
+         return null;
+      }
+      if (g.intersects(m_ClipGeometry)) {
+         try {
+            final Geometry newGeom = g.symDifference(m_ClipGeometry);
+            return newGeom;
+         }
+         catch (final com.vividsolutions.jts.geom.TopologyException e) {
+            if (!g.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong input geometry");
+            }
+            if (!m_ClipGeometry.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong clipping geometry");
+            }
+         }
+      }
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/union/UnionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/centroids/CentroidsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/centroids/CentroidsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/centroids/CentroidsAlgorithm.java	(revision 369)
@@ -0,0 +1,77 @@
+
+
+package es.unex.sextante.vectorTools.centroids;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class CentroidsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      final IVectorLayer result = getNewVectorLayer(RESULT, Sextante.getText("Centroids"), IVectorLayer.SHAPE_TYPE_POINT,
+               layerIn.getFieldTypes(), layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final Point centroid = getCentroid(feature.getGeometry());
+         result.addFeature(centroid, feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Centroids"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Vector_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Centroids"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private Point getCentroid(final Geometry geometry) {
+
+      return geometry.getCentroid();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/centroids/CentroidsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceTableBuffer/DistanceTableBufferAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceTableBuffer/DistanceTableBufferAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceTableBuffer/DistanceTableBufferAlgorithm.java	(revision 369)
@@ -0,0 +1,170 @@
+
+
+package es.unex.sextante.vectorTools.distanceTableBuffer;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.operation.buffer.BufferOp;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+
+
+public class DistanceTableBufferAlgorithm
+         extends
+            GeoAlgorithm {
+
+
+   public static final String RESULT          = "RESULT";
+   public static final String NOTROUNDED      = "NOTROUNDED";
+   public static final String LAYER           = "LAYER";
+   public static final String DISTANCES       = "DISTANCES";
+
+   private IVectorLayer       m_Output;
+   private boolean            m_bRounded;
+   private int                m_iNumProcessed = 0;
+   private Double[]           m_Distances;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final FixedTableModel distances = (FixedTableModel) m_Parameters.getParameterValueAsObject(DISTANCES);
+      final ArrayList<Double> distancesList = new ArrayList<Double>();
+      for (int i = 0; i < distances.getRowCount(); i++) {
+         try {
+            final double dDistance = Double.parseDouble(distances.getValueAt(i, 0).toString());
+            if (dDistance > 0) {
+               distancesList.add(new Double(dDistance));
+            }
+         }
+         catch (final Exception e) {
+            //ignore wrong values in table
+         }
+      }
+
+      if (distancesList.size() == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("No_Elements_In_Distance_List"));
+      }
+
+      m_Distances = distancesList.toArray(new Double[0]);
+      Arrays.sort(m_Distances);
+
+      m_bRounded = !m_Parameters.getParameterValueAsBoolean(NOTROUNDED);
+
+      final int iFieldCount = layerIn.getFieldCount();
+      Class types[];
+      String[] sFieldNames;
+
+      types = new Class[iFieldCount + 2];
+      types[0] = Integer.class;
+      types[1] = Double.class;
+      sFieldNames = new String[iFieldCount + 2];
+      sFieldNames[0] = "ID";
+      sFieldNames[1] = "DIST";
+      for (int i = 0; i < iFieldCount; i++) {
+         sFieldNames[i + 2] = checkAttrName(layerIn.getFieldName(i), i + 2, sFieldNames);
+         types[i + 2] = layerIn.getFieldType(i);
+      }
+
+      m_Output = getNewVectorLayer(RESULT, "Buffer", IVectorLayer.SHAPE_TYPE_POLYGON, types, sFieldNames);
+
+      int i = 0;
+      final int iTotal = layerIn.getShapesCount();
+      final IFeatureIterator iter = layerIn.iterator();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         computeBuffer(feature.getGeometry(), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Multiple_buffer"));
+      setGroup(Sextante.getText("Buffers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addFixedTable(DISTANCES, Sextante.getText("Distances_table"),
+                  new String[] { Sextante.getText("Distance") }, 3, false);
+         m_Parameters.addBoolean(NOTROUNDED, Sextante.getText("Do_not_round_resulting_polygons"), false);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Buffer"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public void computeBuffer(final Geometry originalGeometry,
+                             final Object[] record) {
+
+      Geometry solution = null;
+      final Geometry inputParam = originalGeometry;
+
+      int cap = BufferOp.CAP_ROUND;
+      if (!m_bRounded) {
+         cap = BufferOp.CAP_SQUARE;
+      }
+
+      Geometry previousExteriorRing = null;
+      for (int i = 0; i < m_Distances.length; i++) {
+         final double dDistRing = m_Distances[i].doubleValue();
+         final BufferOp bufOp = new BufferOp(inputParam);
+         bufOp.setEndCapStyle(cap);
+         final Geometry newGeometry = bufOp.getResultGeometry(dDistRing);
+         if (previousExteriorRing != null) {
+            solution = newGeometry.difference(previousExteriorRing);
+         }
+         else {
+            solution = newGeometry;
+         }
+         m_iNumProcessed++;
+         addFeature(solution, dDistRing, record);
+         previousExteriorRing = newGeometry;
+      }
+
+   }
+
+
+   protected void addFeature(final Geometry geom,
+                             final double dDistance,
+                             final Object[] record) {
+
+      final Object[] values = new Object[2 + record.length];
+      values[0] = new Long(m_iNumProcessed);
+      values[1] = new Double(dDistance);
+      for (int i = 0; i < record.length; i++) {
+         values[i + 2] = record[i];
+      }
+      m_Output.addFeature(geom, values);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceTableBuffer/DistanceTableBufferAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/constrainedDelaunay/ConstrainedDelaunayAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/constrainedDelaunay/ConstrainedDelaunayAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/constrainedDelaunay/ConstrainedDelaunayAlgorithm.java	(revision 369)
@@ -0,0 +1,119 @@
+
+
+package es.unex.sextante.vectorTools.constrainedDelaunay;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.triangulate.ConformingDelaunayTriangulationBuilder;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class ConstrainedDelaunayAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS    = "POINTS";
+   public static final String LINES     = "LINES";
+   public static final String TRIANGLES = "TRIANGLES";
+
+   private IVectorLayer       m_Points;
+   private IVectorLayer       m_Lines;
+   private IVectorLayer       m_Triangles;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Constrained_Delaunay_triangulation"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+
+         addOutputVectorLayer(TRIANGLES, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_Lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_Lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class types[] = { Integer.class };
+      final String sNames[] = { "ID" };
+      m_Triangles = getNewVectorLayer(TRIANGLES, m_Points.getName() + "[" + Sextante.getText("triangulated") + "]",
+               IVectorLayer.SHAPE_TYPE_POLYGON, types, sNames);
+
+      i = 0;
+      final ArrayList<Geometry> list = new ArrayList<Geometry>();
+      iShapeCount = m_Points.getShapesCount();
+      IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         list.add(feature.getGeometry());
+         i++;
+      }
+      iter.close();
+
+
+      final GeometryFactory gf = new GeometryFactory();
+      final Geometry geomcolPoints = gf.createGeometryCollection(list.toArray(new Geometry[0]));
+
+      i = 0;
+      iShapeCount = m_Lines.getShapesCount();
+      list.clear();
+      iter = m_Lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         list.add(feature.getGeometry());
+         i++;
+      }
+      iter.close();
+
+      final Geometry geomcolLines = gf.createGeometryCollection(list.toArray(new Geometry[0]));
+
+      m_Task.setDeterminate(false);
+      final ConformingDelaunayTriangulationBuilder delaunay = new ConformingDelaunayTriangulationBuilder();
+      delaunay.setSites(geomcolPoints);
+      delaunay.setConstraints(geomcolLines);
+      final Geometry triangles = delaunay.getTriangles(gf);
+
+      final int iTriangles = triangles.getNumGeometries();
+      for (int iTriangle = 0; iTriangle < iTriangles; iTriangle++) {
+         final Geometry triangle = triangles.getGeometryN(iTriangle);
+         final Object[] record = { new Integer(iTriangle) };
+         m_Triangles.addFeature(triangle, record);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/constrainedDelaunay/ConstrainedDelaunayAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/changeLineDirection/ChangeLineDirectionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/changeLineDirection/ChangeLineDirectionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/changeLineDirection/ChangeLineDirectionAlgorithm.java	(revision 369)
@@ -0,0 +1,103 @@
+
+
+package es.unex.sextante.vectorTools.changeLineDirection;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class ChangeLineDirectionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LINES  = "LINES";
+
+   private IVectorLayer       m_Output;
+   private ArrayList          m_Lines;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Change_line_direction"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE, LINES);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, lines.getFieldTypes(),
+               lines.getFieldNames());
+
+      int i = 0;
+      final int iShapeCount = lines.getShapesCount();
+      final IFeatureIterator iter = lines.iterator();
+      final GeometryFactory gf = new GeometryFactory();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         m_Lines = new ArrayList();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry line = geom.getGeometryN(j);
+            addLine(line);
+         }
+         final LineString[] lineStrings = new LineString[m_Lines.size()];
+         for (int j = 0; j < lineStrings.length; j++) {
+            lineStrings[j] = (LineString) m_Lines.get(j);
+         }
+         m_Output.addFeature(gf.createMultiLineString(lineStrings), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addLine(final Geometry line) {
+
+      final Coordinate[] coords = line.getCoordinates();
+      final Coordinate[] newCoords = new Coordinate[coords.length];
+      for (int i = 0; i < coords.length; i++) {
+         newCoords[i] = coords[coords.length - i - 1];
+      }
+      final GeometryFactory gf = new GeometryFactory();
+      m_Lines.add(gf.createLineString(newCoords));
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/changeLineDirection/ChangeLineDirectionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/delaunay/DelaunayAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/delaunay/DelaunayAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/delaunay/DelaunayAlgorithm.java	(revision 369)
@@ -0,0 +1,101 @@
+
+
+package es.unex.sextante.vectorTools.delaunay;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.triangulate.ConformingDelaunayTriangulationBuilder;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DelaunayAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS    = "POINTS";
+   public static final String TRIANGLES = "TRIANGLES";
+
+   private IVectorLayer       m_Points;
+   private IVectorLayer       m_Triangles;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Delaunay_triangulation"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+
+         addOutputVectorLayer(TRIANGLES, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final int iShapeCount;
+      final GeometryFactory gf = new GeometryFactory();
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class types[] = { Integer.class };
+      final String sNames[] = { "ID" };
+      m_Triangles = getNewVectorLayer(TRIANGLES, m_Points.getName() + "[" + Sextante.getText("triangulated") + "]",
+               IVectorLayer.SHAPE_TYPE_POLYGON, types, sNames);
+
+      i = 0;
+      final ArrayList<Geometry> list = new ArrayList<Geometry>();
+      iShapeCount = m_Points.getShapesCount();
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         list.add(gf.createPoint(coord));
+         i++;
+      }
+      iter.close();
+
+      m_Task.setDeterminate(false);
+      final Geometry geomcol = gf.createGeometryCollection(list.toArray(new Geometry[0]));
+      final ConformingDelaunayTriangulationBuilder delaunay = new ConformingDelaunayTriangulationBuilder();
+      delaunay.setSites(geomcol);
+      final Geometry triangles = delaunay.getTriangles(gf);
+
+      final int iTriangles = triangles.getNumGeometries();
+      for (int iTriangle = 0; iTriangle < iTriangles; iTriangle++) {
+         final Geometry triangle = triangles.getGeometryN(iTriangle);
+         final Object[] record = { new Integer(iTriangle) };
+         m_Triangles.addFeature(triangle, record);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/delaunay/DelaunayAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometriesToPoints/GeometriesToPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometriesToPoints/GeometriesToPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometriesToPoints/GeometriesToPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+
+
+package es.unex.sextante.vectorTools.geometriesToPoints;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class GeometriesToPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS = "POINTS";
+   public static final String INPUT  = "INPUT";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Geometries_to_points"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(INPUT, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(POINTS, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer input = m_Parameters.getParameterValueAsVectorLayer(INPUT);
+      if (!m_bIsAutoExtent) {
+         input.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      int subtype;
+    try {
+        subtype = input.getSubType();
+    } catch (BaseException e) {
+        subtype = org.gvsig.fmap.geom.Geometry.SUBTYPES.UNKNOWN;
+    }
+
+      m_Output = getNewVectorLayer(POINTS, input.getName() + "[" + Sextante.getText("Points") + "]",
+          IVectorLayer.SHAPE_TYPE_POINT, input.getFieldTypes(), input.getFieldNames(), subtype);
+
+
+      int i = 0;
+      final int iShapeCount = input.getShapesCount();
+      final IFeatureIterator iter = input.iterator();
+      final GeometryFactory gf = new GeometryFactory();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate[] coords = geom.getCoordinates();
+         for (final Coordinate element : coords) {
+            m_Output.addFeature(gf.createPoint(element), feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometriesToPoints/GeometriesToPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorMean/VectorMeanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorMean/VectorMeanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorMean/VectorMeanAlgorithm.java	(revision 369)
@@ -0,0 +1,131 @@
+
+
+package es.unex.sextante.vectorTools.vectorMean;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class VectorMeanAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LINES  = "LINES";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Driver;
+   private double             m_dSumX = 0, m_dSumY = 0;
+   private double             m_dSumDifX = 0, m_dSumDifY = 0;
+   private double             m_dAbsSumDifX = 0, m_dAbsSumDifY = 0;
+   private int                m_iCount      = 0;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      double x, y, x2, y2;
+      double dAngle, dLength, dTotalLength;
+      final String sFields[] = { Sextante.getText("Mean_distance"), Sextante.getText("Angle"),
+               Sextante.getText("Circular_variance") };
+      final Class types[] = { Double.class, Double.class, Double.class };
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Driver = getNewVectorLayer(RESULT, Sextante.getText("Vector_mean"), IVectorLayer.SHAPE_TYPE_LINE, types, sFields);
+      i = 0;
+      final int iCount = lines.getShapesCount();
+      final IFeatureIterator iter = lines.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            processLine(subgeom.getCoordinates());
+         }
+         i++;
+      }
+
+      x = m_dSumX / (2. * m_iCount);
+      y = m_dSumY / (2. * m_iCount);
+      x2 = x + m_dSumDifX / m_iCount;
+      y2 = y + m_dSumDifY / m_iCount;
+
+      final Coordinate[] coords = new Coordinate[2];
+      coords[0] = new Coordinate(x, y);
+      coords[1] = new Coordinate(x2, y2);
+      dLength = Math.sqrt(Math.pow(x2 - x, 2) + Math.pow(y2 - y, 2));
+      dTotalLength = Math.sqrt(Math.pow(m_dAbsSumDifX / m_iCount, 2) + Math.pow(m_dAbsSumDifY / m_iCount, 2));
+      dAngle = Math.atan2(y2 - y, x2 - x) / Math.PI * 180.;
+      final Object[] value = new Object[3];
+      value[0] = new Double(dLength);
+      value[1] = new Double(dAngle);
+      value[2] = new Double(1 - dLength / dTotalLength);
+
+      final GeometryFactory gf = new GeometryFactory();
+      m_Driver.addFeature(gf.createLineString(coords), value);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processLine(final Coordinate[] coords) {
+
+      double x, y, x2, y2;
+
+      if (coords.length == 0) {
+         return;
+      }
+
+      x = coords[0].x;
+      y = coords[0].y;
+      m_dSumX += x;
+      m_dSumY += y;
+      x2 = coords[coords.length - 1].x;
+      y2 = coords[coords.length - 1].y;
+      m_dSumX += x2;
+      m_dSumY += y2;
+      m_dSumDifX += (x2 - x);
+      m_dSumDifY += (y2 - y);
+      m_dAbsSumDifX += Math.abs(x2 - x);
+      m_dAbsSumDifY += Math.abs(y2 - y);
+
+      m_iCount++;
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Directional_mean"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Directional_mean"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorMean/VectorMeanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/ControlCurve.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/ControlCurve.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/ControlCurve.java	(revision 369)
@@ -0,0 +1,36 @@
+/*********************************************************
+ * Code adapted from Tim Lambert's Java Classes
+ * http://www.cse.unsw.edu.au/~lambert/
+ *********************************************************/
+package es.unex.sextante.vectorTools.smoothLines;
+
+/** This class represents a curve defined by a sequence of control points */
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineString;
+
+public abstract class ControlCurve {
+
+   protected double[] m_X;
+   protected double[] m_Y;
+   protected Geometry m_Geometry;
+
+
+   public ControlCurve(final Geometry geom) {
+
+      final Coordinate[] coords = geom.getCoordinates();
+      m_X = new double[coords.length];
+      m_Y = new double[coords.length];
+      for (int i = 0; i < coords.length; i++) {
+         m_X[i] = coords[i].x;
+         m_Y[i] = coords[i].y;
+      }
+      m_Geometry = geom;
+
+   }
+
+
+   public abstract LineString getSmoothedLine(int iSteps);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/ControlCurve.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Cubic.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Cubic.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Cubic.java	(revision 369)
@@ -0,0 +1,29 @@
+/*********************************************************
+ * Code adapted from Tim Lambert's Java Classes
+ * http://www.cse.unsw.edu.au/~lambert/
+ *********************************************************/
+package es.unex.sextante.vectorTools.smoothLines;
+
+/** this class represents a cubic polynomial */
+
+public class Cubic {
+
+   double a, b, c, d; /* a + b*u + c*u^2 +d*u^3 */
+
+
+   public Cubic(final double a,
+                final double b,
+                final double c,
+                final double d) {
+      this.a = a;
+      this.b = b;
+      this.c = c;
+      this.d = d;
+   }
+
+
+   /** evaluate cubic */
+   public double eval(final double u) {
+      return (((d * u) + c) * u + b) * u + a;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Cubic.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/NatCubic.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/NatCubic.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/NatCubic.java	(revision 369)
@@ -0,0 +1,103 @@
+/*********************************************************
+ * Code adapted from Tim Lambert's Java Classes
+ * http://www.cse.unsw.edu.au/~lambert/
+ *********************************************************/
+package es.unex.sextante.vectorTools.smoothLines;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+public class NatCubic
+         extends
+            ControlCurve {
+
+   /* calculates the natural cubic spline that interpolates
+   y[0], y[1], ... y[n]
+   The first segment is returned as
+   C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1
+   the other segments are in C[1], C[2], ...  C[n-1] */
+
+   public NatCubic(final Geometry geom) {
+
+      super(geom);
+
+   }
+
+
+   Cubic[] calcNaturalCubic(final int n,
+                            final double[] x) {
+      final double[] gamma = new double[n + 1];
+      final double[] delta = new double[n + 1];
+      final double[] D = new double[n + 1];
+      int i;
+      /* We solve the equation
+       [2 1       ] [D[0]]   [3(x[1] - x[0])  ]
+       |1 4 1     | |D[1]|   |3(x[2] - x[0])  |
+       |  1 4 1   | | .  | = |      .         |
+       |    ..... | | .  |   |      .         |
+       |     1 4 1| | .  |   |3(x[n] - x[n-2])|
+       [       1 2] [D[n]]   [3(x[n] - x[n-1])]
+
+       by using row operations to convert the matrix to upper triangular
+       and then back sustitution.  The D[i] are the derivatives at the knots.
+       */
+
+      gamma[0] = 1.0f / 2.0f;
+      for (i = 1; i < n; i++) {
+         gamma[i] = 1 / (4 - gamma[i - 1]);
+      }
+      gamma[n] = 1 / (2 - gamma[n - 1]);
+
+      delta[0] = 3 * (x[1] - x[0]) * gamma[0];
+      for (i = 1; i < n; i++) {
+         delta[i] = (3 * (x[i + 1] - x[i - 1]) - delta[i - 1]) * gamma[i];
+      }
+      delta[n] = (3 * (x[n] - x[n - 1]) - delta[n - 1]) * gamma[n];
+
+      D[n] = delta[n];
+      for (i = n - 1; i >= 0; i--) {
+         D[i] = delta[i] - gamma[i] * D[i + 1];
+      }
+
+      /* now compute the coefficients of the cubics */
+      final Cubic[] C = new Cubic[n];
+      for (i = 0; i < n; i++) {
+         C[i] = new Cubic(x[i], D[i], 3 * (x[i + 1] - x[i]) - 2 * D[i] - D[i + 1], 2 * (x[i] - x[i + 1]) + D[i] + D[i + 1]);
+      }
+      return C;
+   }
+
+
+   @Override
+   public LineString getSmoothedLine(final int iSteps) {
+
+      final ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
+
+      if (m_X.length >= 2) {
+         final Cubic[] X = calcNaturalCubic(m_X.length - 1, m_X);
+         final Cubic[] Y = calcNaturalCubic(m_Y.length - 1, m_Y);
+
+         /* very crude technique - just break each segment up into steps lines */
+         coords.add(new Coordinate((int) Math.round(X[0].eval(0)), (int) Math.round(Y[0].eval(0))));
+         for (int i = 0; i < X.length; i++) {
+            for (int j = 1; j <= iSteps; j++) {
+               final float u = j / (float) iSteps;
+               coords.add(new Coordinate(X[i].eval(u), Y[i].eval(u)));
+            }
+         }
+
+         return new GeometryFactory().createLineString((Coordinate[]) coords.toArray(new Coordinate[0]));
+
+      }
+      else {
+         return new GeometryFactory().createLineString(m_Geometry.getCoordinates());
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/NatCubic.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/SmoothLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/SmoothLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/SmoothLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,119 @@
+
+
+package es.unex.sextante.vectorTools.smoothLines;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SmoothLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT                = "RESULT";
+   public static final String INTERMEDIATE_POINTS   = "INTERMEDIATE_POINTS";
+   public static final String LAYER                 = "LAYER";
+   public static final String CURVE_TYPE            = "CURVE_TYPE";
+
+   public static final int    NATURAL_CUBIC_SPLINES = 0;
+   public static final int    BEZIER_CURVES         = 1;
+   public static final int    BSPLINES              = 2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      int iSteps = m_Parameters.getParameterValueAsInt(INTERMEDIATE_POINTS) + 1;
+      final int iMethod = m_Parameters.getParameterValueAsInt(CURVE_TYPE);
+
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iSteps = Math.max(1, Math.min(iSteps, 10));
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, layerIn.getName() + "[" + Sextante.getText("smoothed") + "]",
+               IVectorLayer.SHAPE_TYPE_LINE, layerIn.getFieldTypes(), layerIn.getFieldNames());
+      final IFeatureIterator iter = layerIn.iterator();
+      int i = 0;
+      final int iCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry simpleGeom = getSmoothedLine(feature.getGeometry(), iSteps, iMethod);
+         output.addFeature(simpleGeom, feature.getRecord().getValues());
+         i++;
+      }
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Smooth_lines"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addSelection(INTERMEDIATE_POINTS, Sextante.getText("Intermediate_points"), new String[] { "1", "2", "3",
+                  "4", "5", "6", "7", "8", "9" });
+         m_Parameters.addSelection(CURVE_TYPE, Sextante.getText("Curve_type"), new String[] { "Natural cubic splines",
+                  "Bezier curves", "B splines" });
+         addOutputVectorLayer(RESULT, Sextante.getText("Smoothed_lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private Geometry getSmoothedLine(final Geometry geometry,
+                                    final int iSteps,
+                                    final int iMethod) {
+
+      final ArrayList<LineString> geoms = new ArrayList<LineString>();
+
+      ControlCurve curve = null;
+
+      for (int i = 0; i < geometry.getNumGeometries(); i++) {
+         switch (iMethod) {
+            case NATURAL_CUBIC_SPLINES:
+               curve = new NatCubic(geometry.getGeometryN(i));
+               break;
+            case BEZIER_CURVES:
+               curve = new Bezier(geometry.getGeometryN(i));
+               break;
+            case BSPLINES:
+            default:
+               curve = new BSpline(geometry.getGeometryN(i));
+               break;
+         }
+         geoms.add(curve.getSmoothedLine(iSteps));
+      }
+
+      final GeometryFactory gf = geometry.getFactory();
+      return gf.createMultiLineString(geoms.toArray(new LineString[0]));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/SmoothLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/BSpline.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/BSpline.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/BSpline.java	(revision 369)
@@ -0,0 +1,73 @@
+/*********************************************************
+ * Code adapted from Tim Lambert's Java Classes
+ * http://www.cse.unsw.edu.au/~lambert/
+ *********************************************************/
+package es.unex.sextante.vectorTools.smoothLines;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+public class BSpline
+         extends
+            ControlCurve {
+
+   public BSpline(final Geometry geom) {
+
+      super(geom);
+
+   }
+
+
+   // the basis function for a cubic B spline
+   float b(final int i,
+           float t) {
+      switch (i) {
+         case -2:
+            return (((-t + 3) * t - 3) * t + 1) / 6;
+         case -1:
+            return (((3 * t - 6) * t) * t + 4) / 6;
+         case 0:
+            return (((-3 * t + 3) * t + 3) * t + 1) / 6;
+         case 1:
+            return (t * t * t) / 6;
+      }
+      return 0; //we only get here if an invalid i is specified
+   }
+
+
+   //evaluate a point on the B spline
+   Point p(final int i,
+           final float t) {
+      float px = 0;
+      float py = 0;
+      for (int j = -2; j <= 1; j++) {
+         px += b(j, t) * m_X[i + j];
+         py += b(j, t) * m_Y[i + j];
+      }
+      return new Point((int) Math.round(px), (int) Math.round(py));
+   }
+
+
+   @Override
+   public LineString getSmoothedLine(final int iSteps) {
+
+      final ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
+      Point q = p(2, 0);
+      coords.add(new Coordinate(q.x, q.y));
+      for (int i = 2; i < m_X.length - 1; i++) {
+         for (int j = 1; j <= iSteps; j++) {
+            q = p(i, j / (float) iSteps);
+            coords.add(new Coordinate(q.x, q.y));
+         }
+      }
+
+      return new GeometryFactory().createLineString((Coordinate[]) coords.toArray(new Coordinate[0]));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/BSpline.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Bezier.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Bezier.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Bezier.java	(revision 369)
@@ -0,0 +1,73 @@
+/*********************************************************
+ * Code adapted from Tim Lambert's Java Classes
+ * http://www.cse.unsw.edu.au/~lambert/
+ *********************************************************/
+package es.unex.sextante.vectorTools.smoothLines;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+public class Bezier
+         extends
+            ControlCurve {
+
+   public Bezier(final Geometry geom) {
+
+      super(geom);
+
+   }
+
+
+   // the basis function for a Bezier spline
+   static float b(final int i,
+                  final float t) {
+      switch (i) {
+         case 0:
+            return (1 - t) * (1 - t) * (1 - t);
+         case 1:
+            return 3 * t * (1 - t) * (1 - t);
+         case 2:
+            return 3 * t * t * (1 - t);
+         case 3:
+            return t * t * t;
+      }
+      return 0; //we only get here if an invalid i is specified
+   }
+
+
+   //evaluate a point on the B spline
+   Point p(final int i,
+           final float t) {
+      float px = 0;
+      float py = 0;
+      for (int j = 0; j <= 3; j++) {
+         px += b(j, t) * m_X[i + j];
+         py += b(j, t) * m_Y[i + j];
+      }
+      return new Point((int) Math.round(px), (int) Math.round(py));
+   }
+
+
+   @Override
+   public LineString getSmoothedLine(final int iSteps) {
+
+      final ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
+      Point q = p(0, 0);
+      coords.add(new Coordinate(q.x, q.y));
+      for (int i = 0; i < m_X.length - 3; i += 3) {
+         for (int j = 1; j <= iSteps; j++) {
+            q = p(i, j / (float) iSteps);
+            coords.add(new Coordinate(q.x, q.y));
+         }
+      }
+
+      return new GeometryFactory().createLineString((Coordinate[]) coords.toArray(new Coordinate[0]));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/smoothLines/Bezier.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendPointsLayerWithGrids/ExtendPointsLayerWithGridsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendPointsLayerWithGrids/ExtendPointsLayerWithGridsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendPointsLayerWithGrids/ExtendPointsLayerWithGridsAlgorithm.java	(revision 369)
@@ -0,0 +1,134 @@
+
+
+package es.unex.sextante.vectorTools.extendPointsLayerWithGrids;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class ExtendPointsLayerWithGridsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER       = "LAYER";
+   public static final String GRIDS       = "GRIDS";
+   public static final String INTERPOLATE = "INTERPOLATE";
+   public static final String RESULT      = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private ArrayList          m_Grids;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Sample_raster_layers"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addMultipleInput(GRIDS, Sextante.getText("Raster_layers"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addBoolean(INTERPOLATE, Sextante.getText("Use_interpolation"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iTotalProgress;
+      int iProgress = 0;
+      int iLayer;
+      int iShapeCount;
+      double[][] dValues;
+      boolean bInterpolate;
+      IRasterLayer grid;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_Grids = (ArrayList) m_Parameters.getParameterValueAsObject(GRIDS);
+      bInterpolate = m_Parameters.getParameterValueAsBoolean(INTERPOLATE);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iShapeCount = m_Layer.getShapesCount();
+      dValues = new double[m_Grids.size()][iShapeCount];
+      iTotalProgress = iShapeCount * m_Grids.size();
+
+      for (iLayer = 0; iLayer < m_Grids.size(); iLayer++) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_Grids.get(iLayer);
+         final IRasterLayer layer = rab.getRasterLayer();
+         final int iBand = rab.getBand();
+         layer.setFullExtent();
+         if (bInterpolate == false) {
+            layer.setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+         }
+         final IFeatureIterator iter = m_Layer.iterator();
+         i = 0;
+         while (iter.hasNext() && setProgress(iProgress, iTotalProgress)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Coordinate[] coords = geom.getCoordinates();
+            dValues[iLayer][i] = layer.getValueAt(coords[0].x, coords[0].y, iBand);
+            iProgress++;
+            i++;
+         }
+         iter.close();
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Object[][] values = new Object[m_Grids.size()][iShapeCount];
+      final String[] sNames = new String[m_Grids.size()];
+      final Class[] types = new Class[m_Grids.size()];
+      for (i = 0; i < m_Grids.size(); i++) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_Grids.get(i);
+         grid = rab.getRasterLayer();
+         sNames[i] = grid.getName();
+         types[i] = Double.class;
+         for (j = 0; j < iShapeCount; j++) {
+            values[i][j] = new Double(dValues[i][j]);
+         }
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(Sextante.getText("Points"));
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_Layer, channel, sNames, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendPointsLayerWithGrids/ExtendPointsLayerWithGridsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/perturbatePointsLayer/PerturbatePointsLayerAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/perturbatePointsLayer/PerturbatePointsLayerAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/perturbatePointsLayer/PerturbatePointsLayerAlgorithm.java	(revision 369)
@@ -0,0 +1,141 @@
+
+
+package es.unex.sextante.vectorTools.perturbatePointsLayer;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class PerturbatePointsLayerAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String MEAN   = "MEAN";
+   public static final String STDDEV = "STDDEV";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private IVectorLayer       m_Output;
+   private double             m_dMean;
+   private double             m_dStdDev;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Perturbate_points_layer"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addNumericalValue(MEAN, Sextante.getText("Mean"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10,
+                  0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_dMean = m_Parameters.getParameterValueAsDouble(MEAN);
+      m_dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, m_Layer.getName(), m_Layer.getShapeType(), m_Layer.getFieldTypes(),
+               m_Layer.getFieldNames());
+
+      i = 0;
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         addPoint(coord.x, coord.y, feature.getRecord().getValues());
+         i++;
+      }
+
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y,
+                         final Object[] values) {
+
+      final Point pt = getAlteredPoint(x, y);
+      m_Output.addFeature(pt, values);
+
+   }
+
+
+   private Point getAlteredPoint(final double x,
+                                 final double y) {
+
+      final GeometryFactory gf = new GeometryFactory();
+
+      final double dDist = getDist();
+      final double dAngle = Math.random() * Math.PI * 2.;
+
+      return gf.createPoint(new Coordinate(x + Math.cos(dAngle) * dDist, y + Math.sin(dAngle) * dDist));
+
+   }
+
+
+   double getDist() {
+
+
+      double x1, x2, w, y1;
+
+      do {
+         x1 = 2.0 * Math.random() - 1.0;
+         x2 = 2.0 * Math.random() - 1.0;
+
+         w = x1 * x1 + x2 * x2;
+      }
+      while (w >= 1.0);
+
+      w = Math.sqrt((-2.0 * Math.log(w)) / w);
+
+      y1 = x1 * w;
+
+      return (m_dMean + m_dStdDev * y1);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/perturbatePointsLayer/PerturbatePointsLayerAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitPolylinesAtNodes/SplitPolylinesAtNodesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitPolylinesAtNodes/SplitPolylinesAtNodesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitPolylinesAtNodes/SplitPolylinesAtNodesAlgorithm.java	(revision 369)
@@ -0,0 +1,96 @@
+
+
+package es.unex.sextante.vectorTools.splitPolylinesAtNodes;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SplitPolylinesAtNodesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LINES  = "LINES";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Split_polylines_at_nodes"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, lines.getFieldTypes(),
+               lines.getFieldNames());
+
+      int i = 0;
+      final int iShapeCount = lines.getShapesCount();
+      final IFeatureIterator iter = lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry line = geom.getGeometryN(j);
+            addLine(line, feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addLine(final Geometry line,
+                        final Object[] attributes) {
+
+      final GeometryFactory gf = new GeometryFactory();
+
+      final Coordinate[] coords = line.getCoordinates();
+      final Coordinate[] segmentCoords = new Coordinate[2];
+
+      for (int i = 0; i < coords.length - 1; i++) {
+         segmentCoords[0] = new Coordinate(coords[i].x, coords[i].y);
+         segmentCoords[1] = new Coordinate(coords[i + 1].x, coords[i + 1].y);
+         m_Output.addFeature(gf.createLineString(segmentCoords), attributes);
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitPolylinesAtNodes/SplitPolylinesAtNodesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/autoincrementValue/AutoincrementValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/autoincrementValue/AutoincrementValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/autoincrementValue/AutoincrementValueAlgorithm.java	(revision 369)
@@ -0,0 +1,74 @@
+package es.unex.sextante.vectorTools.autoincrementValue;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class AutoincrementValueAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+      final IVectorLayer result = getNewVectorLayer(RESULT, Sextante.getText("Autoincrement_Value"), layerIn.getShapeType(),
+               layerIn.getFieldTypes(), layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final IRecord record = feature.getRecord();
+         final Object[] values = record.getValues();
+         values[iField] = i;
+         result.addFeature(feature.getGeometry(), values);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Autoincrement_Value"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Attribute"), LAYER);
+         addOutputVectorLayer(RESULT, Sextante.getText("Autoincrement_Value"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/autoincrementValue/AutoincrementValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polygonsToPolylines/PolygonsToPolylinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polygonsToPolylines/PolygonsToPolylinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polygonsToPolylines/PolygonsToPolylinesAlgorithm.java	(revision 369)
@@ -0,0 +1,102 @@
+
+
+package es.unex.sextante.vectorTools.polygonsToPolylines;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class PolygonsToPolylinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Polygons_to_polylines"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Lines"), IVectorLayer.SHAPE_TYPE_LINE, m_Layer.getFieldTypes(),
+               m_Layer.getFieldNames());
+
+
+      final ArrayList array = new ArrayList();
+      final GeometryFactory gf = new GeometryFactory();
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         array.clear();
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            if (subgeom instanceof Polygon) {
+               final Polygon poly = (Polygon) subgeom;
+               array.add(poly.getExteriorRing());
+               for (int k = 0; k < poly.getNumInteriorRing(); k++) {
+                  array.add(poly.getInteriorRingN(k));
+               }
+            }
+         }
+         if (array.size() != 0) {
+            final LineString[] lines = new LineString[array.size()];
+            for (int j = 0; j < array.size(); j++) {
+               lines[j] = (LineString) array.get(j);
+            }
+            m_Output.addFeature(gf.createMultiLineString(lines), feature.getRecord().getValues());
+         }
+         i++;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polygonsToPolylines/PolygonsToPolylinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorSpatialCluster/VectorSpatialClusterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorSpatialCluster/VectorSpatialClusterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorSpatialCluster/VectorSpatialClusterAlgorithm.java	(revision 369)
@@ -0,0 +1,254 @@
+
+
+package es.unex.sextante.vectorTools.vectorSpatialCluster;
+
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class VectorSpatialClusterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT        = "RESULT";
+   public static final String NUMCLASS      = "NUMCLASS";
+   public static final String LAYER         = "LAYER";
+
+   private ValueAndClass[]    m_Classes;
+   private double             m_dMean[][];
+   private int                m_iClasses;
+   private int                m_iThreshold;
+   private IVectorLayer       m_LayerIn;
+
+   private static double      NO_DATA       = Double.NEGATIVE_INFINITY;
+   private static int         NO_DATA_CLASS = Integer.MAX_VALUE;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final Class[] types = { Integer.class };
+      final String[] sFields = { Sextante.getText("Class") };
+
+      m_iClasses = m_Parameters.getParameterValueAsInt(NUMCLASS);
+      m_LayerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_LayerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Classes = new ValueAndClass[m_LayerIn.getShapesCount()];
+      final IFeatureIterator iter = m_LayerIn.iterator();
+      i = 0;
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         m_Classes[i] = new ValueAndClass(2);
+         m_Classes[i].dValue[0] = coord.x;
+         m_Classes[i].dValue[1] = coord.y;
+         i++;
+      }
+
+      classify();
+
+      final Object[][] values = new Object[1][m_LayerIn.getShapesCount()];
+      for (i = 0; i < m_Classes.length; i++) {
+         values[0][i] = new Integer(m_Classes[i].iClass);
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = new OutputVectorLayer();
+      out.setDescription(Sextante.getText("Result"));
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_LayerIn, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Spatial_cluster"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addNumericalValue(NUMCLASS, Sextante.getText("Number_of_classes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 3, 2, Integer.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void initValues() {
+
+      int i;
+      int iValues = 0;
+      boolean bNoData;
+      double dStep;
+      double dValue;
+      final double dMin[] = new double[2];
+      final double dMax[] = new double[2];
+
+      for (i = 0; i < 2; i++) {
+         dMin[i] = Double.MAX_VALUE;
+         dMax[i] = Double.NEGATIVE_INFINITY;
+      }
+
+      for (i = 0; i < m_Classes.length; i++) {
+         bNoData = false;
+         for (int j = 0; j < m_Classes[i].dValue.length; j++) {
+            dValue = m_Classes[i].dValue[j];
+            if (dValue != NO_DATA) {
+               dMin[j] = Math.min(dMin[j], dValue);
+               dMax[j] = Math.max(dMax[j], dValue);
+            }
+            else {
+               bNoData = true;
+            }
+         }
+         if (bNoData) {
+            m_Classes[i].iClass = NO_DATA_CLASS;
+         }
+         else {
+            iValues++;
+            m_Classes[i].iClass = 0;
+         }
+      }
+
+      m_dMean = new double[m_iClasses][2];
+
+      for (i = 0; i < 2; i++) {
+         dStep = (dMax[i] - dMin[i]) / ((m_iClasses + 1));
+         for (int j = 0; j < m_iClasses; j++) {
+            m_dMean[j][i] = dMin[i] + dStep * (j + 1);
+         }
+      }
+
+      m_iThreshold = (int) (iValues * 0.02);
+
+   }
+
+
+   private boolean classify() {
+
+      int i, j;
+      int iChangedCells;
+      int iPrevClass;
+      int iClass;
+      final int iCells[] = new int[m_iClasses];
+      double dNewMean[][];
+      double swap[][];
+
+      initValues();
+
+      dNewMean = new double[m_iClasses][2];
+
+      do {
+         Arrays.fill(iCells, 0);
+         iChangedCells = 0;
+
+         for (i = 0; i < m_iClasses; i++) {
+            Arrays.fill(dNewMean[i], 0.0);
+         }
+         for (i = 0; i < m_Classes.length; i++) {
+            iPrevClass = m_Classes[i].iClass;
+            if (iPrevClass != NO_DATA_CLASS) {
+               iClass = getClass(m_Classes[i].dValue);
+               m_Classes[i].iClass = iClass;
+               for (j = 0; j < 2; j++) {
+                  dNewMean[iClass][j] += m_Classes[i].dValue[j];
+               }
+               iCells[iClass]++;
+               if (iClass != iPrevClass) {
+                  iChangedCells++;
+               }
+            }
+         }
+
+         for (i = 0; i < 2; i++) {
+            for (j = 0; j < m_iClasses; j++) {
+               dNewMean[j][i] /= iCells[j];
+            }
+         }
+
+         swap = m_dMean;
+         m_dMean = dNewMean;
+         dNewMean = swap;
+
+         setProgressText(Sextante.getText("Modified_classes") + Integer.toString(iChangedCells));
+
+         if (m_Task.isCanceled()) {
+            return false;
+         }
+
+      }
+      while (iChangedCells > m_iThreshold);
+
+      return true;
+
+   }
+
+
+   private int getClass(final double[] dValues) {
+
+      int iClass = 0;
+      double dMinDist = Double.MAX_VALUE;
+      double dDist;
+      double dDif;
+
+      for (int i = 0; i < m_iClasses; i++) {
+         dDist = 0;
+         for (int j = 0; j < dValues.length; j++) {
+            dDif = m_dMean[i][j] - dValues[j];
+            dDist += (dDif * dDif);
+         }
+         if (dDist < dMinDist) {
+            dMinDist = dDist;
+            iClass = i;
+         }
+      }
+
+      return iClass;
+   }
+
+   private class ValueAndClass {
+
+      public double dValue[];
+      public int    iClass;
+
+
+      public ValueAndClass(final int i) {
+
+         dValue = new double[i];
+
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorSpatialCluster/VectorSpatialClusterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/graticuleBuilder/GraticuleBuilderAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/graticuleBuilder/GraticuleBuilderAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/graticuleBuilder/GraticuleBuilderAlgorithm.java	(revision 369)
@@ -0,0 +1,182 @@
+package es.unex.sextante.vectorTools.graticuleBuilder;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GraticuleBuilderAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   TYPE_RECTANGLES = 0;
+   private static final int   TYPE_LINES      = 1;
+   private static final int   TYPE_POINTS     = 2;
+
+   public static final String GRATICULE       = "GRATICULE";
+   public static final String TYPE            = "TYPE";
+   public static final String INTERVALY       = "INTERVALY";
+   public static final String INTERVALX       = "INTERVALX";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_graticule"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      final String[] sOptions = { Sextante.getText("Rectangles"), Sextante.getText("Lines"), Sextante.getText("Points") };
+
+      try {
+         m_Parameters.addNumericalValue(INTERVALX, Sextante.getText("X_interval"), 1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(INTERVALY, Sextante.getText("Y_interval"), 1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addSelection(TYPE, Sextante.getText("Type"), sOptions);
+         addOutputVectorLayer(GRATICULE, Sextante.getText("Graticule"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      double x, y;
+      int i = 0;
+      int iCountX, iCountY;
+      int iID = 0;
+      int iShapeType;
+      final String[] sNames = { "ID", "X", "Y", "BORDER" };
+      final Class[] types = { Integer.class, Double.class, Double.class, Integer.class };
+
+      final double dXMax = m_AnalysisExtent.getXMax();
+      final double dXMin = m_AnalysisExtent.getXMin();
+      final double dYMax = m_AnalysisExtent.getYMax();
+      final double dYMin = m_AnalysisExtent.getYMin();
+
+      final double dIntervalX = m_Parameters.getParameterValueAsDouble(INTERVALX);
+      final double dIntervalY = m_Parameters.getParameterValueAsDouble(INTERVALY);
+      final int iType = m_Parameters.getParameterValueAsInt(TYPE);
+
+      iCountX = (int) ((dXMax - dXMin) / dIntervalX);
+      iCountY = (int) ((dYMax - dYMin) / dIntervalY);
+
+      switch (iType) {
+         case TYPE_RECTANGLES:
+            iShapeType = IVectorLayer.SHAPE_TYPE_POLYGON;
+            break;
+         case TYPE_LINES:
+            iShapeType = IVectorLayer.SHAPE_TYPE_LINE;
+            iCountX *= 2;
+            break;
+         case TYPE_POINTS:
+         default:
+            iShapeType = IVectorLayer.SHAPE_TYPE_POINT;
+            break;
+      }
+
+      final IVectorLayer output = getNewVectorLayer(GRATICULE, Sextante.getText("Graticule"), iShapeType, types, sNames);
+      final Object[] value = new Object[4];
+      final GeometryFactory gf = new GeometryFactory();
+      switch (iType) {
+         case TYPE_RECTANGLES:
+            Geometry geom;
+            for (x = dXMin; (x < dXMax - dIntervalX) & setProgress(i++, iCountX); x = x + dIntervalX) {
+               for (y = dYMin; y < dYMax - dIntervalY; y = y + dIntervalY) {
+                  final Coordinate[] coords = new Coordinate[5];
+                  coords[0] = new Coordinate(x, y);
+                  coords[1] = new Coordinate(x, y + dIntervalY);
+                  coords[2] = new Coordinate(x + dIntervalX, y + dIntervalY);
+                  coords[3] = new Coordinate(x + dIntervalX, y);
+                  coords[4] = new Coordinate(x, y);
+                  value[0] = new Integer(iID++);
+                  value[1] = new Double(x);
+                  value[2] = new Double(y);
+                  if ((x == dXMin) || (x + dIntervalX >= dXMax - dIntervalX) || (y == dYMin)
+                      || (y + dIntervalY >= dYMax - dIntervalY)) {
+                     value[3] = new Integer(1);
+                  }
+                  else {
+                     value[3] = new Integer(0);
+                  }
+                  final LinearRing ring = gf.createLinearRing(coords);
+                  geom = gf.createPolygon(ring, null);
+                  output.addFeature(geom, value);
+               }
+            }
+            break;
+         case TYPE_LINES:
+            Geometry line;
+
+            for (x = dXMin; (x <= dXMax) && setProgress(i++, iCountX); x = x + dIntervalX) {
+               final Coordinate[] coords = new Coordinate[2];
+               coords[0] = new Coordinate(x, dYMin);
+               coords[1] = new Coordinate(x, dYMax);
+               line = gf.createLineString(coords);
+               value[0] = new Integer(iID++);
+               value[1] = new Double(x);
+               value[2] = new Double(dYMin);
+               if ((x == dXMin) || (x + dIntervalX > dXMax - dIntervalX)) {
+                  value[3] = new Integer(1);
+               }
+               else {
+                  value[3] = new Integer(0);
+               }
+               output.addFeature(line, value);
+            }
+            i = 0;
+            for (y = dYMin; (y <= dYMax) && setProgress(i++, iCountY); y = y + dIntervalY) {
+               final Coordinate[] coords = new Coordinate[2];
+               coords[0] = new Coordinate(dXMin, y);
+               coords[1] = new Coordinate(dXMax, y);
+               line = gf.createLineString(coords);
+               value[0] = new Integer(iID++);
+               value[1] = new Double(dXMin);
+               value[2] = new Double(y);
+               if ((y == dYMin) || (y + dIntervalY > dYMax - dIntervalY)) {
+                  value[3] = new Integer(1);
+               }
+               else {
+                  value[3] = new Integer(0);
+               }
+               output.addFeature(line, value);
+            }
+            break;
+         case TYPE_POINTS:
+            Geometry point;
+            for (x = dXMin; (x <= dXMax) && setProgress(i++, iCountX); x = x + dIntervalX) {
+               for (y = dYMin; y <= dYMax; y = y + dIntervalY) {
+                  point = gf.createPoint(new Coordinate(x, y));
+                  value[0] = new Integer(iID++);
+                  value[1] = new Double(x);
+                  value[2] = new Double(y);
+                  if ((x == dXMin) || (x + dIntervalX > dXMax) || (y == dYMin) || (y + dIntervalY > dYMax)) {
+                     value[3] = new Integer(1);
+                  }
+                  else {
+                     value[3] = new Integer(0);
+                  }
+                  output.addFeature(point, value);
+               }
+            }
+            break;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/graticuleBuilder/GraticuleBuilderAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLines/GeometricPropertiesLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLines/GeometricPropertiesLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLines/GeometricPropertiesLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,152 @@
+
+
+package es.unex.sextante.vectorTools.geometricPropertiesLines;
+
+import com.vividsolutions.jts.algorithm.Angle;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class GeometricPropertiesLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String RESULT = "RESULT";
+   private static final String LINES  = "LINES";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Geometric_properties_of_lines"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE, LINES);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final Class[] types = { Double.class, Double.class, Double.class, Double.class, Double.class };
+      final String[] sFields = { Sextante.getText("Length"), Sextante.getText("Straight_length"), Sextante.getText("Sinuosity"),
+               Sextante.getText("Average_angle"), Sextante.getText("Direction") };
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      if (lines.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException("zero lines in layer");
+      }
+
+      i = 0;
+      final int iShapesCount = lines.getShapesCount();
+      final Object[][] values = new Object[5][iShapesCount];
+      final IFeatureIterator iter = lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         final LineProperties lp = getProperties(feature.getGeometry());
+         values[0][i] = new Double(lp.length);
+         values[1][i] = new Double(lp.straightLength);
+         values[2][i] = new Double(lp.sinuosity);
+         values[3][i] = new Double(lp.angleStats.getMean());
+         values[4][i] = new Double(lp.direction);
+         i++;
+
+      }
+
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = m_OutputObjects.getOutput(RESULT);
+      out.setDescription(lines.getName());
+      out.setName("RESULT");
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, lines, channel, sFields, values, types));
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private LineProperties getProperties(final Geometry geometry) {
+
+      double x, y;
+      double dDifX, dDifY;
+      double dInitX, dInitY;
+      double dDist = 0, dStraightDist, dDirection;
+
+      final Coordinate[] coords = geometry.getCoordinates();
+
+      dInitX = x = coords[0].x;
+      dInitY = y = coords[0].y;
+
+      final LineProperties lp = new LineProperties();
+      for (int i = 0; i < coords.length; i++) {
+         if ((i > 0) && (i < coords.length - 1)) {
+            lp.angleStats.addValue(getAngle(coords[i - 1], coords[i], coords[i + 1]));
+         }
+         dDifX = coords[i].x - x;
+         dDifY = coords[i].y - y;
+         dDist += Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+         x = coords[i].x;
+         y = coords[i].y;
+      }
+
+      dDifX = x - dInitX;
+      dDifY = y - dInitY;
+
+      dStraightDist = Math.sqrt(Math.pow(dDifX, 2) + Math.pow(dDifY, 2));
+      dDirection = Math.toDegrees(Math.atan2(dDifX, dDifY));
+
+      lp.length = dDist;
+      lp.straightLength = dStraightDist;
+      lp.sinuosity = dDist / dStraightDist;
+      lp.direction = dDirection;
+
+      return lp;
+
+   }
+
+
+   private double getAngle(final Coordinate p1,
+                           final Coordinate p2,
+                           final Coordinate p3) {
+
+      return Math.toDegrees(Angle.angleBetween(p1, p2, p3));
+
+   }
+
+   private class LineProperties {
+
+      public double      length, straightLength, sinuosity, direction;
+      public SimpleStats angleStats = new SimpleStats();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLines/GeometricPropertiesLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyPolygons/SimplifyPolygonsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyPolygons/SimplifyPolygonsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyPolygons/SimplifyPolygonsAlgorithm.java	(revision 369)
@@ -0,0 +1,97 @@
+
+
+package es.unex.sextante.vectorTools.simplifyPolygons;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.simplify.DouglasPeuckerSimplifier;
+import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SimplifyPolygonsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT    = "RESULT";
+   public static final String PRESERVE  = "PRESERVE";
+   public static final String TOLERANCE = "TOLERANCE";
+   public static final String LAYER     = "LAYER";
+   private boolean            m_bPreserve;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final double dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+      m_bPreserve = m_Parameters.getParameterValueAsBoolean(PRESERVE);
+
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Simplified_polygons"),
+               IVectorLayer.SHAPE_TYPE_POLYGON, layerIn.getFieldTypes(), layerIn.getFieldNames());
+      final IFeatureIterator iter = layerIn.iterator();
+      int i = 0;
+      final int iCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry simpleGeom = getSimpleLine(feature.getGeometry(), dTolerance);
+         output.addFeature(simpleGeom, feature.getRecord().getValues());
+         i++;
+      }
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Simplify_polygons"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+         m_Parameters.addBoolean(PRESERVE, Sextante.getText("Preserve_topology"), false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Simplified_polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private Geometry getSimpleLine(final Geometry geometry,
+                                  final double dTolerance) {
+
+      Geometry simple;
+      if (m_bPreserve) {
+         simple = TopologyPreservingSimplifier.simplify(geometry, dTolerance);
+      }
+      else {
+         simple = DouglasPeuckerSimplifier.simplify(geometry, dTolerance);
+      }
+      return simple;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/simplifyPolygons/SimplifyPolygonsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/saveToWKT/SaveToWKTAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/saveToWKT/SaveToWKTAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/saveToWKT/SaveToWKTAlgorithm.java	(revision 369)
@@ -0,0 +1,115 @@
+
+
+package es.unex.sextante.vectorTools.saveToWKT;
+
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.io.WKTWriter;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class SaveToWKTAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER    = "LAYER";
+   public static final String RESULT   = "RESULT";
+   public static final String FILENAME = "FILENAME";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final String sFilename = m_Parameters.getParameterValueAsString(FILENAME);
+
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      if (sFilename != null) {
+         Writer output = null;
+         final WKTWriter wkt = new WKTWriter();
+         try {
+            output = new BufferedWriter(new FileWriter(sFilename));
+            final int iShapeCount = layer.getShapesCount();
+            int i = 0;
+            final IFeatureIterator iter = layer.iterator();
+            while (iter.hasNext() && setProgress(i, iShapeCount)) {
+               try {
+                  final IFeature feature = iter.next();
+                  final Geometry geom = feature.getGeometry();
+                  output.write("WKT=" + wkt.write(geom) + "\n");
+                  final int iFieldCount = feature.getRecord().getValues().length;
+                  for (int j = 0; j < iFieldCount; j++) {
+                     //output.write(feature.getRecord().getValue(j).toString() + "\n");
+                  }
+                  i++;
+               }
+               catch (final IteratorException e) {
+
+               }
+            }
+         }
+         catch (final IOException e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+         finally {
+            if (output != null) {
+               try {
+                  output.close();
+               }
+               catch (final IOException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Save_geometries_as_WKT"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addFilepath(FILENAME, Sextante.getText("File"), false, false, false, "wkt");
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean isSuitableForModelling() {
+
+      return false;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/saveToWKT/SaveToWKTAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeHoles/RemoveHolesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeHoles/RemoveHolesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeHoles/RemoveHolesAlgorithm.java	(revision 369)
@@ -0,0 +1,103 @@
+
+
+package es.unex.sextante.vectorTools.removeHoles;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class RemoveHolesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final IVectorLayer driver = getNewVectorLayer(RESULT, Sextante.getText("Result"), layer.getShapeType(),
+               layer.getFieldTypes(), layer.getFieldNames());
+      final int iTotal = layer.getShapesCount();
+      int i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final ArrayList<Polygon> list = new ArrayList<Polygon>();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            list.add(removeHoles(geom.getGeometryN(j)));
+         }
+         final Geometry resultingGeom = geom.getFactory().createMultiPolygon(list.toArray(new Polygon[0]));
+         driver.addFeature(resultingGeom, feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Remove_holes"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   /**
+    * Remove holes from a polygon (based on org.geotools.renderer.lite.LabelCacheDefault)
+    * 
+    * @param Geometry
+    * @return Polygon
+    */
+   private Polygon removeHoles(final Geometry geom) {
+      if (!(geom instanceof Polygon)) {
+         return null;
+      }
+      final Polygon polygon = (Polygon) geom;
+      LineString outer = polygon.getExteriorRing();
+      if (outer.getStartPoint().distance(outer.getEndPoint()) != 0) {
+         final List clist = new ArrayList(Arrays.asList(outer.getCoordinates()));
+         clist.add(outer.getStartPoint().getCoordinate());
+         outer = outer.getFactory().createLinearRing((Coordinate[]) clist.toArray(new Coordinate[clist.size()]));
+      }
+      final LinearRing r = (LinearRing) outer;
+      return outer.getFactory().createPolygon(r, null);
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeHoles/RemoveHolesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/variableDistanceBuffer/VariableDistanceBufferAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/variableDistanceBuffer/VariableDistanceBufferAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/variableDistanceBuffer/VariableDistanceBufferAlgorithm.java	(revision 369)
@@ -0,0 +1,325 @@
+
+
+package es.unex.sextante.vectorTools.variableDistanceBuffer;
+
+import java.util.ArrayList;
+import java.util.Stack;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Polygon;
+import com.vividsolutions.jts.operation.buffer.BufferOp;
+import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class VariableDistanceBufferAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final byte   BUFFER_INSIDE_POLY         = 1;
+   public static final byte   BUFFER_OUTSIDE_POLY        = 0;
+   public static final byte   BUFFER_INSIDE_OUTSIDE_POLY = 2;
+
+   public static final String RESULT                     = "RESULT";
+   public static final String NOTROUNDED                 = "NOTROUNDED";
+   public static final String RINGS                      = "RINGS";
+   public static final String TYPE                       = "TYPES";
+   public static final String FIELD                      = "FIELD";
+   public static final String LAYER                      = "LAYER";
+
+   private IVectorLayer       m_Output;
+   private boolean            m_bRounded;
+   private int                m_iRings;
+   private int                m_iType;
+   private int                numProcessed               = 0;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_bRounded = !m_Parameters.getParameterValueAsBoolean(NOTROUNDED);
+      m_iRings = m_Parameters.getParameterValueAsInt(RINGS) + 1;
+      m_iType = m_Parameters.getParameterValueAsInt(TYPE);
+
+      final int iFieldCount = layerIn.getFieldCount();
+      Class types[];
+      String[] sFieldNames;
+
+      if (layerIn.getShapeType() != IVectorLayer.SHAPE_TYPE_POLYGON) {
+         m_iType = BUFFER_OUTSIDE_POLY;
+      }
+
+      if (m_iType == BUFFER_INSIDE_OUTSIDE_POLY) {
+         types = new Class[iFieldCount + 3];
+         types[0] = Long.class;
+         types[1] = Double.class;
+         sFieldNames = new String[iFieldCount + 3];
+         sFieldNames[0] = "ID";
+         sFieldNames[1] = "FROM";
+         sFieldNames[1] = "TO";
+         for (int i = 0; i < iFieldCount; i++) {
+            sFieldNames[i + 3] = checkAttrName(layerIn.getFieldName(i), i + 3, sFieldNames);
+            types[i + 3] = layerIn.getFieldType(i);
+         }
+      }
+      else {
+         types = new Class[iFieldCount + 2];
+         types[0] = Long.class;
+         types[1] = Double.class;
+         sFieldNames = new String[iFieldCount + 2];
+         sFieldNames[0] = "ID";
+         sFieldNames[1] = "DIST";
+         for (int i = 0; i < iFieldCount; i++) {
+            sFieldNames[i + 2] = checkAttrName(layerIn.getFieldName(i), i + 2, sFieldNames);
+            types[i + 2] = layerIn.getFieldType(i);
+         }
+      }
+
+      m_Output = getNewVectorLayer("RESULT", "Buffer", IVectorLayer.SHAPE_TYPE_POLYGON, types, sFieldNames);
+
+      int i = 0;
+      final int iTotal = layerIn.getShapesCount();
+      double dDistance;
+      final IFeatureIterator iter = layerIn.iterator();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         try {
+
+            final Number num = (Number) feature.getRecord().getValue(iField);
+            dDistance = num.doubleValue();
+         }
+         catch (final Exception e) {
+            continue;
+         }
+         computeBuffer(feature.getGeometry(), dDistance, feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sRings = { Integer.toString(1), Integer.toString(2), Integer.toString(3) };
+      final String[] sType = { Sextante.getText("Outer_buffer"), Sextante.getText("Inner_buffer"), Sextante.getText("Both"), };
+
+      setName(Sextante.getText("Variable_distance_buffer"));
+      setGroup(Sextante.getText("Buffers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Distance_field"), "LAYER");
+         m_Parameters.addSelection(TYPE, Sextante.getText("Buffer_type"), sType);
+         m_Parameters.addSelection(RINGS, Sextante.getText("Number_of_concentric_rings"), sRings);
+         m_Parameters.addBoolean(NOTROUNDED, Sextante.getText("Do_not_round_resulting_polygons"), false);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Buffer"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   //*********** code adapted from BufferVisitor class, by Alvaro Zabala*******************//
+
+   public void computeBuffer(final Geometry originalGeometry,
+                             final double bufferDistance,
+                             final Object[] record) {
+      Geometry solution = null;
+      Geometry inputParam = originalGeometry;
+      /*
+       * When we try to apply large buffer distances, we could get OutOfMemoryError
+       * exceptions. Explanation in
+       * http://lists.jump-project.org/pipermail/jts-devel/2005-February/000991.html
+       * http://lists.jump-project.org/pipermail/jts-devel/2005-September/001292.html
+       * This problems hasnt been resolved in JTS 1.7.
+       */
+      if (originalGeometry.getDimension() != 0) {
+         inputParam = TopologyPreservingSimplifier.simplify(originalGeometry, bufferDistance / 10d);
+      }
+      int cap = BufferOp.CAP_ROUND;
+      if (!m_bRounded) {
+         cap = BufferOp.CAP_SQUARE;
+      }
+
+      //this two references are necessary to compute radial rings
+      Geometry previousExteriorRing = null;
+      Geometry previousInteriorRing = null;
+      if (m_iType == BUFFER_INSIDE_POLY) {
+         //if we have radial internal buffers, we start by
+         //most interior buffer
+         for (int i = m_iRings; i >= 1; i--) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry newGeometry = bufOp.getResultGeometry(-1 * distRing);
+            if (verifyNilGeometry(newGeometry)) {
+               //we have collapsed original geometry
+               return;
+            }
+            if (previousInteriorRing != null) {
+               solution = newGeometry.difference(previousInteriorRing);
+            }
+            else {
+               solution = newGeometry;
+            }
+            numProcessed++;
+            addFeature(solution, distRing, record);
+            previousInteriorRing = newGeometry;
+         }
+      }
+      else if (m_iType == BUFFER_OUTSIDE_POLY) {
+         for (int i = 1; i <= m_iRings; i++) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry newGeometry = bufOp.getResultGeometry(distRing);
+            if (previousExteriorRing != null) {
+               solution = newGeometry.difference(previousExteriorRing);
+            }
+            else {
+               solution = newGeometry;
+            }
+            numProcessed++;
+            addFeature(solution, distRing, record);
+            previousExteriorRing = newGeometry;
+         }
+      }
+      else if (m_iType == BUFFER_INSIDE_OUTSIDE_POLY) {
+         final GeometryFactory geomFact = new GeometryFactory();
+         for (int i = 1; i <= m_iRings; i++) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry out = bufOp.getResultGeometry(distRing);
+            final Geometry in = bufOp.getResultGeometry(-1 * distRing);
+            boolean collapsedInterior = verifyNilGeometry(in);
+            if ((previousExteriorRing == null) || (previousInteriorRing == null)) {
+               if (collapsedInterior) {
+                  solution = out;
+               }
+               else {
+                  solution = out.difference(in);
+               }
+            }
+            else {
+               if (collapsedInterior) {
+                  solution = out.difference(previousExteriorRing);
+               }
+               else {
+                  final Geometry outRing = out.difference(previousExteriorRing);
+                  final Geometry inRing = previousInteriorRing.difference(in);
+                  final Geometry[] geomArray = new Geometry[] { outRing, inRing };
+                  solution = geomFact.createGeometryCollection(geomArray);
+                  final ArrayList polygons = new ArrayList();
+                  final Stack stack = new Stack();
+                  stack.push(solution);
+                  while (stack.size() != 0) {
+                     final GeometryCollection geCol = (GeometryCollection) stack.pop();
+                     for (int j = 0; j < geCol.getNumGeometries(); j++) {
+                        final Geometry geometry = geCol.getGeometryN(j);
+                        if (geometry instanceof GeometryCollection) {
+                           stack.push(geometry);
+                        }
+                        if (geometry instanceof Polygon) {
+                           polygons.add(geometry);
+                        }
+                     }
+                  }
+                  final Polygon[] pols = new Polygon[polygons.size()];
+                  polygons.toArray(pols);
+                  final MultiPolygon newSolution = geomFact.createMultiPolygon(pols);
+                  solution = newSolution;
+               }
+            }
+            numProcessed++;
+            addFeature(solution, -1 * distRing, distRing, record);
+            previousExteriorRing = out;
+            if (!collapsedInterior) {
+               previousInteriorRing = in;
+            }
+         }
+      }
+
+   }
+
+
+   protected void addFeature(final Geometry geom,
+                             final double distance,
+                             final Object[] record) {
+
+      final Object[] values = new Object[2 + record.length];
+      values[0] = new Long(numProcessed);
+      values[1] = new Double(distance);
+      for (int i = 0; i < record.length; i++) {
+         values[i + 2] = record[i];
+      }
+      m_Output.addFeature(geom, values);
+
+   }
+
+
+   protected void addFeature(final Geometry geom,
+                             final double distanceFrom,
+                             final double distanceTo,
+                             final Object[] record) {
+
+      final Object[] values = new Object[3 + record.length];
+      values[0] = new Long(numProcessed);
+      values[1] = new Double(distanceFrom);
+      values[2] = new Double(distanceTo);
+      for (int i = 0; i < record.length; i++) {
+         values[i + 3] = record[i];
+      }
+      m_Output.addFeature(geom, values);
+
+   }
+
+
+   public boolean verifyNilGeometry(final Geometry newGeometry) {
+
+      if (newGeometry instanceof GeometryCollection) {
+         if (((GeometryCollection) newGeometry).getNumGeometries() == 0) {
+            //we have collapsed initial geometry
+            return true;
+         }
+      }
+      return false;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/variableDistanceBuffer/VariableDistanceBufferAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/difference/DifferenceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/difference/DifferenceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/difference/DifferenceAlgorithm.java	(revision 369)
@@ -0,0 +1,147 @@
+
+
+package es.unex.sextante.vectorTools.difference;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DifferenceAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER     = "LAYER";
+   public static final String CLIPLAYER = "CLIPLAYER";
+   public static final String RESULT    = "RESULT";
+
+   private IVectorLayer       m_Output;
+   private Geometry           m_ClipGeometry;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final IVectorLayer layerClip = m_Parameters.getParameterValueAsVectorLayer(CLIPLAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layerClip.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_ClipGeometry = computeJtsClippingPoly(layerClip);
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Difference"), layerIn.getShapeType(), layerIn.getFieldTypes(),
+               layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+
+      int i = 0;
+      final int iShapeCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry g = difference(feature.getGeometry());
+         if (g != null) {
+            m_Output.addFeature(g, feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Difference"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer_to_clip"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         m_Parameters.addInputVectorLayer(CLIPLAYER, Sextante.getText("Clipping_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Difference"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public Geometry difference(final Geometry g) throws GeoAlgorithmExecutionException {
+
+      if (g == null) {
+         return null;
+      }
+
+      final Geometry env = g.getEnvelope();
+      if (env == null) {
+         return null;
+      }
+      if (!env.intersects(m_ClipGeometry.getEnvelope())) {
+         return null;
+      }
+      if (g.intersects(m_ClipGeometry)) {
+         try {
+            final Geometry newGeom = g.difference(m_ClipGeometry);
+            return newGeom;
+         }
+         catch (final com.vividsolutions.jts.geom.TopologyException e) {
+            if (!g.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong input geometry");
+            }
+            if (!m_ClipGeometry.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong clipping geometry");
+            }
+         }
+      }
+      return null;
+   }
+
+
+   private Geometry computeJtsClippingPoly(final IVectorLayer layer) throws IteratorException {
+
+      Geometry currentGeometry;
+      Geometry geometry = null;
+      final GeometryFactory geomFact = new GeometryFactory();
+
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         currentGeometry = feature.getGeometry();
+         if (geometry == null) {
+            geometry = currentGeometry;
+         }
+         else {
+            final Geometry[] geoms = new Geometry[2];
+            geoms[0] = geometry;
+            geoms[1] = currentGeometry;
+            final GeometryCollection gc = geomFact.createGeometryCollection(geoms);
+            geometry = gc.buffer(0d);
+         }
+      }
+      iter.close();
+
+      return geometry;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/difference/DifferenceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricProperties/GeometricPropertiesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricProperties/GeometricPropertiesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricProperties/GeometricPropertiesAlgorithm.java	(revision 369)
@@ -0,0 +1,160 @@
+
+
+package es.unex.sextante.vectorTools.geometricProperties;
+
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class GeometricPropertiesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LAYER  = "LAYER";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final Class[] types = { Double.class, Double.class, Double.class, Double.class, Double.class, Double.class, Double.class,
+               Double.class, Double.class };
+      AreaAndPerimeter ap;
+      final String[] sFields = { Sextante.getText("AREA"), Sextante.getText("PERIMETER"), "THICK", "APRel", "APRel2", "QDR",
+               "FD", "RC", "SHAPE" };
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      final int iShapesCount = layerIn.getShapesCount();
+      final Double[][] values = new Double[9][iShapesCount];
+      final IFeatureIterator iter = layerIn.iterator();
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         ap = getAreaAndPerimeter(feature.getGeometry());
+         values[0][i] = new Double(ap.dArea);
+         values[1][i] = new Double(ap.dPerimeter);
+         values[2][i] = new Double(getThickness(ap));
+         values[3][i] = new Double(getAPRelation(ap));
+         values[4][i] = new Double(getAPRelation2(ap));
+         values[5][i] = new Double(getQDR(ap));
+         values[6][i] = new Double(getFD(ap));
+         values[7][i] = new Double(getRC(ap));
+         values[8][i] = new Double(getSHAPE(ap));
+         i++;
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(layerIn.getName());
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, layerIn, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Geometric_properties_of_polygons"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private AreaAndPerimeter getAreaAndPerimeter(final Geometry geom) {
+
+      final AreaAndPerimeter ap = new AreaAndPerimeter();
+      ap.dArea = geom.getArea();
+      ap.dPerimeter = geom.getLength();
+      return ap;
+
+   }
+
+
+   private double getThickness(final AreaAndPerimeter ap) {
+      double thickness;
+      thickness = (4 * Math.PI * ap.dArea) / Math.pow(ap.dPerimeter, 2);
+      return thickness;
+   }
+
+
+   private double getAPRelation(final AreaAndPerimeter ap) {
+      double APR;
+      APR = Math.pow(ap.dPerimeter, 2) / ap.dArea;
+      return APR;
+   }
+
+
+   private double getAPRelation2(final AreaAndPerimeter ap) {
+      double APR2;
+      APR2 = (5 * ap.dPerimeter) / ap.dArea;
+      return APR2;
+   }
+
+
+   private double getQDR(final AreaAndPerimeter ap) {
+      double QDR;
+      QDR = (16 * ap.dArea) / Math.pow(ap.dPerimeter, 2);
+      return QDR;
+   }
+
+
+   private double getRC(final AreaAndPerimeter ap) {
+      double RC;
+      RC = Math.pow((4 * Math.PI * ap.dArea) / Math.pow(ap.dPerimeter, 2), 0.5);
+      return RC;
+   }
+
+
+   private double getFD(final AreaAndPerimeter ap) {
+
+      double FD;
+      FD = (2 * Math.log(ap.dPerimeter)) / Math.log(ap.dArea);
+      return FD;
+   }
+
+
+   private double getSHAPE(final AreaAndPerimeter ap) {
+
+      double SHAPE;
+      SHAPE = ap.dPerimeter / (2 * (Math.sqrt(ap.dArea * Math.PI)));
+      return SHAPE;
+   }
+
+   private class AreaAndPerimeter {
+
+      public double dArea, dPerimeter;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricProperties/GeometricPropertiesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fitNPointsInPolygon/FitNPointsInPolygonAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fitNPointsInPolygon/FitNPointsInPolygonAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fitNPointsInPolygon/FitNPointsInPolygonAlgorithm.java	(revision 369)
@@ -0,0 +1,241 @@
+
+
+package es.unex.sextante.vectorTools.fitNPointsInPolygon;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class FitNPointsInPolygonAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   MAX_REP                           = 50;
+
+   public static final String POLYGONS                          = "POLYGONS";
+   public static final String NPOINTS                           = "NPOINTS";
+   public static final String NPOINTS_METHOD                    = "NPOINTS_METHOD";
+   public static final String METHOD                            = "METHOD";
+   public static final String RESULT                            = "RESULT";
+   public static final String FIELD                             = "FIELD";
+
+   public static final int    NPOINTS_FIXED                     = 0;
+   public static final int    NPOINTS_FROM_FIELD                = 1;
+
+   public static final int    METHOD_REGULARLY_SPACED           = 0;
+   public static final int    METHOD_RANDOMLY                   = 1;
+   public static final int    METHOD_REGULARLY_SPACED_ALTERNATE = 2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iPointsIn = 0;
+      int iRep = 0;
+      int i = 0, j;
+      double x, y;
+      double dArea;
+      double dDist;
+      double dDistInf, dDistSup;
+      final String[] sFields = { "X", "Y" };
+      final Class[] types = { Double.class, Double.class };
+      final ArrayList points = new ArrayList();
+      final ArrayList allPoints = new ArrayList();
+      Envelope extent;
+      final Coordinate coord = new Coordinate();
+      final Object[] values = new Object[2];
+
+      final IVectorLayer polygons = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+      int iPoints = m_Parameters.getParameterValueAsInt(NPOINTS);
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+      final int iNPointsMethod = m_Parameters.getParameterValueAsInt(NPOINTS_METHOD);
+
+      if (!m_bIsAutoExtent) {
+         polygons.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+      final int iShapeCount = polygons.getShapesCount();
+      final IFeatureIterator iter = polygons.iterator();
+      while (iter.hasNext() && !m_Task.isCanceled()) {
+         setProgressText(Integer.toString(i) + "/" + Integer.toString(iShapeCount));
+         final IFeature feature = iter.next();
+         final Geometry geometry = feature.getGeometry();
+         if (iNPointsMethod == NPOINTS_FROM_FIELD) {
+            try {
+               iPoints = Integer.parseInt(feature.getRecord().getValue(iField).toString());
+            }
+            catch (final Exception e) {
+               iPoints = 0;
+            }
+         }
+         extent = geometry.getEnvelopeInternal();
+         if (iMethod == METHOD_REGULARLY_SPACED) {
+            iRep = 0;
+            dArea = geometry.getArea();
+            dDist = Math.sqrt(dArea / iPoints);
+            dDistInf = Math.sqrt(dArea / (iPoints + 2));
+            dDistSup = Math.sqrt(dArea / (iPoints - Math.min(2, iPoints - 1)));
+            if (dDist > 0) {
+               do {
+                  points.clear();
+                  iPointsIn = 0;
+                  iRep++;
+                  for (x = extent.getMinX(); x < extent.getMaxX(); x = x + dDist) {
+                     for (y = extent.getMinY(); y < extent.getMaxY(); y = y + dDist) {
+                        coord.x = x;
+                        coord.y = y;
+                        if (geometry.contains(gf.createPoint(coord))) {
+                           points.add(new Point2D.Double(x, y));
+                           iPointsIn++;
+                           setProgress(iPointsIn, iPoints);
+                        }
+                     }
+                  }
+                  if (iPointsIn > iPoints) {
+                     dDistInf = dDist;
+                     dDist = (dDistInf + dDistSup) / 2.;
+                  }
+                  else if (iPointsIn < iPoints) {
+                     dDistSup = dDist;
+                     dDist = (dDistInf + dDistSup) / 2.;
+                  }
+               }
+               while ((iPointsIn != iPoints) && (iRep < MAX_REP) && !m_Task.isCanceled());
+               for (j = 0; j < points.size(); j++) {
+                  allPoints.add(new Point2D.Double(((Point2D) points.get(j)).getX(), ((Point2D) points.get(j)).getY()));
+               }
+            }
+         }
+         else if (iMethod == METHOD_RANDOMLY) {
+            iPointsIn = 0;
+            do {
+               x = Math.random() * extent.getWidth() + extent.getMinX();
+               y = Math.random() * extent.getHeight() + extent.getMinY();
+               coord.x = x;
+               coord.y = y;
+               if (geometry.contains(gf.createPoint(coord))) {
+                  allPoints.add(new Point2D.Double(x, y));
+                  iPointsIn++;
+               }
+            }
+            while ((iPointsIn != iPoints) && setProgress(iPointsIn, iPoints));
+         }
+         else if (iMethod == METHOD_REGULARLY_SPACED_ALTERNATE) {
+            iRep = 0;
+            dArea = geometry.getArea();
+            dDist = Math.sqrt(dArea / iPoints);
+            dDistInf = Math.sqrt(dArea / (iPoints + 2));
+            dDistSup = Math.sqrt(dArea / (iPoints - Math.min(2, iPoints - 1)));
+            if (dDist > 0) {
+               do {
+                  points.clear();
+                  iPointsIn = 0;
+                  iRep++;
+                  for (x = extent.getMinX(); x < extent.getMaxX(); x = x + dDist) {
+                     boolean bDisplace = false;
+                     for (y = extent.getMinY(); y < extent.getMaxY(); y = y + dDist) {
+                        coord.x = x;
+                        coord.y = y;
+                        if (bDisplace) {
+                           coord.x = coord.x + dDist / 2;
+                        }
+                        bDisplace = !bDisplace;
+                        if (geometry.contains(gf.createPoint(coord))) {
+                           points.add(new Point2D.Double(coord.x, coord.y));
+                           iPointsIn++;
+                           setProgress(iPointsIn, iPoints);
+                        }
+                     }
+                  }
+                  if (iPointsIn > iPoints) {
+                     dDistInf = dDist;
+                     dDist = (dDistInf + dDistSup) / 2.;
+                  }
+                  else if (iPointsIn < iPoints) {
+                     dDistSup = dDist;
+                     dDist = (dDistInf + dDistSup) / 2.;
+                  }
+               }
+               while ((iPointsIn != iPoints) && (iRep < MAX_REP) && !m_Task.isCanceled());
+               for (j = 0; j < points.size(); j++) {
+                  allPoints.add(new Point2D.Double(((Point2D) points.get(j)).getX(), ((Point2D) points.get(j)).getY()));
+               }
+            }
+         }
+         i++;
+      }
+
+      if (allPoints.size() != 0) {
+         final IVectorLayer outputLayer = getNewVectorLayer(RESULT, Sextante.getText("Points"), IVectorLayer.SHAPE_TYPE_POINT,
+                  types, sFields);
+
+         for (i = 0; i < allPoints.size(); i++) {
+            x = ((Point2D) allPoints.get(i)).getX();
+            y = ((Point2D) allPoints.get(i)).getY();
+            values[0] = new Double(x);
+            values[1] = new Double(y);
+            final Geometry pt = gf.createPoint(new Coordinate(x, y));
+            outputLayer.addFeature(pt, values);
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sOptions = { Sextante.getText("Regular_grid"), Sextante.getText("Random"),
+               Sextante.getText("Regular_grid_alternate") };
+
+      final String[] sOptionsNPoints = { Sextante.getText("Fixed_number"), Sextante.getText("Take_from_table_field") };
+
+      setName(Sextante.getText("Adjust_n_point_to_polygon"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field_for_number_of_points"), POLYGONS);
+         m_Parameters.addNumericalValue(NPOINTS, Sextante.getText("Number_of_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 1, Integer.MAX_VALUE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sOptions);
+         m_Parameters.addSelection(NPOINTS_METHOD, Sextante.getText("Number_of_points"), sOptionsNPoints);
+         addOutputVectorLayer(RESULT, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         e.printStackTrace();
+      }
+      catch (final OptionalParentParameterException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fitNPointsInPolygon/FitNPointsInPolygonAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendLinesLayerWithGrids/ExtendLinesLayerWithGridsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendLinesLayerWithGrids/ExtendLinesLayerWithGridsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendLinesLayerWithGrids/ExtendLinesLayerWithGridsAlgorithm.java	(revision 369)
@@ -0,0 +1,153 @@
+
+
+package es.unex.sextante.vectorTools.extendLinesLayerWithGrids;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+/**
+ * Sample the values of Grids on the first and last vertex of each line on a linestring layer. It creates a new Vector Layer
+ * adding two attributes: <i>'1_'rasterlayer</i> for first vertex and <i>'2_'rasterlayer</i> for last vertex.
+ * 
+ * Based on ExtendPointsLayerWithGridsAlgorithm
+ * 
+ * @author Nacho Varela
+ * 
+ */
+
+//TODO Calculate slope, differences between values, etc...
+public class ExtendLinesLayerWithGridsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER       = "LAYER";
+   public static final String GRIDS       = "GRIDS";
+   public static final String INTERPOLATE = "INTERPOLATE";
+   public static final String RESULT      = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private ArrayList          m_Grids;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Sample_lines_extreme_points"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addMultipleInput(GRIDS, Sextante.getText("Raster_layers"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addBoolean(INTERPOLATE, Sextante.getText("Use_interpolation"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Sampled_lines"), OutputVectorLayer.SHAPE_TYPE_LINE, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iTotalProgress;
+      int iProgress = 0;
+      int iLayer;
+      int iShapeCount;
+      double[][] dValues;
+      boolean bInterpolate;
+      IRasterLayer grid;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_Grids = (ArrayList) m_Parameters.getParameterValueAsObject(GRIDS);
+      bInterpolate = m_Parameters.getParameterValueAsBoolean(INTERPOLATE);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iShapeCount = m_Layer.getShapesCount();
+
+      dValues = new double[2 * m_Grids.size()][iShapeCount];
+      iTotalProgress = 2 * iShapeCount * m_Grids.size();
+      final IFeatureIterator iter = m_Layer.iterator();
+      for (iLayer = 0; iLayer < m_Grids.size(); iLayer++) {
+         i = 0;
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_Grids.get(iLayer);
+         final IRasterLayer raster = rab.getRasterLayer();
+         final int iBand = rab.getBand();
+         raster.setFullExtent();
+         if (!bInterpolate) {
+            raster.setInterpolationMethod(GridWrapper.INTERPOLATION_NearestNeighbour);
+         }
+         while (iter.hasNext() && setProgress(iProgress, iTotalProgress)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Coordinate[] coords = geom.getCoordinates();
+            dValues[iLayer][i] = raster.getValueAt(coords[0].x, coords[0].y, iBand);
+            dValues[iLayer + 1][i] = raster.getValueAt(coords[coords.length - 1].x, coords[coords.length - 1].y, iBand);
+            iProgress++;
+            i++;
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      // 2 * m_Grids.size() because first and last vertex has its own attribute
+      final Object[][] values = new Object[2 * m_Grids.size()][iShapeCount];
+      final String[] sNames = new String[2 * m_Grids.size()];
+      final Class[] types = new Class[2 * m_Grids.size()];
+      for (i = 0; i < m_Grids.size(); i++) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_Grids.get(i);
+         grid = rab.getRasterLayer();
+         sNames[i] = "1_" + grid.getName();
+
+         types[i] = Double.class;
+         for (j = 0; j < iShapeCount; j++) {
+            values[i][j] = new Double(dValues[i][j]);
+         }
+         sNames[(i + 1)] = "2_" + grid.getName();
+
+         types[(i + 1)] = Double.class;
+         for (j = 0; j < (iShapeCount); j++) {
+            values[i][j] = new Double(dValues[i][j]);
+            values[(i + 1)][j] = new Double(dValues[(i + 1)][j]);
+         }
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(m_Layer.getName() + "[" + Sextante.getText("sampled") + "]");
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_Layer, channel, sNames, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/extendLinesLayerWithGrids/ExtendLinesLayerWithGridsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleParametersPanel.java	(revision 369)
@@ -0,0 +1,267 @@
+
+
+package es.unex.sextante.vectorTools.dissolveMultiple;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.util.List;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ScrollPaneConstants;
+
+import org.japura.gui.Anchor;
+import org.japura.gui.BatchSelection;
+import org.japura.gui.CheckComboBox;
+import org.japura.gui.EmbeddedComponent;
+import org.japura.gui.model.ListCheckModel;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+
+
+public class DissolveMultipleParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private GeoAlgorithm                m_Algorithm;
+   private JLabel                      jLabelGroupings;
+   private CheckComboBox               fieldsBox;
+   private JTable                      jTableGroupings;
+   private JComboBox                   jComboBoxLayers;
+   private JLabel                      jLabelField;
+   private JLabel                      jLabelLayer;
+   private JScrollPane                 jScrollPaneFields;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+
+
+   public DissolveMultipleParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      final ParametersSet params = m_Algorithm.getParameters();
+      try {
+         params.getParameter(DissolveMultipleAlgorithm.LAYER).setParameterValue(layer);
+         final StringBuffer sb = new StringBuffer();
+         final List<Object> selected = fieldsBox.getModel().getCheckeds();
+         for (int i = 0; i < selected.size(); i++) {
+            if (i == 0) {
+               sb.append(selected.get(i).toString());
+            }
+            else {
+               sb.append("," + selected.get(i).toString());
+            }
+         }
+         params.getParameter(DissolveMultipleAlgorithm.GROUPING_FIELDS).setParameterValue(sb.toString());
+         final DissolveTableModel model = (DissolveTableModel) jTableGroupings.getModel();
+         params.getParameter(DissolveMultipleAlgorithm.GROUPING_FUNCTIONS).setParameterValue(model.getAsString());
+      }
+      catch (final WrongParameterIDException e) {
+         throw new WrongInputException();
+      }
+
+
+      IOutputChannel channel;
+      Output out;
+      try {
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         out = ooSet.getOutput(DissolveMultipleAlgorithm.RESULT);
+         channel = outputChannelSelectionPanel.getOutputChannel();
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      if (channel instanceof OverwriteOutputChannel) {
+         final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+         if (!ooc.getLayer().canBeEdited()) {
+            throw new LayerCannotBeOverwrittenException();
+         }
+      }
+      out.setOutputChannel(channel);
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] {
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 5.0, 25.0, 5.0, 25.0, 5.0, 25.0, TableLayoutConstants.FILL, 5.0, 20.0, 5.0 } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(469, 257));
+            {
+               jLabelGroupings = new JLabel();
+               this.add(jLabelGroupings, "1, 5");
+               jLabelGroupings.setText(Sextante.getText("Summary_statistics"));
+            }
+            {
+               jScrollPaneFields = new JScrollPane();
+               jScrollPaneFields.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               this.add(jScrollPaneFields, "1, 6, 2, 6");
+               {
+                  jTableGroupings = new JTable();
+                  jScrollPaneFields.setViewportView(jTableGroupings);
+               }
+            }
+            {
+               jLabelLayer = new JLabel();
+               this.add(jLabelLayer, "1, 1");
+               jLabelLayer.setText(Sextante.getText("Layer"));
+            }
+            {
+               jLabelField = new JLabel();
+               this.add(jLabelField, "1, 3");
+               jLabelField.setText(Sextante.getText("Fields"));
+            }
+            {
+               fieldsBox = new CheckComboBox();
+               fieldsBox.setTextFor(CheckComboBox.NONE, Sextante.getText("no_elements_selected"));
+               fieldsBox.setTextFor(CheckComboBox.MULTIPLE, Sextante.getText("multiple_elements_selected"));
+               final BatchSelection bs = new BatchSelection.CheckBox();
+               final EmbeddedComponent comp = new EmbeddedComponent(bs, Anchor.NORTH);
+               fieldsBox.setEmbeddedComponent(comp);
+               this.add(fieldsBox, "2, 3");
+            }
+            {
+               final ComboBoxModel jComboBoxLayersModel = new DefaultComboBoxModel(getLayers());
+               jComboBoxLayers = new JComboBox();
+               this.add(jComboBoxLayers, "2, 1");
+               jComboBoxLayers.setModel(jComboBoxLayersModel);
+               jComboBoxLayers.addItemListener(new java.awt.event.ItemListener() {
+                  public void itemStateChanged(final java.awt.event.ItemEvent e) {
+                     setFields();
+                     setTableModel();
+                  }
+               });
+               jComboBoxLayers.setSelectedIndex(0);
+               setFields();
+               //fieldsBox.initGUI();
+               setTableModel();
+            }
+            {
+               final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+               final Output out = ooSet.getOutput(DissolveMultipleAlgorithm.RESULT);
+               outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+               this.add(outputChannelSelectionPanel, "2,8");
+               this.add(new JLabel(Sextante.getText("Result")), "1,8");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void setFields() {
+
+      final String[] fields = getFields();
+      final ListCheckModel model = fieldsBox.getModel();
+      model.clear();
+      for (final Object obj : fields) {
+         model.addElement(obj);
+      }
+
+      fieldsBox.setModel(model);
+      //fieldsBox.setFields(getFields());
+
+   }
+
+
+   private void setTableModel() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      final DissolveTableModel tableModel = new DissolveTableModel(layer);
+      jTableGroupings.setModel(tableModel);
+
+   }
+
+
+   private String[] getFields() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      return getFields(layer);
+
+   }
+
+
+   private String[] getFields(final IVectorLayer layer) {
+
+      return layer.getFieldNames();
+
+   }
+
+
+   private ObjectAndDescription[] getLayers() {
+
+      final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      for (int i = 0; i < layers.length; i++) {
+         oad[i] = new ObjectAndDescription(layers[i].getName(), layers[i]);
+      }
+      return oad;
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String sOutputName,
+                              final String sValue) {
+
+      outputChannelSelectionPanel.setText(sValue);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+      // TODO Auto-generated method stub
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleAlgorithm.java	(revision 369)
@@ -0,0 +1,267 @@
+
+
+package es.unex.sextante.vectorTools.dissolveMultiple;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DissolveMultipleAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT             = "RESULT";
+   public static final String LAYER              = "LAYER";
+   public static final String GROUPING_FIELDS    = "GROUPING_FIELD";
+   public static final String GROUPING_FUNCTIONS = "GROUPING_FUNCTIONS";
+
+   public static final int    SUM                = 0;
+   public static final int    MIN                = 1;
+   public static final int    MAX                = 2;
+   public static final int    AVG                = 3;
+   public static final String FUNCTIONS[]        = { "SUM", "MIN", "MAX", "AVG" };
+
+   private IVectorLayer       m_LayerIn;
+   private int[]              m_iFields;
+   private Grouping[]         m_Groupings;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_LayerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_LayerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_iFields = getFields(m_Parameters.getParameterValueAsString(GROUPING_FIELDS));
+      final String sGroupings = m_Parameters.getParameterValueAsString(GROUPING_FUNCTIONS);
+      m_Groupings = getGroupings(sGroupings);
+
+      final String[] sFields = new String[m_iFields.length + m_Groupings.length];
+      final Class[] types = new Class[m_iFields.length + m_Groupings.length];
+      for (int i = 0; i < types.length; i++) {
+         sFields[i] = m_LayerIn.getFieldName(m_iFields[i]);
+         types[i] = m_LayerIn.getFieldType(m_iFields[i]);
+      }
+      for (int i = 0; i < m_Groupings.length; i++) {
+         sFields[i + m_iFields.length] = m_LayerIn.getFieldName(m_Groupings[i].field) + "_" + FUNCTIONS[m_Groupings[i].function];
+         types[i + m_iFields.length] = Double.class;
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, m_LayerIn.getName(), m_LayerIn.getShapeType(), types, sFields);
+
+      final int iShapesCount = m_LayerIn.getShapesCount();
+
+      final HashMap<ArrayList, Geometry> geoms = new HashMap<ArrayList, Geometry>();
+      final HashMap[] stats = new HashMap[m_LayerIn.getFieldCount()];
+      for (int i = 0; i < stats.length; i++) {
+         stats[i] = new HashMap();
+      }
+      final IFeatureIterator iter = m_LayerIn.iterator();
+      int i = 0;
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         //String sClass = "";
+         final ArrayList clazz = new ArrayList();
+         final IRecord record = feature.getRecord();
+         //sClass = record.getValue(m_iFields[0]).toString();
+         for (int j = 0; j < m_iFields.length; j++) {
+            clazz.add(record.getValue(m_iFields[j]));
+            //sClass = sClass + "@" + record.getValue(m_iFields[j]).toString();
+         }
+
+         final Geometry geom = geoms.get(clazz);
+         if (geom == null) {
+            geoms.put(clazz, feature.getGeometry());
+            for (final HashMap element : stats) {
+               element.put(clazz, new SimpleStats());
+            }
+         }
+         else {
+            final Geometry[] geomsToUnion = new Geometry[2];
+            geomsToUnion[0] = geom;
+            geomsToUnion[1] = feature.getGeometry();
+            final GeometryFactory fact = geom.getFactory();
+            final Geometry geomColl = fact.createGeometryCollection(geomsToUnion);
+            geoms.put(clazz, geomColl);
+         }
+         for (int j = 0; j < stats.length; j++) {
+            try {
+               final double dValue = Double.parseDouble(record.getValue(j).toString());
+               ((SimpleStats) stats[j].get(clazz)).addValue(dValue);
+            }
+            catch (final Exception e) {
+            }
+         }
+
+         i++;
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Set set = geoms.keySet();
+      final Iterator keys = set.iterator();
+      i = 0;
+      while (keys.hasNext() && setProgress(i, geoms.size())) {
+         final ArrayList clazz = (ArrayList) keys.next();
+         final Geometry geom = geoms.get(clazz).union();
+         final SimpleStats stat[] = new SimpleStats[m_LayerIn.getFieldCount()];
+         for (int j = 0; j < stat.length; j++) {
+            stat[j] = (SimpleStats) stats[j].get(clazz);
+         }
+         final Object[] values = calculateRecord(stat, clazz);
+         output.addFeature(geom, values);
+         i++;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private int[] getFields(final String sFields) throws GeoAlgorithmExecutionException {
+
+      final String[] fields = sFields.split(",");
+
+      if (fields.length == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("At_Least_One_Field_Needed"));
+      }
+      final int[] iFields = new int[fields.length];
+      for (int i = 0; i < fields.length; i++) {
+         iFields[i] = m_LayerIn.getFieldIndexByName(fields[i]);
+         if (iFields[i] == -1) {
+            throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_Field_Name") + ":" + fields[i]);
+         }
+      }
+      return iFields;
+
+   }
+
+
+   private Object[] calculateRecord(final SimpleStats[] stats,
+                                    final ArrayList clazz) {
+
+      double dValue;
+      final Object[] values = new Object[m_Groupings.length + m_iFields.length];
+      //final String[] sClasses = clazz.split("@");
+      for (int i = 0; i < m_iFields.length; i++) {
+         values[i] = clazz.get(i);//sClasses[i];
+      }
+      for (int i = 0; i < m_Groupings.length; i++) {
+         final int iField = m_Groupings[i].field;
+         final int iFunction = m_Groupings[i].function;
+         switch (iFunction) {
+            case MIN:
+               dValue = stats[iField].getMin();
+               break;
+            case MAX:
+               dValue = stats[iField].getMax();
+               break;
+            case SUM:
+               dValue = stats[iField].getSum();
+               break;
+            case AVG:
+            default:
+               dValue = stats[iField].getMean();
+               break;
+         }
+         if (stats[iField].getCount() > 0) {
+            values[i + m_iFields.length] = new Double(dValue);
+         }
+         else {
+            values[i + m_iFields.length] = null;
+         }
+      }
+
+      return values;
+
+   }
+
+
+   private Grouping[] getGroupings(final String sGroupings) throws GeoAlgorithmExecutionException {
+
+      if (sGroupings.trim().equals("")) {
+         return new Grouping[0];
+      }
+      try {
+         final String[] sTokens = sGroupings.split(",");
+         if (sTokens.length % 2 != 0) {
+            throw new GeoAlgorithmExecutionException("Wrong groupings");
+         }
+         final Grouping[] groupings = new Grouping[sTokens.length / 2];
+
+         final int iGrouping = 0;
+         for (int i = 0; i < sTokens.length; i++) {
+            groupings[iGrouping] = new Grouping();
+            groupings[iGrouping].field = Integer.parseInt(sTokens[i]);
+            if ((groupings[iGrouping].field >= m_LayerIn.getFieldCount()) || (groupings[iGrouping].field < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+            i++;
+            groupings[iGrouping].function = Integer.parseInt(sTokens[i]);
+            if ((groupings[iGrouping].function > 4) || (groupings[iGrouping].function < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+         }
+         return groupings;
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException("Wrong groupings");
+      }
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Dissolve_multiple"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(GROUPING_FIELDS, Sextante.getText("Fields"));
+         m_Parameters.addString(GROUPING_FUNCTIONS, Sextante.getText("Summary_statistics"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+
+   }
+
+   private class Grouping {
+
+      public int field;
+      public int function;
+
+
+      public Grouping() {
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveMultipleAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/FieldsBox.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/FieldsBox.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/FieldsBox.java	(revision 369)
@@ -0,0 +1,162 @@
+
+
+package es.unex.sextante.vectorTools.dissolveMultiple;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.algorithm.MultipleInputSelectionDialog;
+
+
+public class FieldsBox
+         extends
+            JPanel {
+
+   private Object[]   m_Values;
+   private ArrayList  m_SelectedIndices = new ArrayList();
+   private JTextField textField;
+   private JButton    button;
+
+
+   public FieldsBox() {
+
+      super();
+
+      //m_Values = values;
+
+      //initGUI();
+
+   }
+
+
+   void initGUI() {
+
+      button = new JButton("...");
+      textField = new JTextField(Sextante.getText("0_elements_selected"));
+      textField.setEditable(false);
+
+      button.addActionListener(new ActionListener() {
+         public void actionPerformed(final ActionEvent evt) {
+            btnActionPerformed(evt);
+         }
+      });
+
+      final TableLayout thisLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL, 25.0 },
+               { TableLayoutConstants.FILL } });
+      this.setLayout(thisLayout);
+      this.add(textField, "0,  0");
+      this.add(button, "1,  0");
+   }
+
+
+   /**
+    * Returns a list of all the objects selected using this panel
+    * 
+    * @return a list of selected objects
+    */
+   public ArrayList getSelectedObjects() {
+
+      int iIndex;
+      final ArrayList selected = new ArrayList();
+
+      for (int i = 0; i < m_SelectedIndices.size(); i++) {
+         iIndex = ((Integer) m_SelectedIndices.get(i)).intValue();
+         selected.add(this.m_Values[iIndex]);
+      }
+
+      return selected;
+
+   }
+
+
+   private void btnActionPerformed(final ActionEvent e) {
+
+      int iCount;
+      final StringBuffer sText = new StringBuffer();
+
+      final Frame window = new Frame();
+
+      final MultipleInputSelectionDialog dialog = new MultipleInputSelectionDialog(window, m_Values, m_SelectedIndices);
+
+      dialog.pack();
+      dialog.setVisible(true);
+
+      iCount = m_SelectedIndices.size();
+      sText.append(Integer.toString(iCount));
+      if (iCount == 1) {
+         sText.append(" " + Sextante.getText("element_selected"));
+      }
+      else {
+         sText.append(" " + Sextante.getText("elements_selected"));
+      }
+
+      textField.setText(sText.toString());
+
+   }
+
+
+   public Object[] getValues() {
+
+      return m_Values;
+
+   }
+
+
+   public void setSelectedIndices(final ArrayList selectedIndices) {
+
+      m_SelectedIndices = selectedIndices;
+      final StringBuffer sText = new StringBuffer();
+      final int iCount = m_SelectedIndices.size();
+      sText.append(Integer.toString(iCount));
+      if (iCount == 1) {
+         sText.append(" " + Sextante.getText("element_selected"));
+      }
+      else {
+         sText.append(" " + Sextante.getText("elements_selected"));
+      }
+
+      textField.setText(sText.toString());
+
+   }
+
+
+   public String getFieldsAsString() {
+
+      final StringBuffer sb = new StringBuffer();
+      boolean bFirst = true;
+      for (int i = 0; i < m_SelectedIndices.size(); i++) {
+         final int iIndex = ((Integer) m_SelectedIndices.get(i)).intValue();
+         if (bFirst) {
+            sb.append(m_Values[iIndex].toString());
+            bFirst = false;
+         }
+         else {
+            sb.append("," + m_Values[iIndex].toString());
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+   public void setFields(final String[] fields) {
+
+      m_SelectedIndices.clear();
+      m_Values = fields;
+
+      textField = new JTextField(Sextante.getText("0_elements_selected"));//initGUI();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/FieldsBox.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveTableModel.java	(revision 369)
@@ -0,0 +1,130 @@
+package es.unex.sextante.vectorTools.dissolveMultiple;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class DissolveTableModel
+         extends
+            AbstractTableModel {
+
+   private final IVectorLayer m_Layer;
+   private final Object[][]   m_Data;
+
+
+   public DissolveTableModel(final IVectorLayer layer) {
+
+      m_Layer = layer;
+      m_Data = new Object[layer.getFieldCount()][5];
+      for (int i = 0; i < layer.getFieldCount(); i++) {
+         m_Data[i][0] = layer.getFieldName(i);
+         for (int j = 0; j < 4; j++) {
+            m_Data[i][j + 1] = new Boolean(false);
+         }
+      }
+
+   }
+
+
+   public int getColumnCount() {
+
+      return 5;
+
+   }
+
+
+   @Override
+   public String getColumnName(final int col) {
+
+      if (col == 0) {
+         return "FIELD";
+      }
+      else {
+         return DissolveMultipleAlgorithm.FUNCTIONS[col - 1];
+      }
+
+
+   }
+
+
+   public int getRowCount() {
+
+      return m_Layer.getFieldCount();
+
+   }
+
+
+   public Object getValueAt(final int row,
+                            final int col) {
+
+      return m_Data[row][col];
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int row,
+                                 final int col) {
+
+      if (col == 0) {
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int row,
+                          final int col) {
+
+      m_Data[row][col] = value;
+      fireTableCellUpdated(row, col);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int columnIndex) {
+
+      if (columnIndex != 0) {
+         return Boolean.class;
+      }
+      else {
+         return String.class;
+      }
+
+   }
+
+
+   public String getAsString() {
+
+      final StringBuffer sb = new StringBuffer();
+      boolean bFirst = true;
+      for (int i = 0; i < m_Data.length; i++) {
+         for (int j = 1; j < 5; j++) {
+            final Boolean b = (Boolean) m_Data[i][j];
+            if (b) {
+               if (!bFirst) {
+                  sb.append(",");
+               }
+               else {
+                  bFirst = false;
+               }
+               sb.append(Integer.toString(i));
+               sb.append(",");
+               sb.append(Integer.toString(j - 1));
+            }
+         }
+
+      }
+
+      return sb.toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolveMultiple/DissolveTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/intersection/IntersectionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/intersection/IntersectionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/intersection/IntersectionAlgorithm.java	(revision 369)
@@ -0,0 +1,113 @@
+
+
+package es.unex.sextante.vectorTools.intersection;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class IntersectionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER1 = "LAYER1";
+   public static final String LAYER2 = "LAYER2";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer1 = m_Parameters.getParameterValueAsVectorLayer(LAYER1);
+      final IVectorLayer layer2 = m_Parameters.getParameterValueAsVectorLayer(LAYER2);
+
+      if (!m_bIsAutoExtent) {
+         layer1.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layer2.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] fieldTypes = new Class[layer1.getFieldCount() + layer2.getFieldCount()];
+      final String[] sFieldNames = new String[fieldTypes.length];
+
+      String layerName1 = layer1.getName();
+      String layerName2 = layer2.getName();
+      if (layerName1.equalsIgnoreCase(layerName2)) {
+         layerName1 = layerName1 + "1";
+         layerName2 = layerName2 + "2";
+      }
+
+      for (int i = 0; i < layer1.getFieldCount(); i++) {
+         fieldTypes[i] = layer1.getFieldType(i);
+         sFieldNames[i] = layer1.getFieldName(i) + "_" + layerName1;
+      }
+      for (int i = 0; i < layer2.getFieldCount(); i++) {
+         fieldTypes[i + layer1.getFieldCount()] = layer2.getFieldType(i);
+         sFieldNames[i + layer1.getFieldCount()] = layer2.getFieldName(i) + "_" + layerName2;
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Intersection"), IVectorLayer.SHAPE_TYPE_POLYGON, fieldTypes,
+               sFieldNames);
+
+      final IFeatureIterator iter = layer1.iterator();
+      IFeatureIterator iter2 = layer2.iterator();
+
+      int i = 0;
+      final int iShapeCount = layer1.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Object[] values = feature.getRecord().getValues();
+         final Geometry g = feature.getGeometry();
+         iter2 = layer2.iterator();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            final Geometry g2 = feature2.getGeometry();
+            if (g2.intersects(g)) {
+               final Object[] values2 = feature2.getRecord().getValues();
+               final Geometry inter = g.intersection(g2);
+               final Object[] resultValues = new Object[values.length + values2.length];
+               System.arraycopy(values, 0, resultValues, 0, values.length);
+               System.arraycopy(values2, 0, resultValues, values.length, values2.length);
+               m_Output.addFeature(inter, resultValues);
+            }
+         }
+         i++;
+      }
+      iter.close();
+      iter2.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Intersection"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER1, Sextante.getText("Layer_1"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addInputVectorLayer(LAYER2, Sextante.getText("Layer_2"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Intersection"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/intersection/IntersectionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/placePointsOnLines/PlacePointsOnLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/placePointsOnLines/PlacePointsOnLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/placePointsOnLines/PlacePointsOnLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,151 @@
+
+
+package es.unex.sextante.vectorTools.placePointsOnLines;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+
+
+public class PlacePointsOnLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String                 RESULT = "RESULT";
+   public static final String                 FIELD  = "FIELD";
+   public static final String                 TABLE  = "TABLE";
+   public static final String                 LINES  = "LINES";
+
+   private IVectorLayer                       m_Output;
+   private HashMap<String, ArrayList<Double>> m_Map;
+   private int                                m_iField;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      m_Map = new HashMap<String, ArrayList<Double>>();
+
+      IVectorLayer lines;
+
+      try {
+         m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+         lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+         final FixedTableModel table = (FixedTableModel) m_Parameters.getParameterValueAsObject(TABLE);
+         for (int j = 0; j < table.getRowCount(); j++) {
+            final String sName = table.getValueAt(j, 0).toString();
+            final String sDistance = table.getValueAt(j, 1).toString();
+            ArrayList<Double> distances = m_Map.get(sName);
+            if (distances == null) {
+               distances = new ArrayList<Double>();
+               m_Map.put(sName, distances);
+            }
+            distances.add(Double.parseDouble(sDistance));
+         }
+
+         m_Output = getNewVectorLayer(RESULT, Sextante.getText("Points") + "(" + lines.getName() + ")",
+                  IVectorLayer.SHAPE_TYPE_POINT, new Class[] { String.class }, new String[] { "ID" });
+
+         i = 0;
+         final int iShapeCount = lines.getShapesCount();
+         final IFeatureIterator iter = lines.iterator();
+         while (iter.hasNext() && setProgress(i, iShapeCount)) {
+            final IFeature feature = iter.next();
+            processLine(feature);
+            i++;
+         }
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processLine(final IFeature feature) {
+
+      final String sName = feature.getRecord().getValue(m_iField).toString();
+
+      final ArrayList<Double> distances = m_Map.get(sName);
+
+      if (distances != null) {
+         for (int i = 0; i < distances.size(); i++) {
+            addPoint(feature, distances.get(i));
+         }
+      }
+
+   }
+
+
+   private void addPoint(final IFeature feature,
+                         final Double dist) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      boolean bPointAdded = false;
+      double dDist = 0;
+      double dDistToNextPoint;
+
+      final Coordinate[] coords = feature.getGeometry().getCoordinates();
+
+      for (int i = 0; i < coords.length - 1; i++) {
+         dDistToNextPoint = coords[i].distance(coords[i + 1]);
+         if (dDist + dDistToNextPoint > dist.doubleValue()) {
+            final double dDistToPoint = dist.doubleValue() - dDist;
+            final double dRatio = dDistToPoint / dDistToNextPoint;
+            final double dDifX = coords[i + 1].x - coords[i].x;
+            final double dDifY = coords[i + 1].y - coords[i].y;
+            final Coordinate coord = new Coordinate(coords[i].x + dDifX * dRatio, coords[i].y + dDifY * dRatio);
+            m_Output.addFeature(gf.createPoint(coord), feature.getRecord().getValues());
+            bPointAdded = true;
+            break;
+         }
+         dDist += dDistToNextPoint;
+      }
+
+      if (!bPointAdded) {
+         final String sName = feature.getRecord().getValue(m_iField).toString();
+         Sextante.addWarningToLog(Sextante.getText("Could_not_add_point_distance_too_large") + ": " + sName + ","
+                                  + dist.toString());
+      }
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Place_point_on_line_at_distance"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LINES);
+         m_Parameters.addFixedTable(TABLE, Sextante.getText("Table"), new String[] { Sextante.getText("Name"),
+                  Sextante.getText("Distance") }, 1, false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/placePointsOnLines/PlacePointsOnLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanPointsLayer/CleanPointsLayerAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanPointsLayer/CleanPointsLayerAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanPointsLayer/CleanPointsLayerAlgorithm.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.vectorTools.cleanPointsLayer;
+
+import java.util.Arrays;
+import java.util.BitSet;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class CleanPointsLayerAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Clean_points_layer"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, layer.getName(), layer.getShapeType(), layer.getFieldTypes(),
+               layer.getFieldNames());
+
+
+      i = 0;
+      iShapeCount = layer.getShapesCount();
+      final Coordinate coords[] = new Coordinate[iShapeCount];
+      IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         coords[i] = new Coordinate(coord.x, coord.y, i);
+         i++;
+      }
+      iter.close();
+
+      Arrays.sort(coords);
+
+      final BitSet add = new BitSet(iShapeCount);
+
+      add.set((int) coords[0].z);
+      for (int j = 1; j < coords.length; j++) {
+         if (coords[j].compareTo(coords[j - 1]) != 0) {
+            add.set((int) coords[j].z);
+         }
+      }
+
+      i = 0;
+      iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         if (add.get(i)) {
+            output.addFeature(feature.getGeometry(), feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanPointsLayer/CleanPointsLayerAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLinesB/GeometricPropertiesLinesBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLinesB/GeometricPropertiesLinesBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLinesB/GeometricPropertiesLinesBAlgorithm.java	(revision 369)
@@ -0,0 +1,268 @@
+
+
+package es.unex.sextante.vectorTools.geometricPropertiesLinesB;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.algorithm.Angle;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class GeometricPropertiesLinesBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT   = "RESULT";
+   public static final String LINES    = "LINES";
+   public static final String DISTANCE = "DISTANCE";
+   public static final String DEM      = "DEM";
+
+   private IRasterLayer       m_DEM;
+   private double             m_dDist;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Geometric_properties_of_lines_b"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("DEM"), true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Distance_between_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE, LINES);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final Class[] types = { Double.class, Double.class, Double.class, Double.class, Double.class, Double.class, Double.class };
+      final String[] sFields = { Sextante.getText("Length"), Sextante.getText("Straight_length"), Sextante.getText("Sinuosity"),
+               Sextante.getText("Average_angle"), Sextante.getText("Direction"), Sextante.getText("Slope"),
+               "Max." + Sextante.getText("Slope")/*, Sextante.getText("Slope" + "%"),
+                                                                           "Max." + Sextante.getText("Slope")+ "%"*/};
+
+      m_dDist = m_Parameters.getParameterValueAsDouble(DISTANCE);
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      if (lines.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException("zero lines in layer");
+      }
+
+      i = 0;
+      final int iShapesCount = lines.getShapesCount();
+      final Object[][] values = new Object[sFields.length][iShapesCount];
+      final IFeatureIterator iter = lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         final LineProperties lp = getProperties(feature.getGeometry());
+         final AdditionalStats stats = getAdditionalStats(feature.getGeometry());
+         values[0][i] = new Double(lp.length);
+         values[1][i] = new Double(lp.straightLength);
+         values[2][i] = new Double(lp.sinuosity);
+         values[3][i] = new Double(stats.meanAngle);
+         values[4][i] = new Double(lp.direction);
+         values[5][i] = new Double(stats.meanSlope * 100);
+         values[6][i] = new Double(stats.maxSlope * 100);
+         i++;
+      }
+
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = m_OutputObjects.getOutput(RESULT);
+      out.setDescription(lines.getName());
+      out.setName("RESULT");
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, lines, channel, sFields, values, types));
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private AdditionalStats getAdditionalStats(final Geometry geom) {
+
+      int i, j;
+      int iPoints;
+      double dX1, dX2, dY1, dY2;
+      double dAddedPointX, dAddedPointY;
+      double dDX, dDY;
+      double dRemainingDistFromLastSegment = 0;
+      double dDistToNextPoint;
+      double dDist;
+      Point point;
+
+      final Coordinate[] coords = geom.getCoordinates();
+
+      final ArrayList<Point> points = new ArrayList<Point>();
+
+      final GeometryFactory gf = new GeometryFactory();
+      dAddedPointX = dX1 = coords[0].x;
+      dAddedPointY = dY1 = coords[0].y;
+      point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+      points.add(point);
+      for (i = 0; i < coords.length - 1; i++) {
+         dX2 = coords[i + 1].x;
+         dX1 = coords[i].x;
+         dY2 = coords[i + 1].y;
+         dY1 = coords[i].y;
+         dDX = dX2 - dX1;
+         dDY = dY2 - dY1;
+         dDistToNextPoint = Math.sqrt(dDX * dDX + dDY * dDY);
+
+         if (dRemainingDistFromLastSegment + dDistToNextPoint > m_dDist) {
+            iPoints = (int) ((dRemainingDistFromLastSegment + dDistToNextPoint) / m_dDist);
+            dDist = m_dDist - dRemainingDistFromLastSegment;
+            for (j = 0; j < iPoints; j++) {
+               dDist = m_dDist - dRemainingDistFromLastSegment;
+               dDist += j * m_dDist;
+               dAddedPointX = dX1 + dDist * dDX / dDistToNextPoint;
+               dAddedPointY = dY1 + dDist * dDY / dDistToNextPoint;
+               point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+               points.add(point);
+            }
+            dDX = dX2 - dAddedPointX;
+            dDY = dY2 - dAddedPointY;
+            dRemainingDistFromLastSegment = Math.sqrt(dDX * dDX + dDY * dDY);
+         }
+         else {
+            dRemainingDistFromLastSegment += dDistToNextPoint;
+         }
+
+      }
+
+      final SimpleStats slopeStats = new SimpleStats();
+      final SimpleStats angleStats = new SimpleStats();
+      for (int k = 0; k < points.size() - 1; k++) {
+         point = points.get(k);
+         final double dElevation = m_DEM.getValueAt(point.getX(), point.getY());
+         final Point point2 = points.get(k + 1);
+         final double dElevation2 = m_DEM.getValueAt(point2.getX(), point2.getY());
+         dDist = Math.sqrt(Math.pow(point.getX() - point2.getX(), 2.) + Math.pow(point.getY() - point2.getY(), 2.));
+         final double dSlope = Math.abs((dElevation2 - dElevation) / dDist);
+         slopeStats.addValue(dSlope);
+         if ((k > 0) && (k < points.size() - 2)) {
+            final Point point3 = points.get(k + 2);
+            final double dAngle = getAngle(point, point2, point3);
+            angleStats.addValue(dAngle);
+         }
+      }
+
+      final AdditionalStats aStats = new AdditionalStats();
+      aStats.maxSlope = slopeStats.getMax();
+      aStats.meanSlope = slopeStats.getMean();
+      aStats.meanAngle = angleStats.getMean();
+      return aStats;
+
+   }
+
+
+   private LineProperties getProperties(final Geometry geometry) {
+
+      double x, y;
+      double dDifX, dDifY;
+      double dInitX, dInitY;
+      double dDist = 0, dStraightDist, dDirection;
+
+      final Coordinate[] coords = geometry.getCoordinates();
+
+      dInitX = x = coords[0].x;
+      dInitY = y = coords[0].y;
+
+      final LineProperties lp = new LineProperties();
+      for (int i = 0; i < coords.length; i++) {
+         if ((i > 0) && (i < coords.length - 1)) {
+            lp.angleStats.addValue(getAngle(coords[i - 1], coords[i], coords[i + 1]));
+         }
+         dDifX = coords[i].x - x;
+         dDifY = coords[i].y - y;
+         dDist += Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+         x = coords[i].x;
+         y = coords[i].y;
+      }
+
+      dDifX = x - dInitX;
+      dDifY = y - dInitY;
+
+      dStraightDist = Math.sqrt(Math.pow(dDifX, 2) + Math.pow(dDifY, 2));
+      dDirection = Math.toDegrees(Math.atan2(dDifX, dDifY));
+
+      lp.length = dDist;
+      lp.straightLength = dStraightDist;
+      lp.sinuosity = dDist / dStraightDist;
+      lp.direction = dDirection;
+
+      return lp;
+
+   }
+
+
+   private double getAngle(final Coordinate p1,
+                           final Coordinate p2,
+                           final Coordinate p3) {
+
+      return Math.toDegrees(Angle.angleBetween(p1, p2, p3));
+
+   }
+
+
+   private double getAngle(final Point p1,
+                           final Point p2,
+                           final Point p3) {
+
+      final Coordinate c1 = new Coordinate(p1.getX(), p1.getY());
+      final Coordinate c2 = new Coordinate(p2.getX(), p2.getY());
+      final Coordinate c3 = new Coordinate(p3.getX(), p3.getY());
+      return Math.toDegrees(Angle.angleBetween(c1, c2, c3));
+
+   }
+
+   private class LineProperties {
+
+      public double      length, straightLength, sinuosity, direction;
+      public SimpleStats angleStats = new SimpleStats();
+
+   }
+
+   private class AdditionalStats {
+
+      public double meanSlope, maxSlope, meanAngle;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/geometricPropertiesLinesB/GeometricPropertiesLinesBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToSingleSegments/PolylinesToSingleSegmentsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToSingleSegments/PolylinesToSingleSegmentsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToSingleSegments/PolylinesToSingleSegmentsAlgorithm.java	(revision 369)
@@ -0,0 +1,121 @@
+
+
+package es.unex.sextante.vectorTools.polylinesToSingleSegments;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class PolylinesToSingleSegmentsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LINES  = "LINES";
+
+   private IVectorLayer       m_Output;
+   private ArrayList          m_Lines;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Polylines_to_single_segments"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, lines.getFieldTypes(),
+               lines.getFieldNames());
+
+      int i = 0;
+      final int iShapeCount = lines.getShapesCount();
+      final IFeatureIterator iter = lines.iterator();
+      final GeometryFactory gf = new GeometryFactory();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         m_Lines = new ArrayList();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry line = geom.getGeometryN(j);
+            addLine(line);
+         }
+         final LineString[] lineStrings = new LineString[m_Lines.size()];
+         for (int j = 0; j < lineStrings.length; j++) {
+            lineStrings[j] = (LineString) m_Lines.get(j);
+         }
+         m_Output.addFeature(gf.createMultiLineString(lineStrings), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addLine(final Geometry line) {
+
+      final Coordinate[] coords = line.getCoordinates();
+      final Regression regression = new Regression();
+      final SimpleStats stats = new SimpleStats();
+
+      for (final Coordinate element : coords) {
+         regression.addValue(element.x, element.y);
+         stats.addValue(element.x);
+      }
+
+      regression.calculate();
+
+      final double dCoeff = regression.getCoeff();
+      final double dConst = regression.getConstant();
+      final double x = stats.getMin();
+      final double x2 = stats.getMax();
+      final double y = dConst + dCoeff * x;
+      final double y2 = dConst + dCoeff * x2;
+      final GeometryFactory gf = new GeometryFactory();
+      final Coordinate[] segmentCoords = new Coordinate[2];
+      segmentCoords[0] = new Coordinate(x, y);
+      segmentCoords[1] = new Coordinate(x2, y2);
+
+      m_Lines.add(gf.createLineString(segmentCoords));
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToSingleSegments/PolylinesToSingleSegmentsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/SnapPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/SnapPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/SnapPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,159 @@
+
+
+package es.unex.sextante.vectorTools.snapPoints;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineSegment;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SnapPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String     SNAPTO    = "SNAPTO";
+   public static final String     LAYER     = "LAYER";
+   public static final String     TOLERANCE = "TOLERANCE";
+   public static final String     RESULT    = "RESULT";
+
+   private IVectorLayer           m_Layer;
+   private IVectorLayer           m_SnapTo;
+   private IVectorLayer           m_Output;
+   private double                 m_dTolerance;
+   private NearestNeighbourFinder m_NNF;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Snap_points_to_layer"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addInputVectorLayer(SNAPTO, Sextante.getText("Capa_ajuste"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY,
+                  true);
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Snapped_points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_SnapTo = m_Parameters.getParameterValueAsVectorLayer(SNAPTO);
+      m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_SnapTo.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_NNF = new NearestNeighbourFinder(m_SnapTo, m_Task);
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Snapped_points"), m_Layer.getShapeType(), m_Layer.getFieldTypes(),
+               m_Layer.getFieldNames());
+
+      i = 0;
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         addPoint(coord.x, coord.y, feature.getRecord().getValues());
+         i++;
+      }
+
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y,
+                         final Object[] values) {
+
+      final Point pt = getSnappedPoint(x, y);
+      m_Output.addFeature(pt, values);
+
+   }
+
+
+   private Point getSnappedPoint(final double x,
+		   final double y) {
+
+	   final GeometryFactory gf = new GeometryFactory();
+	   final Coordinate c = new Coordinate(x, y);
+	   Coordinate closestPoint = new Coordinate(x, y);
+	   Coordinate closestPointToThisLine;
+	   double minDist = m_dTolerance;
+
+	   try {
+		   final List<Geometry> list = m_NNF.getClosestGeometries(c, m_dTolerance);
+		   for (int iGeom = 0; iGeom < list.size(); iGeom++) {
+			   final Geometry geom = list.get(iGeom);
+			   final int iNumGeom = geom.getNumGeometries();
+			   for (int i = 0; i < iNumGeom; i++) {
+				   final Geometry subGeom = geom.getGeometryN(i);
+				   final Coordinate[] coords = subGeom.getCoordinates();
+				   if (coords.length == 1) {
+					   //When snapping to point layer
+					   final double dist = c.distance(coords[0]);
+					   if ((dist < minDist)) {
+						   minDist = dist;
+						   closestPoint = coords[0];
+					   }
+				   } else {
+					   // When snapping to linestring or polygon layer
+					   for (int j = 0; j < coords.length - 1; j++) {
+						   final LineSegment line = new LineSegment(coords[j], coords[j + 1]);
+						   closestPointToThisLine = line.closestPoint(c);
+						   final double dist = c.distance(closestPointToThisLine);
+						   if ((dist < minDist)) {
+							   minDist = dist;
+							   closestPoint = closestPointToThisLine;
+						   }
+					   }
+				   }
+			   }
+		   }
+	   } catch (final Exception e) {
+		   // will return closest point so far
+	   }
+
+	   return gf.createPoint(closestPoint);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/SnapPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,64 @@
+package es.unex.sextante.vectorTools.snapPoints;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iPoints;
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+      float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iPoints = layer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = (float) coord.x;
+         y = (float) coord.y;
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, geom);
+         if (i % 50 == 0) {
+            task.setProgress(i, m_iPoints);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public List<Geometry> getClosestGeometries(final Coordinate c,
+                                              final double dDistance) {
+
+      final Envelope search = new Envelope(c);
+      search.expandBy(dDistance);
+      final List<Geometry> list = m_Tree.query(search);
+
+      return list;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/snapPoints/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/merge/MergeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/merge/MergeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/merge/MergeAlgorithm.java	(revision 369)
@@ -0,0 +1,128 @@
+package es.unex.sextante.vectorTools.merge;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class MergeAlgorithm extends GeoAlgorithm {
+
+	public static final String LAYERMAIN = "LAYERMAIN";
+	public static final String LAYERS = "LAYERS";
+	public static final String RESULT = "RESULT";
+
+	private IVectorLayer m_Output;
+	private IVectorLayer layerMain;
+
+	@Override
+	public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+		int i;
+
+		layerMain = m_Parameters.getParameterValueAsVectorLayer(LAYERMAIN);
+		final ArrayList<?> layers = m_Parameters
+				.getParameterValueAsArrayList(LAYERS);
+
+		if (!m_bIsAutoExtent) {
+			layerMain.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+		}
+
+		m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"),
+				layerMain.getShapeType(), layerMain.getFieldTypes(),
+				layerMain.getFieldNames());
+
+		merge(layerMain);
+		for (i = 0; (i < layers.size()) && !m_Task.isCanceled(); i++) {
+			final IVectorLayer vect = (IVectorLayer) layers.get(i);
+			vect.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+			merge(vect);
+		}
+
+		return !m_Task.isCanceled();
+	}
+
+	private void merge(final IVectorLayer vect) {
+
+		int i = 0;
+
+		try {
+			if (vect.getShapeType() == layerMain.getShapeType()) {
+				final int iShapeCount = vect.getShapesCount();
+
+				final int iFieldsMain = layerMain.getFieldCount();
+				final Class<?>[] types = layerMain.getFieldTypes();
+				final int iFieldsMerge = vect.getFieldCount();
+
+				final IFeatureIterator iter = vect.iterator();
+				while (iter.hasNext() && setProgress(i, iShapeCount)) {
+					final IFeature feature = iter.next();
+					final Object[] values = new Object[iFieldsMain];
+					final Geometry shape = feature.getGeometry();
+
+					for (int j = 0; j < values.length; j++) {
+						final Class<?> valueTypeMain = types[j];
+						final String sFieldNameMain = layerMain.getFieldName(j);
+						// Inicializo values con unos valores por defecto porque
+						// DBFStoreProvider no admite valores null para estos
+						// tipos. Si se arregla/cambia DBFStoreProvider
+						// para que en caso de llegarle un valor null
+						// ponga el valor por defecto, esto se
+						// podr�a eliminar
+						initializeDefaultValues(types, values);
+
+						for (int k = 0; k < iFieldsMerge; k++) {
+							final Class<?> valueTypeMerge = vect.getFieldType(k);
+							final String sFieldNameMerge = vect.getFieldName(k);
+							if (sFieldNameMerge
+									.equalsIgnoreCase(sFieldNameMain)
+									&& valueTypeMain.equals(valueTypeMerge)) {
+								values[j] = feature
+										.getRecord().getValue(k);
+							}
+						}
+					}
+
+					m_Output.addFeature(shape, values);
+					i++;
+				}
+				iter.close();
+			}
+
+		} catch (final Exception e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+	@Override
+	public void defineCharacteristics() {
+
+		setName(Sextante.getText("Merge"));
+		setGroup(Sextante.getText("Tools_for_vector_layers"));
+		setUserCanDefineAnalysisExtent(true);
+
+		try {
+			m_Parameters.addInputVectorLayer(LAYERMAIN,
+					Sextante.getText("Main_layer"),
+					AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+			m_Parameters.addMultipleInput(LAYERS,
+					Sextante.getText("Additional_layers"),
+					AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY, true);
+			addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+		} catch (final RepeatedParameterNameException e) {
+			Sextante.addErrorToLog(e);
+		}
+
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/merge/MergeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/groupNearFeatures/GroupNearFeaturesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/groupNearFeatures/GroupNearFeaturesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/groupNearFeatures/GroupNearFeaturesAlgorithm.java	(revision 369)
@@ -0,0 +1,149 @@
+
+
+package es.unex.sextante.vectorTools.groupNearFeatures;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class GroupNearFeaturesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER     = "LAYER";
+   public static final String TOLERANCE = "TOLERANCE";
+   public static final String RESULT    = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Group_near_features"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 5.0, 0.0001, Double.MAX_VALUE);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int i = 0;
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(GroupNearFeaturesAlgorithm.LAYER);
+      final double tolerance = m_Parameters.getParameterValueAsDouble(GroupNearFeaturesAlgorithm.TOLERANCE);
+
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] in_ftypes = layerIn.getFieldTypes();
+      final Class[] out_ftypes = new Class[in_ftypes.length + 1];
+      System.arraycopy(in_ftypes, 0, out_ftypes, 0, in_ftypes.length);
+      out_ftypes[out_ftypes.length - 1] = Integer.class;
+
+      final String[] in_fnames = layerIn.getFieldNames();
+      final String[] out_fnames = new String[in_ftypes.length + 1];
+      System.arraycopy(in_fnames, 0, out_fnames, 0, in_fnames.length);
+      out_fnames[out_fnames.length - 1] = "GROUP_ID";
+
+      int subtype;
+    try {
+        subtype = layerIn.getSubType();
+    } catch (BaseException e) {
+        subtype = org.gvsig.fmap.geom.Geometry.SUBTYPES.UNKNOWN;
+    }
+
+      final IVectorLayer driver = getNewVectorLayer(GroupNearFeaturesAlgorithm.RESULT, Sextante.getText("Grouped_Layer"),
+               layerIn.getShapeType(), out_ftypes, out_fnames, subtype);
+
+      final int iTotal = layerIn.getShapesCount();
+      int groupID = 0;
+      final int[] groupedMap = new int[iTotal];
+      for (int k = 0; k < iTotal; k++) {
+         groupedMap[k] = -1;
+      }
+      //Array of arrays of groups with all geoms of the group
+      final HashMap groupGeoms = new HashMap();
+
+      final IFeatureIterator iter1 = layerIn.iterator();
+      final Object[] values = new Object[out_fnames.length];
+      for (int featCount1 = 0; iter1.hasNext(); featCount1++) {
+         final IFeature feat1 = iter1.next();
+         Geometry geom1 = feat1.getGeometry();
+         if (groupedMap[featCount1] != -1) {
+            continue;
+         }
+         //A new group is created
+         groupedMap[featCount1] = groupID;
+         ArrayList geomArray = new ArrayList();
+         geomArray.add(geom1);
+         groupGeoms.put(groupID, geomArray);
+         // Also add this feature on the FeatureCollection
+         Object[] aux_values = feat1.getRecord().getValues();
+         System.arraycopy(aux_values, 0, values, 0, aux_values.length);
+         values[values.length - 1] = groupID;
+         driver.addFeature(geom1, values);
+
+         IFeatureIterator iter2 = layerIn.iterator();
+         for (int featCount2 = 0; iter2.hasNext(); featCount2++) {
+            final IFeature feat2 = iter2.next();
+            if (groupedMap[featCount2] != -1) {
+               continue;
+            }
+            final Geometry geom2 = feat2.getGeometry();
+            geomArray = (ArrayList) groupGeoms.get(groupID);
+            for (int j = 0; j < geomArray.size(); j++) {
+               geom1 = (Geometry) geomArray.get(j);
+               final double dist = geom1.distance(geom2);
+               if (dist < tolerance) {
+                  groupedMap[featCount2] = groupID;
+                  geomArray = (ArrayList) groupGeoms.get(groupID);
+                  geomArray.add(geom2);
+                  aux_values = feat2.getRecord().getValues();
+                  System.arraycopy(aux_values, 0, values, 0, aux_values.length);
+                  values[values.length - 1] = groupID;
+                  driver.addFeature(geom2, values);
+                  // It needed to reset the iterator to check if any previous feature belongs to this group
+                  iter2 = layerIn.iterator();
+                  featCount2 = -1;
+                  break;
+               }
+            }
+         }
+         iter2.close();
+         groupID++;
+         setProgress(i, iTotal);
+      }
+      iter1.close();
+      return !m_Task.isCanceled();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/groupNearFeatures/GroupNearFeaturesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanVectorLayer/CleanVectorLayerAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanVectorLayer/CleanVectorLayerAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanVectorLayer/CleanVectorLayerAlgorithm.java	(revision 369)
@@ -0,0 +1,70 @@
+package es.unex.sextante.vectorTools.cleanVectorLayer;
+
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class CleanVectorLayerAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String LAYER  = "LAYER";
+   private static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iWrongShapes = 0;
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Result"), layer.getShapeType(),
+               layer.getFieldTypes(), layer.getFieldNames());
+      final int iShapeCount = layer.getShapesCount();
+      int i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         try {
+            final IFeature feature = iter.next();
+            output.addFeature(feature);
+         }
+         catch (final Exception e) {
+            iWrongShapes++;
+         }
+         i++;
+      }
+
+      String sInfo = Sextante.getText("Eliminados_N_Registros_erroneos)");
+      sInfo = sInfo.replace("XXX", Integer.toString(iWrongShapes));
+      Sextante.addInfoToLog(sInfo);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Clean_vector_layer"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/cleanVectorLayer/CleanVectorLayerAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomGeometryUtilities.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomGeometryUtilities.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomGeometryUtilities.java	(revision 369)
@@ -0,0 +1,300 @@
+/*
+ * OrbisGIS is a GIS application dedicated to scientific spatial simulation.
+ * This cross-platform GIS is developed at French IRSTV institute and is able
+ * to manipulate and create vector and raster spatial information. OrbisGIS
+ * is distributed under GPL 3 license. It is produced  by the geo-informatic team of
+ * the IRSTV Institute <http://www.irstv.cnrs.fr/>, CNRS FR 2488:
+ *    Erwan BOCHER, scientific researcher,
+ *    Thomas LEDUC, scientific researcher,
+ *    Fernando GONZALEZ CORTES, computer engineer.
+ *
+ * Copyright (C) 2007 Erwan BOCHER, Fernando GONZALEZ CORTES, Thomas LEDUC
+ *
+ * This file is part of OrbisGIS.
+ *
+ * OrbisGIS is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * OrbisGIS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with OrbisGIS. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * For more information, please consult:
+ *    <http://orbisgis.cerma.archi.fr/>
+ *    <http://sourcesup.cru.fr/projects/orbisgis/>
+ *
+ * or contact directly:
+ *    erwan.bocher _at_ ec-nantes.fr
+ *    fergonco _at_ gmail.com
+ *    thomas.leduc _at_ cerma.archi.fr
+ */
+package es.unex.sextante.vectorTools.randomVector;
+
+import java.util.Random;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateList;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineSegment;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.Polygon;
+
+public class RandomGeometryUtilities {
+   private static final Random          RAND = new Random();
+   private static final GeometryFactory gf   = new GeometryFactory();
+   private final int                          maxNodesPerLineMinus3;
+   private final int                          maxHolesPerPolygon;
+   private final boolean                                    is3D;
+
+   public RandomGeometryUtilities() {
+      this(12, 4, false);
+   }
+
+
+   public RandomGeometryUtilities(final int maxNodesPerLineMinus3,
+                                  final int maxHolesPerPolygon,
+                                  final boolean is3D) {
+      this.maxNodesPerLineMinus3 = maxNodesPerLineMinus3;
+      this.maxHolesPerPolygon = maxHolesPerPolygon;
+      this.is3D=is3D;
+   }
+
+
+   private int getNumberOfNodesPerLine() {
+      // In a LinearRing number of points must be 0 or >3
+      return RAND.nextInt(maxNodesPerLineMinus3) + 3;
+   }
+
+
+   private int getNumberOfHolesPerPolygon() {
+      return RAND.nextInt(maxHolesPerPolygon);
+   }
+
+
+
+   private Coordinate nextCoordinate() {
+      if (this.is3D){
+          return new Coordinate(RAND.nextLong(), RAND.nextLong(), RAND.nextLong());
+      }
+      else{
+          return new Coordinate(RAND.nextLong(), RAND.nextLong(), Double.NaN);
+      }
+   }
+
+   private Coordinate nextCoordinate(final Envelope envelope) {
+       if (this.is3D){
+           return new Coordinate(RAND.nextInt((int) envelope.getWidth()) + envelope.getMinX(),
+               RAND.nextInt((int) envelope.getHeight()) + envelope.getMinY(), RAND.nextLong());
+       }
+       else{
+            try {
+                return new Coordinate(RAND.nextInt((int) envelope.getWidth()) + envelope.getMinX(),
+                   RAND.nextInt((int) envelope.getHeight()) + envelope.getMinY(), Double.NaN); 
+            }
+            catch (Exception ex) {
+                double x = (RAND.nextDouble() * envelope.getWidth())  + envelope.getMinX();
+                double y = (RAND.nextDouble() * envelope.getHeight()) + envelope.getMinY();
+                return new Coordinate(x, y, Double.NaN);
+            }
+           
+       }
+   }
+
+   public Coordinate[] nextCoordinates(final int n) {
+      final Coordinate[] result = new Coordinate[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextCoordinate();
+      }
+      return result;
+   }
+
+
+   public Point nextPoint() {
+      return gf.createPoint(nextCoordinate());
+   }
+
+
+   public Point nextPoint(final Envelope envelope) {
+      return gf.createPoint(nextCoordinate(envelope));
+   }
+
+
+   public Point[] nextPoints(final int n) {
+      final Point[] result = new Point[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextPoint();
+      }
+      return result;
+   }
+
+
+   public LineSegment nextLineSegment() {
+      return new LineSegment(nextCoordinate(), nextCoordinate());
+   }
+
+
+   public LineSegment[] nextLineSegments(final int n) {
+      final LineSegment[] result = new LineSegment[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextLineSegment();
+      }
+      return result;
+   }
+
+
+   public LineString nextLineString() {
+      final int n = getNumberOfNodesPerLine();
+      final SortedSet<Coordinate> nodes = new TreeSet<Coordinate>();
+      while (n > nodes.size()) {
+         nodes.add(nextCoordinate());
+      }
+      return gf.createLineString(nodes.toArray(new Coordinate[0]));
+   }
+
+
+   public LineString nextLineString(final Envelope envelope) {
+      final int n = getNumberOfNodesPerLine();
+      final SortedSet<Coordinate> nodes = new TreeSet<Coordinate>();
+      while (n > nodes.size()) {
+         nodes.add(nextCoordinate(envelope));
+      }
+      return gf.createLineString(nodes.toArray(new Coordinate[0]));
+   }
+
+
+   public LineString[] nextLineStrings(final int n) {
+      final LineString[] result = new LineString[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextLineString();
+      }
+      return result;
+   }
+
+
+   public LinearRing nextLinearRing() {
+      LinearRing result;
+      do {
+         final CoordinateList cl = new CoordinateList(nextLineString().getCoordinates());
+         cl.closeRing();
+         result = gf.createLinearRing(cl.toCoordinateArray());
+      }
+      while (!result.isValid());
+      return result;
+   }
+
+
+   public LinearRing nextLinearRing(final Envelope envelope) {
+      LinearRing result;
+      do {
+         final CoordinateList cl = new CoordinateList(nextLineString(envelope).getCoordinates());
+         cl.closeRing();
+         result = gf.createLinearRing(cl.toCoordinateArray());
+      }
+      while (!result.isValid());
+      return result;
+   }
+
+
+   public LinearRing[] nextLinearRings(final int n) {
+      final LinearRing[] result = new LinearRing[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextLinearRing();
+      }
+      return result;
+   }
+
+
+   public Polygon nextNoHolePolygon() {
+      return gf.createPolygon(nextLinearRing(), null);
+   }
+
+
+   public Polygon nextNoHolePolygon(final Envelope envelope) {
+      return gf.createPolygon(nextLinearRing(envelope), null);
+   }
+
+
+   public Polygon[] nextNoHolePolygons(final int n) {
+      final Polygon[] result = new Polygon[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextNoHolePolygon();
+      }
+      return result;
+   }
+
+
+   public Polygon nextPolygon() {
+      final LinearRing shell = nextLinearRing();
+      final int nbHoles = 1; // getNumberOfHolesPerPolygon();
+      final LinearRing[] holes = new LinearRing[nbHoles];
+      for (int i = 0; i < nbHoles; i++) {
+         do {
+            holes[i] = nextLinearRing(shell.getEnvelopeInternal());
+         }
+         while (!shell.contains(holes[i]));
+      }
+      return gf.createPolygon(shell, holes);
+   }
+
+
+   //
+   // public Polygon[] nextPolygons(final int n) {
+   // final Polygon[] result = new Polygon[n];
+   // for (int i = 0; i < n; i++) {
+   // result[i] = nextPolygon();
+   // }
+   // return result;
+   // }
+
+   public Geometry nextGeometry() {
+      switch (RAND.nextInt(4)) {
+         case 0:
+            return nextPoint();
+         case 1:
+            return nextLineString();
+         case 2:
+            return nextLinearRing();
+         case 3:
+            return nextNoHolePolygon();
+            // return nextPolygon();
+      }
+      throw new RuntimeException("Unreachable code");
+   }
+
+
+   public Geometry nextGeometry(final Envelope env) {
+      switch (RAND.nextInt(4)) {
+         case 0:
+            return nextPoint(env);
+         case 1:
+            return nextLineString(env);
+         case 2:
+            return nextLinearRing(env);
+         case 3:
+            return nextNoHolePolygon(env);
+            // return nextPolygon();
+      }
+      throw new RuntimeException("Unreachable code");
+   }
+
+
+   public Geometry[] nextGeometries(final int n) {
+      final Geometry[] result = new Geometry[n];
+      for (int i = 0; i < n; i++) {
+         result[i] = nextGeometry();
+      }
+      return result;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomGeometryUtilities.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomVectorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomVectorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomVectorAlgorithm.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.vectorTools.randomVector;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class RandomVectorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   TYPE_POLYGONS = 0;
+   private static final int   TYPE_LINES    = 1;
+   private static final int   TYPE_POINTS   = 2;
+
+   public static final String RESULT        = "RESULT";
+   public static final String TYPE          = "TYPE";
+   public static final String COUNT         = "COUNT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_random_vector_layer"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      final String[] sOptions = { Sextante.getText("Polygons"), Sextante.getText("Lines"), Sextante.getText("Points") };
+
+      try {
+         m_Parameters.addNumericalValue(COUNT, Sextante.getText("Number_of_features_to_create"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 1, Integer.MAX_VALUE);
+         m_Parameters.addSelection(TYPE, Sextante.getText("Type"), sOptions);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iShapeType;
+      final String[] sNames = { "ID" };
+      final Class[] types = { Integer.class };
+
+      final int iCount = m_Parameters.getParameterValueAsInt(COUNT);
+      final int iType = m_Parameters.getParameterValueAsInt(TYPE);
+
+      switch (iType) {
+         case TYPE_POLYGONS:
+            iShapeType = IVectorLayer.SHAPE_TYPE_POLYGON;
+            break;
+         case TYPE_LINES:
+            iShapeType = IVectorLayer.SHAPE_TYPE_LINE;
+            break;
+         case TYPE_POINTS:
+         default:
+            iShapeType = IVectorLayer.SHAPE_TYPE_POINT;
+            break;
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Result"), iShapeType, types, sNames);
+      //Should be used if random 3D layers are  used
+      boolean is3D=false;
+      final RandomGeometryUtilities rgu = new RandomGeometryUtilities(12, 4, is3D);
+      final Envelope env = m_AnalysisExtent.getAsJTSGeometry().getEnvelopeInternal();
+      Geometry geom;
+      for (int i = 0; (i < iCount) && setProgress(i, iCount); i++) {
+         switch (iType) {
+            case TYPE_POLYGONS:
+               geom = rgu.nextNoHolePolygon(env);
+               break;
+            case TYPE_LINES:
+               geom = rgu.nextLineString(env);
+               break;
+            case TYPE_POINTS:
+            default:
+               geom = rgu.nextPoint(env);
+               break;
+         }
+         output.addFeature(geom, new Object[] { new Integer(i) });
+      }
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/randomVector/RandomVectorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fixedDistanceBuffer/FixedDistanceBufferAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fixedDistanceBuffer/FixedDistanceBufferAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fixedDistanceBuffer/FixedDistanceBufferAlgorithm.java	(revision 369)
@@ -0,0 +1,314 @@
+
+
+package es.unex.sextante.vectorTools.fixedDistanceBuffer;
+
+import java.util.ArrayList;
+import java.util.Stack;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Polygon;
+import com.vividsolutions.jts.operation.buffer.BufferOp;
+import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class FixedDistanceBufferAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final byte   BUFFER_INSIDE_POLY         = 1;
+   public static final byte   BUFFER_OUTSIDE_POLY        = 0;
+   public static final byte   BUFFER_INSIDE_OUTSIDE_POLY = 2;
+
+   public static final String RESULT                     = "RESULT";
+   public static final String NOTROUNDED                 = "NOTROUNDED";
+   public static final String RINGS                      = "RINGS";
+   public static final String TYPE                       = "TYPES";
+   public static final String LAYER                      = "LAYER";
+   public static final String DISTANCE                   = "DISTANCE";
+
+   private IVectorLayer       m_Output;
+   private boolean            m_bRounded;
+   private int                m_iRings;
+   private int                m_iType;
+   private int                numProcessed               = 0;
+   private double             m_dDistance;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_dDistance = m_Parameters.getParameterValueAsDouble(DISTANCE);
+      m_bRounded = !m_Parameters.getParameterValueAsBoolean(NOTROUNDED);
+      m_iRings = m_Parameters.getParameterValueAsInt(RINGS);
+      m_iType = m_Parameters.getParameterValueAsInt(TYPE);
+
+      final int iFieldCount = layerIn.getFieldCount();
+      Class types[];
+      String[] sFieldNames;
+
+      if (layerIn.getShapeType() != IVectorLayer.SHAPE_TYPE_POLYGON) {
+         m_iType = BUFFER_OUTSIDE_POLY;
+      }
+
+      if (m_iType == BUFFER_INSIDE_OUTSIDE_POLY) {
+         types = new Class[iFieldCount + 3];
+         types[0] = Long.class;
+         types[1] = Double.class;
+         sFieldNames = new String[iFieldCount + 3];
+         sFieldNames[0] = "ID";
+         sFieldNames[1] = "FROM";
+         sFieldNames[1] = "TO";
+         for (int i = 0; i < iFieldCount; i++) {
+            sFieldNames[i + 3] = checkAttrName(layerIn.getFieldName(i), i + 3, sFieldNames);
+            types[i + 3] = layerIn.getFieldType(i);
+         }
+      }
+      else {
+         types = new Class[iFieldCount + 2];
+         types[0] = Long.class;
+         types[1] = Double.class;
+         sFieldNames = new String[iFieldCount + 2];
+         sFieldNames[0] = "ID";
+         sFieldNames[1] = "DIST";
+         for (int i = 0; i < iFieldCount; i++) {
+            sFieldNames[i + 2] = checkAttrName(layerIn.getFieldName(i), i + 2, sFieldNames);
+            types[i + 2] = layerIn.getFieldType(i);
+         }
+      }
+
+      m_Output = getNewVectorLayer(RESULT, "Buffer", IVectorLayer.SHAPE_TYPE_POLYGON, types, sFieldNames);
+
+      int i = 0;
+      final int iTotal = layerIn.getShapesCount();
+      final IFeatureIterator iter = layerIn.iterator();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         computeBuffer(feature.getGeometry(), m_dDistance, feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      //      final String[] sRings = { Integer.toString(1), Integer.toString(2), Integer.toString(3) };
+
+      final String[] sType = { Sextante.getText("Outer_buffer"), Sextante.getText("Inner_buffer"), Sextante.getText("Both"), };
+
+      setName(Sextante.getText("Fixed_distance_buffer"));
+      setGroup(Sextante.getText("Buffers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Distance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         m_Parameters.addSelection(TYPE, Sextante.getText("Buffer_type"), sType);
+         //         m_Parameters.addSelection(RINGS, Sextante.getText("Number_of_concentric_rings"), sRings);
+         m_Parameters.addNumericalValue(RINGS, Sextante.getText("Number_of_concentric_rings"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 1, Integer.MAX_VALUE);
+         m_Parameters.addBoolean(NOTROUNDED, Sextante.getText("Do_not_round_resulting_polygons"), false);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Buffer"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   //*********** code adapted from BufferVisitor class, by Alvaro Zabala*******************//
+
+   public void computeBuffer(final Geometry originalGeometry,
+                             final double bufferDistance,
+                             final Object[] record) {
+      Geometry solution = null;
+      Geometry inputParam = originalGeometry;
+      /*
+       * When we try to apply large buffer distances, we could get OutOfMemoryError
+       * exceptions. Explanation in
+       * http://lists.jump-project.org/pipermail/jts-devel/2005-February/000991.html
+       * http://lists.jump-project.org/pipermail/jts-devel/2005-September/001292.html
+       * This problems hasnt been resolved in JTS 1.7.
+       */
+      if (originalGeometry.getDimension() != 0) {
+         inputParam = TopologyPreservingSimplifier.simplify(originalGeometry, bufferDistance / 10d);
+      }
+      int cap = BufferOp.CAP_ROUND;
+      if (!m_bRounded) {
+         cap = BufferOp.CAP_SQUARE;
+      }
+
+      //this two references are necessary to compute radial rings
+      Geometry previousExteriorRing = null;
+      Geometry previousInteriorRing = null;
+      if (m_iType == BUFFER_INSIDE_POLY) {
+         //if we have radial internal buffers, we start by
+         //most interior buffer
+         for (int i = m_iRings; i >= 1; i--) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry newGeometry = bufOp.getResultGeometry(-1 * distRing);
+            if (verifyNilGeometry(newGeometry)) {
+               //we have collapsed original geometry
+               return;
+            }
+            if (previousInteriorRing != null) {
+               solution = newGeometry.difference(previousInteriorRing);
+            }
+            else {
+               solution = newGeometry;
+            }
+            numProcessed++;
+            addFeature(solution, distRing, record);
+            previousInteriorRing = newGeometry;
+         }
+      }
+      else if (m_iType == BUFFER_OUTSIDE_POLY) {
+         for (int i = 1; i <= m_iRings; i++) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry newGeometry = bufOp.getResultGeometry(distRing);
+            if (previousExteriorRing != null) {
+               solution = newGeometry.difference(previousExteriorRing);
+            }
+            else {
+               solution = newGeometry;
+            }
+            numProcessed++;
+            addFeature(solution, distRing, record);
+            previousExteriorRing = newGeometry;
+         }
+      }
+      else if (m_iType == BUFFER_INSIDE_OUTSIDE_POLY) {
+         final GeometryFactory geomFact = new GeometryFactory();
+         for (int i = 1; i <= m_iRings; i++) {
+            final double distRing = i * bufferDistance;
+            final BufferOp bufOp = new BufferOp(inputParam);
+            bufOp.setEndCapStyle(cap);
+            final Geometry out = bufOp.getResultGeometry(distRing);
+            final Geometry in = bufOp.getResultGeometry(-1 * distRing);
+            boolean collapsedInterior = verifyNilGeometry(in);
+            if ((previousExteriorRing == null) || (previousInteriorRing == null)) {
+               if (collapsedInterior) {
+                  solution = out;
+               }
+               else {
+                  solution = out.difference(in);
+               }
+            }
+            else {
+               if (collapsedInterior) {
+                  solution = out.difference(previousExteriorRing);
+               }
+               else {
+                  final Geometry outRing = out.difference(previousExteriorRing);
+                  final Geometry inRing = previousInteriorRing.difference(in);
+                  final Geometry[] geomArray = new Geometry[] { outRing, inRing };
+                  solution = geomFact.createGeometryCollection(geomArray);
+                  final ArrayList polygons = new ArrayList();
+                  final Stack stack = new Stack();
+                  stack.push(solution);
+                  while (stack.size() != 0) {
+                     final GeometryCollection geCol = (GeometryCollection) stack.pop();
+                     for (int j = 0; j < geCol.getNumGeometries(); j++) {
+                        final Geometry geometry = geCol.getGeometryN(j);
+                        if (geometry instanceof GeometryCollection) {
+                           stack.push(geometry);
+                        }
+                        if (geometry instanceof Polygon) {
+                           polygons.add(geometry);
+                        }
+                     }
+                  }
+                  final Polygon[] pols = new Polygon[polygons.size()];
+                  polygons.toArray(pols);
+                  final MultiPolygon newSolution = geomFact.createMultiPolygon(pols);
+                  solution = newSolution;
+               }
+            }
+            numProcessed++;
+            addFeature(solution, -1 * distRing, distRing, record);
+            previousExteriorRing = out;
+            if (!collapsedInterior) {
+               previousInteriorRing = in;
+            }
+         }
+      }
+
+   }
+
+
+   protected void addFeature(final Geometry geom,
+                             final double distance,
+                             final Object[] record) {
+
+      final Object[] values = new Object[2 + record.length];
+      values[0] = new Long(numProcessed);
+      values[1] = new Double(distance);
+      for (int i = 0; i < record.length; i++) {
+         values[i + 2] = record[i];
+      }
+      m_Output.addFeature(geom, values);
+
+   }
+
+
+   protected void addFeature(final Geometry geom,
+                             final double distanceFrom,
+                             final double distanceTo,
+                             final Object[] record) {
+
+      final Object[] values = new Object[3 + record.length];
+      values[0] = new Long(numProcessed);
+      values[1] = new Double(distanceFrom);
+      values[2] = new Double(distanceTo);
+      for (int i = 0; i < record.length; i++) {
+         values[i + 3] = record[i];
+      }
+      m_Output.addFeature(geom, values);
+
+   }
+
+
+   public boolean verifyNilGeometry(final Geometry newGeometry) {
+
+      if (newGeometry instanceof GeometryCollection) {
+         if (((GeometryCollection) newGeometry).getNumGeometries() == 0) {
+            //we have collapsed initial geometry
+            return true;
+         }
+      }
+      return false;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/fixedDistanceBuffer/FixedDistanceBufferAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorCluster/VectorClusterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorCluster/VectorClusterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorCluster/VectorClusterAlgorithm.java	(revision 369)
@@ -0,0 +1,312 @@
+
+
+package es.unex.sextante.vectorTools.vectorCluster;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class VectorClusterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String NUMCLASS      = "NUMCLASS";
+   public static final String LAYER         = "LAYER";
+   public static final String FIELDS        = "FIELDS";
+   public static final String RESULT        = "RESULT";
+
+   private ValueAndClass[]    m_Classes;
+   private int                m_iFields[];
+   private double             m_dMean[][];
+   private int                m_iClasses;
+   private int                m_iThreshold;
+   private IVectorLayer       m_LayerIn;
+
+   private static double      NO_DATA       = Double.NEGATIVE_INFINITY;
+   private static int         NO_DATA_CLASS = Integer.MAX_VALUE;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final Class[] types = { Integer.class };
+      final String[] sFields = { Sextante.getText("Class") };
+
+      m_iClasses = m_Parameters.getParameterValueAsInt(NUMCLASS);
+      m_LayerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_LayerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_iFields = getFields(m_Parameters.getParameterValueAsString(FIELDS));
+
+      if (m_iFields == null) {
+         return false;
+      }
+
+      m_Classes = new ValueAndClass[m_LayerIn.getShapesCount()];
+      final IFeatureIterator iter = m_LayerIn.iterator();
+      i = 0;
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Object[] values = feature.getRecord().getValues();
+         m_Classes[i] = new ValueAndClass(m_iFields.length);
+         for (int j = 0; j < m_iFields.length; j++) {
+            try {
+               m_Classes[i].dValue[j] = Double.parseDouble(values[m_iFields[j]].toString());
+            }
+            catch (final NumberFormatException nfe) {
+               m_Classes[i].dValue[j] = NO_DATA;
+            }
+         }
+         i++;
+      }
+
+      classify();
+
+      final Object[][] values = new Object[1][m_LayerIn.getShapesCount()];
+      for (i = 0; i < m_Classes.length; i++) {
+         values[0][i] = new Integer(m_Classes[i].iClass);
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = new OutputVectorLayer();
+      out.setDescription(Sextante.getText("Result"));
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_LayerIn, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private int[] getFields(final String s) {
+
+
+      final ArrayList indices = new ArrayList();
+
+      final String[] sFields = s.split(",");
+
+      try {
+         for (int i = 0; i < sFields.length; i++) {
+            final int iIndex = getFieldIndexByName(sFields[i].trim());
+            if (iIndex != -1) {
+               indices.add(new Integer(iIndex));
+            }
+         }
+
+         final int iFields[] = new int[indices.size()];
+         for (int i = 0; i < sFields.length; i++) {
+            iFields[i] = ((Integer) indices.get(i)).intValue();
+         }
+
+         return iFields;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return null;
+      }
+
+   }
+
+
+   private int getFieldIndexByName(final String sName) {
+
+      final String[] sNames = m_LayerIn.getFieldNames();
+      for (int i = 0; i < sNames.length; i++) {
+         if (sNames[i].equals(sName)) {
+            return i;
+         }
+      }
+
+      return -1;
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cluster"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString("FIELDS", Sextante.getText("fields"), "");
+         m_Parameters.addNumericalValue(NUMCLASS, Sextante.getText("Number_of_classes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 3, 2, Integer.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void initValues() {
+
+      int i;
+      int iValues = 0;
+      boolean bNoData;
+      double dStep;
+      double dValue;
+      final double dMin[] = new double[m_iFields.length];
+      final double dMax[] = new double[m_iFields.length];
+
+      for (i = 0; i < m_iFields.length; i++) {
+         dMin[i] = Double.MAX_VALUE;
+         dMax[i] = Double.NEGATIVE_INFINITY;
+      }
+
+      for (i = 0; i < m_Classes.length; i++) {
+         bNoData = false;
+         for (int j = 0; j < m_Classes[i].dValue.length; j++) {
+            dValue = m_Classes[i].dValue[j];
+            if (dValue != NO_DATA) {
+               dMin[j] = Math.min(dMin[j], dValue);
+               dMax[j] = Math.max(dMax[j], dValue);
+            }
+            else {
+               bNoData = true;
+            }
+         }
+         if (bNoData) {
+            m_Classes[i].iClass = NO_DATA_CLASS;
+         }
+         else {
+            iValues++;
+            m_Classes[i].iClass = 0;
+         }
+      }
+
+      m_dMean = new double[m_iClasses][m_iFields.length];
+
+      for (i = 0; i < m_iFields.length; i++) {
+         dStep = (dMax[i] - dMin[i]) / ((m_iClasses + 2));
+         for (int j = 0; j < m_iClasses; j++) {
+            m_dMean[j][i] = dMin[i] + dStep * (j + 1);
+         }
+      }
+
+      m_iThreshold = (int) (iValues * 0.02);
+
+   }
+
+
+   private boolean classify() {
+
+      int i, j;
+      int iChangedCells;
+      int iPrevClass;
+      int iClass;
+      final int iCells[] = new int[m_iClasses];
+      double dNewMean[][];
+      double swap[][];
+
+      initValues();
+
+      dNewMean = new double[m_iClasses][m_iFields.length];
+
+      do {
+         Arrays.fill(iCells, 0);
+         iChangedCells = 0;
+
+         for (i = 0; i < m_iClasses; i++) {
+            Arrays.fill(dNewMean[i], 0.0);
+         }
+         for (i = 0; i < m_Classes.length; i++) {
+            iPrevClass = m_Classes[i].iClass;
+            if (iPrevClass != NO_DATA_CLASS) {
+               iClass = getClass(m_Classes[i].dValue);
+               m_Classes[i].iClass = iClass;
+               for (j = 0; j < m_iFields.length; j++) {
+                  dNewMean[iClass][j] += m_Classes[i].dValue[j];
+               }
+               iCells[iClass]++;
+               if (iClass != iPrevClass) {
+                  iChangedCells++;
+               }
+            }
+         }
+
+         for (i = 0; i < m_iFields.length; i++) {
+            for (j = 0; j < m_iClasses; j++) {
+               dNewMean[j][i] /= iCells[j];
+            }
+         }
+
+         swap = m_dMean;
+         m_dMean = dNewMean;
+         dNewMean = swap;
+
+         setProgressText(Sextante.getText("Modified_classes") + Integer.toString(iChangedCells));
+
+         if (m_Task.isCanceled()) {
+            return false;
+         }
+
+      }
+      while (iChangedCells > m_iThreshold);
+
+      return true;
+
+   }
+
+
+   private int getClass(final double[] dValues) {
+
+      int iClass = 0;
+      double dMinDist = Double.MAX_VALUE;
+      double dDist;
+      double dDif;
+
+      for (int i = 0; i < m_iClasses; i++) {
+         dDist = 0;
+         for (int j = 0; j < dValues.length; j++) {
+            dDif = m_dMean[i][j] - dValues[j];
+            dDist += (dDif * dDif);
+         }
+         if (dDist < dMinDist) {
+            dMinDist = dDist;
+            iClass = i;
+         }
+      }
+
+      return iClass;
+   }
+
+   private class ValueAndClass {
+
+      public double dValue[];
+      public int    iClass;
+
+
+      public ValueAndClass(final int i) {
+
+         dValue = new double[i];
+
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/vectorCluster/VectorClusterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/transform/TransformAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/transform/TransformAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/transform/TransformAlgorithm.java	(revision 369)
@@ -0,0 +1,126 @@
+
+
+package es.unex.sextante.vectorTools.transform;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.util.AffineTransformation;
+
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class TransformAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DISTANCEX = "DISTANCEX";
+   public static final String DISTANCEY = "DISTANCEY";
+   public static final String ANCHORX   = "ANCHORX";
+   public static final String ANCHORY   = "ANCHORY";
+   public static final String ANGLE     = "ANGLE";
+   public static final String SCALEX    = "SCALEX";
+   public static final String LAYER     = "LAYER";
+   public static final String SCALEY    = "SCALEY";
+   public static final String RESULT    = "RESULT";
+
+   private IVectorLayer       m_Output;
+   private double             dDistanceX;
+   private double             dDistanceY;
+   private double             dAnchorX;
+   private double             dAnchorY;
+   private double             dAngle;
+   private double             dScaleX;
+   private double             dScaleY;
+   IVectorLayer               layerIn;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      dDistanceX = m_Parameters.getParameterValueAsDouble(DISTANCEX);
+      dDistanceY = m_Parameters.getParameterValueAsDouble(DISTANCEY);
+      dAnchorX = m_Parameters.getParameterValueAsDouble(ANCHORX);
+      dAnchorY = m_Parameters.getParameterValueAsDouble(ANCHORY);
+      dAngle = m_Parameters.getParameterValueAsDouble(ANGLE);
+      dScaleX = m_Parameters.getParameterValueAsDouble(SCALEX);
+      dScaleY = m_Parameters.getParameterValueAsDouble(SCALEY);
+      layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      int subtype;
+    try {
+        subtype = layerIn.getSubType();
+    } catch (BaseException e) {
+        subtype = org.gvsig.fmap.geom.Geometry.SUBTYPES.UNKNOWN;
+    }
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Capa_transformada"), layerIn.getShapeType(),
+               layerIn.getFieldTypes(), layerIn.getFieldNames(), subtype);
+
+      final AffineTransformation at = new AffineTransformation();
+      at.compose(AffineTransformation.translationInstance(-dAnchorX, -dAnchorY));
+      at.compose(AffineTransformation.rotationInstance(Math.toRadians(dAngle)));
+      at.compose(AffineTransformation.translationInstance(dAnchorX, dAnchorY));
+      at.compose(AffineTransformation.scaleInstance(dScaleX, dScaleY));
+      at.compose(AffineTransformation.translationInstance(dDistanceX, dDistanceY));
+      final IFeatureIterator iter = layerIn.iterator();
+      i = 0;
+      final int iShapeCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = (Geometry) feature.getGeometry().clone();
+         geom.apply(at);
+         m_Output.addFeature(geom, feature.getRecord().getValues());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Transform"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addNumericalValue(DISTANCEX, Sextante.getText("Translation_X"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(DISTANCEY, Sextante.getText("Translation_Y"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(ANGLE, Sextante.getText("Rotation_angle"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(SCALEX, Sextante.getText("Scale_factor__X"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(SCALEY, Sextante.getText("Scale_Factor__Y"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(ANCHORX, Sextante.getText("Anchor_point_X"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(ANCHORY, Sextante.getText("Anchor_point_Y"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Capa_transformada"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/transform/TransformAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToPolygons/PolylinesToPolygonsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToPolygons/PolylinesToPolygonsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToPolygons/PolylinesToPolygonsAlgorithm.java	(revision 369)
@@ -0,0 +1,101 @@
+
+
+package es.unex.sextante.vectorTools.polylinesToPolygons;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class PolylinesToPolygonsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Polylines_to_polygons"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polylines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, m_Layer.getName(), IVectorLayer.SHAPE_TYPE_POLYGON, m_Layer.getFieldTypes(),
+               m_Layer.getFieldNames());
+
+
+      final ArrayList array = new ArrayList();
+      final GeometryFactory gf = new GeometryFactory();
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         array.clear();
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            final Coordinate[] lineCoords = subgeom.getCoordinates();
+            final Coordinate[] ringCoords = new Coordinate[lineCoords.length + 1];
+            System.arraycopy(lineCoords, 0, ringCoords, 0, lineCoords.length);
+            ringCoords[lineCoords.length] = new Coordinate(lineCoords[0].x, lineCoords[0].y);
+            final LinearRing ring = gf.createLinearRing(ringCoords);
+            final Polygon polygon = gf.createPolygon(ring, null);
+            array.add(polygon);
+         }
+         final Polygon[] polygons = new Polygon[array.size()];
+         for (int j = 0; j < array.size(); j++) {
+            polygons[j] = (Polygon) array.get(j);
+         }
+         m_Output.addFeature(gf.createMultiPolygon(polygons), feature.getRecord().getValues());
+         i++;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/polylinesToPolygons/PolylinesToPolygonsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/InPolygonSpatialJoinBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/InPolygonSpatialJoinBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/InPolygonSpatialJoinBAlgorithm.java	(revision 369)
@@ -0,0 +1,146 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoinB;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class InPolygonSpatialJoinBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String     RESULT    = "RESULT";
+   public static final String     MAIN      = "MAIN";
+   public static final String     SECONDARY = "SECONDARY";
+   public static final String     FIELD     = "FIELD";
+   //public static final String     FIELDNAME = "FIELDNAME";
+
+
+   private IVectorLayer           m_MainLayer;
+   private IVectorLayer           m_SecondaryLayer;
+
+   private IVectorLayer           m_Output;
+
+   private NearestNeighbourFinder m_NNF;
+   private int                    m_iField;
+   private Class                  m_Type;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("InPolygonSpatialJoinB"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(MAIN, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addInputVectorLayer(SECONDARY, Sextante.getText("Secondary_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), MAIN);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON, SECONDARY);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_MainLayer = m_Parameters.getParameterValueAsVectorLayer(MAIN);
+      m_SecondaryLayer = m_Parameters.getParameterValueAsVectorLayer(SECONDARY);
+
+      if (!m_bIsAutoExtent) {
+         m_MainLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_SecondaryLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      final String[] sFields = new String[m_SecondaryLayer.getFieldCount() + 1];
+      final Class[] types = new Class[m_SecondaryLayer.getFieldCount() + 1];
+      for (i = 0; i < m_SecondaryLayer.getFieldCount(); i++) {
+         sFields[i] = m_SecondaryLayer.getFieldName(i);
+         types[i] = m_SecondaryLayer.getFieldType(i);
+      }
+      sFields[m_SecondaryLayer.getFieldCount()] = m_MainLayer.getFieldName(m_iField);
+      m_Type = m_MainLayer.getFieldType(m_iField);
+      types[m_SecondaryLayer.getFieldCount()] = m_Type;
+
+      m_Output = getNewVectorLayer(RESULT, m_SecondaryLayer.getName(), m_SecondaryLayer.getShapeType(), types, sFields);
+
+      m_NNF = new NearestNeighbourFinder(m_MainLayer, this.m_Task);
+
+      iShapeCount = m_SecondaryLayer.getShapesCount();
+      i = 0;
+      setProgressText(Sextante.getText("Processing"));
+      final IFeatureIterator iter = m_SecondaryLayer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         performSpatialJoin(feature);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void performSpatialJoin(final IFeature feature) {
+
+      final Geometry geom = feature.getGeometry();
+      final IFeature[] polygons = m_NNF.getClosestPoints(geom);
+
+      for (final IFeature polygon : polygons) {
+         if (polygon.getGeometry().contains(geom)) {
+            m_Output.addFeature(feature.getGeometry(), calculateRecord(polygon.getRecord().getValue(m_iField),
+                     feature.getRecord().getValues()));
+            return;
+         }
+      }
+
+      Object value;
+
+      if (Integer.class.isAssignableFrom(m_Type)) {
+         value = new Integer(-99999);
+      }
+      else if (Double.class.isAssignableFrom(m_Type)) {
+         value = new Integer(-99999);
+
+      }
+      else {
+         value = "";
+      }
+
+      m_Output.addFeature(feature.getGeometry(), calculateRecord(value, feature.getRecord().getValues()));
+
+   }
+
+
+   private Object[] calculateRecord(final Object value,
+                                    final Object[] record) {
+
+      final Object[] values = new Object[record.length + 1];
+      System.arraycopy(record, 0, values, 0, record.length);
+      values[values.length - 1] = value;
+      return values;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/InPolygonSpatialJoinBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,58 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoinB;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iShapes;
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+      final float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iShapes = layer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, feature);
+         if (i % 100 == 0) {
+            task.setProgress(i, m_iShapes);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public IFeature[] getClosestPoints(final Geometry geom) {
+
+      final Envelope search = geom.getEnvelopeInternal();
+      final List<IFeature> list = m_Tree.query(search);
+
+      return list.toArray(new IFeature[0]);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/PtAndAttributes.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/PtAndAttributes.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/PtAndAttributes.java	(revision 369)
@@ -0,0 +1,23 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoinB;
+
+public class PtAndAttributes {
+
+   public Object[] attrs;
+   public double   x;
+   public double   y;
+   public int      id;
+
+
+   public PtAndAttributes(final double x,
+                          final double y,
+                          final int id,
+                          final Object[] attrs) {
+
+      this.x = x;
+      this.y = y;
+      this.id = id;
+      this.attrs = attrs;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoinB/PtAndAttributes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/boundingbox/BoundingBoxAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/boundingbox/BoundingBoxAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/boundingbox/BoundingBoxAlgorithm.java	(revision 369)
@@ -0,0 +1,93 @@
+
+
+package es.unex.sextante.vectorTools.boundingbox;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+import org.gvsig.tools.exception.BaseException;
+
+
+public class BoundingBoxAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      int subtype;
+    try {
+        subtype = layerIn.getSubType();
+    } catch (BaseException e) {
+        subtype = org.gvsig.fmap.geom.Geometry.SUBTYPES.UNKNOWN;
+    }
+      IVectorLayer result;
+        result = getNewVectorLayer(RESULT, Sextante.getText("Bounding Box"), IVectorLayer.SHAPE_TYPE_POLYGON,
+                   layerIn.getFieldTypes(), layerIn.getFieldNames(), subtype);
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final Geometry bbox = getBBox(feature.getGeometry());
+         result.addFeature(bbox, feature.getRecord().getValues());
+         setProgress(i, iTotal);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Bounding_Box"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+            m_Parameters.addInputVectorLayer(
+                LAYER,
+                Sextante.getText("Layer"),
+                new AdditionalInfoVectorLayer(
+                    true,
+                    AdditionalInfoVectorLayer.MASK_SHAPE_TYPE_LINE | AdditionalInfoVectorLayer.MASK_SHAPE_TYPE_POLYGON
+                )
+            );
+         addOutputVectorLayer(RESULT, Sextante.getText("Bounding_Box"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private Geometry getBBox(final Geometry geometry) {
+      return geometry.getEnvelope();
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/boundingbox/BoundingBoxAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/linesToEquispacedPoints/LinesToEquispacedPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/linesToEquispacedPoints/LinesToEquispacedPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/linesToEquispacedPoints/LinesToEquispacedPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,150 @@
+
+
+package es.unex.sextante.vectorTools.linesToEquispacedPoints;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class LinesToEquispacedPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT   = "RESULT";
+   public static final String DISTANCE = "DISTANCE";
+   public static final String LINES    = "LINES";
+
+   private IVectorLayer       m_Output;
+   private double             m_dDist;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      IVectorLayer lines;
+
+      try {
+         m_dDist = m_Parameters.getParameterValueAsDouble(DISTANCE);
+         lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+
+         if (!m_bIsAutoExtent) {
+            lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         }
+
+         m_Output = getNewVectorLayer(RESULT, Sextante.getText("Points") + "(" + lines.getName() + ")",
+                  IVectorLayer.SHAPE_TYPE_POINT, lines.getFieldTypes(), lines.getFieldNames());
+
+         i = 0;
+         final int iShapeCount = lines.getShapesCount();
+         final IFeatureIterator iter = lines.iterator();
+         while (iter.hasNext() && setProgress(i, iShapeCount)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            for (int j = 0; j < geom.getNumGeometries(); j++) {
+               final Geometry subgeom = geom.getGeometryN(j);
+               processLine(subgeom, feature.getRecord().getValues());
+
+            }
+            i++;
+         }
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processLine(final Geometry geom,
+                            final Object[] record) {
+
+      int i, j;
+      int iPoints;
+      double dX1, dX2, dY1, dY2;
+      double dAddedPointX, dAddedPointY;
+      double dDX, dDY;
+      double dRemainingDistFromLastSegment = 0;
+      double dDistToNextPoint;
+      double dDist;
+      Geometry point;
+
+      final Coordinate[] coords = geom.getCoordinates();
+      if (coords.length == 0) {
+         return;
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+      dAddedPointX = dX1 = coords[0].x;
+      dAddedPointY = dY1 = coords[0].y;
+      point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+      m_Output.addFeature(point, record);
+      for (i = 0; i < coords.length - 1; i++) {
+         dX2 = coords[i + 1].x;
+         dX1 = coords[i].x;
+         dY2 = coords[i + 1].y;
+         dY1 = coords[i].y;
+         dDX = dX2 - dX1;
+         dDY = dY2 - dY1;
+         dDistToNextPoint = Math.sqrt(dDX * dDX + dDY * dDY);
+
+         if (dRemainingDistFromLastSegment + dDistToNextPoint > m_dDist) {
+            iPoints = (int) ((dRemainingDistFromLastSegment + dDistToNextPoint) / m_dDist);
+            dDist = m_dDist - dRemainingDistFromLastSegment;
+            for (j = 0; j < iPoints; j++) {
+               dDist = m_dDist - dRemainingDistFromLastSegment;
+               dDist += j * m_dDist;
+               dAddedPointX = dX1 + dDist * dDX / dDistToNextPoint;
+               dAddedPointY = dY1 + dDist * dDY / dDistToNextPoint;
+               point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+               m_Output.addFeature(point, record);
+            }
+            dDX = dX2 - dAddedPointX;
+            dDY = dY2 - dAddedPointY;
+            dRemainingDistFromLastSegment = Math.sqrt(dDX * dDX + dDY * dDY);
+         }
+         else {
+            dRemainingDistFromLastSegment += dDistToNextPoint;
+         }
+
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Lines_to_equispaced_points"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Distance_between_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/linesToEquispacedPoints/LinesToEquispacedPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,83 @@
+package es.unex.sextante.vectorTools.splitLinesWithPoints;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineSegment;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iPoints;
+   private final double  m_dX[];
+   private final double  m_dY[];
+   private final Object  m_Attributes[];
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+      float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iPoints = layer.getShapesCount();
+      m_dX = new double[m_iPoints];
+      m_dY = new double[m_iPoints];
+      m_Attributes = new Object[m_iPoints];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = (float) coord.x;
+         y = (float) coord.y;
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, new Integer(i));
+         m_dX[i] = x;
+         m_dY[i] = y;
+         m_Attributes[i] = feature.getRecord().getValues();
+
+         if (i % 50 == 0) {
+            task.setProgress(i, m_iPoints);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public PtAndAttributes[] getClosestPoints(final LineSegment seg,
+                                             final double dDistance) {
+
+      int i;
+      int iID;
+      final Envelope search = new Envelope(seg.p0, seg.p1);
+      search.expandBy(dDistance);
+      final List<Integer> list = m_Tree.query(search);
+      final int iSize = list.size();
+      final PtAndAttributes pts[] = new PtAndAttributes[iSize];
+      for (i = 0; i < iSize; i++) {
+         iID = list.get(i).intValue();
+         pts[i] = new PtAndAttributes(m_dX[iID], m_dY[iID], iID, (Object[]) m_Attributes[iID]);
+      }
+
+      return pts;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/PtAndAttributes.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/PtAndAttributes.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/PtAndAttributes.java	(revision 369)
@@ -0,0 +1,23 @@
+package es.unex.sextante.vectorTools.splitLinesWithPoints;
+
+public class PtAndAttributes {
+
+   public Object[] attrs;
+   public double   x;
+   public double   y;
+   public int      id;
+
+
+   public PtAndAttributes(final double x,
+                          final double y,
+                          final int id,
+                          final Object[] attrs) {
+
+      this.x = x;
+      this.y = y;
+      this.id = id;
+      this.attrs = attrs;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/PtAndAttributes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/SplitLinesWithPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/SplitLinesWithPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/SplitLinesWithPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,282 @@
+
+
+package es.unex.sextante.vectorTools.splitLinesWithPoints;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineSegment;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SplitLinesWithPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String     RESULT    = "RESULT";
+   public static final String     METHOD    = "METHOD";
+   public static final String     TOLERANCE = "TOLERANCE";
+   public static final String     LINES     = "LINES";
+   public static final String     POINTS    = "POINTS";
+
+   private IVectorLayer           m_Points;
+   private IVectorLayer           m_Lines;
+
+   private IVectorLayer           m_Output;
+   private double                 m_dTolerance;
+   private int                    m_iMethod;
+   private ArrayList              m_Path;
+   private Object                 m_LastValue[];
+   private BitSet                 m_UsedPoints;
+   private NearestNeighbourFinder m_NNF;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Split_lines_with_points_layer"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      final String sOptions[] = { Sextante.getText("Add_data_before_point"), Sextante.getText("Add_data_after_point") };
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Capa_de_lineas"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+                  true);
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sOptions);
+         addOutputVectorLayer(RESULT, Sextante.getText("Splitted_lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_Lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_Lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] types = new Class[m_Lines.getFieldCount() + m_Points.getFieldCount()];
+      final String[] sFields = new String[m_Lines.getFieldCount() + m_Points.getFieldCount()];
+      for (i = 0; i < m_Lines.getFieldCount(); i++) {
+         types[i] = m_Lines.getFieldType(i);
+         sFields[i] = m_Lines.getFieldName(i);
+      }
+      for (i = 0; i < m_Points.getFieldCount(); i++) {
+         sFields[i + m_Lines.getFieldCount()] = m_Points.getFieldName(i);
+         types[i + m_Lines.getFieldCount()] = m_Points.getFieldType(i);
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Splitted_lines"), m_Lines.getShapeType(), types, sFields);
+
+      m_NNF = new NearestNeighbourFinder(m_Points, this.m_Task);
+      m_UsedPoints = new BitSet(m_Points.getShapesCount());
+
+      iShapeCount = m_Lines.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = m_Lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         splitLine(feature.getGeometry(), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void splitLine(final Geometry line,
+                          final Object[] row) {
+
+      final Object[] nullValue = new Object[m_Points.getFieldCount()];
+      for (int i = 0; i < nullValue.length; i++) {
+         try {
+            final Class c = m_Points.getFieldType(i);
+            nullValue[i] = c.newInstance();
+         }
+         catch (final Exception e) {
+         };
+      }
+      m_LastValue = nullValue;
+      m_Path = new ArrayList();
+
+      Coordinate[] coords;
+      for (int i = 0; i < line.getNumGeometries(); i++) {
+         try {
+            final Geometry geom = line.getGeometryN(i);
+            coords = geom.getCoordinates();
+            m_Path.add(coords[0]);
+            LineSegment segment = null;
+            for (int j = 0; j < coords.length - 1; j++) {
+               segment = new LineSegment(coords[j], coords[j + 1]);
+               splitSegment(segment, row);
+            }
+            if (segment != null) {
+               m_Path.add(segment.p1);
+            }
+            final Object[] values = new Object[row.length + m_Points.getFieldCount()];
+            for (int j = 0; j < row.length; j++) {
+               values[j] = row[j];
+            }
+            if (m_iMethod == 0) {
+               for (int j = 0; j < m_Points.getFieldCount(); j++) {
+                  values[row.length + j] = nullValue[j];
+               }
+            }
+            else {
+               for (int j = 0; j < m_Points.getFieldCount(); j++) {
+                  values[row.length + j] = m_LastValue[j];
+               }
+            }
+
+            addCurrentGeometry(values);
+
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+   }
+
+
+   private void splitSegment(final LineSegment seg,
+                             final Object[] row) throws Exception {
+
+      final ArrayList closePoints = new ArrayList();
+
+      final PtAndAttributes[] pts = m_NNF.getClosestPoints(seg, m_dTolerance);
+
+      for (int i = 0; i < pts.length; i++) {
+         if (!m_UsedPoints.get(pts[i].id)) {
+            final Coordinate c = new Coordinate(pts[i].x, pts[i].y);
+            double dDist = seg.distance(c);
+            if (dDist < m_dTolerance) {
+               final Coordinate closest = seg.closestPoint(c);
+               final double dX = closest.x - seg.p0.x;
+               final double dY = closest.y - seg.p0.y;
+               dDist = dX * dX + dY * dY;
+               closePoints.add(new CoordinateAndDist(closest, dDist, pts[i].attrs));
+               m_UsedPoints.set(pts[i].id);
+            }
+         }
+      }
+
+      final CoordinateAndDist[] ptArray = new CoordinateAndDist[closePoints.size()];
+      for (int i = 0; i < closePoints.size(); i++) {
+         ptArray[i] = (CoordinateAndDist) closePoints.get(i);
+      }
+
+      Arrays.sort(ptArray);
+
+      for (int i = 0; i < ptArray.length; i++) {
+         final Object[] values = new Object[row.length + m_Points.getFieldCount()];
+         for (int j = 0; j < row.length; j++) {
+            values[j] = row[j];
+         }
+         if (m_iMethod == 0) {
+            for (int j = 0; j < m_Points.getFieldCount(); j++) {
+               values[row.length + j] = ptArray[i].val[j];
+            }
+         }
+         else {
+            for (int j = 0; j < m_Points.getFieldCount(); j++) {
+               values[row.length + j] = m_LastValue[j];
+            }
+            m_LastValue = ptArray[i].val;
+         }
+
+         m_Path.add(ptArray[i].coord);
+         addCurrentGeometry(values);
+         m_Path = new ArrayList();
+         m_Path.add(ptArray[i].coord);
+      }
+
+      m_Path.add(seg.p1);
+
+   }
+
+
+   private void addCurrentGeometry(final Object[] values) {
+
+      if (m_Path.size() != 0) {
+         final Coordinate[] coords = new Coordinate[m_Path.size()];
+         for (int i = 0; i < coords.length; i++) {
+            final Coordinate c = (Coordinate) m_Path.get(i);
+            coords[i] = c;
+         }
+         final GeometryFactory gf = new GeometryFactory();
+         m_Output.addFeature(gf.createLineString(coords), values);
+      }
+   }
+
+   private class CoordinateAndDist
+            implements
+               Comparable {
+
+      private final Coordinate coord;
+      private final double     dist;
+      private final Object[]   val;
+
+
+      CoordinateAndDist(final Coordinate c,
+                        final double d,
+                        final Object[] v) {
+
+         coord = c;
+         dist = d;
+         val = v;
+
+      }
+
+
+      public int compareTo(final Object ob) {
+
+         if (!(ob instanceof CoordinateAndDist)) {
+            throw new ClassCastException();
+         }
+
+         final double dist2 = ((CoordinateAndDist) ob).dist;
+
+         return (int) Math.signum(this.dist - dist2);
+
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitLinesWithPoints/SplitLinesWithPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/gridStatisticsInPolygons/GridStatisticsInPolygonsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/gridStatisticsInPolygons/GridStatisticsInPolygonsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/gridStatisticsInPolygons/GridStatisticsInPolygonsAlgorithm.java	(revision 369)
@@ -0,0 +1,275 @@
+
+
+package es.unex.sextante.vectorTools.gridStatisticsInPolygons;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class GridStatisticsInPolygonsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  RESULT = "RESULT";
+   public static final String  GRIDS  = "GRIDS";
+   public static final String  LAYER  = "LAYER";
+   private static final Double NODATA = new Double(-99999.);
+
+   private int                 m_iNX, m_iNY;
+   private IVectorLayer        m_Layer;
+   private AnalysisExtent      m_Extent;
+   private IRasterLayer        m_Window;
+   private ArrayList           m_Grids;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Grid_statistics_in_polygons"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addMultipleInput(GRIDS, Sextante.getText("Grids"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iLayer = 0;
+      int iShapeCount;
+      String sName;
+      SimpleStats[][] stats;
+      IRasterLayer grid;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_Grids = m_Parameters.getParameterValueAsArrayList(GRIDS);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iShapeCount = m_Layer.getShapesCount();
+      stats = new SimpleStats[m_Grids.size()][iShapeCount];
+
+      for (iLayer = 0; (iLayer < m_Grids.size()) && setProgress(iLayer, m_Grids.size()); iLayer++) {
+         m_Window = (IRasterLayer) m_Grids.get(iLayer);
+         m_Window.setFullExtent();
+         m_Extent = m_Window.getWindowGridExtent();
+         final Coordinate[] coords = new Coordinate[5];
+         coords[0] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+         coords[1] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMax());
+         coords[2] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMax());
+         coords[3] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMin());
+         coords[4] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+         final GeometryFactory gf = new GeometryFactory();
+         final LinearRing ring = gf.createLinearRing(coords);
+         final Polygon extent = gf.createPolygon(ring, null);
+         m_iNX = m_Window.getNX();
+         m_iNY = m_Window.getNY();
+         final IFeatureIterator iter = m_Layer.iterator();
+         i = 0;
+         while (iter.hasNext() && !m_Task.isCanceled()) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            if (geom.intersects(extent)) {
+               stats[iLayer][i] = doPolygon(geom);
+            }
+            i++;
+         }
+         iter.close();
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Double[][] values = new Double[m_Grids.size() * 4][iShapeCount];
+      final String[] sNames = new String[m_Grids.size() * 4];
+      final Class[] types = new Class[m_Grids.size() * 4];
+      int iGrid;
+      for (i = 0; i < m_Grids.size() * 4; i += 4) {
+         iGrid = i / 4;
+         grid = (IRasterLayer) m_Grids.get(iGrid);
+         sName = grid.getName();
+         sNames[i] = Sextante.getText("AVG") + "_" + sName;
+         sNames[i + 1] = Sextante.getText("VAR") + "_" + sName;
+         sNames[i + 2] = Sextante.getText("MIN") + "_" + sName;
+         sNames[i + 3] = Sextante.getText("MAX") + "_" + sName;
+         for (j = 0; j < 4; j++) {
+            types[i + j] = Double.class;
+         }
+         for (j = 0; j < iShapeCount; j++) {
+            if (stats[iGrid][j] != null) {
+               values[i][j] = new Double(stats[iGrid][j].getMean());
+               values[i + 1][j] = new Double(stats[iGrid][j].getVariance());
+               values[i + 2][j] = new Double(stats[iGrid][j].getMin());
+               values[i + 3][j] = new Double(stats[iGrid][j].getMax());
+            }
+            else {
+               values[i][j] = NODATA;
+               values[i + 1][j] = NODATA;
+               values[i + 2][j] = NODATA;
+               values[i + 3][j] = NODATA;
+            }
+         }
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(m_Layer.getName());
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_Layer, channel, sNames, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private SimpleStats doPolygon(final Geometry geom) {
+
+      final SimpleStats stats = new SimpleStats();
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part, stats);
+      }
+
+      return stats;
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom,
+                              final SimpleStats stats) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int x, y, ix, xStart, xStop, iPoint;
+      double yPos;
+      double dValue;
+      Coordinate pLeft, pRight, pa, pb;
+      final Coordinate p = new Coordinate();
+      bCrossing = new boolean[m_iNX];
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (y = 0, yPos = m_Extent.getYMax(); y < m_iNY; y++, yPos -= m_Extent.getCellSize()) {
+         if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+            Arrays.fill(bCrossing, false);
+            pLeft = new Coordinate(m_Extent.getXMin() - 1.0, yPos);
+            pRight = new Coordinate(m_Extent.getXMax() + 1.0, yPos);
+
+            pb = points[points.length - 1];
+
+            for (iPoint = 0; iPoint < points.length; iPoint++) {
+               pa = pb;
+               pb = points[iPoint];
+
+               if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                  getCrossing(p, pa, pb, pLeft, pRight);
+
+                  ix = (int) ((p.x - m_Extent.getXMin()) / m_Extent.getCellSize() + 1.0);
+
+                  if (ix < 0) {
+                     ix = 0;
+                  }
+                  else if (ix >= m_iNX) {
+                     ix = m_iNX - 1;
+                  }
+
+                  bCrossing[ix] = !bCrossing[ix];
+               }
+            }
+
+            for (x = xStart, bFill = false; x <= xStop; x++) {
+               if (bCrossing[x]) {
+                  bFill = !bFill;
+               }
+               if (bFill) {
+                  dValue = m_Window.getCellValueAsDouble(x, y);
+                  if (!m_Window.isNoDataValue(dValue)) {
+                     stats.addValue(dValue);
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/gridStatisticsInPolygons/GridStatisticsInPolygonsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/minimumEnclosingPolygon/MinimumEnclosingPolygonAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/minimumEnclosingPolygon/MinimumEnclosingPolygonAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/minimumEnclosingPolygon/MinimumEnclosingPolygonAlgorithm.java	(revision 369)
@@ -0,0 +1,331 @@
+
+
+package es.unex.sextante.vectorTools.minimumEnclosingPolygon;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.MultiPoint;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.util.AffineTransformation;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class MinimumEnclosingPolygonAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   CONVEX_HULL  = 0;
+   private static final int   ME_CIRCLE    = 1;
+   private static final int   ME_RECTANGLE = 2;
+
+   public static final String POINTS       = "POINTS";
+   public static final String FIELD        = "FIELD";
+   public static final String METHOD       = "METHOD";
+   public static final String USECLASSES   = "USECLASSES";
+   public static final String RESULT       = "RESULT";
+
+   private int                m_iMethod;
+   private Geometry           m_ConvexHull;
+   private IVectorLayer       m_Layer;
+   private boolean            m_bUseClasses;
+   private int                m_iClass;
+   IVectorLayer               m_Output;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      final HashMap map = new HashMap(9);
+      ArrayList list;
+      Object key;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_bUseClasses = m_Parameters.getParameterValueAsBoolean(USECLASSES);
+      m_iClass = m_Parameters.getParameterValueAsInt(FIELD);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iCount = m_Layer.getShapesCount();
+
+      if (m_bUseClasses) {
+         m_Output = getNewVectorLayer(RESULT, m_Layer.getName() + Sextante.getText("[Enclosing_shape]"),
+                  IVectorLayer.SHAPE_TYPE_POLYGON, new Class[] { String.class }, new String[] { m_Layer.getFieldName(m_iClass) });
+      }
+      else {
+         m_Output = getNewVectorLayer(RESULT, m_Layer.getName() + Sextante.getText("[Enclosing_shape]"),
+                  IVectorLayer.SHAPE_TYPE_POLYGON, new Class[] { String.class }, new String[] { "ID" });
+      }
+
+      i = 0;
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         if (!m_bUseClasses) {
+            key = "1";
+         }
+         else {
+            key = feature.getRecord().getValue(m_iClass);
+         }
+         list = (ArrayList) map.get(key);
+         if (list == null) {
+            list = new ArrayList();
+            map.put(key, list);
+         }
+         final Coordinate[] coords = geom.getCoordinates();
+         for (final Coordinate element : coords) {
+            list.add(element);
+         }
+      }
+
+      final Set set = map.keySet();
+      final Iterator setiter = set.iterator();
+
+      while (setiter.hasNext()) {
+         key = setiter.next();
+         list = (ArrayList) map.get(key);
+         final Point points[] = new Point[list.size()];
+         final GeometryFactory geometryFactory = new GeometryFactory();
+         for (i = 0; i < list.size(); i++) {
+            points[i] = geometryFactory.createPoint((Coordinate) list.get(i));
+         }
+         try {
+            final MultiPoint mp = new MultiPoint(points, new GeometryFactory());
+            m_ConvexHull = mp.convexHull();
+            generateOutput(key);
+         }
+         catch (final Exception e) {
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minimum_enclosing_shapes"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setIsDeterminatedProcess(false);
+      setUserCanDefineAnalysisExtent(true);
+
+      final String sMethod[] = { Sextante.getText("Convex_hull"), Sextante.getText("Minimum_enclosing_circle"),
+               Sextante.getText("Minimum_enclosing_rectangle") };
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "POINTS");
+         m_Parameters.addSelection(METHOD, Sextante.getText("Enclosing_shape"), sMethod);
+         m_Parameters.addBoolean(USECLASSES, Sextante.getText("Create_one_polygon_for_each_class"), false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Minimum_enclosing_shape"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void generateOutput(final Object ob) {
+
+      final Object value[] = new String[] { (String) ob };
+
+      switch (m_iMethod) {
+         case CONVEX_HULL:
+         default:
+            m_Output.addFeature(m_ConvexHull, value);
+            break;
+         case ME_CIRCLE:
+            m_Output.addFeature(getMinEnclosingCircle(), value);
+            break;
+         case ME_RECTANGLE:
+            m_Output.addFeature(getMinEnclosingRectangle(), value);
+            break;
+      }
+
+   }
+
+
+   private Geometry getMinEnclosingRectangle() {
+
+      int i2;
+      double x, y;
+      double dArea;
+      double dAngle;
+      double dMinArea = Double.MAX_VALUE;
+      Geometry convexHull;
+      Envelope rect;
+      AffineTransformation at, iat;
+      Geometry minRect = null;
+      final Coordinate pts[] = m_ConvexHull.getCoordinates();
+
+      if (pts.length < 3) {
+         return null;
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+      for (int i = 0; i < pts.length; i++) {
+         i2 = (i + 1) % pts.length;
+         x = pts[i2].x - pts[i].x;
+         y = pts[i2].y - pts[i].y;
+         dAngle = -Math.atan2(y, x);
+         at = new AffineTransformation();
+         at.translate(pts[i].x, pts[i].y);
+         at.rotate(dAngle);
+         convexHull = (Geometry) m_ConvexHull.clone();
+         convexHull.apply(at);
+         rect = convexHull.getEnvelopeInternal();
+         dArea = (rect.getMaxX() - rect.getMinX()) * (rect.getMaxY() - rect.getMinY());
+         if (dArea < dMinArea) {
+            dMinArea = dArea;
+            iat = new AffineTransformation();
+            iat.rotate(-dAngle);
+            iat.translate(-pts[i].x, -pts[i].y);
+            final Coordinate[] coord = new Coordinate[5];
+            coord[0] = new Coordinate(rect.getMinX(), rect.getMinY());
+            coord[1] = new Coordinate(rect.getMaxX(), rect.getMinY());
+            coord[2] = new Coordinate(rect.getMaxX(), rect.getMaxY());
+            coord[3] = new Coordinate(rect.getMinX(), rect.getMaxY());
+            coord[4] = new Coordinate(rect.getMinX(), rect.getMinY());
+            final LinearRing ring = gf.createLinearRing(coord);
+            minRect = gf.createPolygon(ring, null);
+            minRect.apply(iat);
+         }
+
+      }
+
+      return minRect;
+
+   }
+
+
+   private Geometry getMinEnclosingCircle() {
+
+      final Coordinate[] bndry = new Coordinate[3];
+      final Coordinate pts[] = m_ConvexHull.getCoordinates();
+      final Circle circle = getMinEnclosingCircle(pts.length, pts, 0, bndry);
+      final Coordinate center = circle.center;
+
+      return ShapesTools.createCircle(center.x, center.y, circle.radius);
+
+   }
+
+
+   private Circle findCenterRadius(final Coordinate p1,
+                                   final Coordinate p2,
+                                   final Coordinate p3) {
+
+      final double x = (p3.x * p3.x * (p1.y - p2.y) + (p1.x * p1.x + (p1.y - p2.y) * (p1.y - p3.y)) * (p2.y - p3.y) + p2.x
+                                                                                                                      * p2.x
+                                                                                                                      * (-p1.y + p3.y))
+                       / (2 * (p3.x * (p1.y - p2.y) + p1.x * (p2.y - p3.y) + p2.x * (-p1.y + p3.y)));
+
+      final double y = (p2.y + p3.y) / 2 - (p3.x - p2.x) / (p3.y - p2.y) * (x - (p2.x + p3.x) / 2);
+
+      final Coordinate c = new Coordinate(x, y);
+      final double r = distance(c, p1);
+
+      return new Circle(c, r);
+
+   }
+
+
+   private Circle getMinEnclosingCircle(final int n,
+                                        final Coordinate[] p,
+                                        final int m,
+                                        final Coordinate[] b) {
+
+      Coordinate c = new Coordinate(-1, -1);
+      double r = 0;
+
+
+      //... Compute the smallest circle defined by B.
+      if (m == 1) {
+         c = new Coordinate(b[0].x, b[0].y);
+         r = 0;
+      }
+      else if (m == 2) {
+         c = new Coordinate((b[0].x + b[1].x) / 2, (b[0].y + b[1].y) / 2);
+         r = distance(b[0], c);
+      }
+      else if (m == 3) {
+         return findCenterRadius(b[0], b[1], b[2]);
+      }
+
+
+      Circle minC = new Circle(c, r);
+
+      //... Now see if all the points in P are enclosed.
+      for (int i = 0; i < n; i++) {
+         if (distance(p[i], minC.center) > minC.radius) {
+            //... Compute B <--- B union P[i].
+            b[m] = new Coordinate(p[i].x, p[i].y);
+
+            //... Recurse
+            minC = getMinEnclosingCircle(i, p, m + 1, b);
+         }
+      }
+
+      return minC;
+   }
+
+
+   private double distance(final Coordinate p1,
+                           final Coordinate p2) {
+
+      return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
+
+   }
+
+   private class Circle {
+
+      public Coordinate center;
+      public double     radius;
+
+
+      public Circle(final Coordinate c,
+                    final double r) {
+
+         center = c;
+         radius = r;
+
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/minimumEnclosingPolygon/MinimumEnclosingPolygonAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/lineAverageSlope/LineAverageSlopeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/lineAverageSlope/LineAverageSlopeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/lineAverageSlope/LineAverageSlopeAlgorithm.java	(revision 369)
@@ -0,0 +1,184 @@
+
+
+package es.unex.sextante.vectorTools.lineAverageSlope;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class LineAverageSlopeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  RESULT   = "RESULT";
+   public static final String  DISTANCE = "DISTANCE";
+   public static final String  DEM      = "DEM";
+   public static final String  LINES    = "LINES";
+   private static final double NODATA   = -99999;
+
+   private IVectorLayer        m_Output;
+   private double              m_dDist;
+   private IRasterLayer        m_DEM;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      IVectorLayer lines;
+
+      try {
+         m_dDist = m_Parameters.getParameterValueAsDouble(DISTANCE);
+         lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+         m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+         m_DEM.setFullExtent();
+
+         if (!m_bIsAutoExtent) {
+            lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         }
+
+         final Class[] types = new Class[lines.getFieldCount() + 2];
+         final String[] sFields = new String[lines.getFieldCount() + 2];
+         types[lines.getFieldCount()] = Double.class;
+         sFields[lines.getFieldCount()] = Sextante.getText("Slope");
+         types[lines.getFieldCount() + 1] = Double.class;
+         sFields[lines.getFieldCount() + 1] = "Max " + Sextante.getText("Slope");
+         for (int j = 0; j < lines.getFieldCount(); j++) {
+            sFields[j] = lines.getFieldName(j);
+            types[j] = lines.getFieldType(j);
+         }
+         m_Output = getNewVectorLayer(RESULT, lines.getName() + "[" + Sextante.getText("Slope") + "]",
+                  IVectorLayer.SHAPE_TYPE_LINE, types, sFields);
+
+         i = 0;
+         final int iShapeCount = lines.getShapesCount();
+         final IFeatureIterator iter = lines.iterator();
+         while (iter.hasNext() && setProgress(i, iShapeCount)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final SimpleStats stats = getSlopeStats(geom);
+            final Object[] orgValues = feature.getRecord().getValues();
+            final Object[] values = new Object[orgValues.length + 2];
+            System.arraycopy(orgValues, 0, values, 0, orgValues.length);
+            values[orgValues.length] = stats.getMean();
+            values[orgValues.length + 1] = stats.getMax();
+            m_Output.addFeature(geom, values);
+            i++;
+         }
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private SimpleStats getSlopeStats(final Geometry geom) {
+
+      int i, j;
+      int iPoints;
+      double dX1, dX2, dY1, dY2;
+      double dAddedPointX, dAddedPointY;
+      double dDX, dDY;
+      double dRemainingDistFromLastSegment = 0;
+      double dDistToNextPoint;
+      double dDist;
+      Point point;
+
+      final Coordinate[] coords = geom.getCoordinates();
+
+      final ArrayList<Point> points = new ArrayList<Point>();
+
+      final GeometryFactory gf = new GeometryFactory();
+      dAddedPointX = dX1 = coords[0].x;
+      dAddedPointY = dY1 = coords[0].y;
+      point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+      points.add(point);
+      for (i = 0; i < coords.length - 1; i++) {
+         dX2 = coords[i + 1].x;
+         dX1 = coords[i].x;
+         dY2 = coords[i + 1].y;
+         dY1 = coords[i].y;
+         dDX = dX2 - dX1;
+         dDY = dY2 - dY1;
+         dDistToNextPoint = Math.sqrt(dDX * dDX + dDY * dDY);
+
+         if (dRemainingDistFromLastSegment + dDistToNextPoint > m_dDist) {
+            iPoints = (int) ((dRemainingDistFromLastSegment + dDistToNextPoint) / m_dDist);
+            dDist = m_dDist - dRemainingDistFromLastSegment;
+            for (j = 0; j < iPoints; j++) {
+               dDist = m_dDist - dRemainingDistFromLastSegment;
+               dDist += j * m_dDist;
+               dAddedPointX = dX1 + dDist * dDX / dDistToNextPoint;
+               dAddedPointY = dY1 + dDist * dDY / dDistToNextPoint;
+               point = gf.createPoint(new Coordinate(dAddedPointX, dAddedPointY));
+               points.add(point);
+            }
+            dDX = dX2 - dAddedPointX;
+            dDY = dY2 - dAddedPointY;
+            dRemainingDistFromLastSegment = Math.sqrt(dDX * dDX + dDY * dDY);
+         }
+         else {
+            dRemainingDistFromLastSegment += dDistToNextPoint;
+         }
+
+      }
+
+      final SimpleStats stats = new SimpleStats();
+      for (int k = 0; k < points.size() - 1; k++) {
+         point = points.get(k);
+         final double dElevation = m_DEM.getValueAt(point.getX(), point.getY());
+         final Point point2 = points.get(k + 1);
+         final double dElevation2 = m_DEM.getValueAt(point2.getX(), point2.getY());
+         dDist = Math.sqrt(Math.pow(point.getX() - point2.getX(), 2.) + Math.pow(point.getY() - point2.getY(), 2.));
+         final double dSlope = Math.abs((dElevation2 - dElevation) / dDist);
+         stats.addValue(dSlope);
+      }
+
+      return stats;
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Average_slope_line"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Distance_between_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("DEM"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/lineAverageSlope/LineAverageSlopeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clip/ClipAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clip/ClipAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clip/ClipAlgorithm.java	(revision 369)
@@ -0,0 +1,159 @@
+
+
+package es.unex.sextante.vectorTools.clip;
+
+import java.util.Iterator;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.prep.PreparedGeometry;
+import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class ClipAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER     = "LAYER";
+   public static final String CLIPLAYER = "CLIPLAYER";
+   public static final String RESULT    = "RESULT";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final IVectorLayer layerClip = m_Parameters.getParameterValueAsVectorLayer(CLIPLAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layerClip.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final STRtree tree = buildClipTree(layerClip);
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Clipped_layer"), layerIn.getShapeType(), layerIn.getFieldTypes(),
+               layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+
+      int i = 0;
+      final int iShapeCount = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry g = clipGeometry(feature.getGeometry(), tree);
+         if (g != null) {
+            m_Output.addFeature(g, feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Clip"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer_to_clip"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY,
+                  true);
+         m_Parameters.addInputVectorLayer(CLIPLAYER, Sextante.getText("Clipping_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Clipped_Layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public Geometry clipGeometry(final Geometry g,
+                                final STRtree tree) throws GeoAlgorithmExecutionException {
+
+      if (g == null) {
+         return null;
+      }
+
+      final Envelope env = g.getEnvelopeInternal();
+      if (env == null) {
+         return null;
+      }
+
+      final List candidates = tree.query(env);
+      Geometry clipGeometry = null;
+      Geometry result = g;
+      boolean intersected = false;
+      if ((candidates == null) || (candidates.size() == 0)) {
+         return null;
+      }
+      else {
+         try {
+            for (final Iterator it = candidates.iterator(); it.hasNext();) {
+               final PreparedGeometry pg = (PreparedGeometry) it.next();
+               if (pg.intersects(result)) {
+                  intersected = true;
+                  clipGeometry = pg.getGeometry();
+                  result = clipGeometry.intersection(result);
+               }
+            }
+            if (!intersected) {
+               return null;
+            }
+            if (result.getNumGeometries() == 0) {
+               return null;
+            }
+            return result;
+         }
+         catch (final com.vividsolutions.jts.geom.TopologyException e) {
+            if (!g.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong input geometry");
+            }
+            if (!clipGeometry.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong clipping geometry");
+            }
+         }
+
+      }
+      return null;
+   }
+
+
+   private STRtree buildClipTree(final IVectorLayer layer) throws IteratorException {
+
+      final STRtree tree = new STRtree();
+
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final PreparedGeometry pg = PreparedGeometryFactory.prepare(geom);
+         tree.insert(pg.getGeometry().getEnvelopeInternal(), pg);
+      }
+      iter.close();
+
+      return tree;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clip/ClipAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveParametersPanel.java	(revision 369)
@@ -0,0 +1,233 @@
+package es.unex.sextante.vectorTools.dissolve;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ScrollPaneConstants;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+
+public class DissolveParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private GeoAlgorithm                m_Algorithm;
+   private JLabel                      jLabelGroupings;
+   private JComboBox                   jComboBoxField;
+   private JTable                      jTableGroupings;
+   private JComboBox                   jComboBoxLayers;
+   private JLabel                      jLabelField;
+   private JLabel                      jLabelLayer;
+   private JScrollPane                 jScrollPaneFields;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+
+
+   public DissolveParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      final ParametersSet params = m_Algorithm.getParameters();
+      try {
+         params.getParameter(DissolveAlgorithm.LAYER).setParameterValue(layer);
+         params.getParameter(DissolveAlgorithm.GROUPING_FIELD).setParameterValue(jComboBoxField.getSelectedIndex());
+         final DissolveTableModel model = (DissolveTableModel) jTableGroupings.getModel();
+         params.getParameter(DissolveAlgorithm.GROUPING_FUNCTIONS).setParameterValue(model.getAsString());
+      }
+      catch (final WrongParameterIDException e) {
+         throw new WrongInputException();
+      }
+
+
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      Output out;
+      IOutputChannel channel;
+      try {
+         out = ooSet.getOutput(DissolveAlgorithm.RESULT);
+         channel = outputChannelSelectionPanel.getOutputChannel();
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      if (channel instanceof OverwriteOutputChannel) {
+         final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+         if (!ooc.getLayer().canBeEdited()) {
+            throw new LayerCannotBeOverwrittenException();
+         }
+      }
+
+      out.setOutputChannel(channel);
+
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] {
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 5.0, 25.0, 5.0, 25.0, 5.0, 25.0, TableLayoutConstants.FILL, 5.0, 20.0, 5.0 } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(469, 257));
+            {
+               jLabelGroupings = new JLabel();
+               this.add(jLabelGroupings, "1, 5");
+               jLabelGroupings.setText(Sextante.getText("Summary_statistics"));
+            }
+            {
+               jScrollPaneFields = new JScrollPane();
+               jScrollPaneFields.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               this.add(jScrollPaneFields, "1, 6, 2, 6");
+               {
+                  jTableGroupings = new JTable();
+                  jScrollPaneFields.setViewportView(jTableGroupings);
+               }
+            }
+            {
+               jLabelLayer = new JLabel();
+               this.add(jLabelLayer, "1, 1");
+               jLabelLayer.setText(Sextante.getText("Layer"));
+            }
+            {
+               jLabelField = new JLabel();
+               this.add(jLabelField, "1, 3");
+               jLabelField.setText(Sextante.getText("Field"));
+            }
+            {
+               jComboBoxField = new JComboBox();
+               this.add(jComboBoxField, "2, 3");
+            }
+            {
+               final ComboBoxModel jComboBoxLayersModel = new DefaultComboBoxModel(getLayers());
+               jComboBoxLayers = new JComboBox();
+               this.add(jComboBoxLayers, "2, 1");
+               jComboBoxLayers.setModel(jComboBoxLayersModel);
+               jComboBoxLayers.addItemListener(new java.awt.event.ItemListener() {
+                  public void itemStateChanged(final java.awt.event.ItemEvent e) {
+                     setFields();
+                     setTableModel();
+                  }
+               });
+               jComboBoxLayers.setSelectedIndex(0);
+               setFields();
+               setTableModel();
+            }
+            {
+               final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+               final Output out = ooSet.getOutput(DissolveAlgorithm.RESULT);
+               outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+               this.add(outputChannelSelectionPanel, "2,8");
+               this.add(new JLabel(Sextante.getText("Result")), "1,8");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   protected void setFields() {
+
+      final ComboBoxModel jComboBoxFieldModel = new DefaultComboBoxModel(getFields());
+      jComboBoxField.setModel(jComboBoxFieldModel);
+
+   }
+
+
+   private void setTableModel() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      final DissolveTableModel tableModel = new DissolveTableModel(layer);
+      jTableGroupings.setModel(tableModel);
+
+   }
+
+
+   private String[] getFields() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      return getFields(layer);
+
+   }
+
+
+   private String[] getFields(final IVectorLayer layer) {
+
+      return layer.getFieldNames();
+
+   }
+
+
+   private ObjectAndDescription[] getLayers() {
+
+      final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(IVectorLayer.SHAPE_TYPE_POLYGON);
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      for (int i = 0; i < layers.length; i++) {
+         oad[i] = new ObjectAndDescription(layers[i].getName(), layers[i]);
+      }
+      return oad;
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String sOutputName,
+                              final String sValue) {
+
+      outputChannelSelectionPanel.setText(sValue);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+   // TODO Auto-generated method stub
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveAlgorithm.java	(revision 369)
@@ -0,0 +1,244 @@
+
+
+package es.unex.sextante.vectorTools.dissolve;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.precision.EnhancedPrecisionOp;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DissolveAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT             = "RESULT";
+   public static final String LAYER              = "LAYER";
+   public static final String GROUPING_FIELD     = "GROUPING_FIELD";
+   public static final String GROUPING_FUNCTIONS = "GROUPING_FUNCTIONS";
+
+   public static final int    SUM                = 0;
+   public static final int    MIN                = 1;
+   public static final int    MAX                = 2;
+   public static final int    AVG                = 3;
+   public static final String FUNCTIONS[]        = { "SUM", "MIN", "MAX", "AVG" };
+
+   private IVectorLayer       m_LayerIn;
+   private int                m_iField;
+   private Grouping[]         m_Groupings;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_LayerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_LayerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_iField = m_Parameters.getParameterValueAsInt(GROUPING_FIELD);
+      final String sGroupings = m_Parameters.getParameterValueAsString(GROUPING_FUNCTIONS);
+      m_Groupings = getGroupings(sGroupings);
+
+      final String[] sFields = new String[1 + m_Groupings.length];
+      final Class[] types = new Class[1 + m_Groupings.length];
+      sFields[0] = Sextante.getText("Class");
+      types[0] = String.class;
+      for (int i = 0; i < m_Groupings.length; i++) {
+         sFields[i + 1] = m_LayerIn.getFieldName(m_Groupings[i].field) + "_" + FUNCTIONS[m_Groupings[i].function];
+         types[i + 1] = Double.class;
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, m_LayerIn.getName(), m_LayerIn.getShapeType(), types, sFields);
+
+      final int iShapesCount = m_LayerIn.getShapesCount();
+
+      final HashMap<String, Geometry> geoms = new HashMap<String, Geometry>();
+      final HashMap[] stats = new HashMap[m_LayerIn.getFieldCount()];
+      for (int i = 0; i < stats.length; i++) {
+         stats[i] = new HashMap();
+      }
+      final IFeatureIterator iter = m_LayerIn.iterator();
+      int i = 0;
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         final String sClass = feature.getRecord().getValue(m_iField).toString();
+         Geometry geom = geoms.get(sClass);
+         if (geom == null) {
+            geoms.put(sClass, feature.getGeometry());
+            for (final HashMap element : stats) {
+               element.put(sClass, new SimpleStats());
+            }
+         }
+         else {
+            try {
+               geom = EnhancedPrecisionOp.union(geom, feature.getGeometry());
+            }
+            catch (final Exception e) {
+               //try this if JTS complains
+               geom = EnhancedPrecisionOp.union(geom.buffer(0), feature.getGeometry());
+            }
+            geoms.put(sClass, geom);
+         }
+         final IRecord record = feature.getRecord();
+         for (int j = 0; j < stats.length; j++) {
+            try {
+               final double dValue = Double.parseDouble(record.getValue(j).toString());
+               ((SimpleStats) stats[j].get(sClass)).addValue(dValue);
+            }
+            catch (final Exception e) {
+            }
+         }
+
+         i++;
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Set set = geoms.keySet();
+      final Iterator keys = set.iterator();
+      i = 0;
+      while (keys.hasNext() && setProgress(i, geoms.size())) {
+         final String sClass = (String) keys.next();
+         final SimpleStats stat[] = new SimpleStats[m_LayerIn.getFieldCount()];
+         for (int j = 0; j < stat.length; j++) {
+            stat[j] = (SimpleStats) stats[j].get(sClass);
+         }
+         final Object[] values = calculateRecord(stat, sClass);
+         output.addFeature(geoms.get(sClass), values);
+         i++;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private Object[] calculateRecord(final SimpleStats[] stats,
+                                    final String sClass) {
+
+      double dValue;
+      final Object[] values = new Object[m_Groupings.length + 1];
+      values[0] = sClass;
+      for (int i = 0; i < m_Groupings.length; i++) {
+         final int iField = m_Groupings[i].field;
+         final int iFunction = m_Groupings[i].function;
+         switch (iFunction) {
+            case MIN:
+               dValue = stats[iField].getMin();
+               break;
+            case MAX:
+               dValue = stats[iField].getMax();
+               break;
+            case SUM:
+               dValue = stats[iField].getSum();
+               break;
+            case AVG:
+            default:
+               dValue = stats[iField].getMean();
+               break;
+         }
+         if (stats[iField].getCount() > 0) {
+            values[i + 1] = new Double(dValue);
+         }
+         else {
+            values[i + 1] = null;
+         }
+      }
+
+      return values;
+
+   }
+
+
+   private Grouping[] getGroupings(final String sGroupings) throws GeoAlgorithmExecutionException {
+
+      if (sGroupings.trim().equals("")) {
+         return new Grouping[0];
+      }
+      try {
+         final String[] sTokens = sGroupings.split(",");
+         if (sTokens.length % 2 != 0) {
+            throw new GeoAlgorithmExecutionException("Wrong groupings");
+         }
+         final Grouping[] groupings = new Grouping[sTokens.length / 2];
+
+         int iGrouping = 0;
+         for (int i = 0; i < sTokens.length - 1; i++) {
+            groupings[iGrouping] = new Grouping();
+            groupings[iGrouping].field = Integer.parseInt(sTokens[i]);
+            if ((groupings[iGrouping].field >= m_LayerIn.getFieldCount()) || (groupings[iGrouping].field < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+            i++;
+            groupings[iGrouping].function = Integer.parseInt(sTokens[i]);
+            if ((groupings[iGrouping].function > 4) || (groupings[iGrouping].function < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+            iGrouping++;
+         }
+         return groupings;
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException("Wrong groupings");
+      }
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Dissolve"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(GROUPING_FIELD, Sextante.getText("Field_with_class_name"), LAYER);
+         m_Parameters.addString(GROUPING_FUNCTIONS, Sextante.getText("Summary_statistics"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+   private class Grouping {
+
+      public int field;
+      public int function;
+
+
+      public Grouping() {
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveTableModel.java	(revision 369)
@@ -0,0 +1,130 @@
+package es.unex.sextante.vectorTools.dissolve;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class DissolveTableModel
+         extends
+            AbstractTableModel {
+
+   private final IVectorLayer m_Layer;
+   private final Object[][]   m_Data;
+
+
+   public DissolveTableModel(final IVectorLayer layer) {
+
+      m_Layer = layer;
+      m_Data = new Object[layer.getFieldCount()][5];
+      for (int i = 0; i < layer.getFieldCount(); i++) {
+         m_Data[i][0] = layer.getFieldName(i);
+         for (int j = 0; j < 4; j++) {
+            m_Data[i][j + 1] = new Boolean(false);
+         }
+      }
+
+   }
+
+
+   public int getColumnCount() {
+
+      return 5;
+
+   }
+
+
+   @Override
+   public String getColumnName(final int col) {
+
+      if (col == 0) {
+         return "FIELD";
+      }
+      else {
+         return DissolveAlgorithm.FUNCTIONS[col - 1];
+      }
+
+
+   }
+
+
+   public int getRowCount() {
+
+      return m_Layer.getFieldCount();
+
+   }
+
+
+   public Object getValueAt(final int row,
+                            final int col) {
+
+      return m_Data[row][col];
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int row,
+                                 final int col) {
+
+      if (col == 0) {
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int row,
+                          final int col) {
+
+      m_Data[row][col] = value;
+      fireTableCellUpdated(row, col);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int columnIndex) {
+
+      if (columnIndex != 0) {
+         return Boolean.class;
+      }
+      else {
+         return String.class;
+      }
+
+   }
+
+
+   public String getAsString() {
+
+      final StringBuffer sb = new StringBuffer();
+      boolean bFirst = true;
+      for (int i = 0; i < m_Data.length; i++) {
+         for (int j = 1; j < 5; j++) {
+            final Boolean b = (Boolean) m_Data[i][j];
+            if (b) {
+               if (!bFirst) {
+                  sb.append(",");
+               }
+               else {
+                  bFirst = false;
+               }
+               sb.append(Integer.toString(i));
+               sb.append(",");
+               sb.append(Integer.toString(j - 1));
+            }
+         }
+
+      }
+
+      return sb.toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/dissolve/DissolveTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeRepeatedGeometries/RemoveRepeatedGeometriesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeRepeatedGeometries/RemoveRepeatedGeometriesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeRepeatedGeometries/RemoveRepeatedGeometriesAlgorithm.java	(revision 369)
@@ -0,0 +1,84 @@
+
+
+package es.unex.sextante.vectorTools.removeRepeatedGeometries;
+
+import java.util.HashMap;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class RemoveRepeatedGeometriesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Remove_repeated_geometries"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Unique_Geometries"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(RemoveRepeatedGeometriesAlgorithm.LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final IVectorLayer driver = getNewVectorLayer(RemoveRepeatedGeometriesAlgorithm.RESULT,
+               Sextante.getText("Unique_Geometries"), layerIn.getShapeType(), layerIn.getFieldTypes(), layerIn.getFieldNames());
+
+      //Map geometries using WKT format to index
+      final HashMap geomHashMap = new HashMap();
+
+      final int iTotal = layerIn.getShapesCount();
+      final IFeatureIterator iter = layerIn.iterator();
+
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feat = iter.next();
+         final Geometry geom = feat.getGeometry();
+         final Object[] values = feat.getRecord().getValues();
+         if (geomHashMap.containsKey(geom.toText())) {
+            continue;
+         }
+         else {
+            geomHashMap.put(geom.toText(), true);
+         }
+         driver.addFeature(geom, values);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/removeRepeatedGeometries/RemoveRepeatedGeometriesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/voronoi/VoronoiAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/voronoi/VoronoiAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/voronoi/VoronoiAlgorithm.java	(revision 369)
@@ -0,0 +1,99 @@
+
+
+package es.unex.sextante.vectorTools.voronoi;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.triangulate.VoronoiDiagramBuilder;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class VoronoiAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS    = "POINTS";
+   public static final String TRIANGLES = "TRIANGLES";
+
+   private IVectorLayer       m_Points;
+   private IVectorLayer       m_Voronoi;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Voronoi_polygons"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+
+         addOutputVectorLayer(TRIANGLES, Sextante.getText("Voronoi_polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      final int iShapeCount;
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class types[] = { Integer.class };
+      final String sNames[] = { "ID" };
+      m_Voronoi = getNewVectorLayer(TRIANGLES, Sextante.getText("Voronoi_polygons"), IVectorLayer.SHAPE_TYPE_POLYGON, types,
+               sNames);
+
+      i = 0;
+      final ArrayList<Geometry> list = new ArrayList<Geometry>();
+      iShapeCount = m_Points.getShapesCount();
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         list.add(feature.getGeometry());
+         i++;
+      }
+      iter.close();
+
+      m_Task.setDeterminate(false);
+      final GeometryFactory gf = new GeometryFactory();
+      final Geometry geomcol = gf.createGeometryCollection(list.toArray(new Geometry[0]));
+      final VoronoiDiagramBuilder voronoi = new VoronoiDiagramBuilder();
+      voronoi.setSites(geomcol);
+      final Geometry polygons = voronoi.getDiagram(gf);
+
+      final int iPolygons = polygons.getNumGeometries();
+      for (int iPolygon = 0; iPolygon < iPolygons; iPolygon++) {
+         final Geometry triangle = polygons.getGeometryN(iPolygon);
+         final Object[] record = { new Integer(iPolygon) };
+         m_Voronoi.addFeature(triangle, record);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/voronoi/VoronoiAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/generateRoutes/GenerateRoutesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/generateRoutes/GenerateRoutesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/generateRoutes/GenerateRoutesAlgorithm.java	(revision 369)
@@ -0,0 +1,217 @@
+package es.unex.sextante.vectorTools.generateRoutes;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class GenerateRoutesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ROUTE        = "ROUTE";
+   public static final String NROUTES      = "NROUTES";
+   public static final String METHOD       = "METHOD";
+   public static final String SINUOSITY    = "SINUOSITY";
+   public static final String USESINUOSITY = "USESINUOSITY";
+   public static final String RESULT       = "RESULT";
+
+   private IVectorLayer       m_Routes;
+   private ArrayList          m_X;
+   private ArrayList          m_Y;
+   private int                m_iNewRoutes;
+   private double             m_dInitX;
+   private double             m_dInitY;
+   private double             m_dSinuosity;
+   private double             m_dFinalX;
+   private double             m_dFinalY;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Generate_alternative_routes"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(ROUTE, Sextante.getText("Original_route"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+                  true);
+         m_Parameters.addNumericalValue(NROUTES, Sextante.getText("Number_of_new_routes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 1, Integer.MAX_VALUE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), new String[] {
+                  Sextante.getText("Constrained_brownian_motion"), Sextante.getText("Recombination") });
+         m_Parameters.addNumericalValue(SINUOSITY, Sextante.getText("Sinuosity"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.3, 1, 10.);
+         m_Parameters.addBoolean(USESINUOSITY, Sextante.getText("Use_base_route_sinuosity"), false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Routes"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      double x, y;
+      double dDifX, dDifY;
+      double dRouteDist = 0, dStraightDist;
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(ROUTE);
+      m_iNewRoutes = m_Parameters.getParameterValueAsInt(NROUTES);
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      final boolean bUseRouteSinuosity = m_Parameters.getParameterValueAsBoolean(USESINUOSITY);
+      m_dSinuosity = m_Parameters.getParameterValueAsDouble(SINUOSITY);
+
+      final int iShapeCount = lines.getShapesCount();
+
+      if (iShapeCount == 0) {
+         throw new GeoAlgorithmExecutionException("zero lines in layer");
+      }
+
+      m_Routes = getNewVectorLayer(RESULT, Sextante.getText("Alternative_routes"), IVectorLayer.SHAPE_TYPE_LINE,
+               new Class[] { Integer.class }, new String[] { "ID" });
+
+      final IFeatureIterator iter = lines.iterator();
+      final IFeature feature = iter.next();
+      final Geometry geom = feature.getGeometry();
+      final Geometry line = geom.getGeometryN(0);
+      final Coordinate[] coords = line.getCoordinates();
+
+      m_X = new ArrayList();
+      m_Y = new ArrayList();
+
+      m_dInitX = x = coords[0].x;
+      m_dInitY = y = coords[0].y;
+
+      for (int i = 1; i < coords.length; i++) {
+         dDifX = coords[i].x - x;
+         dDifY = coords[i].y - y;
+         dRouteDist += Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+         m_X.add(new Double(dDifX));
+         m_Y.add(new Double(dDifY));
+         x = coords[i].x;
+         y = coords[i].y;
+      }
+
+      m_dFinalX = x;
+      m_dFinalY = y;
+
+      dStraightDist = Math.sqrt(Math.pow(m_dFinalX - m_dInitX, 2) + Math.pow(m_dFinalY - m_dInitY, 2));
+      if (bUseRouteSinuosity) {
+         m_dSinuosity = dRouteDist / dStraightDist;
+      }
+
+      if (iMethod == 0) {
+         generateRoutesBrownian();
+      }
+      else {
+         generateRoutesRecombine();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void generateRoutesRecombine() {
+
+      final Object value[] = new Object[1];
+      double dLastX, dLastY;
+      double dX, dY;
+
+      for (int i = 0; (i < m_iNewRoutes) && setProgress(i, m_iNewRoutes); i++) {
+         Collections.shuffle(m_X);
+         Collections.shuffle(m_Y);
+         final Coordinate coords[] = new Coordinate[m_X.size() + 1];
+         dLastX = m_dInitX;
+         dLastY = m_dInitY;
+         coords[0] = new Coordinate(m_dInitX, m_dInitY);
+         for (int j = 0; j < m_X.size(); j++) {
+            dX = dLastX + ((Double) m_X.get(j)).doubleValue();
+            dY = dLastY + ((Double) m_Y.get(j)).doubleValue();
+            coords[j + 1] = new Coordinate(dX, dY);
+            dLastX = dX;
+            dLastY = dY;
+         }
+         value[0] = new Integer(i);
+         final GeometryFactory gf = new GeometryFactory();
+         final Geometry geom = gf.createLineString(coords);
+         m_Routes.addFeature(geom, value);
+      }
+
+   }
+
+
+   private void generateRoutesBrownian() {
+
+      int i;
+      int iIter;
+      final int SEGMENTS = 50;
+      double dMaxDist, dMaxSegmentDist;
+      double dPreviousDist = 0;
+      double dDist;
+      double dAngle;
+      double dX, dY;
+      double dLastX, dLastY;
+      final double dTotalXDif = m_dFinalX - m_dInitX;
+      final double dTotalYDif = m_dFinalY - m_dInitY;
+      final double dTotalDist = Math.sqrt(dTotalXDif * dTotalXDif + dTotalYDif * dTotalYDif) * m_dSinuosity;
+      final Object value[] = new Object[1];
+
+      for (int iRoute = 0; (iRoute < m_iNewRoutes) && setProgress(iRoute, m_iNewRoutes); iRoute++) {
+         final Coordinate coords[] = new Coordinate[SEGMENTS + 1];
+         coords[0] = new Coordinate(m_dInitX, m_dInitY);
+         dLastX = m_dInitX;
+         dLastY = m_dInitY;
+         dPreviousDist = 0;
+
+         for (i = 1; i < SEGMENTS; i++) {
+            dMaxDist = (dTotalDist - dPreviousDist);
+            dMaxSegmentDist = dMaxDist / (SEGMENTS - i);
+            dMaxDist /= (m_dSinuosity);
+            iIter = 0;
+            do {
+               dDist = Math.random() * dMaxSegmentDist;
+               dAngle = Math.random() * Math.PI * 2;
+               dX = dLastX + dDist * Math.cos(dAngle);
+               dY = dLastY + dDist * Math.sin(dAngle);
+               dDist = Math.sqrt(Math.pow(m_dFinalX - dX, 2) + Math.pow(m_dFinalY - dY, 2));
+               iIter++;
+            }
+            while ((dDist > dMaxDist) && (iIter < 1000));
+            if (iIter == 1000) {
+               dX = dLastX + (m_dFinalX - dLastX) * (dMaxSegmentDist / dMaxDist);
+               dY = dLastY + (m_dFinalY - dLastY) * (dMaxSegmentDist / dMaxDist);
+            }
+            dPreviousDist += Math.sqrt(Math.pow(dLastX - dX, 2) + Math.pow(dLastY - dY, 2));
+            coords[i] = new Coordinate(dX, dY);
+            dLastX = dX;
+            dLastY = dY;
+         }
+         coords[i] = new Coordinate(m_dFinalX, m_dFinalY);
+         value[0] = new Integer(iRoute);
+         final GeometryFactory gf = new GeometryFactory();
+         final Geometry geom = gf.createLineString(coords);
+         m_Routes.addFeature(geom, value);
+      }
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/generateRoutes/GenerateRoutesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitMultipart/SplitMultipartAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitMultipart/SplitMultipartAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitMultipart/SplitMultipartAlgorithm.java	(revision 369)
@@ -0,0 +1,82 @@
+
+
+package es.unex.sextante.vectorTools.splitMultipart;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SplitMultipartAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT  = "INPUT";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Output;
+   private IVectorLayer       m_Input;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Separate_multi-part_features"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(INPUT, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, INPUT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      m_Input = m_Parameters.getParameterValueAsVectorLayer(INPUT);
+      if (!m_bIsAutoExtent) {
+         m_Input.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), m_Input.getShapeType(), m_Input.getFieldTypes(),
+               m_Input.getFieldNames());
+
+      if (m_Input.getShapesCount() == 0) {
+         return false;
+      }
+
+      i = 0;
+      final int iShapeCount = m_Input.getShapesCount();
+      final IFeatureIterator iter = m_Input.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Object[] values = feature.getRecord().getValues();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            m_Output.addFeature(subgeom, values);
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/splitMultipart/SplitMultipartAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/exportVector/ExportVectorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/exportVector/ExportVectorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/exportVector/ExportVectorAlgorithm.java	(revision 369)
@@ -0,0 +1,92 @@
+
+
+package es.unex.sextante.vectorTools.exportVector;
+
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.Output;
+
+
+public class ExportVectorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      Output out = m_OutputObjects.getOutput(RESULT);
+      final String sFilename = ((FileOutputChannel) out.getOutputChannel()).getFilename();
+
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      if (sFilename != null) {
+         final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Result"), layer.getShapeType(),
+                  layer.getFieldTypes(), layer.getFieldNames());
+         final int iShapeCount = layer.getShapesCount();
+         int i = 0;
+         final IFeatureIterator iter = layer.iterator();
+         while (iter.hasNext() && setProgress(i, iShapeCount)) {
+            final IFeature feature = iter.next();
+            output.addFeature(feature);
+            i++;
+         }
+         try {
+            output.postProcess();
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(e.getMessage());
+         }
+      }
+
+      //We do not want the result to be added to the view
+      out = m_OutputObjects.getOutput(RESULT);
+      out.setOutputObject(null);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Export_vector_layer"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean isSuitableForModelling() {
+
+      return false;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/exportVector/ExportVectorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/DistanceToClosestGeometryAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/DistanceToClosestGeometryAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/DistanceToClosestGeometryAlgorithm.java	(revision 369)
@@ -0,0 +1,166 @@
+
+
+package es.unex.sextante.vectorTools.distanceToClosestGeometry;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DistanceToClosestGeometryAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DISTTO    = "SNAPTO";
+   public static final String LAYER     = "LAYER";
+   public static final String TOLERANCE = "TOLERANCE";
+   public static final String RESULT    = "RESULT";
+   public static final String FIELD     = "FIELD";
+
+   private IVectorLayer       m_Points;
+   private IVectorLayer       m_Geometries;
+   private IVectorLayer       m_Output;
+   //private double                 m_dTolerance;
+   private SextanteRTree      m_NNF;
+   private int                m_iField;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Distance_to_closest_geometry"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addInputVectorLayer(DISTTO, Sextante.getText("Lines_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), DISTTO);
+         /*m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);*/
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_Geometries = m_Parameters.getParameterValueAsVectorLayer(DISTTO);
+      //m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_Geometries.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_NNF = new SextanteRTree(m_Geometries, m_Task);
+
+      final Class[] types = new Class[m_Points.getFieldCount() + 2];
+      final String[] sFields = new String[m_Points.getFieldCount() + 2];
+      for (int j = 0; j < sFields.length - 2; j++) {
+         types[j] = m_Points.getFieldTypes()[j];
+         sFields[j] = m_Points.getFieldName(j);
+      }
+      sFields[sFields.length - 2] = "ID";
+      sFields[sFields.length - 1] = "DIST";
+      types[types.length - 2] = String.class;
+      types[types.length - 1] = Double.class;
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Distance_to_closest_geometry"), IVectorLayer.SHAPE_TYPE_POINT,
+               types, sFields);
+
+      i = 0;
+      iShapeCount = m_Points.getShapesCount();
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         processPoint(feature);
+         i++;
+      }
+
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processPoint(final IFeature feature) {
+
+      final Geometry geom = feature.getGeometry();
+      final Coordinate coord = geom.getCoordinate();
+      final IFeature closest = m_NNF.getClosestFeature(coord.x, coord.y);
+      final Object[] record = feature.getRecord().getValues();
+      final Object[] attribs = new Object[record.length + 2];
+      for (int i = 0; i < attribs.length - 2; i++) {
+         attribs[i] = record[i];
+      }
+      attribs[attribs.length - 2] = closest.getRecord().getValue(m_iField);
+      final double dDist = feature.getGeometry().distance(closest.getGeometry());
+      attribs[attribs.length - 1] = new Double(dDist);
+
+      m_Output.addFeature(feature.getGeometry(), attribs);
+
+      /*final Coordinate c = new Coordinate(x, y);
+      Coordinate closestPointToThisLine;
+      double minDist = Double.POSITIVE_INFINITY;
+      String closestLineID = null;
+
+      try {
+         final List<NamedGeometry> list = m_NNF.getClosestGeometries(c, m_dTolerance);
+         for (int iGeom = 0; iGeom < list.size(); iGeom++) {
+            final NamedGeometry ng = list.get(iGeom);
+            final Geometry geom = ng.geom;
+            final int iNumGeom = geom.getNumGeometries();
+            for (int i = 0; i < iNumGeom; i++) {
+               final Geometry subGeom = geom.getGeometryN(i);
+               final Coordinate[] coords = subGeom.getCoordinates();
+               for (int j = 0; j < coords.length - 1; j++) {
+                  final LineSegment line = new LineSegment(coords[j], coords[j + 1]);
+                  closestPointToThisLine = line.closestPoint(c);
+                  final double dist = c.distance(closestPointToThisLine);
+                  if ((dist < minDist)) {
+                     minDist = dist;
+                     closestLineID = ng.name;
+                  }
+               }
+
+            }
+         }
+      }
+      catch (final Exception e) {// will return closest point so far
+      }
+
+      if (closestLineID != null) {
+         m_Output.addRecord(new Object[] { closestLineID, new Double(minDist) });
+      }*/
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/DistanceToClosestGeometryAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/SextanteRTree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/SextanteRTree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/SextanteRTree.java	(revision 369)
@@ -0,0 +1,73 @@
+package es.unex.sextante.vectorTools.distanceToClosestGeometry;
+
+import java.util.Properties;
+
+import com.infomatiq.jsi.Point;
+import com.infomatiq.jsi.Rectangle;
+import com.infomatiq.jsi.rtree.RTree;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class SextanteRTree {
+
+   private final RTree      m_Tree;
+   private final int        m_iShapes;
+   private final IFeature[] m_Features;
+
+
+   //TODO:this tree loads all features in memory, so it will not work with large datasets
+   public SextanteRTree(final IVectorLayer layer,
+                        final ITaskMonitor task) {
+
+      int i;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+      m_Tree = new RTree();
+      m_Tree.init(new Properties());
+
+      m_iShapes = layer.getShapesCount();
+      m_Features = new IFeature[m_iShapes];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         try {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Envelope bounds = geom.getEnvelopeInternal();
+            final Rectangle rect = new Rectangle((float) bounds.getMinX(), (float) bounds.getMinY(), (float) bounds.getMaxX(),
+                     (float) bounds.getMaxY());
+            m_Tree.add(rect, new Integer(i));
+            m_Features[i] = feature;
+
+            if (i % 50 == 0) {
+               task.setProgress(i, m_iShapes);
+            }
+            i++;
+         }
+         catch (final IteratorException e1) {
+            //skip feature
+         }
+      }
+      iter.close();
+
+   }
+
+
+   public IFeature getClosestFeature(final double x,
+                                     final double y) {
+
+      final Point pt = new Point((float) x, (float) y);
+      final int iIdx = m_Tree.nearest(pt);
+      return m_Features[iIdx];
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceToClosestGeometry/SextanteRTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clipByRectangle/ClipByRectangleAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clipByRectangle/ClipByRectangleAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clipByRectangle/ClipByRectangleAlgorithm.java	(revision 369)
@@ -0,0 +1,107 @@
+package es.unex.sextante.vectorTools.clipByRectangle;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.prep.PreparedGeometry;
+import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.vectorTools.clip.ClipAlgorithm;
+
+// Author Nacho Varela (Based on ClipAlgorithm)
+//TODO Checkbox to choose if get whole geometries that touch the rectangle or clip them
+//TODO Enable select a full extent of other layer or select by clicking
+public class ClipByRectangleAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String YMAX   = "YMAX";
+   public static final String XMAX   = "XMAX";
+   public static final String YMIN   = "YMIN";
+   public static final String XMIN   = "XMIN";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Clip_by_rectangle"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer_to_clip"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY,
+                  true);
+         /*m_Parameters.addNumericalValue(XMIN, "X Min", -100, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(XMAX, "X Max", 100, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(YMIN, "Y Min", -100, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(YMAX, "Y Max", 100, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);*/
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Clipped_Layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      /*final double dXMin = m_Parameters.getParameterValueAsDouble(XMIN);
+      final double dXMax = m_Parameters.getParameterValueAsDouble(XMAX);
+      final double dYMin = m_Parameters.getParameterValueAsDouble(YMIN);
+      final double dYMax = m_Parameters.getParameterValueAsDouble(YMAX);*/
+
+      final STRtree tree = buildClipTree();//dXMin, dXMax, dYMin, dYMax);
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Clipped_Layer"), layerIn.getShapeType(), layerIn.getFieldTypes(),
+               layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+
+      int i = 0;
+      final int iShapeCount = layerIn.getShapesCount();
+      final ClipAlgorithm alg = new ClipAlgorithm();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry g = alg.clipGeometry(feature.getGeometry(), tree);
+         if (g != null) {
+            m_Output.addFeature(g, feature.getRecord().getValues());
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private STRtree buildClipTree() {
+
+      final STRtree tree = new STRtree();
+
+      final Geometry geom = m_AnalysisExtent.getAsJTSGeometry();
+
+      final PreparedGeometry pg = PreparedGeometryFactory.prepare(geom);
+      tree.insert(pg.getGeometry().getEnvelopeInternal(), pg);
+
+      return tree;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/clipByRectangle/ClipByRectangleAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/SextanteRTree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/SextanteRTree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/SextanteRTree.java	(revision 369)
@@ -0,0 +1,73 @@
+package es.unex.sextante.vectorTools.NNSpatialJoin;
+
+import java.util.Properties;
+
+import com.infomatiq.jsi.Point;
+import com.infomatiq.jsi.Rectangle;
+import com.infomatiq.jsi.rtree.RTree;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class SextanteRTree {
+
+   private final RTree      m_Tree;
+   private final int        m_iShapes;
+   private final IFeature[] m_Features;
+
+
+   //TODO:this tree loads all features in memory, so it will not work with large datasets
+   public SextanteRTree(final IVectorLayer layer,
+                        final ITaskMonitor task) {
+
+      int i;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+      m_Tree = new RTree();
+      m_Tree.init(new Properties());
+
+      m_iShapes = layer.getShapesCount();
+      m_Features = new IFeature[m_iShapes];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         try {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Envelope bounds = geom.getEnvelopeInternal();
+            final Rectangle rect = new Rectangle((float) bounds.getMinX(), (float) bounds.getMinY(), (float) bounds.getMaxX(),
+                     (float) bounds.getMaxY());
+            m_Tree.add(rect, new Integer(i));
+            m_Features[i] = feature;
+
+            if (i % 50 == 0) {
+               task.setProgress(i, m_iShapes);
+            }
+            i++;
+         }
+         catch (final IteratorException e1) {
+            //skip feature
+         }
+      }
+      iter.close();
+
+   }
+
+
+   public IFeature getClosestFeature(final double x,
+                                     final double y) {
+
+      final Point pt = new Point((float) x, (float) y);
+      final int iIdx = m_Tree.nearest(pt);
+      return m_Features[iIdx];
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/SextanteRTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/NNSpatialJoinAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/NNSpatialJoinAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/NNSpatialJoinAlgorithm.java	(revision 369)
@@ -0,0 +1,118 @@
+package es.unex.sextante.vectorTools.NNSpatialJoin;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class NNSpatialJoinAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT    = "RESULT";
+   public static final String MAIN      = "MAIN";
+   public static final String SECONDARY = "SECONDARY";
+
+   private IVectorLayer       m_MainLayer;
+   private IVectorLayer       m_SecondaryLayer;
+
+   private IVectorLayer       m_Output;
+   private SextanteRTree      m_SearchEngine;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("NN_Spatial_Join"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(MAIN, Sextante.getText("Main_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addInputVectorLayer(SECONDARY, Sextante.getText("Additional_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED);
+      }
+      catch (final RepeatedParameterNameException e) {
+
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_MainLayer = m_Parameters.getParameterValueAsVectorLayer(MAIN);
+      m_SecondaryLayer = m_Parameters.getParameterValueAsVectorLayer(SECONDARY);
+
+      if (!m_bIsAutoExtent) {
+         m_MainLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_SecondaryLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_SearchEngine = new SextanteRTree(m_SecondaryLayer, m_Task);
+
+      final Class[] types = new Class[m_SecondaryLayer.getFieldCount() + m_MainLayer.getFieldCount()];
+      final String[] sFields = new String[m_SecondaryLayer.getFieldCount() + m_MainLayer.getFieldCount()];
+      for (i = 0; i < m_MainLayer.getFieldCount(); i++) {
+         sFields[i] = m_MainLayer.getFieldName(i);
+         types[i] = m_MainLayer.getFieldType(i);
+      }
+      for (i = 0; i < m_SecondaryLayer.getFieldCount(); i++) {
+         types[i + m_MainLayer.getFieldCount()] = m_SecondaryLayer.getFieldType(i);
+         sFields[i + m_MainLayer.getFieldCount()] = checkAttrName(m_SecondaryLayer.getFieldName(i), i + m_MainLayer.getFieldCount(), sFields);
+      }
+
+
+      m_Output = getNewVectorLayer(RESULT, m_MainLayer.getName(), m_MainLayer.getShapeType(), types, sFields);
+
+      iShapeCount = m_MainLayer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = m_MainLayer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         performSpatialJoin(feature);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void performSpatialJoin(final IFeature feature) {
+
+      final Coordinate coord = feature.getGeometry().getCoordinate();
+      final IFeature closestFeature = m_SearchEngine.getClosestFeature(coord.x, coord.y);
+      final Object[] record = new Object[m_SecondaryLayer.getFieldCount() + m_MainLayer.getFieldCount()];
+
+      final IRecord closestFeatureRecord = closestFeature.getRecord();
+      for (int i = 0; i < m_SecondaryLayer.getFieldCount(); i++) {
+         record[i + m_MainLayer.getFieldCount()] = closestFeatureRecord.getValue(i);
+      }
+      final IRecord mainRecord = feature.getRecord();
+      for (int i = 0; i < m_MainLayer.getFieldCount(); i++) {
+         record[i] = mainRecord.getValue(i);
+      }
+
+      m_Output.addFeature(feature.getGeometry(), record);
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/NNSpatialJoin/NNSpatialJoinAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoin;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iShapes;
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iShapes = layer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, feature);
+         if (i % 100 == 0) {
+            task.setProgress(i, m_iShapes);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public IFeature[] getClosestPoints(final Geometry geom) {
+
+      final Envelope search = geom.getEnvelopeInternal();
+      final List<IFeature> list = m_Tree.query(search);
+
+      return list.toArray(new IFeature[0]);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/PtAndAttributes.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/PtAndAttributes.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/PtAndAttributes.java	(revision 369)
@@ -0,0 +1,23 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoin;
+
+public class PtAndAttributes {
+
+   public Object[] attrs;
+   public double   x;
+   public double   y;
+   public int      id;
+
+
+   public PtAndAttributes(final double x,
+                          final double y,
+                          final int id,
+                          final Object[] attrs) {
+
+      this.x = x;
+      this.y = y;
+      this.id = id;
+      this.attrs = attrs;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/PtAndAttributes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinParametersPanel.java	(revision 369)
@@ -0,0 +1,223 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoin;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ScrollPaneConstants;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+
+
+public class InPolygonSpatialJoinParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private GeoAlgorithm                m_Algorithm;
+   private JLabel                      jLabelGroupings;
+   private JTable                      jTableGroupings;
+   private JComboBox                   jComboBoxPolygonLayers;
+   private JComboBox                   jComboBoxPointsLayers;
+   private JLabel                      jLabelPointsLayer;
+   private JLabel                      jLabelPolygonsLayer;
+   private JScrollPane                 jScrollPaneGroupings;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+
+
+   public InPolygonSpatialJoinParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+      ObjectAndDescription oad = (ObjectAndDescription) jComboBoxPolygonLayers.getSelectedItem();
+      final IVectorLayer polygonLayer = (IVectorLayer) oad.getObject();
+      final ParametersSet params = m_Algorithm.getParameters();
+      try {
+         params.getParameter(InPolygonSpatialJoinAlgorithm.POLYGONS).setParameterValue(polygonLayer);
+         oad = (ObjectAndDescription) jComboBoxPointsLayers.getSelectedItem();
+         final IVectorLayer pointsLayer = (IVectorLayer) oad.getObject();
+         params.getParameter(InPolygonSpatialJoinAlgorithm.POINTS).setParameterValue(pointsLayer);
+         final SpatialJoinTableModel model = (SpatialJoinTableModel) jTableGroupings.getModel();
+         params.getParameter(InPolygonSpatialJoinAlgorithm.GROUPING_FUNCTIONS).setParameterValue(model.getAsString());
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      Output out;
+      IOutputChannel channel;
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      try {
+         out = ooSet.getOutput(InPolygonSpatialJoinAlgorithm.RESULT);
+         channel = outputChannelSelectionPanel.getOutputChannel();
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+
+      if (channel instanceof OverwriteOutputChannel) {
+         final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+         if (!ooc.getLayer().canBeEdited()) {
+            throw new LayerCannotBeOverwrittenException();
+         }
+      }
+
+      out.setOutputChannel(channel);
+
+   }
+
+
+   private void initGUI() {
+      try {
+         {
+            final TableLayout thisLayout = new TableLayout(new double[][] {
+                     { 5.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 5.0 },
+                     { 5.0, 25.0, 5.0, 25.0, 5.0, 25.0, TableLayoutConstants.FILL, 5.0, 20.0, 5.0 } });
+            thisLayout.setHGap(5);
+            thisLayout.setVGap(5);
+            this.setLayout(thisLayout);
+            this.setPreferredSize(new java.awt.Dimension(469, 257));
+            {
+               jLabelGroupings = new JLabel();
+               this.add(jLabelGroupings, "1, 5");
+               jLabelGroupings.setText(Sextante.getText("Summary_statistics"));
+            }
+            {
+               jScrollPaneGroupings = new JScrollPane();
+               jScrollPaneGroupings.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               this.add(jScrollPaneGroupings, "1, 6, 2, 6");
+               {
+                  jTableGroupings = new JTable();
+                  jScrollPaneGroupings.setViewportView(jTableGroupings);
+               }
+            }
+            {
+               jLabelPolygonsLayer = new JLabel();
+               this.add(jLabelPolygonsLayer, "1, 1");
+               jLabelPolygonsLayer.setText(Sextante.getText("Polygons"));
+            }
+            {
+               jLabelPointsLayer = new JLabel();
+               this.add(jLabelPointsLayer, "1, 3");
+               jLabelPointsLayer.setText(Sextante.getText("Secondary_layer"));
+            }
+            {
+               final ComboBoxModel jComboBoxPointsLayersModel = new DefaultComboBoxModel(getVectorLayers());
+               jComboBoxPointsLayers = new JComboBox();
+               this.add(jComboBoxPointsLayers, "2, 3");
+               jComboBoxPointsLayers.setModel(jComboBoxPointsLayersModel);
+               jComboBoxPointsLayers.addItemListener(new java.awt.event.ItemListener() {
+                  public void itemStateChanged(final java.awt.event.ItemEvent e) {
+                     setTableModel();
+                  }
+               });
+               jComboBoxPointsLayers.setSelectedIndex(0);
+               setTableModel();
+            }
+            {
+               final ComboBoxModel jComboBoxPolygonLayersModel = new DefaultComboBoxModel(getPolygonLayers());
+               jComboBoxPolygonLayers = new JComboBox();
+               this.add(jComboBoxPolygonLayers, "2, 1");
+               jComboBoxPolygonLayers.setModel(jComboBoxPolygonLayersModel);
+            }
+            {
+               final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+               final Output out = ooSet.getOutput(InPolygonSpatialJoinAlgorithm.RESULT);
+               outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+               this.add(outputChannelSelectionPanel, "2,8");
+               this.add(new JLabel(Sextante.getText("Result")), "1,8");
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+   private void setTableModel() {
+
+      final ObjectAndDescription oad = (ObjectAndDescription) jComboBoxPointsLayers.getSelectedItem();
+      final IVectorLayer layer = (IVectorLayer) oad.getObject();
+      final SpatialJoinTableModel tableModel = new SpatialJoinTableModel(layer);
+      jTableGroupings.setModel(tableModel);
+
+   }
+
+
+   private ObjectAndDescription[] getPolygonLayers() {
+
+      final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(IVectorLayer.SHAPE_TYPE_POLYGON);
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      for (int i = 0; i < layers.length; i++) {
+         oad[i] = new ObjectAndDescription(layers[i].getName(), layers[i]);
+      }
+      return oad;
+
+   }
+
+
+   private ObjectAndDescription[] getVectorLayers() {
+
+      final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+      final ObjectAndDescription[] oad = new ObjectAndDescription[layers.length];
+      for (int i = 0; i < layers.length; i++) {
+         oad[i] = new ObjectAndDescription(layers[i].getName(), layers[i]);
+      }
+      return oad;
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String sOutputName,
+                              final String sValue) {
+
+      outputChannelSelectionPanel.setText(sValue);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+   // TODO Auto-generated method stub
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinAlgorithm.java	(revision 369)
@@ -0,0 +1,234 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoin;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class InPolygonSpatialJoinAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String     RESULT             = "RESULT";
+   public static final String     POLYGONS           = "POLYGONS";
+   public static final String     POINTS             = "POINTS";
+   public static final String     GROUPING_FUNCTIONS = "GROUPING_FUNCTIONS";
+
+   public static final int        SUM                = 0;
+   public static final int        MIN                = 1;
+   public static final int        MAX                = 2;
+   public static final int        AVG                = 3;
+   public static final int        COUNT              = 4;
+   public static final String     FUNCTIONS[]        = { "SUM", "MIN", "MAX", "AVG", "COUNT" };
+
+
+   private IVectorLayer           m_MainLayer;
+   private IVectorLayer           m_SecondaryLayer;
+
+   private IVectorLayer           m_Output;
+
+   private NearestNeighbourFinder m_NNF;
+   private Grouping[]             m_Groupings;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("InPolygonSpatialJoin"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Secondary_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY,
+                  true);
+         m_Parameters.addString(GROUPING_FUNCTIONS, Sextante.getText("Summary_statistics"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON, POLYGONS);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_MainLayer = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+      m_SecondaryLayer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+
+      if (!m_bIsAutoExtent) {
+         m_MainLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_SecondaryLayer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final String sGroupings = m_Parameters.getParameterValueAsString(GROUPING_FUNCTIONS);
+      m_Groupings = getGroupings(sGroupings);
+
+      final String[] sFields = new String[m_MainLayer.getFieldCount() + m_Groupings.length];
+      final Class[] types = new Class[m_MainLayer.getFieldCount() + m_Groupings.length];
+      for (i = 0; i < m_MainLayer.getFieldCount(); i++) {
+         sFields[i] = m_MainLayer.getFieldName(i);
+         types[i] = m_MainLayer.getFieldType(i);
+      }
+      for (i = 0; i < m_Groupings.length; i++) {
+         sFields[m_MainLayer.getFieldCount() + i] = m_SecondaryLayer.getFieldName(m_Groupings[i].field) + "_"
+                                                    + FUNCTIONS[m_Groupings[i].function];
+         types[m_MainLayer.getFieldCount() + i] = Double.class;
+      }
+
+      m_Output = getNewVectorLayer(RESULT, m_MainLayer.getName(), m_MainLayer.getShapeType(), types, sFields);
+
+      m_NNF = new NearestNeighbourFinder(m_SecondaryLayer, this.m_Task);
+
+      iShapeCount = m_MainLayer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = m_MainLayer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         performSpatialJoin(feature);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void performSpatialJoin(final IFeature feature) {
+
+      final Geometry polygon = feature.getGeometry();
+      final IFeature[] pts = m_NNF.getClosestPoints(polygon);
+
+      final SimpleStats[] stats = new SimpleStats[m_SecondaryLayer.getFieldCount()];
+      for (int i = 0; i < stats.length; i++) {
+         stats[i] = new SimpleStats();
+      }
+
+      for (final IFeature element : pts) {
+         if (polygon.contains(element.getGeometry())) {
+            for (int j = 0; j < stats.length; j++) {
+               final String sValue = element.getRecord().getValue(j).toString();
+               try {
+                  final double dValue = Double.parseDouble(sValue);
+                  stats[j].addValue(dValue);
+               }
+               catch (final Exception e) {
+                  e.printStackTrace();
+               }
+            }
+         }
+      }
+
+      m_Output.addFeature(polygon, calculateRecord(stats, feature.getRecord().getValues()));
+
+   }
+
+
+   private Object[] calculateRecord(final SimpleStats[] stats,
+                                    final Object[] record) {
+
+      double dValue;
+      final Object[] values = new Object[m_Groupings.length + record.length];
+      System.arraycopy(record, 0, values, 0, record.length);
+      for (int i = 0; i < m_Groupings.length; i++) {
+         final int iField = m_Groupings[i].field;
+         final int iFunction = m_Groupings[i].function;
+         switch (iFunction) {
+            case COUNT:
+               dValue = stats[iField].getCount();
+               break;
+            case MIN:
+               dValue = stats[iField].getMin();
+               break;
+            case MAX:
+               dValue = stats[iField].getMax();
+               break;
+            case SUM:
+               dValue = stats[iField].getSum();
+               break;
+            case AVG:
+            default:
+               dValue = stats[iField].getMean();
+               break;
+         }
+         if (stats[iField].getCount() > 0) {
+            values[i + record.length] = new Double(dValue);
+         }
+         else {
+            values[i + record.length] = null;
+         }
+      }
+
+      return values;
+
+   }
+
+
+   private Grouping[] getGroupings(final String sGroupings) throws GeoAlgorithmExecutionException {
+
+      if (sGroupings.trim().equals("")) {
+         return new Grouping[0];
+      }
+      try {
+         final String[] sTokens = sGroupings.split(",");
+         if (sTokens.length % 2 != 0) {
+            throw new GeoAlgorithmExecutionException("Wrong groupings");
+         }
+         final Grouping[] groupings = new Grouping[sTokens.length / 2];
+
+         int iGrouping = 0;
+         for (int i = 0; i < sTokens.length; i++) {
+            String sToken = sTokens[i];
+            groupings[iGrouping] = new Grouping();
+            groupings[iGrouping].field = Integer.parseInt(sToken);
+            if ((groupings[iGrouping].field >= m_SecondaryLayer.getFieldCount()) || (groupings[iGrouping].field < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+            i++;
+            sToken = sTokens[i];
+            groupings[iGrouping].function = Integer.parseInt(sToken);
+            if ((groupings[iGrouping].function > 4) || (groupings[iGrouping].function < 0)) {
+               throw new GeoAlgorithmExecutionException("Wrong groupings");
+            }
+            iGrouping++;
+         }
+         return groupings;
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException("Wrong groupings");
+      }
+
+
+   }
+
+
+   private class Grouping {
+
+      public int field;
+      public int function;
+
+
+      public Grouping() {}
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/InPolygonSpatialJoinAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/SpatialJoinTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/SpatialJoinTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/SpatialJoinTableModel.java	(revision 369)
@@ -0,0 +1,130 @@
+package es.unex.sextante.vectorTools.InPolygonSpatialJoin;
+
+import javax.swing.table.AbstractTableModel;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class SpatialJoinTableModel
+         extends
+            AbstractTableModel {
+
+   private final IVectorLayer m_Layer;
+   private final Object[][]   m_Data;
+
+
+   public SpatialJoinTableModel(final IVectorLayer layer) {
+
+      m_Layer = layer;
+      m_Data = new Object[layer.getFieldCount()][InPolygonSpatialJoinAlgorithm.FUNCTIONS.length + 1];
+      for (int i = 0; i < layer.getFieldCount(); i++) {
+         m_Data[i][0] = layer.getFieldName(i);
+         for (int j = 0; j < InPolygonSpatialJoinAlgorithm.FUNCTIONS.length; j++) {
+            m_Data[i][j + 1] = new Boolean(false);
+         }
+      }
+
+   }
+
+
+   public int getColumnCount() {
+
+      return InPolygonSpatialJoinAlgorithm.FUNCTIONS.length + 1;
+
+   }
+
+
+   @Override
+   public String getColumnName(final int col) {
+
+      if (col == 0) {
+         return "FIELD";
+      }
+      else {
+         return InPolygonSpatialJoinAlgorithm.FUNCTIONS[col - 1];
+      }
+
+
+   }
+
+
+   public int getRowCount() {
+
+      return m_Layer.getFieldCount();
+
+   }
+
+
+   public Object getValueAt(final int row,
+                            final int col) {
+
+      return m_Data[row][col];
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int row,
+                                 final int col) {
+
+      if (col == 0) {
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int row,
+                          final int col) {
+
+      m_Data[row][col] = value;
+      fireTableCellUpdated(row, col);
+
+   }
+
+
+   @Override
+   public Class getColumnClass(final int columnIndex) {
+
+      if (columnIndex != 0) {
+         return Boolean.class;
+      }
+      else {
+         return String.class;
+      }
+
+   }
+
+
+   public String getAsString() {
+
+      final StringBuffer sb = new StringBuffer();
+      boolean bFirst = true;
+      for (int i = 0; i < m_Data.length; i++) {
+         for (int j = 1; j < InPolygonSpatialJoinAlgorithm.FUNCTIONS.length + 1; j++) {
+            final Boolean b = (Boolean) m_Data[i][j];
+            if (b) {
+               if (!bFirst) {
+                  sb.append(",");
+               }
+               else {
+                  bFirst = false;
+               }
+               sb.append(Integer.toString(i));
+               sb.append(",");
+               sb.append(Integer.toString(j - 1));
+            }
+         }
+
+      }
+
+      return sb.toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/InPolygonSpatialJoin/SpatialJoinTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/addEventTheme/AddEventThemeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/addEventTheme/AddEventThemeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/addEventTheme/AddEventThemeAlgorithm.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.vectorTools.addEventTheme;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class AddEventThemeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TABLE  = "TABLE";
+   public static final String XFIELD = "XFIELD";
+   public static final String RESULT = "RESULT";
+   public static final String YFIELD = "YFIELD";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int j;
+      int iFieldX, iFieldY;
+      ITable table;
+      String[] sFields;
+      Class[] types;
+
+      table = m_Parameters.getParameterValueAsTable(TABLE);
+      iFieldX = m_Parameters.getParameterValueAsInt(XFIELD);
+      iFieldY = m_Parameters.getParameterValueAsInt(YFIELD);
+
+      sFields = new String[table.getFieldCount()];
+      types = new Class[table.getFieldCount()];
+
+      for (j = 0; j < table.getFieldCount(); j++) {
+         sFields[j] = table.getFieldName(j);
+         types[j] = table.getFieldType(j);
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Layer_from_table"), IVectorLayer.SHAPE_TYPE_POINT,
+               types, sFields);
+      final IRecordsetIterator iter = table.iterator();
+      final GeometryFactory geomFac = new GeometryFactory();
+      while (iter.hasNext()) {
+         try {
+            final IRecord record = iter.next();
+            final String sX = record.getValue(iFieldX).toString();
+            final String sY = record.getValue(iFieldY).toString();
+            final double dX = Double.parseDouble(sX);
+            final double dY = Double.parseDouble(sY);
+            final Point pt = geomFac.createPoint(new Coordinate(dX, dY));
+            output.addFeature(pt, record.getValues());
+         }
+         catch (final NumberFormatException e) {}
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Points_layer_from_table"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+
+      try {
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Table"), true);
+         m_Parameters.addTableField(XFIELD, Sextante.getText("X"), TABLE);
+         m_Parameters.addTableField(YFIELD, Sextante.getText("Y"), TABLE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/addEventTheme/AddEventThemeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/medialAxis/MedialAxisAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/medialAxis/MedialAxisAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/medialAxis/MedialAxisAlgorithm.java	(revision 369)
@@ -0,0 +1,110 @@
+
+
+package es.unex.sextante.vectorTools.medialAxis;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import gishur.core.SimpleList;
+import gishur.x.XPoint;
+import gishur.x.XPolygon;
+import gishur.x.XSegment;
+import gishur.x.voronoi.Skeleton;
+
+
+public class MedialAxisAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      final IVectorLayer result = getNewVectorLayer(RESULT, Sextante.getText("Medial_Axis"), IVectorLayer.SHAPE_TYPE_LINE,
+               layerIn.getFieldTypes(), layerIn.getFieldNames());
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final MultiLineString axis = getMedialAxis(((Polygon) feature.getGeometry().getGeometryN(0)));
+         result.addFeature(axis, feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Medial_Axis"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Medial_Axis"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private MultiLineString getMedialAxis(final Polygon poly) {
+
+      final ArrayList<LineString> list = new ArrayList<LineString>();
+      final GeometryFactory gf = new GeometryFactory();
+      final Coordinate[] coords = poly.getExteriorRing().getCoordinates();
+      final XPoint xpoints[] = new XPoint[coords.length];
+      for (int i = 0; i < coords.length; i++) {
+         xpoints[i] = new XPoint(coords[i].x, coords[i].y);
+      }
+      final XPolygon xpoly = new XPolygon(xpoints);
+      final Skeleton skeleton = new Skeleton(xpoly);
+      skeleton.execute();
+      final SimpleList lines = skeleton.getLines(false);
+      final Object[] array = lines.convertValuesToArray();
+
+      for (int i = 0; i < array.length; i++) {
+         final XSegment segment = (XSegment) array[i];
+         System.out.println(segment.toString());
+         final Coordinate[] segmentCoords = new Coordinate[] {
+                  new Coordinate(segment.getStartPoint().x, segment.getStartPoint().y),
+                  new Coordinate(segment.getEndPoint().x, segment.getEndPoint().y) };
+         list.add(gf.createLineString(segmentCoords));
+      }
+
+      return gf.createMultiLineString(list.toArray(new LineString[0]));
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/medialAxis/MedialAxisAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/ResolvePolygonHolesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/ResolvePolygonHolesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/ResolvePolygonHolesAlgorithm.java	(revision 369)
@@ -0,0 +1,141 @@
+package es.unex.sextante.vectorTools.resolvePolygonHoles;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class ResolvePolygonHolesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String     RESULT   = "RESULT";
+   public static final String     POLYGONS = "POLYGONS";
+
+   private IVectorLayer           m_Polygons;
+
+   private IVectorLayer           m_Output;
+
+   private NearestNeighbourFinder m_NNF;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("ResolvePolygonHoles"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons_layer"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Polygons = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+
+      m_Output = getNewVectorLayer(RESULT, m_Polygons.getName(), m_Polygons.getShapeType(), m_Polygons.getFieldTypes(),
+               m_Polygons.getFieldNames());
+
+      m_NNF = new NearestNeighbourFinder(m_Polygons, this.m_Task);
+
+      iShapeCount = m_Polygons.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = m_Polygons.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         resolveHoles(feature);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void resolveHoles(final IFeature feature) {
+
+      final ArrayList<Polygon> polygons = new ArrayList<Polygon>();
+      final Geometry geom = feature.getGeometry();
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Polygon poly = resolveHolesInSimplePolygon((Polygon) geom.getGeometryN(i));
+         if (poly != null) {
+            polygons.add(poly);
+         }
+      }
+
+      if (!polygons.isEmpty()) {
+         final GeometryFactory gf = new GeometryFactory();
+         final MultiPolygon polygonWithHoles = gf.createMultiPolygon(polygons.toArray(new Polygon[0]));
+         m_Output.addFeature(polygonWithHoles, feature.getRecord().getValues());
+      }
+
+   }
+
+
+   private Polygon resolveHolesInSimplePolygon(final Polygon polygon) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final ArrayList<LinearRing> holes = new ArrayList<LinearRing>();
+      for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
+         holes.add(gf.createLinearRing(polygon.getInteriorRingN(i).getCoordinates()));
+      }
+
+      final IFeature[] holeCandidates = m_NNF.getClosestFeatures(polygon);
+
+      for (int i = 0; i < holeCandidates.length; i++) {
+         final Geometry geom = holeCandidates[i].getGeometry();
+         for (int j = 0; j < geom.getNumGeometries(); j++) {
+            final Geometry subgeom = geom.getGeometryN(j);
+            if (!polygon.equals(subgeom)) {
+               if (polygon.contains(subgeom)) {
+                  holes.add(gf.createLinearRing(subgeom.getCoordinates()));
+               }
+            }
+         }
+      }
+
+      //check that the polygon is not a hole itself
+      //      for (int i = 0; i < holeCandidates.length; i++) {
+      //         final Geometry geom = holeCandidates[i].getGeometry();
+      //         for (int j = 0; j < geom.getNumGeometries(); j++) {
+      //            final Geometry subgeom = geom.getGeometryN(j);
+      //            if (!polygon.equals(subgeom)) {
+      //               if (subgeom.contains(polygon)) {
+      //                  return null;
+      //               }
+      //            }
+      //         }
+      //      }
+
+      return gf.createPolygon(gf.createLinearRing(polygon.getExteriorRing().getCoordinates()), holes.toArray(new LinearRing[0]));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/ResolvePolygonHolesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,58 @@
+package es.unex.sextante.vectorTools.resolvePolygonHoles;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iShapes;
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+      final float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iShapes = layer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, feature);
+         if (i % 100 == 0) {
+            task.setProgress(i, m_iShapes);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public IFeature[] getClosestFeatures(final Geometry geom) {
+
+      final Envelope search = geom.getEnvelopeInternal();
+      final List<IFeature> list = m_Tree.query(search);
+
+      return list.toArray(new IFeature[0]);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/resolvePolygonHoles/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/symDifference/SymDifferenceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/symDifference/SymDifferenceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/symDifference/SymDifferenceAlgorithm.java	(revision 369)
@@ -0,0 +1,191 @@
+
+
+package es.unex.sextante.vectorTools.symDifference;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class SymDifferenceAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER1 = "LAYER1";
+   public static final String LAYER2 = "LAYER2";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Output;
+   private Geometry           m_ClipGeometry1;
+   private Geometry           m_ClipGeometry2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer1 = m_Parameters.getParameterValueAsVectorLayer(LAYER1);
+      final IVectorLayer layer2 = m_Parameters.getParameterValueAsVectorLayer(LAYER2);
+
+      if (!m_bIsAutoExtent) {
+         layer1.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layer2.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] fieldTypes = new Class[layer1.getFieldCount() + layer2.getFieldCount()];
+      final String[] sFieldNames = new String[fieldTypes.length];
+
+      for (int i = 0; i < layer1.getFieldCount(); i++) {
+         Class fieldType = layer1.getFieldType(i);
+            fieldTypes[i] = fieldType;
+            sFieldNames[i] = layer1.getFieldName(i);
+      }
+      for (int i = 0; i < layer2.getFieldCount(); i++) {
+         Class fieldType = layer2.getFieldType(i);
+         int targetIndex = i + layer1.getFieldCount() ;
+         fieldTypes[targetIndex] = fieldType;
+         sFieldNames[targetIndex] = checkAttrName(layer2.getFieldName(i), targetIndex, sFieldNames);
+      }
+      
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Symmetric_difference"), layer1.getShapeType(),
+    		  fieldTypes, sFieldNames);
+      
+      final Object[] resultValues = new Object[fieldTypes.length];
+
+      // layer1.difference(layer2)
+      m_ClipGeometry1 = computeJtsClippingPoly(layer2);
+      final IFeatureIterator iter1 = layer1.iterator();
+
+      int i = 0;
+      final int iShapeCount1 = layer1.getShapesCount();
+      while (iter1.hasNext() && setProgress(i, iShapeCount1)) {
+         final IFeature feature1 = iter1.next();
+         final Geometry g = symDifference(feature1.getGeometry(), m_ClipGeometry1);
+         if (g != null) {
+            initializeDefaultValues(fieldTypes, resultValues);
+            final Object[] values1 = feature1.getRecord().getValues();
+            System.arraycopy(values1, 0, resultValues, 0, layer1.getFieldCount());
+            m_Output.addFeature(g, resultValues);
+         }
+         i++;
+      }
+      iter1.close();
+      
+      // layer2.difference(layer1)
+      m_ClipGeometry2 = computeJtsClippingPoly(layer1);
+      final IFeatureIterator iter2 = layer2.iterator();
+
+      int j = 0;
+      final int iShapeCount2 = layer2.getShapesCount();
+      while (iter2.hasNext() && setProgress(j, iShapeCount2)) {
+         final IFeature feature2 = iter2.next();
+         final Geometry g = symDifference(feature2.getGeometry(), m_ClipGeometry2);
+         if (g != null) {
+            initializeDefaultValues(fieldTypes, resultValues);
+            final Object[] values2 = feature2.getRecord().getValues();
+            System.arraycopy(values2, 0, resultValues, layer1.getFieldCount(), layer2.getFieldCount());
+            m_Output.addFeature(g, resultValues);
+         }
+         j++;
+      }
+      iter2.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Symmetric_difference"));
+      setGroup(Sextante.getText("Tools_for_polygon_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER1, Sextante.getText("Primera_capa"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         m_Parameters.addInputVectorLayer(LAYER2, Sextante.getText("Segunda_capa"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Symmetric_difference"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   public Geometry symDifference(final Geometry g, final Geometry m_ClipGeometry) throws GeoAlgorithmExecutionException {
+
+      if (g == null) {
+         return null;
+      }
+
+      final Geometry env = g.getEnvelope();
+      if (env == null) {
+         return null;
+      }
+      if (!env.intersects(m_ClipGeometry.getEnvelope())) {
+         return g;
+      }
+      if (g.intersects(m_ClipGeometry)) {
+         try {
+            final Geometry newGeom = g.difference(m_ClipGeometry);
+            return newGeom;
+         }
+         catch (final com.vividsolutions.jts.geom.TopologyException e) {
+            if (!g.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong input geometry");
+            }
+            if (!m_ClipGeometry.isValid()) {
+               throw new GeoAlgorithmExecutionException("Wrong clipping geometry");
+            }
+         }
+      } else {
+         return g;
+      }
+      return null;
+   }
+
+
+   private Geometry computeJtsClippingPoly(final IVectorLayer layer) throws IteratorException {
+
+      Geometry currentGeometry;
+      Geometry geometry = null;
+      final GeometryFactory geomFact = new GeometryFactory();
+
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         currentGeometry = feature.getGeometry();
+         if (geometry == null) {
+            geometry = currentGeometry;
+         }
+         else {
+            final Geometry[] geoms = new Geometry[2];
+            geoms[0] = geometry;
+            geoms[1] = currentGeometry;
+            final GeometryCollection gc = geomFact.createGeometryCollection(geoms);
+            geometry = gc.buffer(0d);
+         }
+      }
+      iter.close();
+
+      return geometry;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/symDifference/SymDifferenceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceAndAngle/DistanceAndAngleAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceAndAngle/DistanceAndAngleAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceAndAngle/DistanceAndAngleAlgorithm.java	(revision 369)
@@ -0,0 +1,233 @@
+
+
+package es.unex.sextante.vectorTools.distanceAndAngle;
+
+//import com.vividsolutions.jcs.algorithm.VertexHausdorffDistance;
+import com.vividsolutions.jts.algorithm.distance.DiscreteHausdorffDistance;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class DistanceAndAngleAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER1        = "LAYER1";
+   public static final String FIELD1        = "ID1";
+   public static final String CONVEXHULL1   = "CONVEXHULL1";
+   public static final String LAYER2        = "LAYER2";
+   public static final String FIELD2        = "ID2";
+   public static final String CONVEXHULL2   = "CONVEXHULL2";
+   public static final String RESULT_POINTS = "POINTS";
+   public static final String RESULT_LINES  = "LINES";
+
+
+   /**
+    * LINES -- UID_A, UID_B, MIN_DISTANCE, CENTROID_DISTANCE, HAUSDORFF_DISTANCE, ANGLE_CENTROIDS, BEARING_CENTROIDS
+    */
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0, j = 0;
+      double x1, x2, y1, y2;
+      int iCount1;
+      String[] linesFields;
+      Class[] linesTypes;
+      Object[] linesValues;
+
+      final IVectorLayer layer1 = m_Parameters.getParameterValueAsVectorLayer(LAYER1);
+      final int id1_idx = m_Parameters.getParameterValueAsInt(FIELD1);
+      final boolean useConvexHull1 = m_Parameters.getParameterValueAsBoolean(CONVEXHULL1);
+      final IVectorLayer layer2 = m_Parameters.getParameterValueAsVectorLayer(LAYER2);
+      final int id2_idx = m_Parameters.getParameterValueAsInt(FIELD2);
+      final boolean useConvexHull2 = m_Parameters.getParameterValueAsBoolean(CONVEXHULL2);
+
+      if (!m_bIsAutoExtent) {
+         layer1.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         layer2.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iCount1 = layer1.getShapesCount();
+
+      linesFields = new String[] { "UID_A", "UID_B", "MIN_DIST", "CENTR_DIST", "HAUSD_DIST", "BEARING" };
+      linesTypes = new Class[] { String.class, String.class, Double.class, Double.class, Double.class, Double.class };
+
+      final IVectorLayer driver = getNewVectorLayer(RESULT_LINES, Sextante.getText("Lines_Dist_Angles"),
+               OutputVectorLayer.SHAPE_TYPE_LINE, linesTypes, linesFields);
+
+      final IFeatureIterator iter1 = layer1.iterator();
+      while (iter1.hasNext() && setProgress(i, iCount1)) {
+         linesValues = new Object[linesFields.length];
+         final IFeature feature1 = iter1.next();
+         Geometry geom1 = feature1.getGeometry();
+         if (useConvexHull1) {
+            geom1 = geom1.convexHull();
+         }
+         final Point geom1_c = geom1.getCentroid();
+         final Coordinate coord1 = geom1_c.getCoordinate();
+         x1 = coord1.x;
+         y1 = coord1.y;
+
+         final IFeatureIterator iter2 = layer2.iterator();
+         //uid_A
+         linesValues[0] = feature1.getRecord().getValue(id1_idx).toString();
+
+         j = 0;
+         final GeometryFactory gf = new GeometryFactory();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            Geometry geom2 = feature2.getGeometry();
+            if (useConvexHull2) {
+               geom2 = geom2.convexHull();
+            }
+            final Point geom2_c = geom2.getCentroid();
+            final Coordinate coord2 = geom2_c.getCoordinate();
+            x2 = coord2.x;
+            y2 = coord2.y;
+            final double dX = (x2 - x1);
+            final double dY = (y2 - y1);
+
+            //uid_B
+            linesValues[1] = feature2.getRecord().getValue(id2_idx).toString();
+            //min_dist
+            final double min_dist = geom1.distance(geom2);
+            linesValues[2] = min_dist;
+            //centroid_dist
+            final double centroid_dist = geom1_c.distance(geom2_c);
+            linesValues[3] = centroid_dist;
+            //hausdorff_dist (approximation)
+            final DiscreteHausdorffDistance hausdorff = new DiscreteHausdorffDistance(geom1, geom2);
+            final double hausd_dist = hausdorff.distance();
+            linesValues[4] = hausd_dist;
+
+            Double slope = (dY) / (dX);
+            if (Double.isNaN(slope)) {
+               slope = 0.0;
+            }
+            if (Double.isInfinite(slope)) {
+               if (dY < 0) {
+                  slope = Double.MIN_VALUE;
+               }
+               else {
+                  slope = Double.MAX_VALUE;
+               }
+            }
+            // To retrieve angles between -180 and 180 degrees
+            // Quadrants:
+            //     	0 = 0-90 grades
+            //     	1 = 90-180 grades
+            // 		2 = 180-270 grades (0(-90) degrees)
+            // 		3 = 270-360 grades ((-90)-(-180) degrees)
+            int quadrant = 0;
+            if (dX < 0) {
+               if (slope < 0) {
+                  quadrant = 1;
+               }
+               else {
+                  quadrant = 2;
+               }
+            }
+            else {
+               if (slope < 0) {
+                  quadrant = 3;
+               }
+               else {
+                  quadrant = 0;
+               }
+            }
+
+
+            //angle[5] <-- It was removed
+            //bearing[6] <-- Changed to [5]
+            if (centroid_dist == 0) {
+               //linesValues[5] = -1;
+               linesValues[5] = -1;
+            }
+            else {
+               if (Double.MIN_VALUE == slope) {
+                  //linesValues[5] = -90;
+                  linesValues[5] = 180;
+               }
+               else {
+
+                  final double angle_aux = Math.toDegrees((Math.atan(slope)));
+                  switch (quadrant) {
+                     case 0: {
+                        //linesValues[5] = angle_aux;
+                        linesValues[5] = 90 - angle_aux;
+                        break;
+                     }
+                     case 1: {
+                        //linesValues[5] = angle_aux + 180;
+                        linesValues[5] = 270 - angle_aux;
+                        break;
+                     }
+                     case 2: {
+                        //linesValues[5] = angle_aux - 180;
+                        linesValues[5] = 270 - angle_aux;
+                        break;
+                     }
+                     case 3: {
+                        //linesValues[5] = angle_aux;
+                        linesValues[5] = Math.abs(angle_aux) + 90;
+                        break;
+                     }
+                  }
+               }
+            }
+            driver.addFeature(gf.createLineString(new Coordinate[] { coord1, coord2 }), linesValues);
+            j++;
+         }
+         iter2.close();
+         i++;
+      }
+      iter1.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Distances_and_Angles"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER1, Sextante.getText("Layer_1"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD1, Sextante.getText("ID1_FIELDNAME"), LAYER1);
+         m_Parameters.addBoolean(CONVEXHULL1, Sextante.getText("ConvexHull_of_layer_1"), true);
+
+         m_Parameters.addInputVectorLayer(LAYER2, Sextante.getText("Layer_2"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD2, Sextante.getText("ID2_FIELDNAME"), LAYER2);
+         m_Parameters.addBoolean(CONVEXHULL2, Sextante.getText("ConvexHull_of_Layer_2"), true);
+         addOutputVectorLayer(RESULT_LINES, Sextante.getText("Lines_Dist_Angles"));
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/distanceAndAngle/DistanceAndAngleAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointCoordinates/pointCoordinatesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointCoordinates/pointCoordinatesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointCoordinates/pointCoordinatesAlgorithm.java	(revision 369)
@@ -0,0 +1,98 @@
+
+
+package es.unex.sextante.vectorTools.pointCoordinates;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class pointCoordinatesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER       = "LAYER";
+   public static final String GRIDS       = "GRIDS";
+   public static final String INTERPOLATE = "INTERPOLATE";
+   public static final String RESULT      = "RESULT";
+
+   private IVectorLayer       m_Layer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Add_coordinates_to_points"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Points"), OutputVectorLayer.SHAPE_TYPE_POINT, LAYER);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iProgress = 0;
+      int iShapeCount;
+      Double[][] values;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iShapeCount = m_Layer.getShapesCount();
+      values = new Double[2][iShapeCount];
+      final IFeatureIterator iter = m_Layer.iterator();
+
+      while (iter.hasNext() && setProgress(iProgress, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate[] coords = geom.getCoordinates();
+         values[0][iProgress] = new Double(coords[0].x);
+         values[1][iProgress] = new Double(coords[0].y);
+         iProgress++;
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final String[] sNames = { "X", "Y" };
+      final Class[] types = { Double.class, Double.class };
+
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(m_Layer.getName());
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, m_Layer, channel, sNames, values, types));
+      addOutputObject(out);
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/pointCoordinates/pointCoordinatesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/convergence/ConvergenceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/convergence/ConvergenceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/convergence/ConvergenceAlgorithm.java	(revision 369)
@@ -0,0 +1,168 @@
+package es.unex.sextante.morphometry.convergence;
+
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ConvergenceAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[]   = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[]   = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String  DEM            = "DEM";
+   public static final String  METHOD         = "METHOD";
+   public static final String  RESULT         = "RESULT";
+
+   private static final double DEG_45_IN_RAD  = Math.toRadians(45);
+   private static final double DEG_90_IN_RAD  = Math.toRadians(90);
+   private static final double DEG_180_IN_RAD = Math.toRadians(180);
+   private static final double DEG_360_IN_RAD = Math.toRadians(360);
+
+   IRasterLayer                m_Convergence;
+   IRasterLayer                m_DEM;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_Convergence = getNewRasterLayer(RESULT, Sextante.getText("Convergence"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_Convergence.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            switch (iMethod) {
+               case 0:
+                  Do_Aspect(x, y);
+                  break;
+               case 1:
+                  Do_Gradient(x, y);
+                  break;
+            }
+         }
+      }
+
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Aspect"), Sextante.getText("Gradient") };
+
+      setName(Sextante.getText("Convergence_index"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Convergence"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void Do_Aspect(final int x,
+                          final int y) {
+
+      int i, n;
+      double dAspect, dIAspect, d, dSum, z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         m_Convergence.setNoData(x, y);
+      }
+      else {
+         for (i = 0, n = 0, dSum = 0.0, dIAspect = -DEG_180_IN_RAD; i < 8; i++, dIAspect += DEG_45_IN_RAD) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               dAspect = m_DEM.getAspect(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+               if (!m_DEM.isNoDataValue(dAspect) && (dAspect >= 0)) {
+                  d = dAspect - dIAspect;
+                  d = d % DEG_360_IN_RAD;
+                  if (d < -DEG_180_IN_RAD) {
+                     d += DEG_360_IN_RAD;
+                  }
+                  else if (d > DEG_180_IN_RAD) {
+                     d -= DEG_360_IN_RAD;
+                  }
+
+                  dSum += Math.abs(d);
+                  n++;
+               }
+            }
+         }
+         double res = dSum / n;
+         res = (res - DEG_90_IN_RAD);
+         res = res * 100.0 / DEG_90_IN_RAD;
+
+         m_Convergence.setCellValue(x, y, n > 0 ? (dSum / n - DEG_90_IN_RAD) * 100.0 / DEG_90_IN_RAD : 0.0);
+      }
+   }
+
+
+   private void Do_Gradient(final int x,
+                            final int y) {
+
+      int i, n;
+      double dAspect, dIAspect, dSlope, dISlope, d, dSum, z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         m_Convergence.setNoData(x, y);
+      }
+      else {
+         for (i = 0, n = 0, dSum = 0.0, dIAspect = -DEG_180_IN_RAD; i < 8; i++, dIAspect += DEG_45_IN_RAD) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               dSlope = m_DEM.getSlope(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+               dAspect = m_DEM.getAspect(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+               if (!m_DEM.isNoDataValue(dAspect) && (dAspect >= 0)) {
+                  dISlope = Math.atan((z2 - z) / m_DEM.getDistToNeighborInDir(i));
+                  d = Math.acos(Math.sin(dSlope) * Math.sin(dISlope) + Math.cos(dSlope) * Math.cos(dISlope)
+                                * Math.cos(dIAspect - dAspect));
+                  d = d % DEG_360_IN_RAD;
+
+                  if (d < -DEG_180_IN_RAD) {
+                     d += DEG_360_IN_RAD;
+                  }
+                  else if (d > DEG_180_IN_RAD) {
+                     d -= DEG_360_IN_RAD;
+                  }
+
+                  dSum += Math.abs(d);
+                  n++;
+
+               }
+            }
+         }
+         m_Convergence.setCellValue(x, y, n > 0 ? (dSum / n - DEG_90_IN_RAD) * 100.0 / DEG_90_IN_RAD : 0.0);
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/convergence/ConvergenceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/protectionIndex/ProtectionIndexAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/protectionIndex/ProtectionIndexAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/protectionIndex/ProtectionIndexAlgorithm.java	(revision 369)
@@ -0,0 +1,113 @@
+package es.unex.sextante.morphometry.protectionIndex;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ProtectionIndexAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String RADIUS       = "RADIUS";
+   public static final String RESULT       = "RESULT";
+
+   double                     m_dRadius;
+   IRasterLayer               m_ProtectionIndex;
+   IRasterLayer               m_Window     = null;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_dRadius = m_Parameters.getParameterValueAsDouble(RADIUS);
+      m_ProtectionIndex = getNewRasterLayer(RESULT, Sextante.getText("Protection_index"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_ProtectionIndex.getWindowGridExtent();
+
+      m_Window.setWindowExtent(extent);
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            setProtectionIndex(x, y);
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setName(Sextante.getText("Protection_index"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  1000, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Protection_index"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void setProtectionIndex(final int x,
+                                   final int y) {
+
+      int i, j;
+      double z, z2;
+      double dDifHeight;
+      double dDist;
+      double dAngle;
+      double dProtectionIndex = 0;
+      double dMaxAngle;
+
+      z = m_Window.getCellValueAsDouble(x, y);
+
+      for (i = 0; i < 8; i++) {
+         j = 1;
+         dMaxAngle = 0;
+         dDist = m_Window.getDistToNeighborInDir(i) * j;
+         while (dDist < m_dRadius) {
+            z2 = m_Window.getCellValueAsDouble(x + m_iOffsetX[i] * j, y + m_iOffsetY[i] * j);
+            if (m_Window.isNoDataValue(z2)) {
+               m_ProtectionIndex.setNoData(x, y);
+               return;
+            }
+            dDifHeight = z2 - z;
+            dAngle = Math.atan(dDifHeight / dDist);
+            if (dMaxAngle < dAngle) {
+               dMaxAngle = dAngle;
+            }
+            j++;
+            dDist = m_Window.getDistToNeighborInDir(i) * j;
+         }
+         dProtectionIndex += dMaxAngle;
+      }
+
+      m_ProtectionIndex.setCellValue(x, y, dProtectionIndex / 8.);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/protectionIndex/ProtectionIndexAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/aspect/AspectAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/aspect/AspectAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/aspect/AspectAlgorithm.java	(revision 369)
@@ -0,0 +1,482 @@
+package es.unex.sextante.morphometry.aspect;
+
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class AspectAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int    m_iOffsetX[]         = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[]         = { -1, -1, 0, 1, 1, 1, 0, -1 };
+
+   public static final String  ASPECT               = "ASPECT";
+   public static final String  METHOD               = "METHOD";
+   public static final String  UNITS                = "UNITS";
+   public static final String  DEM                  = "DEM";
+
+   public final static int     UNITS_RADIANS        = 0;
+   public final static int     UNITS_DEGREES        = 1;
+   public final static int     UNITS_PERCENTAGE     = 2;
+
+   public final static int     METHOD_MAXIMUM_SLOPE = 0;
+   public final static int     METHOD_TARBOTON      = 1;
+   public final static int     METHOD_BURGESS       = 2;
+   public final static int     METHOD_BAUER         = 3;
+   public final static int     METHOD_HEERDEGEN     = 4;
+   public final static int     METHOD_ZEVENBERGEN   = 5;
+   public final static int     METHOD_HARALICK      = 6;
+
+   private static final double DEG_45_IN_RAD        = Math.toRadians(45);
+   private static final double DEG_90_IN_RAD        = Math.toRadians(90);
+   private static final double DEG_180_IN_RAD       = Math.toRadians(180);
+   private static final double DEG_270_IN_RAD       = Math.toRadians(270);
+
+   IRasterLayer                m_DEM                = null;
+   IRasterLayer                m_Aspect;
+
+   private double              _6DX;
+   private double              _2DX;
+
+   private int                 m_iUnits;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+
+      m_iUnits = m_Parameters.getParameterValueAsInt(UNITS);
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_Aspect = getNewRasterLayer(ASPECT, Sextante.getText("Aspect"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_Aspect.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      _2DX = m_DEM.getWindowCellSize() * 2.;
+      _6DX = m_DEM.getWindowCellSize() * 6.;
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            switch (iMethod) {
+               case 0:
+                  Do_MaximumSlope(x, y);
+                  break;
+
+               case 1:
+                  Do_Tarboton(x, y);
+                  break;
+
+               case 2:
+                  Do_LeastSquare(x, y);
+                  break;
+
+               case 3:
+                  Do_FD_BRM(x, y);
+                  break;
+
+               case 4:
+                  Do_FD_Heerdegen(x, y);
+                  break;
+
+               case 5:
+                  Do_FD_Zevenbergen(x, y);
+                  break;
+
+               case 6:
+                  Do_FD_Haralick(x, y);
+                  break;
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("M\u00e1ximum_slope__Travis_et_al_1975"),
+               Sextante.getText("Maximum_Triangle_Slope__Tarboton_1997"),
+               Sextante.getText("Plane_fitting__Costa-Cabral_&_Burgess_1996"),
+               Sextante.getText("Fit_2_Degree_Polynom__Bauer_Rohdenburg_Bork_1985"),
+               Sextante.getText("Fit_2_Degree_Polynom__Heerdegen_&_Beran_1982"),
+               Sextante.getText("Fit_2_Degree_Polynom__Zevenbergen_&_Thorne_1987"),
+               Sextante.getText("Fit_3_Degree_Polynom__Haralick_1983") };
+
+      final String[] sUnits = { Sextante.getText("Radians"), Sextante.getText("Degrees") };
+
+      setName(Sextante.getText("Aspect"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+
+         m_Parameters.addSelection(UNITS, Sextante.getText("Units"), sUnits);
+
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(ASPECT, Sextante.getText("Aspect"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void Do_MaximumSlope(final int x,
+                                final int y) {
+
+      int i, Aspect;
+      double z, z2, dSlope, dMaxSlope;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         dMaxSlope = 0.0;
+         for (Aspect = -1, i = 0; i < 8; i++) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               dSlope = Math.atan((z - z2) / m_DEM.getDistToNeighborInDir(i));
+               if (dSlope > dMaxSlope) {
+                  Aspect = i;
+                  dMaxSlope = dSlope;
+               }
+            }
+         }
+
+         if (Aspect < 0.0) {
+            Set_Parameters_NoData(x, y);
+         }
+         else {
+            Set_Parameters(x, y, Aspect * DEG_45_IN_RAD);
+         }
+      }
+   }
+
+
+   private void Do_Tarboton(final int x,
+                            final int y) {
+
+      int i, j;
+      double z, z2, zm[], iSlope, iAspect, Slope, Aspect, G, H;
+
+      zm = new double[8];
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         for (i = 0; i < 8; i++) {
+
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               zm[i] = z2;
+            }
+            else {
+               z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[(i + 4) % 8], y + m_iOffsetY[(i + 4) % 8]);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  zm[i] = z - (z2 - z);
+               }
+               else {
+                  zm[i] = z;
+               }
+            }
+         }
+
+         Slope = 0.0;
+         Aspect = -1.0;
+
+         for (i = 0, j = 1; i < 8; i++, j = (j + 1) % 8) {
+            if ((i % 2) != 0) // i => diagonal
+            {
+               G = (z - zm[j]) / m_DEM.getWindowCellSize();
+               H = (zm[j] - zm[i]) / m_DEM.getWindowCellSize();
+            }
+            else // i => orthogonal
+            {
+               G = (z - zm[i]) / m_DEM.getWindowCellSize();
+               H = (zm[i] - zm[j]) / m_DEM.getWindowCellSize();
+            }
+
+            if (H < 0.0) {
+               iAspect = 0.0;
+               iSlope = G;
+            }
+            else if (H > G) {
+               iAspect = DEG_45_IN_RAD;
+               iSlope = (z - zm[((i % 2) != 0) ? i : j]) / (Math.sqrt(2.0) * m_DEM.getWindowCellSize());
+            }
+            else {
+               iAspect = Math.atan(H / G);
+               iSlope = Math.sqrt(G * G + H * H);
+            }
+
+            if (iSlope > Slope) {
+               Aspect = i * DEG_45_IN_RAD + (((i % 2) != 0) ? DEG_45_IN_RAD - iAspect : iAspect);
+               Slope = iSlope;
+            }
+         }
+
+         if (Aspect < 0.0) {
+            Set_Parameters_NoData(x, y);
+         }
+         else {
+            Set_Parameters(x, y, Aspect);
+         }
+      }
+   }
+
+
+   private void Do_LeastSquare(final int x,
+                               final int y) {
+
+      double zm[], a, b;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         a = ((zm[2] + 2 * zm[5] + zm[8]) - (zm[0] + 2 * zm[3] + zm[6])) / (8 * m_DEM.getWindowCellSize());
+         b = ((zm[6] + 2 * zm[7] + zm[8]) - (zm[0] + 2 * zm[1] + zm[2])) / (8 * m_DEM.getWindowCellSize());
+
+         if (a != 0.0) {
+            Set_Parameters(x, y, DEG_180_IN_RAD + Math.atan2(b, a));
+         }
+         else if (b > 0.0) {
+            Set_Parameters(x, y, DEG_270_IN_RAD);
+         }
+         else if (b < 0.0) {
+            Set_Parameters(x, y, DEG_90_IN_RAD);
+         }
+         else {
+            Set_Parameters_NoData(x, y);
+         }
+      }
+   }
+
+
+   private void Do_FD_BRM(final int x,
+                          final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = ((zm[2] - zm[0]) + (zm[5] - zm[3]) + (zm[8] - zm[6])) / _6DX;
+         H = ((zm[6] - zm[0]) + (zm[7] - zm[1]) + (zm[8] - zm[2])) / _6DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Heerdegen(final int x,
+                                final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = (-zm[0] + zm[2] - zm[3] + zm[5] - zm[6] + zm[8]) / _6DX;
+         H = (-zm[0] - zm[1] - zm[2] + zm[6] + zm[7] + zm[8]) / _6DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Zevenbergen(final int x,
+                                  final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = (zm[5] - zm[3]) / _2DX;
+         H = (zm[7] - zm[1]) / _2DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Haralick(final int x,
+                               final int y) {
+
+      final int Mtrx[][][] = {
+               { { 31, -5, -17, -5, 31 }, { -44, -62, -68, -62, -44 }, { 0, 0, 0, 0, 0 }, { 44, 62, 68, 62, 44 },
+                        { -31, 5, 17, 5, -31 } },
+               { { 31, -44, 0, 44, -31 }, { -5, -62, 0, 62, 5 }, { -17, -68, 0, 68, 17 }, { -5, -62, 0, 62, 5 },
+                        { 31, -44, 0, 44, -31 } },
+               { { 2, 2, 2, 2, 2 }, { -1, -1, -1, -1, -1 }, { -2, -2, -2, -2, -2 }, { -1, -1, -1, -1, -1 }, { 2, 2, 2, 2, 2 } },
+               { { 4, 2, 0, -2, -4 }, { 2, 1, 0, -1, -2 }, { 0, 0, 0, 0, 0 }, { -2, -1, 0, 1, 2 }, { -4, -2, 0, 2, 4 } },
+               { { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 } } };
+
+      final int QMtrx[] = { 4200, 4200, 700, 1000, 700 };
+
+      int i, ix, iy, n;
+      double Sum, zm[], k[];
+
+      zm = new double[25];
+      k = new double[2];
+
+      if (Get_SubMatrix5x5(x, y, zm)) {
+         for (i = 0; i < 2; i++) {
+            for (n = 0, Sum = 0.0, iy = 0; iy < 5; iy++) {
+               for (ix = 0; ix < 5; ix++, n++) {
+                  Sum += zm[n] * Mtrx[i][ix][iy];
+               }
+            }
+
+            k[i] = Sum / QMtrx[i];
+         }
+
+         Set_Parameters_Derive(x, y, k[1], k[0]);
+      }
+   }
+
+
+   //	additional methods
+
+   private void Set_Parameters(final int x,
+                               final int y,
+                               double dAspect) {
+
+      if (m_iUnits == UNITS_DEGREES) {
+         dAspect = Math.toDegrees(dAspect);
+      }
+
+      m_Aspect.setCellValue(x, y, dAspect);
+
+   }
+
+
+   private void Set_Parameters_Derive(final int x,
+                                      final int y,
+                                      final double G,
+                                      final double H) {
+
+      if (G != 0.0) {
+         Set_Parameters(x, y, DEG_180_IN_RAD + Math.atan2(H, G));
+      }
+      else if (H > 0.0) {
+         Set_Parameters(x, y, DEG_270_IN_RAD);
+      }
+      else if (H < 0.0) {
+         Set_Parameters(x, y, DEG_90_IN_RAD);
+      }
+      else {
+         m_Aspect.setNoData(x, y);
+      }
+   }
+
+
+   private void Set_Parameters_NoData(final int x,
+                                      final int y) {
+
+      m_Aspect.setNoData(x, y);
+
+   }
+
+
+   //	---------------------------------------------------------
+   //	Indexing of the Submatrix:
+   //
+   //	+-------+    +-------+
+   //	| 7 0 1 |    | 2 5 8 |
+   //	| 6 * 2 | => | 1 4 7 |
+   //	| 5 4 3 |    | 0 3 6 |
+   //	+-------+    +-------+
+   //
+   //	---------------------------------------------------------
+   private boolean Get_SubMatrix3x3(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+
+      final int iSub[] = { 5, 8, 7, 6, 3, 0, 1, 2 };
+
+      int i;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         SubMatrix[4] = 0.0;
+         for (i = 0; i < 8; i++) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               SubMatrix[iSub[i]] = z2 - z;
+            }
+            else {
+               z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[(i + 4) % 8], y + m_iOffsetY[(i + 4) % 8]);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[iSub[i]] = z - z2;
+               }
+               else {
+                  SubMatrix[iSub[i]] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+
+   private boolean Get_SubMatrix5x5(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+      int i, ix, iy, jx, jy;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (!m_DEM.isNoDataValue(z)) {
+         for (i = 0, iy = y - 2; iy <= y + 2; iy++) {
+            jy = iy < 0 ? 0 : (iy >= m_DEM.getNY() ? m_DEM.getNY() - 1 : iy);
+            for (ix = x - 2; ix <= x + 2; ix++, i++) {
+               jx = ix < 0 ? 0 : (ix >= m_DEM.getNX() ? m_DEM.getNY() - 1 : ix);
+               z2 = m_DEM.getCellValueAsDouble(jx, jy);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[i] = z2 - z;
+               }
+               else {
+                  SubMatrix[i] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/aspect/AspectAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/slope/SlopeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/slope/SlopeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/slope/SlopeAlgorithm.java	(revision 369)
@@ -0,0 +1,463 @@
+package es.unex.sextante.morphometry.slope;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class SlopeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public final static int    METHOD_MAXIMUM_SLOPE = 0;
+   public final static int    METHOD_TARBOTON      = 1;
+   public final static int    METHOD_BURGESS       = 2;
+   public final static int    METHOD_BAUER         = 3;
+   public final static int    METHOD_HEERDEGEN     = 4;
+   public final static int    METHOD_ZEVENBERGEN   = 5;
+   public final static int    METHOD_HARALICK      = 6;
+
+   public final static int    UNITS_RADIANS        = 0;
+   public final static int    UNITS_DEGREES        = 1;
+   public final static int    UNITS_PERCENTAGE     = 2;
+
+   public static final String METHOD               = "METHOD";
+   public static final String UNITS                = "UNITS";
+   public static final String DEM                  = "DEM";
+   public static final String SLOPE                = "SLOPE";
+
+   private final static int   m_iOffsetX[]         = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]         = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private IRasterLayer       m_DEM;
+   private IRasterLayer       m_Slope;
+   private int                m_iUnits;
+   private double             _2DX;
+   private double             _6DX;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_iUnits = m_Parameters.getParameterValueAsInt(UNITS);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_Slope = getNewRasterLayer(SLOPE, Sextante.getText("Slope"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_Slope.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      _2DX = m_DEM.getWindowCellSize() * 2.;
+      _6DX = m_DEM.getWindowCellSize() * 6.;
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            switch (iMethod) {
+               case 0:
+                  Do_MaximumSlope(x, y);
+                  break;
+
+               case 1:
+                  Do_Tarboton(x, y);
+                  break;
+
+               case 2:
+                  Do_LeastSquare(x, y);
+                  break;
+
+               case 3:
+                  Do_FD_BRM(x, y);
+                  break;
+
+               case 4:
+                  Do_FD_Heerdegen(x, y);
+                  break;
+
+               case 5:
+                  Do_FD_Zevenbergen(x, y);
+                  break;
+
+               case 6:
+                  Do_FD_Haralick(x, y);
+                  break;
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("M\u00e1ximum_slope__Travis_et_al_1975"),
+               Sextante.getText("Maximum_Triangle_Slope__Tarboton_1997"),
+               Sextante.getText("Plane_fitting__Costa-Cabral_&_Burgess_1996"),
+               Sextante.getText("Fit_2_Degree_Polynom__Bauer_Rohdenburg_Bork_1985"),
+               Sextante.getText("Fit_2_Degree_Polynom__Heerdegen_&_Beran_1982"),
+               Sextante.getText("Fit_2_Degree_Polynom__Zevenbergen_&_Thorne_1987"),
+               Sextante.getText("Fit_3_Degree_Polynom__Haralick_1983") };
+
+      final String[] sUnits = { Sextante.getText("Radians"), Sextante.getText("Degrees"), Sextante.getText("Percentage") };
+
+
+      setName(Sextante.getText("Slope"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addSelection(UNITS, Sextante.getText("Units"), sUnits);
+         addOutputRasterLayer(SLOPE, Sextante.getText("Slope"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void Do_MaximumSlope(final int x,
+                                final int y) {
+
+      int i;
+      double z, z2, dSlope, dMaxSlope;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         dMaxSlope = 0.0;
+         for (i = 0; i < 8; i++) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               dSlope = Math.atan((z - z2) / m_DEM.getDistToNeighborInDir(i));
+               if (dSlope > dMaxSlope) {
+                  dMaxSlope = dSlope;
+               }
+            }
+         }
+
+         Set_Parameters(x, y, dMaxSlope);
+      }
+   }
+
+
+   private void Do_Tarboton(final int x,
+                            final int y) {
+
+      int i, j;
+      double z, z2, zm[], iSlope, Slope, G, H;
+
+      zm = new double[8];
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         for (i = 0; i < 8; i++) {
+
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               zm[i] = z2;
+            }
+            else {
+               z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[(i + 4) % 8], y + m_iOffsetY[(i + 4) % 8]);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  zm[i] = z - (z2 - z);
+               }
+               else {
+                  zm[i] = z;
+               }
+            }
+         }
+
+         Slope = 0.0;
+
+         for (i = 0, j = 1; i < 8; i++, j = (j + 1) % 8) {
+            if ((i % 2) != 0) // i => diagonal
+            {
+               G = (z - zm[j]) / m_DEM.getWindowCellSize();
+               H = (zm[j] - zm[i]) / m_DEM.getWindowCellSize();
+            }
+            else // i => orthogonal
+            {
+               G = (z - zm[i]) / m_DEM.getWindowCellSize();
+               H = (zm[i] - zm[j]) / m_DEM.getWindowCellSize();
+            }
+
+            if (H < 0.0) {
+               iSlope = G;
+            }
+            else if (H > G) {
+               iSlope = (z - zm[((i % 2) != 0) ? i : j]) / (Math.sqrt(2.0) * m_DEM.getWindowCellSize());
+            }
+            else {
+               iSlope = Math.sqrt(G * G + H * H);
+            }
+
+            if (iSlope > Slope) {
+               Slope = iSlope;
+            }
+         }
+
+         Set_Parameters(x, y, Math.atan(Slope));
+
+      }
+   }
+
+
+   private void Do_LeastSquare(final int x,
+                               final int y) {
+
+      double zm[], a, b;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         a = ((zm[2] + 2 * zm[5] + zm[8]) - (zm[0] + 2 * zm[3] + zm[6])) / (8 * m_DEM.getWindowCellSize());
+         b = ((zm[6] + 2 * zm[7] + zm[8]) - (zm[0] + 2 * zm[1] + zm[2])) / (8 * m_DEM.getWindowCellSize());
+
+         if (a != 0.0) {
+            Set_Parameters(x, y, Math.atan(Math.sqrt(a * a + b * b)));
+         }
+         else if (b > 0.0) {
+            Set_Parameters(x, y, Math.atan(Math.sqrt(a * a + b * b)));
+         }
+         else if (b < 0.0) {
+            Set_Parameters(x, y, Math.atan(Math.sqrt(a * a + b * b)));
+         }
+         else {
+            Set_Parameters_NoData(x, y);
+         }
+      }
+   }
+
+
+   private void Do_FD_BRM(final int x,
+                          final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = ((zm[2] - zm[0]) + (zm[5] - zm[3]) + (zm[8] - zm[6])) / _6DX;
+         H = ((zm[6] - zm[0]) + (zm[7] - zm[1]) + (zm[8] - zm[2])) / _6DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Heerdegen(final int x,
+                                final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = (-zm[0] + zm[2] - zm[3] + zm[5] - zm[6] + zm[8]) / _6DX;
+         H = (-zm[0] - zm[1] - zm[2] + zm[6] + zm[7] + zm[8]) / _6DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Zevenbergen(final int x,
+                                  final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         G = (zm[5] - zm[3]) / _2DX;
+         H = (zm[7] - zm[1]) / _2DX;
+         Set_Parameters_Derive(x, y, G, H);
+      }
+   }
+
+
+   private void Do_FD_Haralick(final int x,
+                               final int y) {
+
+      final int Mtrx[][][] = {
+               { { 31, -5, -17, -5, 31 }, { -44, -62, -68, -62, -44 }, { 0, 0, 0, 0, 0 }, { 44, 62, 68, 62, 44 },
+                        { -31, 5, 17, 5, -31 } },
+               { { 31, -44, 0, 44, -31 }, { -5, -62, 0, 62, 5 }, { -17, -68, 0, 68, 17 }, { -5, -62, 0, 62, 5 },
+                        { 31, -44, 0, 44, -31 } },
+               { { 2, 2, 2, 2, 2 }, { -1, -1, -1, -1, -1 }, { -2, -2, -2, -2, -2 }, { -1, -1, -1, -1, -1 }, { 2, 2, 2, 2, 2 } },
+               { { 4, 2, 0, -2, -4 }, { 2, 1, 0, -1, -2 }, { 0, 0, 0, 0, 0 }, { -2, -1, 0, 1, 2 }, { -4, -2, 0, 2, 4 } },
+               { { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 } } };
+
+      final int QMtrx[] = { 4200, 4200, 700, 1000, 700 };
+
+      int i, ix, iy, n;
+      double Sum, zm[], k[];
+
+      zm = new double[25];
+      k = new double[2];
+
+      if (Get_SubMatrix5x5(x, y, zm)) {
+         for (i = 0; i < 2; i++) {
+            for (n = 0, Sum = 0.0, iy = 0; iy < 5; iy++) {
+               for (ix = 0; ix < 5; ix++, n++) {
+                  Sum += zm[n] * Mtrx[i][ix][iy];
+               }
+            }
+
+            k[i] = Sum / QMtrx[i];
+         }
+
+         Set_Parameters_Derive(x, y, k[1], k[0]);
+      }
+   }
+
+
+   // additional methods
+
+   private void Set_Parameters(final int x,
+                               final int y,
+                               double dSlope) {
+
+      if (m_iUnits == UNITS_DEGREES) {
+         dSlope = Math.toDegrees(dSlope);
+      }
+      else if (m_iUnits == UNITS_PERCENTAGE) {
+         dSlope = Math.tan(dSlope) * 100;
+      }
+
+      m_Slope.setCellValue(x, y, dSlope);
+
+   }
+
+
+   private void Set_Parameters_Derive(final int x,
+                                      final int y,
+                                      final double G,
+                                      final double H) {
+
+      double k2;
+
+      k2 = G * G + H * H;
+
+      if (G != 0.0) {
+         Set_Parameters(x, y, Math.atan(Math.sqrt(k2)));
+      }
+      else if (H > 0.0) {
+         Set_Parameters(x, y, Math.atan(Math.sqrt(k2)));
+      }
+      else if (H < 0.0) {
+         Set_Parameters(x, y, Math.atan(Math.sqrt(k2)));
+      }
+      else {
+         Set_Parameters(x, y, Math.atan(Math.sqrt(k2)));
+      }
+   }
+
+
+   private void Set_Parameters_NoData(final int x,
+                                      final int y) {
+
+      m_Slope.setNoData(x, y);
+
+   }
+
+
+   //	---------------------------------------------------------
+   //	 Indexing of the Submatrix:
+   //
+   //	  +-------+    +-------+
+   //	  | 7 0 1 |    | 2 5 8 |
+   //	  | 6 * 2 | => | 1 4 7 |
+   //	  | 5 4 3 |    | 0 3 6 |
+   //	  +-------+    +-------+
+   //
+   //	---------------------------------------------------------
+   private boolean Get_SubMatrix3x3(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+
+      final int iSub[] = { 5, 8, 7, 6, 3, 0, 1, 2 };
+
+      int i;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         SubMatrix[4] = 0.0;
+         for (i = 0; i < 8; i++) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               SubMatrix[iSub[i]] = z2 - z;
+            }
+            else {
+               z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[(i + 4) % 8], y + m_iOffsetY[(i + 4) % 8]);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[iSub[i]] = z - z2;
+               }
+               else {
+                  SubMatrix[iSub[i]] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+
+   private boolean Get_SubMatrix5x5(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+      int i, ix, iy, jx, jy;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (!m_DEM.isNoDataValue(z)) {
+         for (i = 0, iy = y - 2; iy <= y + 2; iy++) {
+            jy = iy < 0 ? 0 : (iy >= m_DEM.getNY() ? m_DEM.getNY() - 1 : iy);
+            for (ix = x - 2; ix <= x + 2; ix++, i++) {
+               jx = ix < 0 ? 0 : (ix >= m_DEM.getNX() ? m_DEM.getNY() - 1 : ix);
+               z2 = m_DEM.getCellValueAsDouble(jx, jy);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[i] = z2 - z;
+               }
+               else {
+                  SubMatrix[i] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/slope/SlopeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/curvatures/CurvaturesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/curvatures/CurvaturesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/curvatures/CurvaturesAlgorithm.java	(revision 369)
@@ -0,0 +1,351 @@
+package es.unex.sextante.morphometry.curvatures;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CurvaturesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static double PLAN_THRESHOLD = 0.00001;
+   private final static int    m_iOffsetX[]   = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[]   = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String  METHOD         = "METHOD";
+   public static final String  DEM            = "DEM";
+   public static final String  HORZ           = "HORZ";
+   public static final String  VERT           = "VERT";
+   public static final String  GLOBAL         = "GLOBAL";
+   public static final String  CLASS          = "CLASS";
+
+   IRasterLayer                m_DEM          = null;
+   IRasterLayer                m_Curv;
+   IRasterLayer                m_hCurv;
+   IRasterLayer                m_vCurv;
+   IRasterLayer                m_CurvClass;
+
+   private double              _6DX;
+   private double              _2DX;
+   private double              _4_DX2;
+   private double              _DX2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_hCurv = getNewRasterLayer(HORZ, Sextante.getText("Horizontal_curvature"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_vCurv = getNewRasterLayer(VERT, Sextante.getText("Vertical_curvature"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_Curv = getNewRasterLayer(GLOBAL, Sextante.getText("Curvature"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_CurvClass = getNewRasterLayer(CLASS, Sextante.getText("Classification"), IRasterLayer.RASTER_DATA_TYPE_SHORT);
+      final AnalysisExtent extent = m_hCurv.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      _2DX = m_DEM.getWindowCellSize() * 2.;
+      _DX2 = m_DEM.getWindowCellSize() * m_DEM.getWindowCellSize();
+      _4_DX2 = 4 * m_DEM.getWindowCellSize() * m_DEM.getWindowCellSize();
+      _6DX = m_DEM.getWindowCellSize() * 6.;
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            switch (iMethod) {
+               case 0:
+                  Do_FD_BRM(x, y);
+                  break;
+
+               case 1:
+                  Do_FD_Heerdegen(x, y);
+                  break;
+
+               case 2:
+                  Do_FD_Zevenbergen(x, y);
+                  break;
+
+               case 3:
+                  Do_FD_Haralick(x, y);
+                  break;
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Fit_2_Degree_Polynom__Bauer_Rohdenburg_Bork_1985"),
+               Sextante.getText("Fit_2_Degree_Polynom__Heerdegen_&_Beran_1982"),
+               Sextante.getText("Fit_2_Degree_Polynom__Zevenbergen_&_Thorne_1987"),
+               Sextante.getText("Fit_3_Degree_Polynom__Haralick_1983") };
+
+      setName(Sextante.getText("Curvatures"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(HORZ, Sextante.getText("Horizontal_curvature"));
+         addOutputRasterLayer(VERT, Sextante.getText("Vertical_curvature"));
+         addOutputRasterLayer(GLOBAL, Sextante.getText("Curvature"));
+         addOutputRasterLayer(CLASS, Sextante.getText("Classification"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void Do_FD_BRM(final int x,
+                          final int y) {
+
+      double zm[], D, E, F, G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         D = ((zm[0] + zm[2] + zm[3] + zm[5] + zm[6] + zm[8]) - 2 * (zm[1] + zm[4] + zm[7])) / _DX2;
+         E = ((zm[0] + zm[6] + zm[1] + zm[7] + zm[2] + zm[8]) - 2 * (zm[3] + zm[4] + zm[5])) / _DX2;
+         F = (zm[8] + zm[0] - zm[7]) / _4_DX2;
+         G = ((zm[2] - zm[0]) + (zm[5] - zm[3]) + (zm[8] - zm[6])) / _6DX;
+         H = ((zm[6] - zm[0]) + (zm[7] - zm[1]) + (zm[8] - zm[2])) / _6DX;
+
+         Set_Parameters_Derive(x, y, D, E, F, G, H);
+      }
+   }
+
+
+   private void Do_FD_Heerdegen(final int x,
+                                final int y) {
+
+      double zm[], a, b, D, E, F, G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+         a = zm[0] + zm[2] + zm[3] + zm[5] + zm[6] + zm[8];
+         b = zm[0] + zm[1] + zm[2] + zm[6] + zm[7] + zm[8];
+         D = (0.3 * a - 0.2 * b) / _DX2;
+         E = (0.3 * b - 0.2 * a) / _DX2;
+         F = (zm[0] - zm[2] - zm[6] + zm[8]) / _4_DX2;
+         G = (-zm[0] + zm[2] - zm[3] + zm[5] - zm[6] + zm[8]) / _6DX;
+         H = (-zm[0] - zm[1] - zm[2] + zm[6] + zm[7] + zm[8]) / _6DX;
+
+         Set_Parameters_Derive(x, y, D, E, F, G, H);
+      }
+   }
+
+
+   private void Do_FD_Zevenbergen(final int x,
+                                  final int y) {
+
+      double zm[], D, E, F, G, H;
+
+      zm = new double[9];
+
+      if (Get_SubMatrix3x3(x, y, zm)) {
+
+         D = ((zm[3] + zm[5]) / 2.0 - zm[4]) / _DX2;
+         E = ((zm[1] + zm[7]) / 2.0 - zm[4]) / _DX2;
+         F = (zm[0] - zm[2] - zm[6] + zm[8]) / _4_DX2;
+         G = (zm[5] - zm[3]) / _2DX;
+         H = (zm[7] - zm[1]) / _2DX;
+
+         Set_Parameters_Derive(x, y, D, E, F, G, H);
+      }
+   }
+
+
+   private void Do_FD_Haralick(final int x,
+                               final int y) {
+
+      final int Mtrx[][][] = {
+               { { 31, -5, -17, -5, 31 }, { -44, -62, -68, -62, -44 }, { 0, 0, 0, 0, 0 }, { 44, 62, 68, 62, 44 },
+                        { -31, 5, 17, 5, -31 } },
+               { { 31, -44, 0, 44, -31 }, { -5, -62, 0, 62, 5 }, { -17, -68, 0, 68, 17 }, { -5, -62, 0, 62, 5 },
+                        { 31, -44, 0, 44, -31 } },
+               { { 2, 2, 2, 2, 2 }, { -1, -1, -1, -1, -1 }, { -2, -2, -2, -2, -2 }, { -1, -1, -1, -1, -1 }, { 2, 2, 2, 2, 2 } },
+               { { 4, 2, 0, -2, -4 }, { 2, 1, 0, -1, -2 }, { 0, 0, 0, 0, 0 }, { -2, -1, 0, 1, 2 }, { -4, -2, 0, 2, 4 } },
+               { { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 }, { 2, -1, -2, -1, 2 } } };
+
+      final int QMtrx[] = { 4200, 4200, 700, 1000, 700 };
+
+      int i, ix, iy, n;
+      double Sum, zm[], k[];
+
+      zm = new double[25];
+      k = new double[5];
+
+      if (Get_SubMatrix5x5(x, y, zm)) {
+         for (i = 0; i < 5; i++) {
+            for (n = 0, Sum = 0.0, iy = 0; iy < 5; iy++) {
+               for (ix = 0; ix < 5; ix++, n++) {
+                  Sum += zm[n] * Mtrx[i][ix][iy];
+               }
+            }
+
+            k[i] = Sum / QMtrx[i];
+         }
+
+         Set_Parameters_Derive(x, y, k[4], k[2], k[3], k[1], k[0]);
+      }
+   }
+
+
+   // additional methods
+
+   private void Set_Parameters(final int x,
+                               final int y,
+                               final double dCurv,
+                               final double dHCurv,
+                               final double dVCurv) {
+
+      int iClass;
+
+      m_Curv.setCellValue(x, y, dCurv);
+      m_hCurv.setCellValue(x, y, dHCurv);
+      m_vCurv.setCellValue(x, y, dVCurv);
+
+
+      iClass = dHCurv < -PLAN_THRESHOLD ? 0 : (dHCurv <= PLAN_THRESHOLD ? 3 : 6);
+      iClass += dVCurv < -PLAN_THRESHOLD ? 0 : (dVCurv <= PLAN_THRESHOLD ? 1 : 2);
+
+      m_CurvClass.setCellValue(x, y, iClass);
+
+   }
+
+
+   private void Set_Parameters_Derive(final int x,
+                                      final int y,
+                                      final double D,
+                                      final double E,
+                                      final double F,
+                                      final double G,
+                                      final double H) {
+
+      double k1, k2, Curv, vCurv, hCurv;
+
+      k1 = F * G * H;
+      k2 = G * G + H * H;
+
+      if (k2 != 0) {
+         Curv = -2.0 * (E + D);
+         vCurv = -2.0 * (D * G * G + E * H * H + k1) / k2;
+         hCurv = -2.0 * (D * H * H + E * G * G - k1) / k2;
+
+      }
+      else {
+         Curv = vCurv = hCurv = 0.0;
+      }
+
+      Set_Parameters(x, y, Curv, hCurv, vCurv);
+   }
+
+
+   private void Set_Parameters_NoData(final int x,
+                                      final int y) {
+
+      m_Curv.setNoData(x, y);
+      m_hCurv.setNoData(x, y);
+      m_vCurv.setNoData(x, y);
+
+   }
+
+
+   //	---------------------------------------------------------
+   //	 Indexing of the Submatrix:
+   //
+   //	  +-------+    +-------+
+   //	  | 7 0 1 |    | 2 5 8 |
+   //	  | 6 * 2 | => | 1 4 7 |
+   //	  | 5 4 3 |    | 0 3 6 |
+   //	  +-------+    +-------+
+   //
+   //	---------------------------------------------------------
+   private boolean Get_SubMatrix3x3(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+
+      final int iSub[] = { 5, 8, 7, 6, 3, 0, 1, 2 };
+
+      int i;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         Set_Parameters_NoData(x, y);
+      }
+      else {
+         SubMatrix[4] = 0.0;
+         for (i = 0; i < 8; i++) {
+            z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z2)) {
+               SubMatrix[iSub[i]] = z2 - z;
+            }
+            else {
+               z2 = m_DEM.getCellValueAsDouble(x + m_iOffsetY[(i + 4) % 8], y + m_iOffsetY[(i + 4) % 8]);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[iSub[i]] = z - z2;
+               }
+               else {
+                  SubMatrix[iSub[i]] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+
+   private boolean Get_SubMatrix5x5(final int x,
+                                    final int y,
+                                    final double SubMatrix[]) {
+      int i, ix, iy, jx, jy;
+      double z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (!m_DEM.isNoDataValue(z)) {
+         for (i = 0, iy = y - 2; iy <= y + 2; iy++) {
+            jy = iy < 0 ? 0 : (iy >= m_DEM.getNY() ? m_DEM.getNY() - 1 : iy);
+            for (ix = x - 2; ix <= x + 2; ix++, i++) {
+               jx = ix < 0 ? 0 : (ix >= m_DEM.getNX() ? m_DEM.getNY() - 1 : ix);
+               z2 = m_DEM.getCellValueAsDouble(jx, jy);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  SubMatrix[i] = z2 - z;
+               }
+               else {
+                  SubMatrix[i] = 0.0;
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      return (false);
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/curvatures/CurvaturesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/hypsometry/HypsometryAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/hypsometry/HypsometryAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/hypsometry/HypsometryAlgorithm.java	(revision 369)
@@ -0,0 +1,132 @@
+package es.unex.sextante.morphometry.hypsometry;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class HypsometryAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   CLASS_COUNT = 100;
+
+   public static final String DEM         = "DEM";
+   public static final String RESULT      = "RESULT";
+
+   IRasterLayer               m_DEM       = null;
+   private double             _DX2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int i;
+      int A, a;
+      int iNX, iNY;
+      double z;
+      double dMin = 0, dMax = 0;
+      double dDz, dZa;
+      long Count[];
+      Object[] values;
+      final String sFields[] = { Sextante.getText("Relative_elevation"), Sextante.getText("Relative_area"),
+               Sextante.getText("Absolute_elevation"), Sextante.getText("Absolute_area") };
+      final Class iTypes[] = { Double.class, Double.class, Double.class, Double.class };
+
+      Count = new long[CLASS_COUNT + 1];
+      values = new Object[4];
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      _DX2 = m_DEM.getWindowCellSize() * m_DEM.getWindowCellSize();
+
+      A = 0;
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            z = m_DEM.getCellValueAsFloat(x, y);
+            if (!m_DEM.isNoDataValue(z)) {
+               if (A <= 0) {
+                  dMin = dMax = z;
+               }
+               else {
+                  if (dMin > z) {
+                     dMin = z;
+                  }
+                  else if (dMax < z) {
+                     dMax = z;
+                  }
+               }
+               A++;
+            }
+         }
+
+      }
+
+      if ((A > 0) && (dMin < dMax)) {
+
+         for (y = 0; y < iNY; y++) {
+            for (x = 0; x < iNX; x++) {
+               z = m_DEM.getCellValueAsFloat(x, y);
+               if (!m_DEM.isNoDataValue(z)) {
+                  i = (int) (CLASS_COUNT * (dMax - z) / (dMax - dMin));
+                  Count[i]++;
+               }
+            }
+         }
+
+         dDz = (dMax - dMin) / CLASS_COUNT;
+         a = A;
+
+         final String sTableName = Sextante.getText("Hypsometry_[") + m_DEM.getName() + "]";
+         final ITable table = getNewTable(RESULT, sTableName, iTypes, sFields);
+
+         for (i = CLASS_COUNT; i >= 0; i--) {
+            dZa = (double) a / (double) A;
+            a -= Count[i];
+
+            values[0] = new Double(100.0 * i * dDz / (dMax - dMin)); // Relative Height;
+            values[1] = new Double(100.0 * dZa); // Relative Area
+            values[2] = new Double(dMin + i * dDz); // Absolute Height
+            values[3] = new Double(a * _DX2); // Absolute Area
+            table.addRecord(values);
+
+         }
+
+
+         return !m_Task.isCanceled();
+
+      }
+      else {
+         return false;
+      }
+
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Hypsometry"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         this.setUserCanDefineAnalysisExtent(false);
+         addOutputTable(RESULT, Sextante.getText("Hypsometry"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/hypsometry/HypsometryAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/elevationReliefIndex/ElevationReliefIndexAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/elevationReliefIndex/ElevationReliefIndexAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/elevationReliefIndex/ElevationReliefIndexAlgorithm.java	(revision 369)
@@ -0,0 +1,115 @@
+package es.unex.sextante.morphometry.elevationReliefIndex;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ElevationReliefIndexAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String DEM          = "DEM";
+   public static final String RESULT       = "RESULT";
+
+   IRasterLayer               m_ERIndex;
+   IRasterLayer               m_DEM        = null;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      m_ERIndex = getNewRasterLayer(RESULT, Sextante.getText("Elevation-relief_ratio"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_ERIndex.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            calculateERIndex(x, y);
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Elevation-relief_ratio"));
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Elevation-relief_ratio"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateERIndex(final int x,
+                                 final int y) {
+
+      int i;
+      int iCells;
+      double z, dAvgZ;
+      double dMaxZ, dMinZ;
+      double dIndex;
+
+      z = m_DEM.getCellValueAsDouble(x, y);
+
+      if (m_DEM.isNoDataValue(z)) {
+         m_ERIndex.setNoData(x, y);
+      }
+      else {
+         dMaxZ = dMinZ = z;
+         dAvgZ = z;
+         iCells = 0;
+         for (i = 0; i < 8; i++) {
+            z = m_DEM.getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+            if (!m_DEM.isNoDataValue(z)) {
+               iCells++;
+               dAvgZ += z;
+               dMinZ = Math.min(dMinZ, z);
+               dMaxZ = Math.max(dMaxZ, z);
+            }
+         }
+
+         if (iCells == 0) {
+            m_ERIndex.setNoData(x, y);
+         }
+         else {
+            if (dMaxZ != dMinZ) {
+               dIndex = (dAvgZ - dMinZ) / (dMaxZ - dMinZ);
+               m_ERIndex.setCellValue(x, y, dIndex);
+            }
+            else {
+               m_ERIndex.setNoData(x, y);
+            }
+         }
+      }
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/elevationReliefIndex/ElevationReliefIndexAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/anisotropicCoefficientOfVariation/ACVAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/anisotropicCoefficientOfVariation/ACVAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/anisotropicCoefficientOfVariation/ACVAlgorithm.java	(revision 369)
@@ -0,0 +1,352 @@
+
+
+package es.unex.sextante.morphometry.anisotropicCoefficientOfVariation;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+
+public class ACVAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private double             NO_DATA;
+
+   public static final String DEM     = "DEM";
+   public static final String RESULT  = "RESULT";
+
+   IRasterLayer               m_ACV;
+   IRasterLayer               m_DEM;
+   IRasterLayer               m_DX, m_DY, m_DUp, m_DDown;
+   int                        m_iNX, m_iNY;
+
+   int                        m_iSize = 5;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_ACV = getNewRasterLayer(RESULT, Sextante.getText("Anisotropic_coefficient_of_variation"),
+               IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent extent = m_ACV.getWindowGridExtent();
+
+      m_DX = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      m_DY = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      m_DDown = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      m_DUp = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+
+      m_DEM.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      m_ACV.setNoDataValue(NO_DATA);
+
+      calculateDerivatives();
+
+      setProgressText(Sextante.getText("Calculating_coefficient") + "...");
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            m_ACV.setCellValue(x, y, getACV(x, y));
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setName(Sextante.getText("Anisotropic_coefficient_of_variation"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Anisotropic_coefficient_of_variation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateDerivatives() throws UnsupportedOutputChannelException {
+
+      int x, y;
+
+      setProgressText(Sextante.getText("Calculating_derivatives") + "...");
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            m_DX.setCellValue(x, y, getDFDX(x, y));
+            m_DY.setCellValue(x, y, getDFDY(x, y));
+            m_DDown.setCellValue(x, y, getDFDDown(x, y));
+            m_DUp.setCellValue(x, y, getDFDUp(x, y));
+         }
+      }
+      smooth(m_DX);
+      smooth(m_DY);
+      smooth(m_DDown);
+      smooth(m_DUp);
+
+   }
+
+
+   private void smooth(IRasterLayer driver) throws UnsupportedOutputChannelException {
+
+      int i, j;
+      int x, y;
+      int iValidCells;
+      double dSum;
+      double dValue;
+      final IRasterLayer temp = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, m_DEM.getWindowGridExtent());
+
+      for (y = 1; y < m_iNY - 1; y++) {
+         for (x = 1; x < m_iNX - 1; x++) {
+            dSum = 0;
+            iValidCells = 0;
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  dValue = driver.getCellValueAsDouble(x + i, y + j);
+                  if (dValue != NO_DATA) {
+                     dSum += dValue;
+                     iValidCells++;
+                  }
+               }
+            }
+            if (iValidCells != 0) {
+               temp.setCellValue(x, y, dSum / iValidCells);
+            }
+            else {
+               temp.setNoData(x, y);
+            }
+         }
+      }
+
+      driver = temp;
+
+      System.gc();
+
+   }
+
+
+   private double getACV(final int x,
+                         final int y) {
+
+      final double dX = m_DX.getCellValueAsDouble(x, y);
+      final double dY = m_DY.getCellValueAsDouble(x, y);
+      final double dUp = m_DUp.getCellValueAsDouble(x, y);
+      final double dDown = m_DDown.getCellValueAsDouble(x, y);
+
+      if ((dX == NO_DATA) || (dY == NO_DATA) || (dUp == NO_DATA) || (dDown == NO_DATA)) {
+         return NO_DATA;
+      }
+
+      final double dAvg = (dX + dY + dUp + dDown) / 4.;
+      double dDif = 0;
+      double dZ;
+
+      if ((dZ = m_DX.getCellValueAsDouble(x, y - 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DX.getCellValueAsDouble(x, y + 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DY.getCellValueAsDouble(x - 1, y)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DY.getCellValueAsDouble(x + 1, y)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DDown.getCellValueAsDouble(x - 1, y + 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+      if ((dZ = m_DDown.getCellValueAsDouble(x + 1, y - 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DUp.getCellValueAsDouble(x - 1, y - 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      if ((dZ = m_DUp.getCellValueAsDouble(x + 1, y + 1)) != NO_DATA) {
+         dDif += Math.pow(dAvg - dZ, 2.);
+      }
+      else {
+         return NO_DATA;
+      }
+
+      return Math.log(1 + Math.sqrt(dDif / 8.) / dAvg);
+
+   }
+
+
+   private double getDFDX(final int x,
+                          final int y) {
+
+      double dValue;
+      final double dValues[] = new double[4];
+
+      dValue = m_DEM.getCellValueAsDouble(x - 2, y);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[0] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x - 1, y);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[1] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 1, y);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[2] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 2, y);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[3] = dValue;
+
+      return Math.abs(dValues[0] + dValues[1] * -8 + dValues[2] * 8 + dValues[3] * -1);
+
+   }
+
+
+   private double getDFDY(final int x,
+                          final int y) {
+
+      double dValue;
+      final double dValues[] = new double[4];
+
+      dValue = m_DEM.getCellValueAsDouble(x, y - 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[0] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x, y - 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[1] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x, y + 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[2] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x, y + 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[3] = dValue;
+
+      return Math.abs(dValues[0] + dValues[1] * -8 + dValues[2] * 8 + dValues[3] * -1);
+
+   }
+
+
+   private double getDFDDown(final int x,
+                             final int y) {
+
+      double dValue;
+      final double dValues[] = new double[4];
+
+      dValue = m_DEM.getCellValueAsDouble(x - 2, y + 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[0] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x - 1, y + 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[1] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 1, y - 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[2] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 2, y - 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[3] = dValue;
+
+      return Math.abs(dValues[0] + dValues[1] * -8 + dValues[2] * 8 + dValues[3] * -1);
+
+   }
+
+
+   private double getDFDUp(final int x,
+                           final int y) {
+
+      double dValue;
+      final double dValues[] = new double[4];
+
+      dValue = m_DEM.getCellValueAsDouble(x - 2, y - 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[0] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x - 1, y - 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[1] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 1, y + 1);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[2] = dValue;
+      dValue = m_DEM.getCellValueAsDouble(x + 2, y + 2);
+      if (m_DEM.isNoDataValue(dValue)) {
+         return NO_DATA;
+      }
+      dValues[3] = dValue;
+
+      return Math.abs(dValues[0] + dValues[1] * -8 + dValues[2] * 8 + dValues[3] * -1);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/anisotropicCoefficientOfVariation/ACVAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/surfaceSpecificPoints/SurfaceSpecificPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/surfaceSpecificPoints/SurfaceSpecificPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/surfaceSpecificPoints/SurfaceSpecificPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,351 @@
+package es.unex.sextante.morphometry.surfaceSpecificPoints;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+public class SurfaceSpecificPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String METHOD       = "METHOD";
+   public static final String DEM          = "DEM";
+   public static final String THRESHOLD    = "THRESHOLD";
+   public static final String RESULT       = "RESULT";
+
+   IRasterLayer               m_DEM        = null;
+   IRasterLayer               m_Result;
+   double                     m_dThreshold;
+   int                        m_iNX, m_iNY;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_dThreshold = m_Parameters.getParameterValueAsDouble(THRESHOLD);
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Result"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      switch (iMethod) {
+         case 0:
+            doMarkHighestNB();
+            break;
+         case 1:
+            doOppositeNB();
+            break;
+         case 2:
+            doFlowDirection();
+            break;
+         case 3:
+            doPeuckerDouglas();
+            break;
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Mark_Highest_Neighbour"), Sextante.getText("Opposite_neighbours"),
+               Sextante.getText("Flow_direction"), Sextante.getText("Peucker_&_Douglas") };
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setName(Sextante.getText("Landform_classification"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Threshold__Peucker_&_Douglas"), 0.01,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void doMarkHighestNB() throws UnsupportedOutputChannelException {
+
+      int i, x, y, ix, iy, xlo, ylo, xhi, yhi;
+      double lo, hi, z;
+
+      IRasterLayer clo, chi;
+
+      clo = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Result.getWindowGridExtent());
+      chi = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Result.getWindowGridExtent());
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            lo = hi = m_DEM.getCellValueAsDouble(x, y);
+            xhi = xlo = x;
+            yhi = ylo = y;
+            for (i = 0; i < 4; i++) {
+               ix = x + m_iOffsetX[i];
+               iy = y + m_iOffsetY[i];
+               z = m_DEM.getCellValueAsDouble(ix, iy);
+               if (!m_DEM.isNoDataValue(z)) {
+                  if (z > hi) {
+                     hi = z;
+                     xhi = ix;
+                     yhi = iy;
+                  }
+                  else if (z < lo) {
+                     lo = z;
+                     xlo = ix;
+                     ylo = iy;
+                  }
+               }
+            }
+            this.setProgress(y, m_iNY);
+            clo.addToCellValue(xlo, ylo, 1);
+            chi.addToCellValue(xhi, yhi, 1);
+         }
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            if (chi.getCellValueAsByte(x, y) == 0) {
+               if (clo.getCellValueAsByte(x, y) == 0) {
+                  m_Result.setCellValue(x, y, 2);
+               }
+               else {
+                  m_Result.setCellValue(x, y, 1);
+               }
+            }
+            else if (clo.getCellValueAsByte(x, y) == 0) {
+               m_Result.setCellValue(x, y, -1);
+            }
+            else {
+               m_Result.setCellValue(x, y, 0);
+            }
+         }
+      }
+
+   }
+
+
+   private void doOppositeNB() throws UnsupportedOutputChannelException {
+
+      int i, x, y, ix, iy, jx, jy;
+      double z, iz, jz;
+
+      IRasterLayer clo, chi;
+
+      clo = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Result.getWindowGridExtent());
+      chi = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Result.getWindowGridExtent());
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_DEM.getCellValueAsDouble(x, y);
+            for (i = 0; i < 4; i++) {
+               ix = x + m_iOffsetX[i];
+               iy = y + m_iOffsetY[i];
+               iz = m_DEM.getCellValueAsDouble(ix, iy);
+               if (!m_DEM.isNoDataValue(iz)) {
+                  jx = x + m_iOffsetX[i + 4];
+                  jy = y + m_iOffsetX[i + 4];
+                  jz = m_DEM.getCellValueAsDouble(jx, jy);
+                  if (!m_DEM.isNoDataValue(jz)) {
+                     if ((iz > z) && (jz > z)) {
+                        chi.addToCellValue(x, y, 1);
+                     }
+                     else if ((iz < z) && (jz < z)) {
+                        clo.addToCellValue(x, y, 1);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            if (chi.getCellValueAsByte(x, y) != 0) {
+               if (clo.getCellValueAsByte(x, y) != 0) {
+                  m_Result.setCellValue(x, y, 5);
+               }
+               else {
+                  m_Result.setCellValue(x, y, chi.getCellValueAsByte(x, y));
+               }
+            }
+            else if (clo.getCellValueAsByte(x, y) != 0) {
+               m_Result.setCellValue(x, y, -clo.getCellValueAsByte(x, y));
+            }
+            else {
+               m_Result.setCellValue(x, y, 0);
+            }
+         }
+      }
+
+   }
+
+
+   private void doFlowDirection() {
+
+      boolean bLower;
+      int x, y, i, ix, iy, xLow = 0, yLow = 0;
+      double z, iz, zLow = 0.;
+
+      m_Result.assign(0.0);
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_DEM.getCellValueAsDouble(x, y);
+            bLower = false;
+            for (i = 0; i < 8; i++) {
+               ix = x + m_iOffsetX[i];
+               iy = y + m_iOffsetY[i];
+               iz = m_DEM.getCellValueAsDouble(ix, iy);
+               if (!m_DEM.isNoDataValue(iz)) {
+                  if (iz < z) {
+                     if (!bLower) {
+                        bLower = true;
+                        zLow = iz;
+                        xLow = ix;
+                        yLow = iy;
+                     }
+                     else if (iz < zLow) {
+                        zLow = iz;
+                        xLow = ix;
+                        yLow = iy;
+                     }
+                  }
+               }
+            }
+
+            if (bLower) {
+               m_Result.addToCellValue(xLow, yLow, 1);
+            }
+         }
+      }
+   }
+
+
+   private void doPeuckerDouglas() {
+
+      boolean wasPlus;
+      int x, y, i, ix, iy, nSgn;
+      double d, dPlus, dMinus, z, iz, alt[];
+
+      alt = new double[8];
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_DEM.getCellValueAsDouble(x, y);
+            for (i = 0; i < 8; i++) {
+               ix = x + m_iOffsetX[i];
+               iy = y + m_iOffsetY[i];
+               iz = m_DEM.getCellValueAsDouble(ix, iy);
+               if (!m_DEM.isNoDataValue(iz)) {
+                  alt[i] = iz;
+               }
+               else {
+                  alt[i] = z;
+               }
+            }
+
+            dPlus = dMinus = 0;
+            nSgn = 0;
+            wasPlus = (alt[7] - z > 0) ? true : false;
+
+            for (i = 0; i < 8; i++) {
+               d = alt[i] - z;
+               if (d > 0) {
+                  dPlus += d;
+                  if (!wasPlus) {
+                     nSgn++;
+                     wasPlus = true;
+                  }
+               }
+               else if (d < 0) {
+                  dMinus -= d;
+                  if (wasPlus) {
+                     nSgn++;
+                     wasPlus = false;
+                  }
+               }
+            }
+
+            i = 0;
+            if (dPlus == 0) {
+               i = 9;
+            }
+            else if (dMinus == 0) {
+               i = -9;
+            }
+            else if (nSgn == 4) {
+               i = 1;
+            }
+            else if (nSgn == 2) {
+               i = nSgn = 0;
+
+               if (alt[7] > z) {
+                  while (alt[i++] > z) {
+                     ;
+                  }
+                  do {
+                     nSgn++;
+                  }
+                  while (alt[i++] < z);
+               }
+               else {
+                  while (alt[i++] < z) {
+                     ;
+                  }
+                  do {
+                     nSgn++;
+                  }
+                  while (alt[i++] > z);
+               }
+
+               i = 0;
+
+               if (nSgn == 4) {
+                  if (dMinus - dPlus > m_dThreshold) {
+                     i = 2;
+                  }
+                  else if (dPlus - dMinus > m_dThreshold) {
+                     i = -2;
+                  }
+               }
+               else { // lines:
+                  if (dMinus - dPlus > 0) {
+                     i = 7;
+                  }
+                  else {
+                     // Channel
+                     i = -7;
+                  }
+               }
+            }
+
+            m_Result.setCellValue(x, y, i);
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/surfaceSpecificPoints/SurfaceSpecificPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/realArea/RealAreaAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/realArea/RealAreaAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/realArea/RealAreaAlgorithm.java	(revision 369)
@@ -0,0 +1,85 @@
+package es.unex.sextante.morphometry.realArea;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class RealAreaAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM      = "DEM";
+   public static final String REALAREA = "REALAREA";
+
+   IRasterLayer               m_RealArea;
+   IRasterLayer               m_DEM    = null;
+   private double             m_DX2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_RealArea = getNewRasterLayer(REALAREA, Sextante.getText("Real_area"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+
+      final AnalysisExtent extent = m_RealArea.getWindowGridExtent();
+
+      m_DEM.setWindowExtent(extent);
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      m_DX2 = m_DEM.getWindowCellSize() * m_DEM.getWindowCellSize();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            setRealArea(x, y);
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Geomorphometry_and_terrain_analysis"));
+      setName(Sextante.getText("Real_area"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         addOutputRasterLayer(REALAREA, Sextante.getText("Real_area"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void setRealArea(final int x,
+                            final int y) {
+
+      final double dSlope = m_DEM.getSlope(x, y);
+      double dArea;
+
+      if (!m_DEM.isNoDataValue(dSlope)) {
+         dArea = m_DX2 / Math.cos(dSlope);
+         m_RealArea.setCellValue(x, y, dArea);
+      }
+      else {
+         m_RealArea.setNoData(x, y);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/realArea/RealAreaAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FillElevationValuesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FillElevationValuesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FillElevationValuesAlgorithm.java	(revision 369)
@@ -0,0 +1,218 @@
+package es.unex.sextante.morphometry.fillElevationValues;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class FillElevationValuesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  CONTOURS_LAYER              = "CONTOURS_LAYER";
+   public static final String  CONTOURS_LAYER_FIELD        = "CONTOURS_LAYER_FIELD";
+   public static final String  RESULT                      = "RESULT";
+   public static final String  DISTANCE                    = "DISTANCE";
+   public static final String  UPHILL_LAYER                = "UPHILL_LAYER";
+   public static final String  UPHILL_LAYER_FIELD          = "UPHILL_LAYER_FIELD";
+   public static final String  UPHILL_LAYER_INTERVAL_FIELD = "UPHILL_LAYER_INTERVAL_FIELD";
+
+   private IVectorLayer        m_Contours_Layer;
+   private IVectorLayer        m_Uphill_Layer;
+   private IVectorLayer        m_Output;
+   private ArrayList<Geometry> m_Geometries;
+   private ArrayList<Double>   m_Elevations;
+   private double              m_dEquidistance;
+   private STRtree             m_Tree;
+   private BitSet              m_BitSet;
+   private int                 m_iContoursField;
+   private int                 m_iUphillField;
+   private int                 m_iUphillIntervalField;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Fill_elevation_values"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(CONTOURS_LAYER, Sextante.getText("Contour_lines"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputVectorLayer(UPHILL_LAYER, Sextante.getText("Uphill_lines"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addTableField(CONTOURS_LAYER_FIELD, Sextante.getText("Elevation_field"), CONTOURS_LAYER);
+         m_Parameters.addTableField(UPHILL_LAYER_FIELD, Sextante.getText("Elevation_field"), UPHILL_LAYER);
+         m_Parameters.addTableField(UPHILL_LAYER_INTERVAL_FIELD, Sextante.getText("Interval_field"), UPHILL_LAYER);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+
+      m_Contours_Layer = m_Parameters.getParameterValueAsVectorLayer(CONTOURS_LAYER);
+      m_Uphill_Layer = m_Parameters.getParameterValueAsVectorLayer(UPHILL_LAYER);
+      m_iContoursField = m_Parameters.getParameterValueAsInt(CONTOURS_LAYER_FIELD);
+      m_iUphillField = m_Parameters.getParameterValueAsInt(UPHILL_LAYER_FIELD);
+      m_iUphillIntervalField = m_Parameters.getParameterValueAsInt(UPHILL_LAYER_FIELD);
+
+      if (!checkFields()) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_field_types"));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, m_Contours_Layer.getName(), IVectorLayer.SHAPE_TYPE_LINE,
+               m_Contours_Layer.getFieldTypes(), m_Contours_Layer.getFieldNames());
+
+
+      iShapeCount = m_Contours_Layer.getShapesCount();
+      m_BitSet = new BitSet(iShapeCount);
+
+      m_Tree = new STRtree();
+
+      setProgressText(Sextante.getText("Reading_input_data"));
+      i = 0;
+      IFeatureIterator iter = m_Contours_Layer.iterator();
+      while (iter.hasNext() && !m_Task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Envelope envelope = geom.getEnvelopeInternal();
+         final FeatureAndIndex fai = new FeatureAndIndex(feature, i);
+         m_Tree.insert(envelope, fai);
+         if (i % 50 == 0) {
+            m_Task.setProgress(i, iShapeCount);
+         }
+         i++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      iter = m_Uphill_Layer.iterator();
+      setProgressText(Sextante.getText("computing_elevation_values"));
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         computeElevations(feature);
+      }
+      iter.close();
+
+      //		i = 0;
+      //		iter = m_Contours_Layer.iterator();
+      //		while(iter.hasNext() && !m_Task.isCanceled()){
+      //			if (!m_BitSet.get(i)){
+      //				m_Output.addFeature(iter.next());
+      //			}
+      //			i++;
+      //		}
+      //		iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean checkFields() {
+
+      final Class contoursField = m_Contours_Layer.getFieldType(m_iContoursField);
+      final Class uphillField = m_Uphill_Layer.getFieldType(m_iUphillField);
+      final Class intervalField = m_Uphill_Layer.getFieldType(m_iUphillIntervalField);
+
+      return Number.class.isAssignableFrom(contoursField) && Number.class.isAssignableFrom(uphillField)
+             && Number.class.isAssignableFrom(intervalField);
+   }
+
+
+   private void computeElevations(final IFeature feature) {
+
+      final Geometry geom = feature.getGeometry();
+      final Coordinate initPt = geom.getCoordinates()[0];
+      final Object elevation = feature.getRecord().getValue(m_iUphillField);
+      final Object interval = feature.getRecord().getValue(m_iUphillIntervalField);
+      try {
+         final String sElevation = elevation.toString();
+         double dElevation = Double.parseDouble(sElevation);
+         final String sInterval = interval.toString();
+         final double dInterval = Double.parseDouble(sInterval);
+         final Envelope envelope = geom.getEnvelopeInternal();
+         final List lines = m_Tree.query(envelope);
+         final ArrayList<FeatureAndDistance> features = new ArrayList<FeatureAndDistance>();
+         for (int i = 0; i < lines.size(); i++) {
+            final FeatureAndIndex fai = (FeatureAndIndex) lines.get(i);
+            final Geometry line = fai.feature.getGeometry();
+            m_BitSet.set(fai.index);
+            final Coordinate pt = line.intersection(geom).getCoordinate();
+            if (pt != null) {
+               final double dDist = initPt.distance(pt);
+               final FeatureAndDistance fad = new FeatureAndDistance(fai.feature, dDist);
+               features.add(fad);
+            }
+         }
+         final FeatureAndDistance[] featuresArray = features.toArray(new FeatureAndDistance[0]);
+         Arrays.sort(featuresArray);
+         for (int i = 0; i < featuresArray.length; i++, dElevation += dInterval) {
+            final Object[] record = featuresArray[i].getFeature().getRecord().getValues();
+            record[m_iContoursField] = new Double(dElevation);
+            m_Output.addFeature(featuresArray[i].getFeature().getGeometry(), record);
+         }
+
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+         return;
+      }
+
+
+   }
+
+   private class FeatureAndIndex {
+
+      public IFeature feature;
+      public int      index;
+
+
+      public FeatureAndIndex(final IFeature feature,
+                             final int index) {
+
+         this.feature = feature;
+         this.index = index;
+
+      }
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FillElevationValuesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FeatureAndDistance.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FeatureAndDistance.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FeatureAndDistance.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.morphometry.fillElevationValues;
+
+import es.unex.sextante.dataObjects.IFeature;
+
+public class FeatureAndDistance
+         implements
+            Comparable {
+
+   private final IFeature feature;
+   private final double   dDist;
+
+
+   public FeatureAndDistance(final IFeature feature,
+                             final double dDist) {
+
+      this.feature = feature;
+      this.dDist = dDist;
+
+   }
+
+
+   public double getDist() {
+
+      return dDist;
+
+   }
+
+
+   public IFeature getFeature() {
+
+      return feature;
+
+   }
+
+
+   public int compareTo(final Object ob) throws ClassCastException {
+
+      if (!(ob instanceof FeatureAndDistance)) {
+         throw new ClassCastException();
+      }
+
+      final double dValue = ((FeatureAndDistance) ob).getDist();
+      final double dDif = this.dDist - dValue;
+
+      if (dDif > 0.0) {
+         return 1;
+      }
+      else if (dDif < 0.0) {
+         return -1;
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/FeatureAndDistance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/ValueAndDistance.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/ValueAndDistance.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/ValueAndDistance.java	(revision 369)
@@ -0,0 +1,55 @@
+package es.unex.sextante.morphometry.fillElevationValues;
+
+public class ValueAndDistance
+         implements
+            Comparable {
+
+   private final double m_dValue;
+   private final double m_dDist;
+
+
+   public ValueAndDistance(final double dValue,
+                           final double dDistance) {
+
+      m_dValue = dValue;
+      m_dDist = dDistance;
+
+   }
+
+
+   public double getDist() {
+
+      return m_dDist;
+
+   }
+
+
+   public double getValue() {
+
+      return m_dValue;
+
+   }
+
+
+   public int compareTo(final Object ob) throws ClassCastException {
+
+      if (!(ob instanceof ValueAndDistance)) {
+         throw new ClassCastException();
+      }
+
+      final double dValue = ((ValueAndDistance) ob).getDist();
+      final double dDif = this.m_dDist - dValue;
+
+      if (dDif > 0.0) {
+         return 1;
+      }
+      else if (dDif < 0.0) {
+         return -1;
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/morphometry/fillElevationValues/ValueAndDistance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/fire/simulation/FireSimulationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/fire/simulation/FireSimulationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/fire/simulation/FireSimulationAlgorithm.java	(revision 369)
@@ -0,0 +1,266 @@
+package es.unex.sextante.fire.simulation;
+
+import java.util.ArrayList;
+
+import wf.rothermel.Behave;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class FireSimulationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int    NO_DATA    = -1;
+   private static final double ANGLES[][] = { { 315, 0, 45 }, { 270, 0, 90 }, { 225, 180, 135 } };
+
+   public static final String  DEM        = "DEM";
+   public static final String  MODEL      = "MODEL";
+   public static final String  INITPOINTS = "INITPOINTS";
+   public static final String  WINDSPEED  = "WINDSPEED";
+   public static final String  WINDDIR    = "WINDDIR";
+   public static final String  DEAD1      = "DEAD1";
+   public static final String  DEAD10     = "DEAD10";
+   public static final String  DEAD100    = "DEAD100";
+   public static final String  HERB       = "HERB";
+   public static final String  WOODY      = "WOODY";
+   public static final String  TIME       = "TIME";
+
+   private int                 m_iNX, m_iNY;
+   private IRasterLayer        m_Dead1, m_Dead10, m_Dead100;
+   private IRasterLayer        m_WindDir, m_WindSpeed;
+   private IRasterLayer        m_Herb, m_Woody;
+   private IRasterLayer        m_Points;
+   private IRasterLayer        m_Model;
+   private IRasterLayer        m_DEM;
+   private IRasterLayer        m_Time;
+   private IRasterLayer        m_SpreadRate;
+   private IRasterLayer        m_Dir;
+   private IRasterLayer        m_Eccentricity;
+   private ArrayList           m_CentralPoints, m_AdjPoints;
+   private Behave              m_Behave;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Fire_simulation"));
+      setGroup(Sextante.getText("Fire_modeling"));
+
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(MODEL, Sextante.getText("Fuel_model"), true);
+         m_Parameters.addInputRasterLayer(INITPOINTS, Sextante.getText("Ignition_points"), true);
+         m_Parameters.addInputRasterLayer(WINDSPEED, Sextante.getText("Wind_speed_m-s"), true);
+         m_Parameters.addInputRasterLayer(WINDDIR, Sextante.getText("Wind_direction"), true);
+         m_Parameters.addInputRasterLayer(DEAD1, Sextante.getText("Dead_fuel_moisture_1H"), true);
+         m_Parameters.addInputRasterLayer(DEAD10, Sextante.getText("Dead_fuel_moisture_10H"), true);
+         m_Parameters.addInputRasterLayer(DEAD100, Sextante.getText("Dead_fuel_moisture_100"), true);
+         m_Parameters.addInputRasterLayer(HERB, Sextante.getText("Herb_fuel_moisture"), true);
+         m_Parameters.addInputRasterLayer(WOODY, Sextante.getText("Woody_fuel_moisture"), true);
+         addOutputRasterLayer(TIME, Sextante.getText("Time"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_Behave = new Behave();
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Woody = m_Parameters.getParameterValueAsRasterLayer(WOODY);
+      m_Herb = m_Parameters.getParameterValueAsRasterLayer(HERB);
+      m_Dead1 = m_Parameters.getParameterValueAsRasterLayer(DEAD1);
+      m_Dead10 = m_Parameters.getParameterValueAsRasterLayer(DEAD10);
+      m_Dead100 = m_Parameters.getParameterValueAsRasterLayer(DEAD100);
+      m_WindSpeed = m_Parameters.getParameterValueAsRasterLayer(WINDSPEED);
+      m_WindDir = m_Parameters.getParameterValueAsRasterLayer(WINDDIR);
+      m_Model = m_Parameters.getParameterValueAsRasterLayer(MODEL);
+      m_Points = m_Parameters.getParameterValueAsRasterLayer(INITPOINTS);
+
+      m_Time = getNewRasterLayer(TIME, Sextante.getText("Time"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = m_Time.getLayerGridExtent();
+
+      m_SpreadRate = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, extent);
+      m_Eccentricity = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, extent);
+      m_Dir = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, extent);
+
+      m_DEM.setWindowExtent(extent);
+      m_Herb.setWindowExtent(extent);
+      m_Woody.setWindowExtent(extent);
+      m_Dead1.setWindowExtent(extent);
+      m_Dead10.setWindowExtent(extent);
+      m_Dead100.setWindowExtent(extent);
+      m_WindSpeed.setWindowExtent(extent);
+      m_WindDir.setWindowExtent(extent);
+      m_Model.setWindowExtent(extent);
+      m_Points.setWindowExtent(extent);
+      m_Points.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = extent.getNX();
+      m_iNY = extent.getNY();
+
+      m_Time.setNoDataValue(NO_DATA);
+      m_Time.assignNoData();
+
+      setProgressText(Sextante.getText("Calculando_velocidades_propagacion"));
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            calculateCostValues(x, y);
+            dValue = m_Points.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Points.isNoDataValue(dValue)) {
+               m_CentralPoints.add(new GridCell(x, y, 0));
+               m_Time.setCellValue(x, y, 0.0);
+            }
+         }
+
+      }
+
+      simulateFire();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateCostValues(final int x,
+                                    final int y) {
+
+      final double dDead1 = m_Dead1.getCellValueAsDouble(x, y);
+      final double dDead10 = m_Dead10.getCellValueAsDouble(x, y);
+      final double dDead100 = m_Dead100.getCellValueAsDouble(x, y);
+      final double dWoody = m_Woody.getCellValueAsDouble(x, y);
+      final double dHerb = m_Herb.getCellValueAsDouble(x, y);
+      final double dWindSpeed = m_WindSpeed.getCellValueAsDouble(x, y);
+      final double dWindDir = m_WindDir.getCellValueAsDouble(x, y);
+      final double dAspect = m_DEM.getAspect(x, y);
+      final double dSlope = m_DEM.getSlope(x, y);
+      final int iModel = m_Model.getCellValueAsInt(x, y);
+
+      if (m_Dead1.isNoDataValue(dDead1) || m_Dead10.isNoDataValue(dDead10) || m_Dead100.isNoDataValue(dDead100)
+          || m_Herb.isNoDataValue(dHerb) || m_Woody.isNoDataValue(dWoody) || m_WindSpeed.isNoDataValue(dWindSpeed)
+          || m_WindDir.isNoDataValue(dWindDir) || m_Model.isNoDataValue(iModel) || m_DEM.isNoDataValue(dAspect)
+          || m_DEM.isNoDataValue(dSlope)) {}
+      else {
+         if (m_Behave.setFuelModel(iModel)) {
+            m_Behave.setAspect(Math.toDegrees(dAspect));
+            m_Behave.setSlope(Math.toDegrees(dSlope));
+            m_Behave.setWindSpeed(dWindSpeed);
+            m_Behave.setWindDir(dWindDir);
+            m_Behave.setWindSpeed(dWindSpeed);
+            m_Behave.setDeadMoisture1(dDead1);
+            m_Behave.setDeadMoisture10(dDead10);
+            m_Behave.setDeadMoisture100(dDead100);
+            m_Behave.setWoodyMoisture(dWoody);
+            m_Behave.setHerbMoisture(dHerb);
+            m_Behave.calc();
+            m_SpreadRate.setCellValue(x, y, m_Behave.ros);
+            m_Dir.setCellValue(x, y, m_Behave.sdr);
+            m_Eccentricity.setCellValue(x, y, m_Behave.ecc);
+         }
+         else {
+            m_SpreadRate.setNoData(x, y);
+            m_Eccentricity.setNoData(x, y);
+            m_Dir.setNoData(x, y);
+         }
+      }
+
+   }
+
+
+   private void simulateFire() {
+
+      int i, j;
+      int iPt;
+      int x, y, x2, y2;
+      double dAccTime;
+      double dSpeed1, dSpeed2;
+      double dPrevTime;
+      GridCell cell;
+      final double dCellSize = m_Time.getWindowCellSize();
+
+      final double dDist[][] = new double[3][3];
+
+      for (i = -1; i < 2; i++) {
+         for (j = -1; j < 2; j++) {
+            dDist[i + 1][j + 1] = Math.sqrt(i * i + j * j);
+         }
+      }
+
+      setProgressText(Sextante.getText("Simulando_propagacion_fuego"));
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            dSpeed1 = m_SpreadRate.getCellValueAsDouble(x, y);
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  dSpeed2 = m_SpreadRate.getCellValueAsDouble(x2, y2);
+                  if (!m_SpreadRate.isNoDataValue(dSpeed1) && !m_SpreadRate.isNoDataValue(dSpeed2)) {
+                     dAccTime = m_Time.getCellValueAsDouble(x, y);
+                     dAccTime += ((dCellSize * dDist[i + 1][j + 1]) / (getSpreadRateAt(x, y, i, j)));
+                     dPrevTime = m_Time.getCellValueAsDouble(x2, y2);
+                     if (m_Time.isNoDataValue(dPrevTime) || (dPrevTime > dAccTime)) {
+                        m_Time.setCellValue(x2, y2, dAccTime);
+                        m_AdjPoints.add(new GridCell(x2, y2, 0));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         setProgressText(Integer.toString(m_CentralPoints.size()));
+
+      }
+   }
+
+
+   private double getSpreadRateAt(final int x,
+                                  final int y,
+                                  final int iH,
+                                  final int iV) {
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+      final double dAngle1 = m_Dir.getCellValueAsDouble(x, y);
+      final double dAngle2 = m_Dir.getCellValueAsDouble(x2, y2);
+      final double dEcc1 = m_Eccentricity.getCellValueAsDouble(x, y);
+      final double dEcc2 = m_Eccentricity.getCellValueAsDouble(x2, y2);
+      final double dRos1 = m_SpreadRate.getCellValueAsDouble(x, y);
+      final double dRos2 = m_SpreadRate.getCellValueAsDouble(x2, y2);
+
+      final double dCost1 = Behave.getRosInDir(dRos1, dAngle1, dAngle, dEcc1) / 2.;
+      final double dCost2 = Behave.getRosInDir(dRos2, dAngle2, dAngle, dEcc2) / 2.;
+
+      return dCost1 + dCost2;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/fire/simulation/FireSimulationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/erosionDilation/ErosionDilationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/erosionDilation/ErosionDilationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/erosionDilation/ErosionDilationAlgorithm.java	(revision 369)
@@ -0,0 +1,155 @@
+package es.unex.sextante.imageAnalysis.erosionDilation;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ErosionDilationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final int    ERODE     = 0;
+   public static final int    DILATE    = 1;
+
+   public static final String LAYER     = "LAYER";
+   public static final String OPERATION = "OPERATION";
+   public static final String RADIUS    = "RADIUS";
+   public static final String RESULT    = "RESULT";
+
+   protected final byte       NO_DATA   = 0;
+
+   private int                m_iRadius;
+   private boolean            m_bIsValidCell[][];
+   private boolean            m_bIsForegroundCell[][];
+   private IRasterLayer       m_Image;
+   private int                m_iOperationType;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Erosion"), Sextante.getText("Dilation") };
+
+      setUserCanDefineAnalysisExtent(false);
+      setName(Sextante.getText("Erosion-Dilation"));
+      setGroup(Sextante.getText("Image_processing"));
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Image"), true);
+         m_Parameters.addSelection(OPERATION, Sextante.getText("Operation"), sMethod);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 1, 20);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iValidCells = 0;
+
+      m_iRadius = m_Parameters.getParameterValueAsInt(RADIUS);
+      m_iOperationType = m_Parameters.getParameterValueAsInt(OPERATION);
+      m_Image = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_Image.setFullExtent();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_BYTE,
+               m_Image.getWindowGridExtent());
+
+      result.setNoDataValue(NO_DATA);
+      result.assignNoData();
+
+      iNX = m_Image.getNX();
+      iNY = m_Image.getNY();
+
+      m_bIsValidCell = new boolean[2 * m_iRadius + 1][2 * m_iRadius + 1];
+      m_bIsForegroundCell = new boolean[2 * m_iRadius + 1][2 * m_iRadius + 1];
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            final double dDist = Math.sqrt(x * x + y * y);
+            if (dDist <= m_iRadius) {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = true;
+               iValidCells++;
+            }
+            else {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = false;
+            }
+         }
+      }
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            setNeighborhoodValues(x, y);
+            result.setCellValue(x, y, operate());
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private byte operate() {
+
+      switch (m_iOperationType) {
+         case ERODE:
+         default:
+            for (int i = 0; i < m_bIsValidCell.length; i++) {
+               for (int j = 0; j < m_bIsValidCell[0].length; j++) {
+                  if ((m_bIsValidCell[i][j] == true) && (m_bIsForegroundCell[i][j] == false)) {
+                     return NO_DATA;
+                  }
+               }
+            }
+            return 1;
+         case DILATE:
+            for (int i = 0; i < m_bIsValidCell.length; i++) {
+               for (int j = 0; j < m_bIsValidCell[0].length; j++) {
+                  if ((m_bIsValidCell[i][j] == true) && (m_bIsForegroundCell[i][j] == true)) {
+                     return 1;
+                  }
+               }
+            }
+            return NO_DATA;
+      }
+   }
+
+
+   private void setNeighborhoodValues(final int iX,
+                                      final int iY) {
+
+      int x, y;
+      int iCell = 0;
+      double dValue;
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            if (m_bIsValidCell[x + m_iRadius][y + m_iRadius]) {
+               dValue = m_Image.getCellValueAsDouble(iX + x, iY + y);
+               if (!m_Image.isNoDataValue(dValue) && (dValue != 0)) {
+                  m_bIsForegroundCell[x + m_iRadius][y + m_iRadius] = true;
+               }
+               else {
+                  m_bIsForegroundCell[x + m_iRadius][y + m_iRadius] = false;
+               }
+               iCell++;
+            }
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/erosionDilation/ErosionDilationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrate/CalibrateAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrate/CalibrateAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrate/CalibrateAlgorithm.java	(revision 369)
@@ -0,0 +1,113 @@
+package es.unex.sextante.imageAnalysis.calibrate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CalibrateAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String INPUT      = "INPUT";
+   private static final String METHOD     = "METHOD";
+   private static final String STDDEV     = "STDDEV";
+   private static final String MEAN       = "MEAN";
+   private static final String GAIN       = "GAIN";
+   private static final String OFFSET     = "OFFSET";
+   private static final String CALIBRATED = "CALIBRATED";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Average_and_standard_deviation"), Sextante.getText("Gain_and_offset") };
+
+      setName(Sextante.getText("Calibrate_an_image"));
+      setGroup(Sextante.getText("Image_processing"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Image_to_calibrate"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Resulting_standard_deviation"), 1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MEAN, Sextante.getText("Resulting_average"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(GAIN, Sextante.getText("Gain"), 1, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(OFFSET, Sextante.getText("Offset"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(CALIBRATED, Sextante.getText("Calibrated_image"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dCellValue;
+      double dOutput;
+      double dMeanIn, dStdDevIn;
+      IRasterLayer input;
+      IRasterLayer output;
+
+      input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final double dMean = m_Parameters.getParameterValueAsDouble(MEAN);
+      final double dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+      final double dGain = m_Parameters.getParameterValueAsDouble(GAIN);
+      final double dOffset = m_Parameters.getParameterValueAsDouble(OFFSET);
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+
+      input.setFullExtent();
+
+      output = getNewRasterLayer(CALIBRATED, Sextante.getText("Calibrated_image"), input.getDataType(),
+               input.getWindowGridExtent());
+
+      iNX = input.getNX();
+      iNY = input.getNY();
+
+      if (iMethod == 0) { //mean and stddev
+         dMeanIn = input.getMeanValue();
+         dStdDevIn = Math.sqrt(input.getVariance());
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dCellValue = input.getCellValueAsDouble(x, y);
+               if (input.isNoDataValue(dCellValue)) {
+                  output.setNoData(x, y);
+               }
+               else {
+                  dOutput = (((dCellValue - dMeanIn) / dStdDevIn) * dStdDev) + dMean;
+                  output.setCellValue(x, y, dOutput);
+               }
+            }
+
+         }
+      }
+      else { // gain and offset
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dCellValue = input.getCellValueAsDouble(x, y);
+               if (input.isNoDataValue(dCellValue)) {
+                  output.setNoData(x, y);
+               }
+               else {
+                  output.setCellValue(x, y, dGain * dCellValue + dOffset);
+               }
+            }
+
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrate/CalibrateAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrateRegression/CalibrateRegressionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrateRegression/CalibrateRegressionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrateRegression/CalibrateRegressionAlgorithm.java	(revision 369)
@@ -0,0 +1,92 @@
+package es.unex.sextante.imageAnalysis.calibrateRegression;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+
+public class CalibrateRegressionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String CALIBRATED = "CALIBRATED";
+   public static final String INPUT      = "INPUT";
+   public static final String REF        = "REF";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Calibrate_an_image__regression"));
+      setUserCanDefineAnalysisExtent(false);
+      setGroup(Sextante.getText("Image_processing"));
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Image_to_calibrate"), true);
+         m_Parameters.addInputRasterLayer(REF, Sextante.getText("Reference_image"), false);
+         addOutputRasterLayer(CALIBRATED, Sextante.getText("Calibrated_image"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dCellValue, dCellValue2;
+      final Regression regression = new Regression();
+      IRasterLayer input, ref;
+      IRasterLayer output;
+
+      input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      ref = m_Parameters.getParameterValueAsRasterLayer(REF);
+      input.setFullExtent();
+      ref.setWindowExtent(input.getWindowGridExtent());
+      output = getNewRasterLayer(CALIBRATED, Sextante.getText("Calibrated_image"), input.getDataType(),
+               input.getWindowGridExtent());
+      if ((ref.getDataType() == IRasterLayer.RASTER_DATA_TYPE_INT) || (ref.getDataType() == IRasterLayer.RASTER_DATA_TYPE_SHORT)) {
+         ref.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      }
+
+      iNX = input.getNX();
+      iNY = input.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dCellValue = input.getCellValueAsDouble(x, y);
+            dCellValue2 = ref.getCellValueAsDouble(x, y);
+            if (!input.isNoDataValue(dCellValue) && !ref.isNoDataValue(dCellValue2)) {
+               regression.addValue(dCellValue, dCellValue2);
+            }
+         }
+
+      }
+
+      regression.calculate();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dCellValue = input.getCellValueAsDouble(x, y);
+            if (input.isNoDataValue(dCellValue)) {
+               output.setNoData(x, y);
+            }
+            else {
+               output.setCellValue(x, y, regression.getY(dCellValue));
+            }
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/calibrateRegression/CalibrateRegressionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/contrastStretching/ContrastStretchingAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/contrastStretching/ContrastStretchingAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/contrastStretching/ContrastStretchingAlgorithm.java	(revision 369)
@@ -0,0 +1,96 @@
+package es.unex.sextante.imageAnalysis.contrastStretching;
+
+import java.awt.image.DataBuffer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.imageAnalysis.pixelOpsBase.PixelOpsBaseAlgorithm;
+
+
+public class ContrastStretchingAlgorithm
+         extends
+            PixelOpsBaseAlgorithm {
+
+   public static final String LOWER = "LOWER";
+   public static final String UPPER = "UPPER";
+
+   private int                m_iUpper, m_iLower;
+   private int[]              m_Histogram;
+   private int                m_iSize;
+   private double             m_dUpper, m_dLower;
+   private double             m_dRange;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName(Sextante.getText("Contrast_stretching"));
+
+      try {
+         m_Parameters.addNumericalValue(LOWER, Sextante.getText("Lower_percentile"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 0, 0, 99);
+         m_Parameters.addNumericalValue(UPPER, Sextante.getText("Upper_percentile"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 100, 1, 100);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+
+      m_Histogram = m_Image.getAccumulatedHistogram();
+      final double dMin = m_dLower = m_Image.getMinValue();
+      final double dMax = m_dUpper = m_Image.getMaxValue();
+      final double dRange = dMax - dMin;
+      m_iLower = m_Parameters.getParameterValueAsInt(LOWER);
+      m_iUpper = m_Parameters.getParameterValueAsInt(UPPER);
+      if (m_iLower > m_iUpper) {
+         final int iSwap = m_iUpper;
+         m_iUpper = m_iLower;
+         m_iLower = iSwap;
+      }
+      m_iSize = (int) (Math.pow(2., DataBuffer.getDataTypeSize(m_Image.getDataType())) / 2.) - 1;
+      m_iLower = (int) (m_Histogram[m_Histogram.length - 1] * (double) m_iLower / 100.);
+      m_iUpper = (int) (m_Histogram[m_Histogram.length - 1] * (double) m_iUpper / 100.);
+      for (int i = 0; i < m_Histogram.length - 1; i++) {
+         if ((m_Histogram[i] < m_iLower) && (m_Histogram[i + 1] > m_iLower)) {
+            m_dLower = dMin + (i + 1) * dRange / m_iSize;
+         }
+         if ((m_Histogram[i] < m_iUpper) && (m_Histogram[i + 1] > m_iUpper)) {
+            m_dUpper = dMin + (i + 1) * dRange / m_iSize;
+         }
+      }
+      m_dRange = m_dUpper - m_dLower;
+
+   }
+
+
+   @Override
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final double dValue = m_Image.getCellValueAsDouble(x, y);
+      double dRet = (dValue - m_dLower) / m_dRange * m_iSize;
+
+      if (dRet > m_iSize) {
+         dRet = m_iSize;
+      }
+      if (dRet < 0) {
+         dRet = 0;
+      }
+
+      return dRet;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/contrastStretching/ContrastStretchingAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/Tree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/Tree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/Tree.java	(revision 369)
@@ -0,0 +1,25 @@
+package es.unex.sextante.imageAnalysis.vectorizeTrees;
+
+import java.awt.geom.Point2D;
+
+public class Tree {
+
+   Point2D center;
+   double  dRadius;
+   double  dArea;
+   double  dPerimeter;
+
+
+   public double getAreaPerimeterRatio() {
+
+      return dArea / dPerimeter;
+   }
+
+
+   public double getRadius() {
+
+      return Math.sqrt(dArea / Math.PI);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/Tree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/VectorizeTreesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/VectorizeTreesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/VectorizeTreesAlgorithm.java	(revision 369)
@@ -0,0 +1,508 @@
+package es.unex.sextante.imageAnalysis.vectorizeTrees;
+
+import java.awt.Point;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class VectorizeTreesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[]       = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]       = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String INPUT              = "INPUT";
+   public static final String POLYGONS           = "POLYGONS";
+   public static final String TOLERANCE_SPECTRAL = "TOLERANCE_SPECTRAL";
+   public static final String TOLERANCE_SIZE     = "TOLERANCE_SIZE";
+   public static final String MINSIZE            = "MINSIZE";
+   public static final String MAXSIZE            = "MAXSIZE";
+   public static final String TREES              = "TREES";
+
+   private static final int   ANALIZED           = 2;
+
+   private int                m_iMinX, m_iMinY;
+   private IRasterLayer[]     m_Window;
+   private IRasterLayer       m_BinaryImage;
+   private ArrayList          m_Bands;
+   private IVectorLayer       m_Polygons;
+   private ArrayList          m_Stats;
+   private SimpleStats        m_SizeStats;
+   private IVectorLayer       m_Trees;
+   private ArrayList          m_TreesArray;
+   private double             m_dTolerance;
+   private double             m_dToleranceSize;
+   private double             m_dMinSize;
+   private double             m_dMaxSize;
+   private GeometryFactory    m_GeometryFactory;
+   private int                m_iBand[];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Detect_and_vectorize_individual_trees"));
+      setGroup(Sextante.getText("Image_processing"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Bands"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Sample_trees"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addNumericalValue(TOLERANCE_SPECTRAL, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(TOLERANCE_SIZE, Sextante.getText("Tolerance_[size]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         //			m_Parameters.addNumericalValue(MINSIZE,
+         //				    						Sextante.getText( "Tamano_min"),
+         //				    						AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+         //				    						0,0, Double.MAX_VALUE);
+         //			m_Parameters.addNumericalValue(MAXSIZE,
+         //											Sextante.getText( "Tamano_max"),
+         //											AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+         //											100,0, Double.MAX_VALUE);
+         addOutputVectorLayer(TREES, Sextante.getText("Trees"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      m_GeometryFactory = new GeometryFactory();
+
+      m_Bands = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_Polygons = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+      m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE_SPECTRAL);
+      m_dToleranceSize = m_Parameters.getParameterValueAsDouble(TOLERANCE_SIZE);
+      //		m_dMinSize = m_Parameters.getParameterValueAsDouble(MINSIZE);
+      //		m_dMaxSize = m_Parameters.getParameterValueAsDouble(MAXSIZE);
+
+      m_TreesArray = new ArrayList();
+
+      m_Trees = getNewVectorLayer(TREES, Sextante.getText("Trees"), IVectorLayer.SHAPE_TYPE_POINT, new Class[] { Integer.class,
+               Double.class, Double.class },
+               new String[] { "ID", Sextante.getText("Superficie"), Sextante.getText("coef_forma") });
+
+      m_SizeStats = new SimpleStats();
+
+      getClassInformation();
+
+      m_BinaryImage = this.getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_AnalysisExtent, 1);
+      m_BinaryImage.setNoDataValue(0.);
+
+      for (i = 0; i < m_Window.length; i++) {
+         m_Window[i].setWindowExtent(m_AnalysisExtent);
+      }
+
+      doParalellpiped();
+      detectAndVectorizeTrees();
+
+      //addOutputObject("out", "out", null, m_BinaryImage);
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void detectAndVectorizeTrees() {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+
+      iNX = m_BinaryImage.getWindowGridExtent().getNX();
+      iNY = m_BinaryImage.getWindowGridExtent().getNY();
+
+      setProgressText(Sextante.getText("Vectorizing"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_BinaryImage.getCellValueAsDouble(x, y);
+            if (!m_BinaryImage.isNoDataValue(dValue) && (dValue != ANALIZED)) {
+               detectTree(x, y);
+            }
+         }
+      }
+
+      vectorize();
+
+   }
+
+
+   private void detectTree(int x,
+                           int y) {
+
+      int x2, y2;
+      int iPt;
+      int n;
+      int iCells = 0;
+      int xMax = Integer.MIN_VALUE;
+      int yMax = Integer.MIN_VALUE;
+      int xMin = Integer.MAX_VALUE;
+      int yMin = Integer.MAX_VALUE;
+      double xCenter, yCenter;
+      double dValue;
+      ArrayList centralPoints = new ArrayList();
+      ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      xMin = Math.min(xMin, x);
+      yMin = Math.min(yMin, y);
+      xMax = Math.max(xMax, x);
+      yMax = Math.max(yMax, y);
+      iCells++;
+
+      centralPoints.add(new Point(x, y));
+      //m_BinaryImage.setNoData(x,y);
+      m_BinaryImage.setCellValue(x, y, ANALIZED);
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            for (n = 0; n < 8; n++) {
+               x2 = x + m_iOffsetX[n];
+               y2 = y + m_iOffsetY[n];
+               dValue = m_BinaryImage.getCellValueAsDouble(x2, y2);
+               if (!m_BinaryImage.isNoDataValue(dValue) && (dValue != ANALIZED)) {
+                  //m_BinaryImage.setNoData(x2,y2);
+                  m_BinaryImage.setCellValue(x2, y2, ANALIZED);
+                  adjPoints.add(new Point(x2, y2));
+                  xMin = Math.min(xMin, x2);
+                  yMin = Math.min(yMin, y2);
+                  xMax = Math.max(xMax, x2);
+                  yMax = Math.max(yMax, y2);
+                  iCells++;
+               }
+            }
+         }
+
+         centralPoints = adjPoints;
+         adjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+
+      if (Math.abs(iCells - m_SizeStats.getMean()) < m_SizeStats.getStdDev() * m_dToleranceSize) {
+         final Tree tree = new Tree();
+         final GridCell cellMin = new GridCell(xMin, yMin, 0);
+         final GridCell cellMax = new GridCell(xMax, yMax, 0);
+         final Point2D ptMin = m_AnalysisExtent.getWorldCoordsFromGridCoords(cellMin);
+         final Point2D ptMax = m_AnalysisExtent.getWorldCoordsFromGridCoords(cellMax);
+         xCenter = (ptMax.getX() + ptMin.getX()) / 2.;
+         yCenter = (ptMax.getY() + ptMin.getY()) / 2.;
+
+         tree.center = new Point2D.Double(xCenter, yCenter);
+         tree.dArea = iCells;
+         tree.dPerimeter = ((xMax - xMin + 1) * (yMax - yMin + 1));
+         m_TreesArray.add(tree);
+      }
+
+   }
+
+
+   private void vectorize() {
+
+      int iTree = 1;
+      Tree tree;
+
+      for (int i = 0; i < m_TreesArray.size(); i++) {
+         tree = (Tree) m_TreesArray.get(i);
+         final Object[] value = new Object[3];
+         value[0] = new Integer(iTree);
+         value[1] = new Double(tree.dArea);
+         value[2] = new Double(tree.getAreaPerimeterRatio());
+         final com.vividsolutions.jts.geom.Point pt = m_GeometryFactory.createPoint(new Coordinate(tree.center.getX(),
+                  tree.center.getY()));
+         m_Trees.addFeature(pt, value);
+         iTree++;
+      }
+
+   }
+
+
+   private void getClassInformation() {
+
+      int i;
+      final RasterLayerAndBand band;
+      m_Stats = new ArrayList();
+
+      m_Window = new IRasterLayer[m_Bands.size()];
+      m_iBand = new int[m_Bands.size()];
+      for (i = 0; i < m_Bands.size(); i++) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_Bands.get(i);
+         m_iBand[i] = rab.getBand();
+         m_Window[i] = rab.getRasterLayer();
+         final AnalysisExtent extent = getAdjustedGridExtent(i);
+         m_Stats.add(new SimpleStats());
+         m_Window[i].setWindowExtent(extent);
+      }
+
+      setProgressText(Sextante.getText("Calculating_spectral_signatures"));
+      i = 0;
+      final int iShapeCount = m_Polygons.getShapesCount();
+      final IFeatureIterator featureIter = m_Polygons.iterator();
+      while (featureIter.hasNext() && setProgress(i, iShapeCount)) {
+         IFeature feature;
+         try {
+            feature = featureIter.next();
+            final Geometry geometry = feature.getGeometry();
+            doPolygon(geometry);
+         }
+         catch (final IteratorException e) {
+            //we ignore wrong features
+         }
+
+      }
+      featureIter.close();
+
+   }
+
+
+   private void doPolygon(final Geometry geom) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part);
+      }
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int iNX, iNY;
+      int i;
+      int x, y, ix, xStart, xStop;
+      int iSize = 0;
+      int iPoint;
+      double yPos;
+      double dValue;
+      AnalysisExtent ge;
+      SimpleStats substats;
+      Coordinate pLeft, pRight, pa, pb, p;
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (i = 0; i < m_Window.length; i++) {
+         p = new Coordinate();
+         substats = (SimpleStats) m_Stats.get(i);
+         ge = m_Window[i].getWindowGridExtent();
+         iNX = ge.getNX();
+         iNY = ge.getNY();
+         bCrossing = new boolean[iNX];
+
+         xStart = (int) ((extent.getMinX() - ge.getXMin()) / ge.getCellSize()) - 1;
+         if (xStart < 0) {
+            xStart = 0;
+         }
+
+         xStop = (int) ((extent.getMaxX() - ge.getXMin()) / ge.getCellSize()) + 1;
+         if (xStop >= iNX) {
+            xStop = iNX - 1;
+         }
+
+         for (y = 0, yPos = ge.getYMax(); y < iNY; y++, yPos -= ge.getCellSize()) {
+            if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+               Arrays.fill(bCrossing, false);
+               pLeft = new Coordinate(ge.getXMin() - 1.0, yPos);
+               pRight = new Coordinate(ge.getXMax() + 1.0, yPos);
+
+               pb = points[points.length - 1];
+
+               for (iPoint = 0; iPoint < points.length; iPoint++) {
+                  pa = pb;
+                  pb = points[iPoint];
+
+                  if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                     getCrossing(p, pa, pb, pLeft, pRight);
+
+                     ix = (int) ((p.x - ge.getXMin()) / ge.getCellSize() + 1.0);
+
+                     if (ix < 0) {
+                        ix = 0;
+                     }
+                     else if (ix >= iNX) {
+                        ix = iNX - 1;
+                     }
+
+                     bCrossing[ix] = !bCrossing[ix];
+                  }
+               }
+
+               for (x = xStart, bFill = false; x <= xStop; x++) {
+                  if (bCrossing[x]) {
+                     bFill = !bFill;
+                  }
+                  if (bFill) {
+                     iSize++;
+                     dValue = m_Window[i].getCellValueAsDouble(x /*+ m_iMinX - 1*/, y /*+ m_iMinY - 1*/, m_iBand[i]);
+                     if (!m_Window[i].isNoDataValue(dValue)) {
+                        substats.addValue(dValue);
+                     }
+                  }
+               }
+            }
+         }
+
+         if (i == 0) {
+            m_SizeStats.addValue(iSize);
+         }
+      }
+
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+
+   }
+
+
+   private AnalysisExtent getAdjustedGridExtent(final int iLayer) {
+
+      double iMaxX, iMaxY;
+      double dMinX, dMinY;
+      double dMinX2, dMinY2, dMaxX2, dMaxY2;
+      double dCellSize;
+      final AnalysisExtent ge = new AnalysisExtent();
+
+      final Rectangle2D rect = m_Polygons.getFullExtent();
+      dMinX = m_Window[iLayer].getLayerGridExtent().getXMin();
+      dMinY = m_Window[iLayer].getLayerGridExtent().getYMin();
+      dCellSize = m_Window[iLayer].getLayerGridExtent().getCellSize();
+
+      m_iMinX = (int) Math.floor((rect.getMinX() - dMinX) / dCellSize);
+      iMaxX = Math.ceil((rect.getMaxX() - dMinX) / dCellSize);
+      m_iMinY = (int) Math.floor((rect.getMinY() - dMinY) / dCellSize);
+      iMaxY = Math.ceil((rect.getMaxY() - dMinY) / dCellSize);
+
+      dMinX2 = dMinX + m_iMinX * dCellSize;
+      dMinY2 = dMinY + m_iMinY * dCellSize;
+      dMaxX2 = dMinX + iMaxX * dCellSize;
+      dMaxY2 = dMinY + iMaxY * dCellSize;
+
+      ge.setCellSize(dCellSize);
+      ge.setXRange(dMinX2, dMaxX2, true);
+      ge.setYRange(dMinY2, dMaxY2, true);
+
+      return ge;
+
+   }
+
+
+   private boolean doParalellpiped() {
+
+      boolean bIsInParalellpiped;
+      int iNX, iNY;
+      int x, y;
+      int iGrid;
+      final double dMean[] = new double[m_Window.length];
+      final double dStdDev[] = new double[m_Window.length];
+      double dValue;
+      SimpleStats substats;
+
+      iNX = m_BinaryImage.getWindowGridExtent().getNX();
+      iNY = m_BinaryImage.getWindowGridExtent().getNY();
+
+      for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+         substats = ((SimpleStats) m_Stats.get(iGrid));
+         dMean[iGrid] = substats.getMean();
+         dStdDev[iGrid] = Math.sqrt(substats.getVariance());
+      }
+
+      setProgressText(Sextante.getText("Classifying"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            bIsInParalellpiped = true;
+            for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+               dValue = m_Window[iGrid].getCellValueAsDouble(x, y, m_iBand[iGrid]);
+               if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                  if (Math.abs(dValue - dMean[iGrid]) > dStdDev[iGrid] * m_dTolerance) {
+                     bIsInParalellpiped = false;
+                     break;
+                  }
+               }
+               else {
+                  bIsInParalellpiped = false;
+                  break;
+               }
+            }
+
+            if (bIsInParalellpiped) {
+               m_BinaryImage.setCellValue(x, y, 1);
+            }
+            else {
+               m_BinaryImage.setNoData(x, y);
+            }
+         }
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/vectorizeTrees/VectorizeTreesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/pixelOpsBase/PixelOpsBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/pixelOpsBase/PixelOpsBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/pixelOpsBase/PixelOpsBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,78 @@
+package es.unex.sextante.imageAnalysis.pixelOpsBase;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public abstract class PixelOpsBaseAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String IMAGE  = "IMAGE";
+
+   protected IRasterLayer     m_Image;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Image_processing"));
+
+      try {
+         m_Parameters.addInputRasterLayer(IMAGE, Sextante.getText("Image"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+
+      setValues();
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("Result"), m_Image.getDataType());
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      setProgressText(Sextante.getText("Processing"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_Image.getCellValueAsDouble(x, y);
+            if (!m_Image.isNoDataValue(dValue)) {
+               result.setCellValue(x, y, getValueAt(x, y));
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      m_Image = m_Parameters.getParameterValueAsRasterLayer(IMAGE);
+      m_Image.setFullExtent();
+
+   }
+
+
+   protected abstract double getValueAt(int x,
+                                        int y);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/pixelOpsBase/PixelOpsBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/thinning/ThinningAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/thinning/ThinningAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/thinning/ThinningAlgorithm.java	(revision 369)
@@ -0,0 +1,200 @@
+package es.unex.sextante.imageAnalysis.thinning;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ThinningAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int   m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1, 0 };
+   private final static int   m_iOffsetY[] = { -1, -1, 0, 1, 1, 1, 0, -1, -1 };
+
+   public static final String LAYER        = "LAYER";
+   public static final String RESULT       = "RESULT";
+
+   protected final byte       NO_DATA      = 0;
+
+   private IRasterLayer       m_Window;
+   private IRasterLayer       m_Result;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(false);
+      setName(Sextante.getText("Thinning"));
+      setGroup(Sextante.getText("Image_processing"));
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Image"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Thinned_image"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iIteration = 1;
+      boolean bFoundCell;
+      double dValue;
+      final ArrayList marked = new ArrayList();
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_Window.setFullExtent();
+
+      m_Result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Window.getWindowGridExtent());
+
+      m_Result.setNoDataValue(NO_DATA);
+      m_Result.assign(1);
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (m_Window.isNoDataValue(dValue) || (dValue == 0)) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               m_Result.setCellValue(x, y, 1);
+            }
+         }
+      }
+
+      do {
+         bFoundCell = false;
+         setProgressText(Sextante.getText("Iteration") + " " + Integer.toString(iIteration++));
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               if (m_Result.getCellValueAsByte(x, y) == 1) {
+                  if (applyFirstCondition(x, y)) {
+                     marked.add(new Point(x, y));
+                     bFoundCell = true;
+                  }
+               }
+            }
+         }
+
+         if (bFoundCell) {
+            for (int i = 0; i < marked.size(); i++) {
+               final Point pt = (Point) marked.get(i);
+               m_Result.setNoData(pt.x, pt.y);
+            }
+            marked.clear();
+         }
+         else {
+            break;
+         }
+
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               if (m_Result.getCellValueAsByte(x, y) == 1) {
+                  if (applySecondCondition(x, y)) {
+                     marked.add(new Point(x, y));
+                     bFoundCell = true;
+                  }
+               }
+            }
+         }
+
+         for (int i = 0; i < marked.size(); i++) {
+            final Point pt = (Point) marked.get(i);
+            m_Result.setNoData(pt.x, pt.y);
+         }
+         marked.clear();
+
+      }
+      while (bFoundCell && !m_Task.isCanceled() && (iIteration < 100));
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean applyFirstCondition(final int x,
+                                       final int y) {
+
+      int iCount = 0;
+      int iChanges = 0;
+      byte byValue;
+      byte byPrev = 1;
+      double pw, pe, ps, pn;
+
+      for (int i = 0; i < 9; i++) {
+         byValue = m_Result.getCellValueAsByte(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+         if (byValue == 1) {
+            iCount++;
+            if (byPrev == 0) {
+               iChanges++;
+            }
+         }
+         byPrev = byValue;
+      }
+
+      pn = m_Result.getCellValueAsByte(x + m_iOffsetX[0], y + m_iOffsetY[0]);
+      pe = m_Result.getCellValueAsByte(x + m_iOffsetX[2], y + m_iOffsetY[2]);
+      ps = m_Result.getCellValueAsByte(x + m_iOffsetX[4], y + m_iOffsetY[4]);
+      pw = m_Result.getCellValueAsByte(x + m_iOffsetX[6], y + m_iOffsetY[6]);
+
+      if ((pn * ps * pe == 0) && (pw * pe * ps == 0) && (iCount >= 2) && (iCount <= 6) && (iChanges == 1)) {
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private boolean applySecondCondition(final int x,
+                                        final int y) {
+
+      int iCount = 0;
+      int iChanges = 0;
+      byte byValue;
+      byte byPrev = 1;
+      double pw, pe, ps, pn;
+
+      for (int i = 0; i < 9; i++) {
+         byValue = m_Result.getCellValueAsByte(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+         if (byValue == 1) {
+            iCount++;
+            if (byPrev == 0) {
+               iChanges++;
+            }
+         }
+         byPrev = byValue;
+      }
+
+      pn = m_Result.getCellValueAsByte(x + m_iOffsetX[0], y + m_iOffsetY[0]);
+      pe = m_Result.getCellValueAsByte(x + m_iOffsetX[2], y + m_iOffsetY[2]);
+      ps = m_Result.getCellValueAsByte(x + m_iOffsetX[4], y + m_iOffsetY[4]);
+      pw = m_Result.getCellValueAsByte(x + m_iOffsetX[6], y + m_iOffsetY[6]);
+
+      if ((pn * ps * pw == 0) && (pw * pe * pn == 0) && (iCount >= 2) && (iCount <= 6) && (iChanges == 1)) {
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/thinning/ThinningAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/equalize/EqualizeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/equalize/EqualizeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/equalize/EqualizeAlgorithm.java	(revision 369)
@@ -0,0 +1,55 @@
+package es.unex.sextante.imageAnalysis.equalize;
+
+import java.awt.image.DataBuffer;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.imageAnalysis.pixelOpsBase.PixelOpsBaseAlgorithm;
+
+public class EqualizeAlgorithm
+         extends
+            PixelOpsBaseAlgorithm {
+
+   private int[]  m_Histogram;
+   private double m_dRange;
+   private double m_dMin;
+   private int    m_iCells;
+   private int    m_iSize;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName(Sextante.getText("Equalize"));
+
+   }
+
+
+   @Override
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final double dValue = m_Image.getCellValueAsDouble(x, y);
+      final int iClass = (int) (((dValue - m_dMin) / m_dRange) * m_iSize);
+
+      return (double) m_Histogram[iClass] / (double) m_iCells * m_iSize;
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+      m_Histogram = m_Image.getAccumulatedHistogram();
+      m_iCells = m_Histogram[m_Histogram.length - 1];
+      m_dMin = m_Image.getMinValue();
+      m_dRange = m_Image.getMaxValue() - m_dMin;
+      m_iSize = (int) Math.pow(2., DataBuffer.getDataTypeSize(m_Image.getDataType())) - 1;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/equalize/EqualizeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/his2rgb/HIS2RGBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/his2rgb/HIS2RGBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/his2rgb/HIS2RGBAlgorithm.java	(revision 369)
@@ -0,0 +1,130 @@
+package es.unex.sextante.imageAnalysis.his2rgb;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+public class HIS2RGBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERH = "LAYERH";
+   public static final String LAYERI = "LAYERI";
+   public static final String LAYERS = "LAYERS";
+   public static final String BANDH  = "BANDH";
+   public static final String BANDI  = "BANDI";
+   public static final String BANDS  = "BANDS";
+   public static final String R      = "R";
+   public static final String G      = "G";
+   public static final String B      = "B";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName("HIS -> RGB");
+      setGroup(Sextante.getText("Image_processing"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYERH, Sextante.getText("H_layer"), true);
+         m_Parameters.addBand(BANDH, Sextante.getText("H_band"), LAYERH);
+         m_Parameters.addInputRasterLayer("LAYERI", Sextante.getText("I_layer"), true);
+         m_Parameters.addBand(BANDI, Sextante.getText("I_band"), LAYERI);
+         m_Parameters.addInputRasterLayer("LAYERS", Sextante.getText("S_layer"), true);
+         m_Parameters.addBand(BANDS, Sextante.getText("S_band"), LAYERS);
+         addOutputRasterLayer(R, "R");
+         addOutputRasterLayer(G, "G");
+         addOutputRasterLayer(B, "B");
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      byte r, g, b, i, s;
+      int h;
+      IRasterLayer rLayer, gLayer, bLayer;
+
+      final IRasterLayer hLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERH);
+      final IRasterLayer iLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERI);
+      final IRasterLayer sLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERS);
+      final int hBand = m_Parameters.getParameterValueAsInt(BANDH);
+      final int iBand = m_Parameters.getParameterValueAsInt(BANDI);
+      final int sBand = m_Parameters.getParameterValueAsInt(BANDS);
+
+      rLayer = getNewRasterLayer(R, "R", IRasterLayer.RASTER_DATA_TYPE_BYTE);
+      gLayer = getNewRasterLayer(G, "G", IRasterLayer.RASTER_DATA_TYPE_BYTE);
+      bLayer = getNewRasterLayer(B, "B", IRasterLayer.RASTER_DATA_TYPE_BYTE);
+
+      final AnalysisExtent extent = rLayer.getWindowGridExtent();
+
+      hLayer.setWindowExtent(extent);
+      sLayer.setWindowExtent(extent);
+      iLayer.setWindowExtent(extent);
+
+      iNX = extent.getNX();
+      iNY = extent.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            h = hLayer.getCellValueAsInt(x, y, hBand);
+            i = iLayer.getCellValueAsByte(x, y, iBand);
+            s = sLayer.getCellValueAsByte(x, y, sBand);
+
+            if (hLayer.isNoDataValue(h) || iLayer.isNoDataValue(i) || sLayer.isNoDataValue(s)) {
+               rLayer.setNoData(x, y);
+               gLayer.setNoData(x, y);
+               bLayer.setNoData(x, y);
+            }
+            else {
+               if ((h <= 0) && (h < 120)) {
+                  r = (byte) (1 + ((s * Math.cos(h)) / (Math.cos(Math.toRadians(60 - h)))) * i);
+                  b = (byte) (i * (1 - s));
+                  g = (byte) (1 - r - b);
+               }
+               else if (h < 240) {
+                  h = h - 120;
+                  g = (byte) (1 + ((s * Math.cos(h)) / (Math.cos(Math.toRadians(60 - h)))) * i);
+                  r = (byte) (i * (1 - s));
+                  b = (byte) (1 - r - g);
+               }
+               else {
+                  h = h - 240;
+                  b = (byte) (1 + ((s * Math.cos(h)) / (Math.cos(Math.toRadians(60 - h)))) * i);
+                  g = (byte) (i * (1 - s));
+                  r = (byte) (1 - g - b);
+               }
+
+               rLayer.setCellValue(x, y, r);
+               gLayer.setCellValue(x, y, g);
+               bLayer.setCellValue(x, y, b);
+            }
+
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/his2rgb/HIS2RGBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/rgb2his/RGB2HISAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/rgb2his/RGB2HISAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/rgb2his/RGB2HISAlgorithm.java	(revision 369)
@@ -0,0 +1,128 @@
+package es.unex.sextante.imageAnalysis.rgb2his;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+public class RGB2HISAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERR = "LAYERR";
+   public static final String LAYERB = "LAYERB";
+   public static final String LAYERG = "LAYERG";
+   public static final String BANDR  = "BANDR";
+   public static final String BANDG  = "BANDG";
+   public static final String BANDB  = "BANDB";
+   public static final String H      = "H";
+   public static final String I      = "I";
+   public static final String S      = "S";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName("RGB -> HIS");
+      setGroup(Sextante.getText("Image_processing"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYERR, Sextante.getText("R_layer"), true);
+         m_Parameters.addBand(BANDR, Sextante.getText("R_band"), LAYERR);
+         m_Parameters.addInputRasterLayer("LAYERG", Sextante.getText("G_layer"), true);
+         m_Parameters.addBand(BANDG, Sextante.getText("G_band"), LAYERG);
+         m_Parameters.addInputRasterLayer(LAYERB, Sextante.getText("B_layer"), true);
+         m_Parameters.addBand(BANDB, Sextante.getText("B_band"), LAYERB);
+         addOutputRasterLayer(H, "H");
+         addOutputRasterLayer(I, "I");
+         addOutputRasterLayer(S, "S");
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      byte r, g, b, i;
+      double h, s;
+      IRasterLayer hLayer, iLayer, sLayer;
+
+      final IRasterLayer rLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERR);
+      final IRasterLayer gLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERG);
+      final IRasterLayer bLayer = m_Parameters.getParameterValueAsRasterLayer(LAYERB);
+      final int rBand = m_Parameters.getParameterValueAsInt(BANDR);
+      final int gBand = m_Parameters.getParameterValueAsInt(BANDG);
+      final int bBand = m_Parameters.getParameterValueAsInt(BANDB);
+
+      hLayer = getNewRasterLayer(H, "H", IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      iLayer = getNewRasterLayer(I, "I", IRasterLayer.RASTER_DATA_TYPE_BYTE);
+      sLayer = getNewRasterLayer(S, "S", IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      final AnalysisExtent gridExtent = hLayer.getWindowGridExtent();
+
+      rLayer.setWindowExtent(gridExtent);
+      gLayer.setWindowExtent(gridExtent);
+      bLayer.setWindowExtent(gridExtent);
+
+      iNX = gridExtent.getNX();
+      iNY = gridExtent.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            r = rLayer.getCellValueAsByte(x, y, rBand);
+            g = gLayer.getCellValueAsByte(x, y, gBand);
+            b = bLayer.getCellValueAsByte(x, y, bBand);
+
+            if (rLayer.isNoDataValue(r) || gLayer.isNoDataValue(g) || bLayer.isNoDataValue(b)) {
+               hLayer.setNoData(x, y);
+               sLayer.setNoData(x, y);
+               iLayer.setNoData(x, y);
+            }
+            else {
+               h = (((r - g) + (r - b)) * .5) / Math.sqrt((r - g) * (r - g) + (r - b) * (g - b) + 0.0000000001);
+               h = Math.acos(h);
+               h = h / Math.PI * 180.;
+               if (Double.isNaN(h)) {
+                  h = 0;
+               }
+               if (b > g) {
+                  h = 360 - h;
+               }
+               i = (byte) ((r + g + b) / Math.sqrt(3.));
+               if ((r == g) && (g == b)) {
+                  s = 0;
+               }
+               else {
+                  s = (float) (1. - Math.sqrt(3) / (i) * Math.min(Math.min(r, g), b));
+               }
+
+               hLayer.setCellValue(x, y, h);
+               iLayer.setCellValue(x, y, i);
+               sLayer.setCellValue(x, y, s);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/rgb2his/RGB2HISAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureASMAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureASMAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureASMAlgorithm.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.imageAnalysis.texture.features;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class TextureASMAlgorithm
+         extends
+            BaseTextureAnalysisAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      this.setName(Sextante.getText("Texture_ASM"));
+
+   }
+
+
+   @Override
+   protected double getTextureFeature() {
+
+      double dASM = 0;
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            dASM += (m_GLCM[i][j] * m_GLCM[i][j]);
+         }
+      }
+
+      return dASM;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureASMAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureEntropyAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureEntropyAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureEntropyAlgorithm.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.imageAnalysis.texture.features;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class TextureEntropyAlgorithm
+         extends
+            BaseTextureAnalysisAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      this.setName(Sextante.getText("Texture_Entropy"));
+
+   }
+
+
+   @Override
+   protected double getTextureFeature() {
+
+      double dEntropy = 0;
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            dEntropy += (m_GLCM[i][j] * -1 * Math.log(m_GLCM[i][j]));
+         }
+      }
+
+      return dEntropy;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureEntropyAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureDissimilarityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureDissimilarityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureDissimilarityAlgorithm.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.imageAnalysis.texture.features;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class TextureDissimilarityAlgorithm
+         extends
+            BaseTextureAnalysisAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      this.setName(Sextante.getText("Texture_Dissimilarity"));
+
+   }
+
+
+   @Override
+   protected double getTextureFeature() {
+
+      double dDissimilarity = 0;
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            dDissimilarity += (m_GLCM[i][j] * Math.abs(i - j));
+         }
+      }
+
+      return dDissimilarity;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureDissimilarityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureHomogeneityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureHomogeneityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureHomogeneityAlgorithm.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.imageAnalysis.texture.features;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class TextureHomogeneityAlgorithm
+         extends
+            BaseTextureAnalysisAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      this.setName(Sextante.getText("Texture_Homogeneity"));
+
+   }
+
+
+   @Override
+   protected double getTextureFeature() {
+
+      double dHomogeneity = 0;
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            dHomogeneity += (m_GLCM[i][j] / (1 - (i - j) * (i - j)));
+         }
+      }
+
+      return dHomogeneity;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureHomogeneityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureContrastAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureContrastAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureContrastAlgorithm.java	(revision 369)
@@ -0,0 +1,34 @@
+package es.unex.sextante.imageAnalysis.texture.features;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class TextureContrastAlgorithm
+         extends
+            BaseTextureAnalysisAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      this.setName(Sextante.getText("Texture_Contrast"));
+
+   }
+
+
+   @Override
+   protected double getTextureFeature() {
+
+      double dContrast = 0;
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            dContrast += (m_GLCM[i][j] * (i - j) * (i - j));
+         }
+      }
+
+      return dContrast;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/features/TextureContrastAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/quantization/QuantizationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/quantization/QuantizationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/quantization/QuantizationAlgorithm.java	(revision 369)
@@ -0,0 +1,91 @@
+package es.unex.sextante.imageAnalysis.texture.quantization;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
+
+public class QuantizationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  GRID    = "GRID";
+   public static final String  RESULT  = "RESULT";
+   private static final double CLASSES = BaseTextureAnalysisAlgorithm.GRAYSCALE_LEVELS - 1;
+
+   private int                 m_iNX, m_iNY;
+
+   private IRasterLayer        m_Grid  = null;
+   private IRasterLayer        m_Result;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(GRID);
+
+      m_Result = getNewRasterLayer(RESULT, m_Grid.getName() + Sextante.getText("[4 bits]"), IRasterLayer.RASTER_DATA_TYPE_BYTE);
+
+      m_Result.setNoDataValue(-1.);
+
+      m_Grid.setWindowExtent(getAnalysisExtent());
+
+      m_iNX = m_Grid.getNX();
+      m_iNY = m_Grid.getNY();
+
+      return normalize();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Quantization_[4_bits]"));
+      setGroup(Sextante.getText("Image_processing"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Image"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private boolean normalize() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double z;
+      double dValue1 = 0, dValue2 = 0;
+
+      dValue1 = m_Grid.getMinValue();
+      dValue2 = m_Grid.getMaxValue() - dValue1;
+
+      if (dValue2 == 0) {
+         m_Result.assign(1.);
+         return true;
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_Grid.getCellValueAsDouble(x, y);
+            if (!m_Grid.isNoDataValue(z)) {
+               m_Result.setCellValue(x, y, Math.floor((z - dValue1) / dValue2) * CLASSES);
+            }
+            else {
+               m_Result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/quantization/QuantizationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/base/BaseTextureAnalysisAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/base/BaseTextureAnalysisAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/base/BaseTextureAnalysisAlgorithm.java	(revision 369)
@@ -0,0 +1,132 @@
+package es.unex.sextante.imageAnalysis.texture.base;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public abstract class BaseTextureAnalysisAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER            = "LAYER";
+   public static final String WINDOW_RADIUS    = "WINDOW_RADIUS";
+   public static final String RESULT           = "RESULT";
+   public static final String SHIFTX           = "SHIFTX";
+   public static final String SHIFTY           = "SHIFTY";
+   public static final int    GRAYSCALE_LEVELS = 16;
+
+   private IRasterLayer       m_Image;
+   protected byte[][]         m_GLCM;
+   private int                m_iWindowRadius;
+   private int                m_iWindowSize;
+   private int                m_iShiftX;
+   private int                m_iShiftY;
+   private double             m_ProbabilityFraction;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Image_processing"));
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Image"), true);
+         m_Parameters.addNumericalValue(WINDOW_RADIUS, Sextante.getText("Window_radius"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 2, 1, 15);
+         m_Parameters.addNumericalValue(SHIFTX, Sextante.getText("ShiftX"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 1, 15);
+         m_Parameters.addNumericalValue(SHIFTY, Sextante.getText("ShiftY"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 1, 15);
+      }
+      catch (final RepeatedParameterNameException e) {
+         e.printStackTrace();
+      }
+
+      addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Image = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_iWindowRadius = m_Parameters.getParameterValueAsInt(WINDOW_RADIUS);
+      m_iShiftX = m_Parameters.getParameterValueAsInt(SHIFTX);
+      m_iShiftY = m_Parameters.getParameterValueAsInt(SHIFTY);
+      m_iWindowSize = m_iWindowRadius * 2 + 1;
+      m_GLCM = new byte[GRAYSCALE_LEVELS][GRAYSCALE_LEVELS];
+
+      m_ProbabilityFraction = (1. / ((m_iWindowSize - m_iShiftY) * (m_iWindowSize - m_iShiftY)));
+
+      for (y = m_iWindowRadius; (y < iNY - m_iWindowRadius) && setProgress(y, iNY); y++) {
+         for (x = m_iWindowRadius; x < iNX - m_iWindowRadius; x++) {
+            if (calculateGLCM(x, y)) {
+               result.setCellValue(x, y, getTextureFeature());
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean calculateGLCM(int x,
+                                 int y) throws GeoAlgorithmExecutionException {
+
+      //center the window
+      x -= m_iWindowRadius;
+      y -= m_iWindowRadius;
+
+
+      //init the GLCM
+      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
+         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
+            m_GLCM[i][j] = 0;
+         }
+      }
+
+      try {
+         for (int iX = 0; iX < m_iWindowRadius - m_iShiftX; iX++) {
+            for (int iY = 0; iY < m_iWindowRadius - m_iShiftY; iY++) {
+               final byte valueA = m_Image.getCellValueAsByte(x + iX, y + iY);
+               if (m_Image.isNoDataValue(valueA)) {
+                  return false;
+               }
+               final byte valueB = m_Image.getCellValueAsByte(x + iX + m_iShiftX, y + iY + m_iShiftY);
+               if (m_Image.isNoDataValue(valueB)) {
+                  return false;
+               }
+               m_GLCM[valueA][valueB] += m_ProbabilityFraction;
+               m_GLCM[valueB][valueA] += m_ProbabilityFraction;
+            }
+         }
+      }
+      catch (final ArrayIndexOutOfBoundsException e) {
+         throw new GeoAlgorithmExecutionException("Wrong_input_layer_for_texture_analysis");
+      }
+
+
+      return true;
+
+   }
+
+
+   protected abstract double getTextureFeature();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/imageAnalysis/texture/base/BaseTextureAnalysisAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassificationB/SupervisedClassificationBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassificationB/SupervisedClassificationBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassificationB/SupervisedClassificationBAlgorithm.java	(revision 369)
@@ -0,0 +1,342 @@
+package es.unex.sextante.gridAnalysis.supervisedClassificationB;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+public class SupervisedClassificationBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT                 = "INPUT";
+   public static final String METHOD                = "METHOD";
+   public static final String CLASSIFICATION        = "CLASSIFICATION";
+   public static final String CLASSES               = "CLASSES";
+   public static final String TABLE                 = "TABLE";
+
+   public static final int    METHOD_PARALELLPIPED  = 0;
+   public static final int    METHOD_MIN_DISTANCE   = 1;
+   public static final int    METHOD_MAX_LIKELIHOOD = 2;
+
+   private IRasterLayer[]     m_Window;
+   private IRasterLayer       m_Output;
+   private ArrayList          m_Bands;
+   private HashMap            m_Classes;
+   private int[]              m_iBands;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Parallelepiped"), Sextante.getText("Minimum_distance"),
+               Sextante.getText("Maximum_likelihood") };
+
+      setName(Sextante.getText("Supervised_classification") + "(B)");
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Bands"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Classes"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(CLASSIFICATION, Sextante.getText("Classification"));
+         //addOutputTable(CLASSES, Sextante.getText("Classes"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      AnalysisExtent ge;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_Bands = m_Parameters.getParameterValueAsArrayList(INPUT);
+
+
+      if (m_Bands.size() == 0) {
+         return false;
+      }
+
+      m_Classes = new HashMap();
+
+      getClassInformation();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      m_Output = getNewRasterLayer(CLASSIFICATION, Sextante.getText("Classification"), IRasterLayer.RASTER_DATA_TYPE_SHORT);
+      m_Output.setNoDataValue(-1);
+      ge = m_Output.getWindowGridExtent();
+
+      m_Window = new IRasterLayer[m_Bands.size()];
+      m_iBands = new int[m_Bands.size()];
+      for (i = 0; i < m_Window.length; i++) {
+         final RasterLayerAndBand band = (RasterLayerAndBand) m_Bands.get(i);
+         m_iBands[i] = band.getBand();
+         m_Window[i] = band.getRasterLayer();
+         m_Window[i].setWindowExtent(ge);
+      }
+
+      switch (iMethod) {
+         case 0:
+            doParalellpiped();
+         case 1:
+         default:
+            doMinimumDistance();
+         case 2:
+            doMaximumLikelihood();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void getClassInformation() throws GeoAlgorithmExecutionException {
+
+      try {
+         final ITable table = m_Parameters.getParameterValueAsTable(TABLE);
+         m_Window = new IRasterLayer[m_Bands.size()];
+
+         final IRecordsetIterator iter = table.iterator();
+         while (iter.hasNext()) {
+            final IRecord record = iter.next();
+            final String sClassName = record.getValue(0).toString();
+            final ArrayList stats = new ArrayList();
+            for (int i = 0; i < m_Window.length; i++) {
+               final String sFieldName = m_Window[i].getName() + "|" + Integer.toString(m_iBands[i] + 1);
+               final MeanAndStdDev masd = new MeanAndStdDev();
+               boolean bMatchFound = false;
+               for (int j = 1; j < table.getFieldCount(); j += 2) {
+                  if (table.getFieldName(j).equals(sFieldName)) {
+                     masd.mean = Double.parseDouble(record.getValue(j).toString());
+                     masd.stdDev = Double.parseDouble(record.getValue(j + 1).toString());
+                     bMatchFound = true;
+                  }
+               }
+               if (!bMatchFound) {
+                  throw new GeoAlgorithmExecutionException(Sextante.getText("Error_reading_table"));
+               }
+               stats.add(masd);
+            }
+            m_Classes.put(sClassName, stats);
+         }
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Error_reading_table"));
+      }
+
+
+   }
+
+
+   private void doParalellpiped() {
+
+      int iNX, iNY;
+      int x, y;
+      int iMatchingClass = 0;
+      int iClass, iGrid;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      final double dStdDev[][] = new double[m_Classes.size()][m_Window.length];
+      double dValue;
+      ArrayList stats;
+      MeanAndStdDev substats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            substats = ((MeanAndStdDev) stats.get(iGrid));
+            dMean[iClass][iGrid] = substats.mean;
+            dStdDev[iClass][iGrid] = substats.stdDev;
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0; iClass < m_Classes.size(); iClass++) {
+               iMatchingClass = iClass;
+               for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     if (Math.abs(m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid]) > dStdDev[iClass][iGrid]) {
+                        iMatchingClass = -1;
+                        break;
+                     }
+                  }
+                  else {
+                     break;
+                  }
+               }
+               if (iMatchingClass != -1) {
+                  break;
+               }
+            }
+            if (iMatchingClass != -1) {
+               m_Output.setCellValue(x, y, iMatchingClass + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void doMinimumDistance() {
+
+      int iNX, iNY;
+      int x, y;
+      int iClass, iGrid, iMin = 0;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      double dMin, d, e;
+      double dValue;
+      ArrayList stats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            dMean[iClass][iGrid] = ((MeanAndStdDev) stats.get(iGrid)).mean;
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0, dMin = -1.0; iClass < m_Classes.size(); iClass++) {
+               for (iGrid = 0, d = 0.0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     e = m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid];
+                     d += e * e;
+                     if ((dMin < 0.0) || (dMin > d)) {
+                        dMin = d;
+                        iMin = iClass;
+                     }
+                  }
+                  else {
+                     dMin = -1;
+                  }
+               }
+            }
+
+            if (dMin >= 0.0) {
+               m_Output.setCellValue(x, y, iMin + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void doMaximumLikelihood() {
+
+      int iNX, iNY;
+      int x, y;
+      int iClass, iGrid, iMax = 0;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      final double dStdDev[][] = new double[m_Classes.size()][m_Window.length];
+      final double dK[][] = new double[m_Classes.size()][m_Window.length];
+      double dMax, d, e;
+      double dValue;
+      ArrayList stats;
+      MeanAndStdDev substats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            substats = ((MeanAndStdDev) stats.get(iGrid));
+            dMean[iClass][iGrid] = substats.mean;
+            dStdDev[iClass][iGrid] = substats.stdDev;
+            dK[iClass][iGrid] = 1.0 / (dStdDev[iClass][iGrid] * Math.sqrt(2.0 * Math.PI));
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0, dMax = 0.0; iClass < m_Classes.size(); iClass++) {
+               for (iGrid = 0, d = 0.0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     e = (m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid]) / dStdDev[iClass][iGrid];
+                     e = dK[iClass][iGrid] * Math.exp(-0.5 * e * e);
+                     d += e * e;
+                     if (dMax < d) {
+                        dMax = d;
+                        iMax = iClass;
+                     }
+                  }
+                  else {
+                     dMax = -1;
+                  }
+               }
+            }
+
+            if (dMax > 0.0) {
+               m_Output.setCellValue(x, y, iMax + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+   private class MeanAndStdDev {
+
+      public double mean   = 0;
+      public double stdDev = 0;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassificationB/SupervisedClassificationBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/ahp/AHPAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/ahp/AHPAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/ahp/AHPAlgorithm.java	(revision 369)
@@ -0,0 +1,222 @@
+package es.unex.sextante.gridAnalysis.ahp;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class AHPAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  INPUT    = "INPUT";
+   public static final String  PAIRWISE = "PAIRWISE";
+   public static final String  RESULT   = "RESULT";
+   public static final String  STATS    = "STATS";
+
+   private static final double RI[]     = new double[] { 0.0, 0.0, 0.58, 0.9, 1.12, 1.24, 1.32, 1.41, 1.45, 1.49, 1.51, 1.48,
+            1.56, 1.57, 1.59           };
+
+   private String              m_sNames[];
+   private double              m_dWeights[];
+   private ITable              m_Pairwise;
+   private double              m_dPairwise[][];
+   private ArrayList           layers;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Analytical_Hierarchy_Process__AHP"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addInputTable(PAIRWISE, Sextante.getText("Pairwise_comparisons"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+         addOutputText(STATS, Sextante.getText("Statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      double dResult;
+      double dValues[];
+      boolean bNoDataValue;
+      IRasterLayer windows[];
+
+      layers = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_Pairwise = m_Parameters.getParameterValueAsTable(PAIRWISE);
+      if ((layers.size() == 0) || (layers.size() > RI.length)) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Error_wrong_number_of_layers"));
+      }
+
+      getWeights();
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("Analytical_Hierarchy_Process"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      windows = new IRasterLayer[layers.size()];
+
+      for (i = 0; i < layers.size(); i++) {
+         windows[i] = (IRasterLayer) layers.get(i);
+         windows[i].setWindowExtent(result.getWindowGridExtent());
+         windows[i].setInterpolationMethod(GridWrapper.INTERPOLATION_BSpline);
+      }
+
+      final int iNX = result.getWindowGridExtent().getNX();
+      final int iNY = result.getWindowGridExtent().getNY();
+
+      dValues = new double[layers.size()];
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            bNoDataValue = false;
+            for (i = 0; i < dValues.length; i++) {
+               dValues[i] = windows[i].getCellValueAsDouble(x, y);
+               if (windows[i].isNoDataValue(dValues[i])) {
+                  bNoDataValue = true;
+                  break;
+               }
+            }
+            if (bNoDataValue) {
+               result.setNoData(x, y);
+            }
+            else {
+               dResult = 0;
+               for (i = 0; i < dValues.length; i++) {
+                  dResult += (dValues[i] * m_dWeights[i]);
+               }
+               result.setCellValue(x, y, dResult);
+            }
+         }
+      }
+
+      showInfo();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void getWeights() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iRow, iCol;
+      final int iField[] = new int[layers.size()];
+      boolean bMatchFound;
+      IRasterLayer layer;
+      String sName;
+      String sFieldName;
+      Object[] record;
+      m_dPairwise = new double[layers.size()][layers.size()];
+
+      m_sNames = new String[layers.size()];
+      for (i = 0; i < layers.size(); i++) {
+         layer = (IRasterLayer) layers.get(i);
+         sName = layer.getName();
+         m_sNames[i] = sName;
+         bMatchFound = false;
+         for (j = 0; j < m_Pairwise.getFieldCount(); j++) {
+            sFieldName = m_Pairwise.getFieldName(j);
+            if (sName.equals(sFieldName)) {
+               bMatchFound = true;
+               iField[i] = j;
+               break;
+            }
+         }
+         if (!bMatchFound) {
+            throw new GeoAlgorithmExecutionException("AHP Could not Assign weights");
+         }
+      }
+
+      i = 0;
+      final IRecordsetIterator iter = m_Pairwise.iterator();
+      while (iter.hasNext()) {
+         record = iter.next().getValues();
+         for (j = 0; j < iField.length; j++) {
+            m_dPairwise[i][j] = new Double(record[iField[i]].toString()).doubleValue();
+         }
+         i++;
+      }
+      iter.close();
+
+      final double[] dSum = new double[m_dPairwise.length];
+      for (iCol = 0; iCol < m_dPairwise.length; iCol++) {
+         for (iRow = 0; iRow < m_dPairwise.length; iRow++) {
+            dSum[iCol] += m_dPairwise[iRow][iCol];
+         }
+      }
+
+      for (iCol = 0; iCol < m_dPairwise.length; iCol++) {
+         for (iRow = 0; iRow < m_dPairwise.length; iRow++) {
+            m_dPairwise[iRow][iCol] /= dSum[iCol];
+         }
+      }
+
+      m_dWeights = new double[m_dPairwise.length];
+      for (iRow = 0; iRow < m_dPairwise.length; iRow++) {
+         for (iCol = 0; iCol < m_dPairwise.length; iCol++) {
+            m_dWeights[iRow] += m_dPairwise[iRow][iCol];
+         }
+         m_dWeights[iRow] /= m_dPairwise.length;
+      }
+
+   }
+
+
+   private void showInfo() {
+
+      int i, j;
+      double dSum;
+      //DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open("AHP");
+      doc.addHeader("AHP", 2);
+      doc.addHeader(Sextante.getText("Analytical_Hierarchy_Process_Weights"), 3);
+      doc.startUnorderedList();
+      for (i = 0; i < m_dWeights.length; i++) {
+         doc.addListElement(m_sNames[i] + ": " + Double.toString(m_dWeights[i]));
+      }
+      doc.closeUnorderedList();
+
+      double dRelSum = 0;
+
+      for (i = 0; i < m_dPairwise.length; i++) {
+         dSum = 0;
+         for (j = 0; j < m_dPairwise.length; j++) {
+            dSum += m_dWeights[j] * m_dPairwise[i][j];
+         }
+         dRelSum += dSum / m_dWeights[i];
+      }
+      final double dLambda = dRelSum / m_dWeights.length;
+      final double dConsistency = (dLambda - m_dWeights.length) / (m_dWeights.length - 1);
+      final double dCR = dConsistency / RI[m_dWeights.length];
+      if (dCR < 0.10) {
+         doc.addBoldText(Sextante.getText("Warning_Inconsistent_weighting_values"));
+         Sextante.addWarningToLog("AHP:" + Sextante.getText("Warning_Inconsistent_weighting_values"));
+      }
+      doc.close();
+
+      addOutputText(STATS, "AHP", doc.getHTMLCode());
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/ahp/AHPAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cva/CVAAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cva/CVAAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cva/CVAAlgorithm.java	(revision 369)
@@ -0,0 +1,97 @@
+package es.unex.sextante.gridAnalysis.cva;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CVAAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String A1    = "A1";
+   public static final String A2    = "A2";
+   public static final String B1    = "B1";
+   public static final String B2    = "B2";
+   public static final String ANGLE = "ANGLE";
+   public static final String DIST  = "DIST";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Change_Vector_Analysis"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(A1, Sextante.getText("Layer_1__init"), true);
+         m_Parameters.addInputRasterLayer(A2, Sextante.getText("Layer_2__init"), true);
+         m_Parameters.addInputRasterLayer(B1, Sextante.getText("Layer_1__final"), true);
+         m_Parameters.addInputRasterLayer(B2, Sextante.getText("Layer_2__final"), true);
+         addOutputRasterLayer(ANGLE, Sextante.getText("Angle"));
+         addOutputRasterLayer(DIST, Sextante.getText("Modulus"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dAngle, dDist;
+      double a1, a2, b1, b2;
+      int iNX, iNY;
+      IRasterLayer layerA1, layerA2, layerB1, layerB2;
+      IRasterLayer Angle, Distance;
+
+      layerA1 = m_Parameters.getParameterValueAsRasterLayer(A1);
+      layerA2 = m_Parameters.getParameterValueAsRasterLayer(A2);
+      layerB1 = m_Parameters.getParameterValueAsRasterLayer(B1);
+      layerB2 = m_Parameters.getParameterValueAsRasterLayer(B2);
+
+      Distance = getNewRasterLayer(DIST, Sextante.getText("Modulus"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      Angle = getNewRasterLayer(ANGLE, Sextante.getText("Angle"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = Distance.getWindowGridExtent();
+
+      layerA1.setWindowExtent(extent);
+      layerA2.setWindowExtent(extent);
+      layerB1.setWindowExtent(extent);
+      layerB2.setWindowExtent(extent);
+
+      iNX = extent.getNX();
+      iNY = extent.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            a1 = layerA1.getCellValueAsDouble(x, y);
+            a2 = layerA2.getCellValueAsDouble(x, y);
+            b1 = layerB1.getCellValueAsDouble(x, y);
+            b2 = layerB2.getCellValueAsDouble(x, y);
+            if (layerA1.isNoDataValue(a1) || layerA2.isNoDataValue(a2) || layerB1.isNoDataValue(b1) || layerB2.isNoDataValue(b2)) {
+               Distance.setNoData(x, y);
+               Angle.setNoData(x, y);
+            }
+            else {
+               dDist = Math.sqrt((a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));
+               dAngle = Math.atan((a1 - a2) / (b1 - b2));
+               Distance.setCellValue(x, y, dDist);
+               Angle.setCellValue(x, y, dAngle);
+            }
+
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cva/CVAAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropic/CostInRoutesAnisotropicAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropic/CostInRoutesAnisotropicAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropic/CostInRoutesAnisotropicAlgorithm.java	(revision 369)
@@ -0,0 +1,267 @@
+package es.unex.sextante.gridAnalysis.costInRoutesAnisotropic;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+public class CostInRoutesAnisotropicAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  ROUTES     = "ROUTES";
+   public static final String  COST       = "COST";
+   public static final String  COSTDIR    = "COSTDIR";
+   public static final String  KFACTOR    = "KFACTOR";
+   public static final String  RESULT     = "RESULT";
+
+   private static final double ANGLES[][] = { { 135, 180, 225 }, { 90, 0, 270 }, { 45, 0, 315 } };
+   private static final double NO_DATA    = -99999;
+
+   private IRasterLayer        m_Cost;
+   private double[]            m_dDist;
+   private double[]            m_dCost;
+   private int                 m_iLastX, m_iLastY;
+   private int                 m_iPoints  = 0;
+   private int                 m_iCurrentRoute;
+   private double              m_dK;
+   private IRasterLayer        m_CostDir;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cost_for_predefined_routes__anisotropic"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(ROUTES, Sextante.getText("Routes"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Maximum_unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(COSTDIR, Sextante.getText("Direction_of_maximum_cost_[degrees]"), true);
+         m_Parameters.addNumericalValue(KFACTOR, Sextante.getText("K"), 2, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Routes_and_cost"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_CostDir = m_Parameters.getParameterValueAsRasterLayer(COSTDIR);
+
+      m_dK = m_Parameters.getParameterValueAsDouble(KFACTOR);
+
+      m_Cost.setFullExtent();
+
+      m_CostDir.setWindowExtent(m_Cost.getWindowGridExtent());
+
+      final IVectorLayer routes = m_Parameters.getParameterValueAsVectorLayer(ROUTES);
+
+      if (routes.getShapesCount() == 0) {
+         return false;
+      }
+      final int iShapesCount = routes.getShapesCount();
+      m_iCurrentRoute = 0;
+      m_Cost.setFullExtent();
+      m_dCost = new double[routes.getShapesCount()];
+      m_dDist = new double[routes.getShapesCount()];
+      final IFeatureIterator iter = routes.iterator();
+      while (iter.hasNext() && setProgress(m_iCurrentRoute, iShapesCount)) {
+         m_iPoints = 0;
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         processLine(geom.getCoordinates());
+         m_iCurrentRoute++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Object[][] values = new Object[2][routes.getShapesCount()];
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Cost") };
+      final Class[] types = { Double.class, Double.class };
+      for (int i = 0; i < routes.getShapesCount(); i++) {
+         values[0][i] = new Double(m_dDist[i]);
+         values[1][i] = new Double(m_dCost[i]);
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(Sextante.getText("Routes"));
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, routes, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return true;
+
+   }
+
+
+   private void processLine(final Coordinate coords[]) {
+
+      int i;
+      double x, y, x2, y2;
+
+      for (i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         processSegment(x, y, x2, y2);
+      }
+
+   }
+
+
+   private void processSegment(double x,
+                               double y,
+                               final double x2,
+                               final double y2) {
+
+      double dx, dy, d, n;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_Cost.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_Cost.getWindowCellSize();
+         }
+         else {
+            dy /= m_Cost.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_Cost.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            addPoint(x, y);
+         }
+      }
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+      int iDX, iDY;
+      final GridCell cell = m_Cost.getWindowGridExtent().getGridCoordsFromWorldCoords(x, y);
+      final int iX = cell.getX();
+      final int iY = cell.getY();
+
+      if (m_iPoints == 0) {
+         m_dDist[m_iCurrentRoute] = 0.0;
+         m_dCost[m_iCurrentRoute] = 0.0;
+         m_iLastX = cell.getX();
+         m_iLastY = cell.getY();
+      }
+      else {
+         iDX = iX - m_iLastX;
+         iDY = iY - m_iLastY;
+         m_dDist[m_iCurrentRoute] += Math.sqrt(iDX * iDX + iDY * iDY) * m_Cost.getWindowCellSize();
+         final double dCost = getCostInDir(m_iLastX, m_iLastY, iDX, iDY);
+         if (dCost != NO_DATA) {
+            m_dCost[m_iCurrentRoute] += dCost;
+         }
+         m_iLastX = iX;
+         m_iLastY = iY;
+      }
+
+      m_iLastX = iX;
+      m_iLastY = iY;
+      m_iPoints++;
+
+   }
+
+
+   private double getCostInDir(final int x,
+                               final int y,
+                               final int iH,
+                               final int iV) {
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      double dCost1 = m_Cost.getCellValueAsDouble(x, y);
+      double dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+
+      final double dCostDir1 = m_CostDir.getCellValueAsDouble(x, y);
+      final double dCostDir2 = m_CostDir.getCellValueAsDouble(x2, y2);
+
+      if (m_Cost.isNoDataValue(dCost1) || m_Cost.isNoDataValue(dCost2) || m_CostDir.isNoDataValue(dCostDir1)
+          || m_CostDir.isNoDataValue(dCostDir2) || (dCost1 <= 0) || (dCost2 <= 0)) {
+         return NO_DATA;
+      }
+      else {
+         double dDifAngle1 = Math.abs(dCostDir1 - dAngle);
+         double dDifAngle2 = Math.abs(dCostDir2 - dAngle);
+
+         dDifAngle1 = Math.toRadians(dDifAngle1);
+         dDifAngle2 = Math.toRadians(dDifAngle2);
+
+         final double dCos1 = Math.cos(dDifAngle1);
+         final double dCos2 = Math.cos(dDifAngle2);
+
+         final int dSgn1 = signum(dCos1);
+         final int dSgn2 = signum(dCos2);
+
+         final double dExp1 = dSgn1 * Math.pow(Math.abs(dCos1), m_dK);
+         final double dExp2 = dSgn2 * Math.pow(Math.abs(dCos2), m_dK);
+
+         dCost1 = Math.pow(dCost1, dExp1) / 2.;
+         dCost2 = Math.pow(dCost2, dExp2) / 2.;
+
+         return dCost1 + dCost2;
+      }
+
+   }
+
+
+   private int signum(final double difAngle) {
+
+      if (difAngle < 0) {
+         return -1;
+      }
+      else {
+         return 1;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropic/CostInRoutesAnisotropicAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropicB/CostInRoutesAnisotropicBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropicB/CostInRoutesAnisotropicBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropicB/CostInRoutesAnisotropicBAlgorithm.java	(revision 369)
@@ -0,0 +1,304 @@
+package es.unex.sextante.gridAnalysis.costInRoutesAnisotropicB;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.rasterWrappers.GridCell;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+public class CostInRoutesAnisotropicBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String   ROUTES     = "ROUTES";
+   public static final String   COST       = "COST";
+   public static final String   COSTDIR    = "COSTDIR";
+   public static final String   RESULT     = "RESULT";
+   public static final String   FACTORS    = "FACTORS";
+
+   private static final double  ANGLES[][] = { { 135, 180, 225 }, { 90, 0, 270 }, { 45, 0, 315 } };
+   private static final double  NO_DATA    = -99999;
+
+   private IRasterLayer         m_Cost;
+   private double[]             m_dDist;
+   private double[]             m_dCost;
+   private int                  m_iLastX, m_iLastY;
+   private int                  m_iPoints  = 0;
+   private int                  m_iCurrentRoute;
+   private IRasterLayer         m_CostDir;
+   private DeviationAndFactor[] m_Factors;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sColumnNames[] = new String[] { Sextante.getText("Difference"), Sextante.getText("Factor") };
+
+      setName(Sextante.getText("Cost_for_predefined_routes__anisotropic") + "(B)");
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(ROUTES, Sextante.getText("Routes"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Maximum_unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(COSTDIR, Sextante.getText("Direction_of_maximum_cost_[degrees]"), true);
+         m_Parameters.addFixedTable(FACTORS, Sextante.getText("Cost_variation_factors"), sColumnNames, 5, false);
+         addOutputVectorLayer(RESULT, Sextante.getText("Routes_and_cost"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_CostDir = m_Parameters.getParameterValueAsRasterLayer(COSTDIR);
+
+      final FixedTableModel factors = (FixedTableModel) m_Parameters.getParameterValueAsObject(FACTORS);
+
+      m_Factors = new DeviationAndFactor[factors.getRowCount()];
+      for (int i = 0; i < factors.getRowCount(); i++) {
+         final double dDeviation = Double.parseDouble(factors.getValueAt(i, 0).toString());
+         final double dFactor = Double.parseDouble(factors.getValueAt(i, 1).toString());
+         m_Factors[i] = new DeviationAndFactor(dDeviation, dFactor);
+      }
+
+      m_Cost.setFullExtent();
+
+      m_CostDir.setWindowExtent(m_Cost.getWindowGridExtent());
+
+      final IVectorLayer routes = m_Parameters.getParameterValueAsVectorLayer(ROUTES);
+
+      if (routes.getShapesCount() == 0) {
+         return false;
+      }
+      final int iShapesCount = routes.getShapesCount();
+      m_iCurrentRoute = 0;
+      m_Cost.setFullExtent();
+      m_dCost = new double[routes.getShapesCount()];
+      m_dDist = new double[routes.getShapesCount()];
+      final IFeatureIterator iter = routes.iterator();
+      while (iter.hasNext() && setProgress(m_iCurrentRoute, iShapesCount)) {
+         m_iPoints = 0;
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         processLine(geom.getCoordinates());
+         m_iCurrentRoute++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Object[][] values = new Object[2][routes.getShapesCount()];
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Cost") };
+      final Class[] types = { Double.class, Double.class };
+      for (int i = 0; i < routes.getShapesCount(); i++) {
+         values[0][i] = new Double(m_dDist[i]);
+         values[1][i] = new Double(m_dCost[i]);
+      }
+
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setDescription(Sextante.getText("Routes"));
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, routes, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return true;
+
+   }
+
+
+   private void processLine(final Coordinate coords[]) {
+
+      int i;
+      double x, y, x2, y2;
+
+      for (i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         processSegment(x, y, x2, y2);
+      }
+
+   }
+
+
+   private void processSegment(double x,
+                               double y,
+                               final double x2,
+                               final double y2) {
+
+      double dx, dy, d, n;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_Cost.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_Cost.getWindowCellSize();
+         }
+         else {
+            dy /= m_Cost.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_Cost.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            addPoint(x, y);
+         }
+      }
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+      int iDX, iDY;
+      final GridCell cell = m_Cost.getWindowGridExtent().getGridCoordsFromWorldCoords(x, y);
+      final int iX = cell.getX();
+      final int iY = cell.getY();
+
+      if (m_iPoints == 0) {
+         m_dDist[m_iCurrentRoute] = 0.0;
+         m_dCost[m_iCurrentRoute] = 0.0;
+         m_iLastX = cell.getX();
+         m_iLastY = cell.getY();
+      }
+      else {
+         iDX = iX - m_iLastX;
+         iDY = iY - m_iLastY;
+         m_dDist[m_iCurrentRoute] += Math.sqrt(iDX * iDX + iDY * iDY) * m_Cost.getWindowCellSize();
+         final double dCost = getCostInDir(m_iLastX, m_iLastY, iDX, iDY);
+         if (dCost != NO_DATA) {
+            m_dCost[m_iCurrentRoute] += dCost;
+         }
+         m_iLastX = iX;
+         m_iLastY = iY;
+      }
+
+      m_iLastX = iX;
+      m_iLastY = iY;
+      m_iPoints++;
+
+   }
+
+
+   private double getCostInDir(final int x,
+                               final int y,
+                               final int iH,
+                               final int iV) {
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      final double dCostDir1 = m_CostDir.getCellValueAsDouble(x, y);
+      final double dCostDir2 = m_CostDir.getCellValueAsDouble(x2, y2);
+      double dCost1 = m_Cost.getCellValueAsDouble(x, y);
+      double dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+
+      if (m_Cost.isNoDataValue(dCost1) || m_Cost.isNoDataValue(dCost1) || m_CostDir.isNoDataValue(dCostDir1)
+          || m_CostDir.isNoDataValue(dCostDir1)) {
+         return NO_DATA;
+      }
+      else {
+         final double dDifAngle1 = Math.abs(dCostDir1 - dAngle);
+         final double dDifAngle2 = Math.abs(dCostDir2 - dAngle);
+
+         dCost1 = getWeigthedCost(dCost1, dDifAngle1);
+         dCost2 = getWeigthedCost(dCost2, dDifAngle2);
+
+         return dCost1 + dCost2;
+      }
+
+   }
+
+
+   private double getWeigthedCost(final double cost,
+                                  final double difAngle) {
+
+      for (int i = 0; i < m_Factors.length - 1; i++) {
+         if ((m_Factors[i].deviation < difAngle) || (m_Factors[i + 1].deviation >= difAngle)) {
+            return m_Factors[i].factor * cost / 2.;
+         }
+      }
+
+      return cost / 2.;
+
+   }
+
+   private class DeviationAndFactor
+            implements
+               Comparable {
+
+      public double factor;
+      public double deviation;
+
+
+      DeviationAndFactor(final double dDeviation,
+                         final double dFactor) {
+
+         deviation = dDeviation;
+         factor = dFactor;
+      }
+
+
+      public int compareTo(final Object ob) throws ClassCastException {
+
+         if (!(ob instanceof DeviationAndFactor)) {
+            throw new ClassCastException();
+         }
+
+         final double dDeviation = ((DeviationAndFactor) ob).deviation;
+         final double dDif = this.deviation - dDeviation;
+
+         if (dDif > 0.0) {
+            return 1;
+         }
+         else if (dDif < 0.0) {
+            return -1;
+         }
+         else {
+            return 0;
+         }
+
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutesAnisotropicB/CostInRoutesAnisotropicBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCost/AccCostAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCost/AccCostAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCost/AccCostAlgorithm.java	(revision 369)
@@ -0,0 +1,287 @@
+package es.unex.sextante.gridAnalysis.accCost;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class AccCostAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String COST         = "COST";
+   public static final String FEATURES     = "FEATURES";
+   public static final String ACCCOST      = "ACCCOST";
+   public static final String CLOSESTPOINT = "CLOSESTPOINT";
+   public static final String DISTANCE     = "DISTANCE";
+
+   private static final int   NO_DATA      = -1;
+
+   public static final int    EUCLIDEAN    = 0;
+   public static final int    CHESSBOARD   = 1;
+   public static final int    MANHATTAN    = 2;
+   public static final int    CHAMFER      = 3;
+   public static final int    WINDOW5X5    = 4;
+
+   private int                m_iNX, m_iNY;
+   private int                m_iDistance;
+   private IRasterLayer       m_Cost;
+   private IRasterLayer       m_Features;
+   private IRasterLayer       m_AccCost;
+   private IRasterLayer       m_ClosestPoint;
+   private ArrayList          m_CentralPoints, m_AdjPoints;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sOptions = { Sextante.getText("Euclidean"), Sextante.getText("Chessboard"), Sextante.getText("Manhattan"),
+               Sextante.getText("Chamfer_3-4"), " 5 X 5" };
+      setName(Sextante.getText("Accumulated_cost__isotropic"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Origin-destination_points"), true);
+         addOutputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"));
+         addOutputRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"));
+         m_Parameters.addSelection(DISTANCE, Sextante.getText("Type_of_distance"), sOptions);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iPoint = 1;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+      m_iDistance = m_Parameters.getParameterValueAsInt(DISTANCE);
+
+      m_AccCost = getNewRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_ClosestPoint = getNewRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      final AnalysisExtent extent = m_AccCost.getWindowGridExtent();
+
+      m_Cost.setWindowExtent(extent);
+      m_Cost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_Features.setWindowExtent(extent);
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Cost.getNX();
+      m_iNY = m_Cost.getNY();
+
+      m_AccCost.setNoDataValue(NO_DATA);
+      m_AccCost.assignNoData();
+
+      m_ClosestPoint.setNoDataValue(NO_DATA);
+      m_ClosestPoint.assignNoData();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Features.isNoDataValue(dValue)) {
+               m_CentralPoints.add(new GridCell(x, y, iPoint));
+               m_AccCost.setCellValue(x, y, 0.0);
+               m_ClosestPoint.setCellValue(x, y, iPoint);
+               iPoint++;
+            }
+         }
+      }
+
+      if (m_iDistance != WINDOW5X5) {
+         calculateCost3X3();
+      }
+      else {
+         calculateCost5X5();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateCost5X5() {
+
+      int i, j;
+      int iPt;
+      int iPoint;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dCost;
+      double dPrevAccCost;
+      GridCell cell;
+
+      final double dDist[][] = new double[5][5];
+
+      for (i = -2; i < 3; i++) {
+         for (j = -1; j < 2; j++) {
+            dDist[i + 2][j + 2] = Math.sqrt(i * i + j * j);
+         }
+      }
+
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            iPoint = (int) cell.getValue();
+            for (i = -2; i < 3; i++) {
+               for (j = -2; j < 3; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  dCost = getCostTo(x, y, i, j);
+                  if (dCost != NO_DATA) {
+                     dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                     dAccCost += (dCost * dDist[i + 2][j + 2]);
+                     dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                     if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                        m_AccCost.setCellValue(x2, y2, dAccCost);
+                        m_ClosestPoint.setCellValue(x2, y2, iPoint);
+                        m_AdjPoints.add(new GridCell(x2, y2, iPoint));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+      }
+
+   }
+
+
+   private double getCostTo(final int x,
+                            final int y,
+                            final int i,
+                            final int j) {
+
+      int n, nMax;
+      int iCells = 0;
+      double di, dj;
+      double dCost = 0;
+      double dPartialCost;
+
+      if ((i == 0) && (j == 0)) {
+         return 0;
+      }
+
+      if (i > j) {
+         dj = Math.abs((double) j / (double) i) * Math.signum(j);
+         di = Math.signum(i);
+         nMax = Math.abs(i);
+      }
+      else {
+         di = Math.abs((double) i / (double) j) * Math.signum(i);
+         dj = Math.signum(j);
+         nMax = Math.abs(j);
+      }
+
+      double ii = 0;
+      double jj = 0;
+      for (n = 0; n <= nMax; n++, ii += di, jj += dj) {
+         dPartialCost = m_Cost.getCellValueAsDouble((int) (x + ii), (int) (y + jj));
+         if (m_Cost.isNoDataValue(dPartialCost) || (dPartialCost <= 0)) {
+            return NO_DATA;
+         }
+         else {
+            dCost += dPartialCost;
+            iCells++;
+         }
+      }
+
+      return dCost / iCells;
+
+   }
+
+
+   private void calculateCost3X3() {
+
+      int i, j;
+      int iPt;
+      int iPoint;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dCost1, dCost2;
+      double dPrevAccCost;
+      GridCell cell;
+
+      double dDist[][] = new double[3][3];
+
+      switch (m_iDistance) {
+         case EUCLIDEAN:
+         default:
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  dDist[i + 1][j + 1] = Math.sqrt(i * i + j * j);
+               }
+            }
+            break;
+         case CHESSBOARD:
+            final double chessboard[][] = { { 1, 1, 1 }, { 1, 0, 1 }, { 1, 1, 1 } };
+            dDist = chessboard;
+            break;
+         case MANHATTAN:
+            final double manhattan[][] = { { 2, 1, 2 }, { 1, 0, 1 }, { 2, 1, 2 } };
+            dDist = manhattan;
+            break;
+         case CHAMFER:
+            final double chamfer[][] = { { 4, 3, 4 }, { 3, 0, 3 }, { 4, 3, 4 } };
+            dDist = chamfer;
+            break;
+      }
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            iPoint = (int) cell.getValue();
+            dCost1 = m_Cost.getCellValueAsDouble(x, y);
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+                  if (!m_Cost.isNoDataValue(dCost1) && !m_Cost.isNoDataValue(dCost2) && (dCost1 > 0) && (dCost2 > 0)) {
+                     dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                     dAccCost += ((dCost1 + dCost2) / 2.0 * dDist[i + 1][j + 1]);
+                     dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                     if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                        m_AccCost.setCellValue(x2, y2, dAccCost);
+                        m_ClosestPoint.setCellValue(x2, y2, iPoint);
+                        m_AdjPoints.add(new GridCell(x2, y2, iPoint));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+         setProgressText(Integer.toString(m_CentralPoints.size()));
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCost/AccCostAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostCombined/AccCostCombinedAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostCombined/AccCostCombinedAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostCombined/AccCostCombinedAlgorithm.java	(revision 369)
@@ -0,0 +1,210 @@
+package es.unex.sextante.gridAnalysis.accCostCombined;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class AccCostCombinedAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  ISOCOST      = "ISOCOST";
+   public static final String  ANISOCOST    = "ANISOCOST";
+   public static final String  COSTDIR      = "COSTDIR";
+   public static final String  KFACTOR      = "KFACTOR";
+   public static final String  FEATURES     = "FEATURES";
+   public static final String  ACCCOST      = "ACCCOST";
+   public static final String  CLOSESTPOINT = "CLOSESTPOINT";
+
+   private static final int    NO_DATA      = -1;
+   private static final double ANGLES[][]   = { { 315, 0, 45 }, { 270, 0, 90 }, { 225, 180, 135 } };
+
+   int                         m_iNX, m_iNY;
+   double                      m_dK;
+   IRasterLayer                m_IsotropicCost;
+   IRasterLayer                m_AnisotropicCost;
+   IRasterLayer                m_CostDir;
+   IRasterLayer                m_Features;
+   IRasterLayer                m_AccCost;
+   IRasterLayer                m_ClosestPoint;
+   ArrayList                   m_CentralPoints, m_AdjPoints;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Accumulated_cost__combined"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(ISOCOST, Sextante.getText("Isotropic_cost"), true);
+         m_Parameters.addInputRasterLayer(ANISOCOST, Sextante.getText("Anisotropic_cost"), true);
+         m_Parameters.addInputRasterLayer(COSTDIR, Sextante.getText("Direction_of_maximum_cost_[degrees]"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Origin-destination_points"), true);
+         m_Parameters.addNumericalValue(KFACTOR, Sextante.getText("K"), 2, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"));
+         addOutputRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iPoint = 1;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_IsotropicCost = m_Parameters.getParameterValueAsRasterLayer(ISOCOST);
+      m_AnisotropicCost = m_Parameters.getParameterValueAsRasterLayer(ANISOCOST);
+      m_CostDir = m_Parameters.getParameterValueAsRasterLayer(COSTDIR);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+
+      m_dK = m_Parameters.getParameterValueAsDouble(KFACTOR);
+
+      m_AccCost = getNewRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_ClosestPoint = getNewRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      final AnalysisExtent extent = m_AccCost.getWindowGridExtent();
+
+      m_IsotropicCost.setWindowExtent(extent);
+      m_IsotropicCost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_AnisotropicCost.setWindowExtent(extent);
+      m_AnisotropicCost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_CostDir.setWindowExtent(extent);
+      m_CostDir.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_Features.setWindowExtent(extent);
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_IsotropicCost.getNX();
+      m_iNY = m_IsotropicCost.getNY();
+
+      m_AccCost.setNoDataValue(NO_DATA);
+      m_AccCost.assignNoData();
+
+      m_ClosestPoint.setNoDataValue(NO_DATA);
+      m_ClosestPoint.assignNoData();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Features.isNoDataValue(dValue)) {
+               m_CentralPoints.add(new GridCell(x, y, iPoint));
+               m_AccCost.setCellValue(x, y, 0.0);
+               m_ClosestPoint.setCellValue(x, y, iPoint);
+               iPoint++;
+            }
+         }
+      }
+
+      calculateCost();
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void calculateCost() {
+
+      int i, j;
+      int iPt;
+      int iPoint;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dPrevAccCost;
+      GridCell cell;
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            iPoint = (int) cell.getValue();
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  final double dCostInDir = getCostInDir(x, y, i, j);
+                  if (dCostInDir != NO_DATA) {
+                     dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                     dAccCost += dCostInDir * Math.sqrt(i * i + j * j);
+                     dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                     if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                        m_AccCost.setCellValue(x2, y2, dAccCost);
+                        m_ClosestPoint.setCellValue(x2, y2, iPoint);
+                        m_AdjPoints.add(new GridCell(x2, y2, iPoint));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+   }
+
+
+   private double getCostInDir(final int x,
+                               final int y,
+                               final int iH,
+                               final int iV) {
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      final double dCostDir1 = m_CostDir.getCellValueAsDouble(x, y);
+      final double dCostDir2 = m_CostDir.getCellValueAsDouble(x2, y2);
+      double dCost1 = m_AnisotropicCost.getCellValueAsDouble(x, y);
+      double dCost2 = m_AnisotropicCost.getCellValueAsDouble(x2, y2);
+      final double dIsoCost1 = m_IsotropicCost.getCellValueAsDouble(x, y);
+      final double dIsoCost2 = m_IsotropicCost.getCellValueAsDouble(x2, y2);
+
+      if (m_AnisotropicCost.isNoDataValue(dCost1) || m_AnisotropicCost.isNoDataValue(dCost1)
+          || m_IsotropicCost.isNoDataValue(dIsoCost1) || m_IsotropicCost.isNoDataValue(dIsoCost2)
+          || m_CostDir.isNoDataValue(dCostDir1) || m_CostDir.isNoDataValue(dCostDir1)) {
+         return NO_DATA;
+      }
+      else {
+         double dDifAngle1 = Math.abs(dCostDir1 - dAngle);
+         double dDifAngle2 = Math.abs(dCostDir2 - dAngle);
+
+         dDifAngle1 = Math.toRadians(dDifAngle1);
+         dDifAngle2 = Math.toRadians(dDifAngle1);
+
+         dCost1 = Math.pow(Math.cos(dDifAngle1), m_dK) / 2. * (dCost1) + dIsoCost1;
+         dCost2 = Math.pow(Math.cos(dDifAngle2), m_dK) / 2. * (dCost2) + dIsoCost2;
+
+         return dCost1 + dCost2;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostCombined/AccCostCombinedAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cluster/ClusterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cluster/ClusterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cluster/ClusterAlgorithm.java	(revision 369)
@@ -0,0 +1,272 @@
+package es.unex.sextante.gridAnalysis.cluster;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+public class ClusterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULTLAYER = "RESULTLAYER";
+   public static final String RESULTTABLE = "RESULTTABLE";
+   public static final String INPUT       = "INPUT";
+   public static final String NUMCLASS    = "NUMCLASS";
+
+   private int                m_iNX, m_iNY;
+   private int                m_iClasses;
+   private int                m_iCells[];
+   private int                m_iThreshold;
+   private double             m_dMean[][];
+   private ArrayList          m_Bands;
+   private int                m_iBands[];
+   private IRasterLayer       m_Windows[];
+   private IRasterLayer       m_Result;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      this.setIsDeterminatedProcess(false);
+
+      setName(Sextante.getText("Unsupervised_classification__clustering"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Bands"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addNumericalValue(NUMCLASS, Sextante.getText("Number_of_classes"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 3, 2, Integer.MAX_VALUE);
+         addOutputRasterLayer(RESULTLAYER, Sextante.getText("Clusters"));
+         addOutputTable(RESULTTABLE, Sextante.getText("Statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      RasterLayerAndBand band;
+
+      m_Bands = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_iClasses = m_Parameters.getParameterValueAsInt(NUMCLASS);
+      if ((m_Bands.size() == 0) || (m_iClasses < 2)) {
+         return false;
+      }
+
+      m_Result = getNewRasterLayer(RESULTLAYER, Sextante.getText("Clusters"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      m_Windows = new IRasterLayer[m_Bands.size()];
+      m_iBands = new int[m_Bands.size()];
+      for (i = 0; i < m_Bands.size(); i++) {
+         band = (RasterLayerAndBand) m_Bands.get(i);
+         m_iBands[i] = band.getBand();
+         m_Windows[i] = band.getRasterLayer();
+         m_Windows[i].setWindowExtent(m_Result.getWindowGridExtent());
+         m_Windows[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+      }
+
+      m_dMean = new double[m_iClasses][m_Windows.length];
+      m_iCells = new int[m_iClasses];
+
+      m_iNX = m_Result.getWindowGridExtent().getNX();
+      m_iNY = m_Result.getWindowGridExtent().getNY();
+
+      if (classify()) {
+         createTable();
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   private void createTable() throws UnsupportedOutputChannelException {
+
+      int i, j;
+      RasterLayerAndBand band;
+      final String[] sFields = new String[m_Bands.size() + 2];
+      final Class types[] = new Class[m_Bands.size() + 2];
+      final Object[] values = new Object[m_Bands.size() + 2];
+
+      sFields[0] = "Class";
+      sFields[1] = "Count";
+      types[0] = Integer.class;
+      types[1] = Integer.class;
+      for (i = 0; i < m_Bands.size(); i++) {
+         band = (RasterLayerAndBand) m_Bands.get(i);
+         sFields[i + 2] = new String(band.getRasterLayer().getName() + "[" + Integer.toString(band.getBand()) + "]");
+         types[i + 2] = Double.class;
+
+      }
+      final ITable table = getNewTable(RESULTTABLE, Sextante.getText("Classification"), types, sFields);
+
+      for (i = 0; i < m_iClasses; i++) {
+         values[0] = new Integer(i);
+         values[1] = new Integer(m_iCells[i]);
+         for (j = 0; j < m_Bands.size(); j++) {
+            values[j + 2] = new Double(m_dMean[i][j]);
+         }
+         table.addRecord(values);
+      }
+
+   }
+
+
+   private boolean classify() {
+
+      int i;
+      int x, y;
+      int iChangedCells;
+      int iPrevClass;
+      int iClass;
+      final double dValues[] = new double[m_Windows.length];
+      double dNewMean[][];
+      double swap[][];
+
+      initValues();
+
+      dNewMean = new double[m_iClasses][m_Windows.length];
+
+      do {
+         Arrays.fill(m_iCells, 0);
+         iChangedCells = 0;
+
+         for (i = 0; i < m_iClasses; i++) {
+            Arrays.fill(dNewMean[i], 0.0);
+         }
+         for (y = 0; y < m_iNY; y++) {
+            for (x = 0; x < m_iNX; x++) {
+               iPrevClass = m_Result.getCellValueAsInt(x, y);
+               if (!m_Result.isNoDataValue(iPrevClass)) {
+                  for (i = 0; i < m_Windows.length; i++) {
+                     dValues[i] = m_Windows[i].getCellValueAsDouble(x, y, m_iBands[i]);
+                  }
+                  iClass = getClass(dValues);
+                  m_Result.setCellValue(x, y, iClass);
+                  for (i = 0; i < m_Windows.length; i++) {
+                     dNewMean[iClass][i] += dValues[i];
+                  }
+                  m_iCells[iClass]++;
+                  if (iClass != iPrevClass) {
+                     iChangedCells++;
+                  }
+               }
+            }
+         }
+
+         for (i = 0; i < m_Windows.length; i++) {
+            for (int j = 0; j < m_iClasses; j++) {
+               dNewMean[j][i] /= m_iCells[j];
+            }
+         }
+
+         swap = m_dMean;
+         m_dMean = dNewMean;
+         dNewMean = swap;
+
+         setProgressText(Sextante.getText("Modified_cells") + Integer.toString(iChangedCells));
+
+         if (m_Task.isCanceled()) {
+            return false;
+         }
+
+      }
+      while (iChangedCells > m_iThreshold);
+
+      return true;
+
+   }
+
+
+   private int getClass(final double[] dValues) {
+
+      int iClass = 0;
+      double dMinDist = Double.MAX_VALUE;
+      double dDist;
+      double dDif;
+
+      for (int i = 0; i < m_iClasses; i++) {
+         dDist = 0;
+         for (int j = 0; j < dValues.length; j++) {
+            dDif = m_dMean[i][j] - dValues[j];
+            dDist += (dDif * dDif);
+         }
+         if (dDist < dMinDist) {
+            dMinDist = dDist;
+            iClass = i;
+         }
+      }
+
+      return iClass;
+   }
+
+
+   private void initValues() {
+
+      int i;
+      int x, y;
+      int iCells = 0;
+      boolean bNoData;
+      double dStep;
+      double dValue;
+      final double dMin[] = new double[m_Windows.length];
+      final double dMax[] = new double[m_Windows.length];
+
+      for (i = 0; i < m_Windows.length; i++) {
+         dMin[i] = Double.MAX_VALUE;
+         dMax[i] = Double.NEGATIVE_INFINITY;
+      }
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            bNoData = false;
+            for (i = 0; i < m_Windows.length; i++) {
+               dValue = m_Windows[i].getCellValueAsDouble(x, y, m_iBands[i]);
+               if (!m_Windows[i].isNoDataValue(dValue)) {
+                  dMin[i] = Math.min(dMin[i], dValue);
+                  dMax[i] = Math.max(dMax[i], dValue);
+               }
+               else {
+                  bNoData = true;
+               }
+            }
+            if (bNoData) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               iCells++;
+               m_Result.setCellValue(x, y, 0);
+            }
+         }
+      }
+
+      for (i = 0; i < m_Windows.length; i++) {
+         dStep = (dMax[i] - dMin[i]) / ((m_iClasses + 2));
+         for (int j = 0; j < m_iClasses; j++) {
+            m_dMean[j][i] = dMin[i] + dStep * (j + 1);
+         }
+      }
+
+      m_iThreshold = (int) (iCells * 0.02);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/cluster/ClusterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/roc/ROCAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/roc/ROCAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/roc/ROCAlgorithm.java	(revision 369)
@@ -0,0 +1,198 @@
+package es.unex.sextante.gridAnalysis.roc;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+public class ROCAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT               = "INPUT";
+   public static final String POINTS              = "POINTS";
+   public static final String GRAPH               = "GRAPH";
+   public static final String FIELD               = "FIELD";
+   public static final String AREA                = "AREA";
+
+   private IVectorLayer       m_Points;
+   private IRasterLayer       m_Suitability;
+   private XYSeries           serie;
+   private boolean            bPresence[];
+   private int                m_iField;
+   private final double       m_dLastSensitivity  = 0;
+   private final double       m_dLastEspecificity = 0;
+   private double             m_dArea;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("ROC_curve"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Suitability"), true);
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Observed_points"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Presence-abscence_field"), POINTS);
+         addOutputChart(GRAPH, Sextante.getText("ROC"));
+         addOutputText(AREA, Sextante.getText("ROC_curve"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_dArea = 0;
+
+      m_Suitability = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      m_Suitability.setFullExtent();
+
+      final XYSeriesCollection dataset = new XYSeriesCollection();
+      serie = new XYSeries(Sextante.getText("Profile"));
+      dataset.addSeries(serie);
+
+      createPointsData();
+      calculateCurveData();
+
+      final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, true,
+               true);
+
+      final ChartPanel jPanelChart = new ChartPanel(chart);
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart(GRAPH, Sextante.getText("ROC"), jPanelChart);
+
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("ROC_curve"));
+      doc.addHeader(Sextante.getText("ROC_curve"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("area_under_the_curve") + ":" + Double.toString(m_dArea));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(AREA, Sextante.getText("ROC_curve"), doc.getHTMLCode());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createPointsData() {
+
+      int iPoints;
+
+      iPoints = m_Points.getShapesCount();
+
+      bPresence = new boolean[iPoints];
+
+      int i = 0;
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext()) {
+         try {
+            final IFeature feature = iter.next();
+            final Object[] record = feature.getRecord().getValues();
+            final String sValue = record[m_iField].toString();
+            final double dValue = Double.parseDouble(sValue);
+            bPresence[i] = (dValue != 0.0);
+         }
+         catch (final Exception e) {
+            bPresence[i] = false;
+         }
+         i++;
+      }
+      iter.close();
+
+   }
+
+
+   private void calculateCurveData() throws IteratorException {
+
+      double dValue;
+      int iFalsePositives;
+      int iTruePositives;
+      int iTrueNegatives;
+      int iFalseNegatives;
+
+      for (int i = 0; (i < 100) && setProgress(i, 100); i++) {
+         final double dCutoff = (i) / 100.;
+         iFalsePositives = 0;
+         iTruePositives = 0;
+         iFalseNegatives = 0;
+         iTrueNegatives = 0;
+         int j = 0;
+         final IFeatureIterator iter = m_Points.iterator();
+         while (iter.hasNext()) {
+            final IFeature feature = iter.next();
+            final Coordinate pt = feature.getGeometry().getCoordinate();
+            dValue = m_Suitability.getValueAt(pt.x, pt.y);
+            if (!m_Suitability.isNoDataValue(dValue)) {
+               if (dValue < dCutoff) {
+                  if (bPresence[j]) {
+                     iTruePositives++;
+                  }
+                  else {
+                     iFalsePositives++;
+                  }
+               }
+               else {
+                  if (bPresence[j]) {
+                     iFalseNegatives++;
+                  }
+                  else {
+                     iTrueNegatives++;
+                  }
+               }
+            }
+            j++;
+         }
+         iter.close();
+
+         final double dSensitivity = ((double) iTruePositives) / (double) (iTruePositives + iFalseNegatives);
+         final double dEspecificity = ((double) iFalsePositives) / (double) (iFalsePositives + iTrueNegatives);
+         if (!Double.isNaN(dSensitivity) && !Double.isNaN(dEspecificity)) {
+            serie.add(dSensitivity, dEspecificity);
+            m_dArea += (dEspecificity + m_dLastEspecificity) / 2. * (dSensitivity - m_dLastSensitivity);
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/roc/ROCAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/owa/OWAAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/owa/OWAAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/owa/OWAAlgorithm.java	(revision 369)
@@ -0,0 +1,111 @@
+package es.unex.sextante.gridAnalysis.owa;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class OWAAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT   = "INPUT";
+   public static final String WEIGHTS = "WEIGHTS";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Ordered_Weighted_Averaging__OWA"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addFixedTable(WEIGHTS, Sextante.getText("Weights"), new String[] { Sextante.getText("Pesos") }, 3, false);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      double dResult;
+      double dValues[];
+      double dWeights[];
+      boolean bNoDataValue;
+      IRasterLayer windows[];
+
+      final ArrayList layers = m_Parameters.getParameterValueAsArrayList(INPUT);
+      final FixedTableModel weights = (FixedTableModel) m_Parameters.getParameterValueAsObject(WEIGHTS);
+
+      if ((layers.size() == 0) || (weights.getRowCount() == 0) || (weights.getRowCount() < layers.size())) {
+         return false;
+      }
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("OWA"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      dWeights = new double[layers.size()];
+      windows = new IRasterLayer[layers.size()];
+
+      for (i = 0; i < layers.size(); i++) {
+         windows[i] = (IRasterLayer) layers.get(i);
+         windows[i].setWindowExtent(result.getWindowGridExtent());
+         windows[i].setInterpolationMethod(GridWrapper.INTERPOLATION_BSpline);
+         try {
+            dWeights[i] = Double.parseDouble(weights.getValueAt(i, 0).toString());
+         }
+         catch (final NumberFormatException e) {
+            throw new GeoAlgorithmExecutionException(Sextante.getText("OWA_Invalid_weight"));
+         }
+      }
+
+      final int iNX = result.getWindowGridExtent().getNX();
+      final int iNY = result.getWindowGridExtent().getNY();
+
+      dValues = new double[layers.size()];
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            bNoDataValue = false;
+            for (i = 0; i < dValues.length; i++) {
+               dValues[i] = windows[i].getCellValueAsDouble(x, y);
+               if (windows[i].isNoDataValue(dValues[i])) {
+                  bNoDataValue = true;
+                  break;
+               }
+            }
+            if (bNoDataValue) {
+               result.setNoData(x, y);
+            }
+            else {
+               Arrays.sort(dValues);
+               dResult = 0;
+               for (i = 0; i < dValues.length; i++) {
+                  dResult += (dValues[i] * dWeights[i]);
+               }
+               result.setCellValue(x, y, dResult);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/owa/OWAAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropic/AccCostAnisotropicAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropic/AccCostAnisotropicAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropic/AccCostAnisotropicAlgorithm.java	(revision 369)
@@ -0,0 +1,245 @@
+package es.unex.sextante.gridAnalysis.accCostAnisotropic;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class AccCostAnisotropicAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  COST         = "COST";
+   public static final String  COSTDIR      = "COSTDIR";
+   public static final String  KFACTOR      = "KFACTOR";
+   public static final String  FEATURES     = "FEATURES";
+   public static final String  ACCCOST      = "ACCCOST";
+   public static final String  CLOSESTPOINT = "CLOSESTPOINT";
+
+   private final static int    m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private final static double m_dDist[]    = { 1, Math.sqrt(2.), 1, Math.sqrt(2.), 1, Math.sqrt(2.), 1, Math.sqrt(2.) };
+
+   private static final int    NO_DATA      = -1;
+   private static final int    DATA         = 1;
+   private static final double ANGLES[][]   = { { 135, 180, 225 }, { 90, 0, 270 }, { 45, 0, 315 } };
+
+   private int                 m_iNX, m_iNY;
+   private double              m_dK;
+   private IRasterLayer        m_Cost;
+   private IRasterLayer        m_CostDir;
+   private IRasterLayer        m_Features;
+   private IRasterLayer        m_AccCost;
+   private IRasterLayer        m_ClosestPoint;
+   private IRasterLayer        m_Points, m_Points2;
+   private ArrayList           m_AdjPoints, m_CentralPoints;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Accumulated_cost__anisotropic"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Maximum_unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(COSTDIR, Sextante.getText("Direction_of_maximum_cost_[degrees]"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Origin-destination_points"), true);
+         m_Parameters.addNumericalValue(KFACTOR, Sextante.getText("K"), 2, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"));
+         addOutputRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iPoint = 1;
+      double dValue;
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_CostDir = m_Parameters.getParameterValueAsRasterLayer(COSTDIR);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+
+      m_AdjPoints = new ArrayList();
+      m_CentralPoints = new ArrayList();
+
+      m_dK = m_Parameters.getParameterValueAsDouble(KFACTOR);
+
+      m_AccCost = getNewRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_ClosestPoint = getNewRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      final AnalysisExtent extent = m_AccCost.getWindowGridExtent();
+
+      m_Cost.setWindowExtent(extent);
+      m_Cost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_CostDir.setWindowExtent(extent);
+      m_CostDir.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_Features.setWindowExtent(extent);
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Cost.getNX();
+      m_iNY = m_Cost.getNY();
+
+      m_AccCost.setNoDataValue(NO_DATA);
+      m_AccCost.assignNoData();
+
+      m_Points = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_Points2 = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_Points.setNoDataValue(NO_DATA);
+      m_Points.assignNoData();
+
+      m_Points2.setNoDataValue(NO_DATA);
+      m_Points2.assignNoData();
+
+      m_ClosestPoint.assign(0);
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Features.isNoDataValue(dValue)) {
+               m_Points.setCellValue(x, y, DATA);
+               m_CentralPoints.add(new GridCell(x, y, iPoint));
+               m_AccCost.setCellValue(x, y, 0.0);
+               m_ClosestPoint.setCellValue(x, y, iPoint);
+               iPoint++;
+            }
+         }
+      }
+
+      calculateCost();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateCost() {
+
+      int i;
+      int iPt;
+      int iPoint;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dPrevAccCost;
+      GridCell cell;
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            iPoint = (int) cell.getValue();
+            if (m_Points.getCellValueAsInt(x, y) == DATA) {
+               m_Points.setCellValue(x, y, NO_DATA);
+               for (i = 0; i < 8; i++) {
+                  x2 = x + m_iOffsetX[i];
+                  y2 = y + m_iOffsetY[i];
+                  dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                  dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                  if ((dPrevAccCost > dAccCost) || m_AccCost.isNoDataValue(dPrevAccCost)) {
+                     final double dCostInDir = getCostInDir(x, y, m_iOffsetX[i], m_iOffsetY[i]);
+                     if (dCostInDir != NO_DATA) {
+                        dAccCost += dCostInDir * m_dDist[i];
+                        if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                           m_AccCost.setCellValue(x2, y2, dAccCost);
+                           m_ClosestPoint.setCellValue(x2, y2, iPoint);
+                           if (m_Points2.getCellValueAsInt(x2, y2) == NO_DATA) {
+                              m_Points2.setCellValue(x2, y2, DATA);
+                              m_AdjPoints.add(new GridCell(x2, y2, iPoint));
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         final IRasterLayer swap = m_Points;
+         m_Points = m_Points2;
+         m_Points2 = swap;
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         setProgressText(Integer.toString(m_AdjPoints.size()));
+
+      }
+   }
+
+
+   private double getCostInDir(final int x,
+                               final int y,
+                               final int iH,
+                               final int iV) {
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      double dCost1 = m_Cost.getCellValueAsDouble(x, y);
+      double dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+
+      final double dCostDir1 = m_CostDir.getCellValueAsDouble(x, y);
+      final double dCostDir2 = m_CostDir.getCellValueAsDouble(x2, y2);
+
+      if (m_Cost.isNoDataValue(dCost1) || m_Cost.isNoDataValue(dCost2) || m_CostDir.isNoDataValue(dCostDir1)
+          || m_CostDir.isNoDataValue(dCostDir2) || (dCost1 <= 0) || (dCost2 <= 0)) {
+         return NO_DATA;
+      }
+      else {
+         double dDifAngle1 = Math.abs(dCostDir1 - dAngle);
+         double dDifAngle2 = Math.abs(dCostDir2 - dAngle);
+
+         dDifAngle1 = Math.toRadians(dDifAngle1);
+         dDifAngle2 = Math.toRadians(dDifAngle2);
+
+         final double dCos1 = Math.cos(dDifAngle1);
+         final double dCos2 = Math.cos(dDifAngle2);
+
+         final int dSgn1 = signum(dCos1);
+         final int dSgn2 = signum(dCos2);
+
+         final double dExp1 = dSgn1 * Math.pow(Math.abs(dCos1), m_dK);
+         final double dExp2 = dSgn2 * Math.pow(Math.abs(dCos2), m_dK);
+
+         dCost1 = Math.pow(dCost1, dExp1) / 2.;
+         dCost2 = Math.pow(dCost2, dExp2) / 2.;
+
+         return dCost1 + dCost2;
+      }
+
+   }
+
+
+   private int signum(final double difAngle) {
+
+      if (difAngle < 0) {
+         return -1;
+      }
+      else {
+         return 1;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropic/AccCostAnisotropicAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/sumOfCostFromAllPoints/SumOfCostFromAllPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/sumOfCostFromAllPoints/SumOfCostFromAllPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/sumOfCostFromAllPoints/SumOfCostFromAllPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,156 @@
+package es.unex.sextante.gridAnalysis.sumOfCostFromAllPoints;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class SumOfCostFromAllPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   NO_DATA  = -1;
+
+   public static final String COST     = "COST";
+   public static final String FEATURES = "FEATURES";
+   public static final String ACCCOST  = "ACCCOST";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Cost;
+   IRasterLayer               m_Features;
+   IRasterLayer               m_AccCost, m_TotalCost;
+   ArrayList                  m_CentralPoints, m_AdjPoints;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Sum_of_cost_to_all_points"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Origin-destination_points"), true);
+         addOutputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+
+      m_TotalCost = getNewRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = m_TotalCost.getWindowGridExtent();
+      m_AccCost = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, extent);
+
+      m_Cost.setWindowExtent(extent);
+      m_Cost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_Features.setWindowExtent(extent);
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Cost.getNX();
+      m_iNY = m_Cost.getNY();
+
+      m_TotalCost.setNoDataValue(NO_DATA);
+      m_TotalCost.assign(0.0);
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Features.isNoDataValue(dValue)) {
+               m_CentralPoints.clear();
+               m_CentralPoints.add(new GridCell(x, y, 0));
+               m_AccCost.setCellValue(x, y, 0.0);
+               m_AccCost.setNoDataValue(NO_DATA);
+               m_AccCost.assignNoData();
+               calculateCost();
+               if (m_Task.isCanceled()) {
+                  return false;
+               }
+               m_AccCost.multiply(dValue);
+               m_TotalCost.add(m_AccCost);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateCost() {
+
+      int i, j;
+      int iPt;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dCost1, dCost2;
+      double dPrevAccCost;
+      GridCell cell;
+
+      final double dDist[][] = new double[3][3];
+
+      for (i = -1; i < 2; i++) {
+         for (j = -1; j < 2; j++) {
+            dDist[i + 1][j + 1] = Math.sqrt(i * i + j * j);
+         }
+      }
+
+      while (m_CentralPoints.size() != 0) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            dCost1 = m_Cost.getCellValueAsDouble(x, y);
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+                  if (!m_Cost.isNoDataValue(dCost1) && !m_Cost.isNoDataValue(dCost2)) {
+                     dAccCost = 0;
+                     dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                     dAccCost += ((dCost1 + dCost2) / 2.0 * dDist[i + 1][j + 1]);
+                     dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                     if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                        m_AccCost.setCellValue(x2, y2, dAccCost);
+                        m_AdjPoints.add(new GridCell(x2, y2, 0));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/sumOfCostFromAllPoints/SumOfCostFromAllPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropicB/AccCostAnisotropicBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropicB/AccCostAnisotropicBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropicB/AccCostAnisotropicBAlgorithm.java	(revision 369)
@@ -0,0 +1,284 @@
+package es.unex.sextante.gridAnalysis.accCostAnisotropicB;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.parameters.FixedTableModel;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class AccCostAnisotropicBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String   COST         = "COST";
+   public static final String   COSTDIR      = "COSTDIR";
+   public static final String   FEATURES     = "FEATURES";
+   public static final String   ACCCOST      = "ACCCOST";
+   public static final String   CLOSESTPOINT = "CLOSESTPOINT";
+   public static final String   FACTORS      = "FACTORS";
+
+   private static final int     NO_DATA      = -1;
+   private static final int     DATA         = 1;
+   private static final double  ANGLES[][]   = { { 135, 180, 225 }, { 90, 0, 270 }, { 45, 0, 315 } };
+
+   private final static int     m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int     m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+   private final static double  m_dDist[]    = { 1, Math.sqrt(2.), 1, Math.sqrt(2.), 1, Math.sqrt(2.), 1, Math.sqrt(2.) };
+
+   private int                  m_iNX, m_iNY;
+   private IRasterLayer         m_Cost;
+   private IRasterLayer         m_CostDir;
+   private IRasterLayer         m_Features;
+   private IRasterLayer         m_AccCost;
+   private IRasterLayer         m_ClosestPoint;
+   private IRasterLayer         m_Points, m_Points2;
+   private ArrayList            m_CentralPoints, m_AdjPoints;
+   private DeviationAndFactor[] m_Factors;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sColumnNames[] = new String[] { Sextante.getText("Difference"), Sextante.getText("Factor") };
+
+      setName(Sextante.getText("Accumulated_cost__anisotropic") + "(B)");
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Maximum_unitary_cost"), true);
+         m_Parameters.addInputRasterLayer(COSTDIR, Sextante.getText("Direction_of_maximum_cost_[degrees]"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Origin-destination_points"), true);
+         m_Parameters.addFixedTable(FACTORS, Sextante.getText("Cost_variation_factors"), sColumnNames, 5, false);
+         addOutputRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"));
+         addOutputRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iPoint = 1;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+      m_CostDir = m_Parameters.getParameterValueAsRasterLayer(COSTDIR);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+
+      final FixedTableModel factors = (FixedTableModel) m_Parameters.getParameterValueAsObject(FACTORS);
+
+      m_Factors = new DeviationAndFactor[factors.getRowCount()];
+      for (int i = 0; i < factors.getRowCount(); i++) {
+         final double dDeviation = Double.parseDouble(factors.getValueAt(i, 0).toString());
+         final double dFactor = Double.parseDouble(factors.getValueAt(i, 1).toString());
+         m_Factors[i] = new DeviationAndFactor(dDeviation, dFactor);
+      }
+
+      Arrays.sort(m_Factors);
+
+      m_AccCost = getNewRasterLayer(ACCCOST, Sextante.getText("Accumulated_cost"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_ClosestPoint = getNewRasterLayer(CLOSESTPOINT, Sextante.getText("Closest_points"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+      final AnalysisExtent extent = m_AccCost.getWindowGridExtent();
+
+      m_Cost.setWindowExtent(extent);
+      m_Cost.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_CostDir.setWindowExtent(extent);
+      m_CostDir.setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+
+      m_Features.setWindowExtent(extent);
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      m_iNX = m_Cost.getNX();
+      m_iNY = m_Cost.getNY();
+
+      m_Points = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_Points2 = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, extent);
+
+      m_Points.setNoDataValue(NO_DATA);
+      m_Points.assignNoData();
+
+      m_Points2.setNoDataValue(NO_DATA);
+      m_Points2.assignNoData();
+
+      m_AccCost.setNoDataValue(NO_DATA);
+      m_AccCost.assignNoData();
+
+      m_ClosestPoint.setNoDataValue(NO_DATA);
+      m_ClosestPoint.assignNoData();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0.0) && !m_Features.isNoDataValue(dValue)) {
+               m_CentralPoints.add(new GridCell(x, y, iPoint));
+               m_AccCost.setCellValue(x, y, 0.0);
+               m_ClosestPoint.setCellValue(x, y, iPoint);
+               iPoint++;
+            }
+         }
+      }
+
+      calculateCost();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateCost() {
+
+      int i;
+      int iPt;
+      int iPoint;
+      int x, y, x2, y2;
+      double dAccCost;
+      double dPrevAccCost;
+      GridCell cell;
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            iPoint = (int) cell.getValue();
+            if (m_Points.getCellValueAsInt(x, y) == DATA) {
+               m_Points.setCellValue(x, y, NO_DATA);
+               for (i = 0; i < 8; i++) {
+                  x2 = x + m_iOffsetX[i];
+                  y2 = y + m_iOffsetY[i];
+                  dAccCost = m_AccCost.getCellValueAsDouble(x, y);
+                  dPrevAccCost = m_AccCost.getCellValueAsDouble(x2, y2);
+                  if ((dPrevAccCost > dAccCost) || m_AccCost.isNoDataValue(dPrevAccCost)) {
+                     final double dCostInDir = getCostInDir(x, y, m_iOffsetX[i], m_iOffsetY[i]);
+                     if (dCostInDir != NO_DATA) {
+                        dAccCost += dCostInDir * m_dDist[i];
+                        if (m_AccCost.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                           m_AccCost.setCellValue(x2, y2, dAccCost);
+                           m_ClosestPoint.setCellValue(x2, y2, iPoint);
+                           if (m_Points2.getCellValueAsInt(x2, y2) == NO_DATA) {
+                              m_Points2.setCellValue(x2, y2, DATA);
+                              m_AdjPoints.add(new GridCell(x2, y2, iPoint));
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         final IRasterLayer swap = m_Points;
+         m_Points = m_Points2;
+         m_Points2 = swap;
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         setProgressText(Integer.toString(m_AdjPoints.size()));
+
+      }
+   }
+
+
+   private double getCostInDir(final int x,
+                               final int y,
+                               final int iH,
+                               final int iV) {
+
+      final double dAngle = ANGLES[iV + 1][iH + 1];
+
+      final int x2 = x + iH;
+      final int y2 = y + iV;
+
+      final double dCostDir1 = m_CostDir.getCellValueAsDouble(x, y);
+      final double dCostDir2 = m_CostDir.getCellValueAsDouble(x2, y2);
+      double dCost1 = m_Cost.getCellValueAsDouble(x, y);
+      double dCost2 = m_Cost.getCellValueAsDouble(x2, y2);
+
+      if (m_Cost.isNoDataValue(dCost1) || m_Cost.isNoDataValue(dCost1) || m_CostDir.isNoDataValue(dCostDir1)
+          || m_CostDir.isNoDataValue(dCostDir1)) {
+         return NO_DATA;
+      }
+      else {
+         final double dDifAngle1 = Math.abs(dCostDir1 - dAngle);
+         final double dDifAngle2 = Math.abs(dCostDir2 - dAngle);
+
+         dCost1 = getWeigthedCost(dCost1, dDifAngle1);
+         dCost2 = getWeigthedCost(dCost2, dDifAngle2);
+
+         return dCost1 + dCost2;
+      }
+
+   }
+
+
+   private double getWeigthedCost(final double cost,
+                                  final double difAngle) {
+
+      for (int i = 0; i < m_Factors.length - 1; i++) {
+         if ((m_Factors[i].deviation < difAngle) || (m_Factors[i + 1].deviation >= difAngle)) {
+            return m_Factors[i].factor * cost / 2.;
+         }
+      }
+
+      return cost / 2.;
+
+   }
+
+   private class DeviationAndFactor
+            implements
+               Comparable {
+
+      public double factor;
+      public double deviation;
+
+
+      DeviationAndFactor(final double dDeviation,
+                         final double dFactor) {
+
+         deviation = dDeviation;
+         factor = dFactor;
+      }
+
+
+      public int compareTo(final Object ob) throws ClassCastException {
+
+         if (!(ob instanceof DeviationAndFactor)) {
+            throw new ClassCastException();
+         }
+
+         final double dDeviation = ((DeviationAndFactor) ob).deviation;
+         final double dDif = this.deviation - dDeviation;
+
+         if (dDif > 0.0) {
+            return 1;
+         }
+         else if (dDif < 0.0) {
+            return -1;
+         }
+         else {
+            return 0;
+         }
+
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/accCostAnisotropicB/AccCostAnisotropicBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/polarToRect/PolarToRectAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/polarToRect/PolarToRectAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/polarToRect/PolarToRectAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.gridAnalysis.polarToRect;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class PolarToRectAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ANGLE    = "ANGLE";
+   public static final String DISTANCE = "DISTANCE";
+   public static final String X        = "X";
+   public static final String Y        = "Y";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Distance;
+   private IRasterLayer       m_Angle;
+   private IRasterLayer       m_X;
+   private IRasterLayer       m_Y;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Polar_to_Cartesian"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(ANGLE, Sextante.getText("Angle"), true);
+         m_Parameters.addInputRasterLayer(DISTANCE, Sextante.getText("Distance"), true);
+         addOutputRasterLayer(X, "X");
+         addOutputRasterLayer(Y, "Y");
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dAngle, dDist;
+      double dX, dY;
+
+      m_Distance = m_Parameters.getParameterValueAsRasterLayer(DISTANCE);
+      m_Angle = m_Parameters.getParameterValueAsRasterLayer(ANGLE);
+
+      m_X = getNewRasterLayer(X, "X", IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Y = getNewRasterLayer(Y, "Y", IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = m_X.getWindowGridExtent();
+
+      m_Distance.setWindowExtent(extent);
+      m_Angle.setWindowExtent(extent);
+
+      m_iNX = extent.getNX();
+      m_iNY = extent.getNY();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dDist = m_Distance.getCellValueAsDouble(x, y);
+            dAngle = m_Angle.getCellValueAsDouble(x, y);
+            if (!m_Distance.isNoDataValue(dDist) && !m_Angle.isNoDataValue(dAngle)) {
+               dX = Math.cos(dAngle) * dDist;
+               dY = Math.sin(dAngle) * dDist;
+               m_X.setCellValue(x, y, dX);
+               m_Y.setCellValue(x, y, dY);
+            }
+            else {
+               m_X.setNoData(x, y);
+               m_Y.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/polarToRect/PolarToRectAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/rectToPolar/RectToPolarAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/rectToPolar/RectToPolarAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/rectToPolar/RectToPolarAlgorithm.java	(revision 369)
@@ -0,0 +1,101 @@
+package es.unex.sextante.gridAnalysis.rectToPolar;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class RectToPolarAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ANGLE = "ANGLE";
+   public static final String DIST  = "DIST";
+   public static final String X     = "X";
+   public static final String Y     = "Y";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Distance;
+   IRasterLayer               m_Angle;
+   IRasterLayer               m_X;
+   IRasterLayer               m_Y;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cartesian_to_polar"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(X, Sextante.getText("X"), true);
+         m_Parameters.addInputRasterLayer(Y, Sextante.getText("Y"), true);
+         addOutputRasterLayer(ANGLE, Sextante.getText("Angle"));
+         addOutputRasterLayer(DIST, Sextante.getText("Distance"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dAngle, dDist;
+      double dX, dY;
+
+      m_X = m_Parameters.getParameterValueAsRasterLayer(X);
+      m_Y = m_Parameters.getParameterValueAsRasterLayer(Y);
+
+      m_Distance = getNewRasterLayer(DIST, Sextante.getText("Distance"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Angle = getNewRasterLayer(ANGLE, Sextante.getText("Angle"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = m_Distance.getWindowGridExtent();
+
+      m_X.setWindowExtent(extent);
+      m_Y.setWindowExtent(extent);
+
+      m_iNX = extent.getNX();
+      m_iNY = extent.getNY();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dX = m_X.getCellValueAsDouble(x, y);
+            dY = m_Y.getCellValueAsDouble(x, y);
+            if (!m_Y.isNoDataValue(dY) && !m_X.isNoDataValue(dX)) {
+               dDist = Math.sqrt(dX * dX + dY * dY);
+               dAngle = Math.atan(dY / dX);
+               if (dX * dY > 0) {
+                  if ((dY < 0) && (dX < 0)) {
+                     dAngle += Math.PI;
+                  }
+               }
+               else {
+                  if (dY < 0) {
+                     dAngle = 2 * Math.PI - dAngle;
+                  }
+                  else {
+                     dAngle = Math.PI - dAngle;
+                  }
+               }
+               m_Distance.setCellValue(x, y, dDist);
+               m_Angle.setCellValue(x, y, dAngle);
+            }
+            else {
+               m_Distance.setNoData(x, y);
+               m_Angle.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/rectToPolar/RectToPolarAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutes/CostInRoutesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutes/CostInRoutesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutes/CostInRoutesAlgorithm.java	(revision 369)
@@ -0,0 +1,187 @@
+package es.unex.sextante.gridAnalysis.costInRoutes;
+
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+public class CostInRoutesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String ROUTES    = "ROUTES";
+   public static final String COST      = "COST";
+   public static final String RESULT    = "RESULT";
+
+   private IRasterLayer       m_Cost;
+   private double[]           m_dDist;
+   private double[]           m_dCost;
+   private double             m_dLastX, m_dLastY;
+   private int                m_iPoints = 0;
+   private int                m_iCurrentRoute;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Cost_for_predefined_routes"));
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(ROUTES, Sextante.getText("Routes"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addInputRasterLayer(COST, Sextante.getText("Cost"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Routes_and_cost"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer routes = m_Parameters.getParameterValueAsVectorLayer(ROUTES);
+      m_Cost = m_Parameters.getParameterValueAsRasterLayer(COST);
+
+      if (routes.getShapesCount() == 0) {
+         return false;
+      }
+
+      final int iShapesCount = routes.getShapesCount();
+      m_iCurrentRoute = 0;
+      m_Cost.setFullExtent();
+      m_dCost = new double[routes.getShapesCount()];
+      m_dDist = new double[routes.getShapesCount()];
+      final IFeatureIterator iter = routes.iterator();
+      while (iter.hasNext() && setProgress(m_iCurrentRoute, iShapesCount)) {
+         m_iPoints = 0;
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         processLine(geom.getCoordinates());
+         m_iCurrentRoute++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final Object[][] values = new Object[2][routes.getShapesCount()];
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Cost") };
+      final Class[] types = { Double.class, Double.class };
+      for (int i = 0; i < routes.getShapesCount(); i++) {
+         values[0][i] = new Double(m_dDist[i]);
+         values[1][i] = new Double(m_dCost[i]);
+      }
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final Output out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setDescription(Sextante.getText("Routes"));
+      out.setOutputChannel(channel);
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, routes, channel, sFields, values, types));
+      addOutputObject(out);
+
+      return true;
+
+   }
+
+
+   private void processLine(final Coordinate coords[]) {
+
+      int i;
+      double x, y, x2, y2;
+
+      for (i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         processSegment(x, y, x2, y2);
+      }
+
+   }
+
+
+   private void processSegment(double x,
+                               double y,
+                               final double x2,
+                               final double y2) {
+
+      double dx, dy, d, n;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_Cost.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_Cost.getWindowCellSize();
+         }
+         else {
+            dy /= m_Cost.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_Cost.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            addPoint(x, y);
+         }
+      }
+
+   }
+
+
+   private void addPoint(final double x,
+                         final double y) {
+
+      double dDX, dDY;
+
+      final double z = m_Cost.getValueAt(x, y);
+
+      if (m_iPoints == 0) {
+         m_dDist[m_iCurrentRoute] = 0.0;
+         m_dCost[m_iCurrentRoute] = 0.0;
+      }
+      else {
+         dDX = x - m_dLastX;
+         dDY = y - m_dLastY;
+         m_dDist[m_iCurrentRoute] += Math.sqrt(dDX * dDX + dDY * dDY);
+         if (!m_Cost.isNoDataValue(z)) {
+            m_dCost[m_iCurrentRoute] += z;
+         }
+      }
+
+      m_dLastX = x;
+      m_dLastY = y;
+      m_iPoints++;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/costInRoutes/CostInRoutesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/predictiveModels/PredictiveModelsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/predictiveModels/PredictiveModelsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/predictiveModels/PredictiveModelsAlgorithm.java	(revision 369)
@@ -0,0 +1,373 @@
+
+
+package es.unex.sextante.gridAnalysis.predictiveModels;
+
+
+import java.util.ArrayList;
+
+import Jama.Matrix;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+
+public class PredictiveModelsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  INPUT       = "INPUT";
+   public static final String  POINTS      = "POINTS";
+   public static final String  METHOD      = "METHOD";
+   public static final String  CUTOFF      = "CUTOFF";
+   public static final String  RESULT      = "RESULT";
+
+   private static final double NODATA      = -99999999999999.;
+   private static final int    DISTTOAVG   = 0;
+   private static final int    MAHALANOBIS = 1;
+   private static final int    BIOCLIM     = 2;
+
+   private int                 m_iNX, m_iNY;
+   private int                 m_iMethod;
+   private double              m_dCutoff;
+   private double              m_dMean[];
+   private double              m_dMin[];
+   private double              m_dMax[];
+   private double              m_dStdDev[];
+   private ArrayList           m_RasterLayers;
+   private IVectorLayer        m_Points;
+   private IRasterLayer        m_Windows[];
+   private IRasterLayer        m_Result;
+   private Matrix              m_Inverse;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sOptions[] = { Sextante.getText("Distance_to_mean_value"), Sextante.getText("Mahalanobis_distance"),
+               Sextante.getText("BIOCLIM") };
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setName(Sextante.getText("Predictive_models"));
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Predictors"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Presence_points"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sOptions);
+         m_Parameters.addNumericalValue(CUTOFF, Sextante.getText("Cutoff__BIOCLIM"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0.1, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Suitability"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+
+      m_RasterLayers = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_dCutoff = m_Parameters.getParameterValueAsDouble(CUTOFF);
+
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iCount = m_Points.getShapesCount();
+
+      if ((m_RasterLayers.size() == 0) || (iCount < 3)) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Numero_insuficiente_de_puntos"));
+      }
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Suitability"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      m_Windows = new IRasterLayer[m_RasterLayers.size()];
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         m_Windows[i] = (IRasterLayer) m_RasterLayers.get(i);
+         m_Windows[i].setWindowExtent(m_Result.getWindowGridExtent());
+         m_Windows[i].setInterpolationMethod(GridWrapper.INTERPOLATION_BSpline);
+      }
+
+      m_iNX = m_Result.getWindowGridExtent().getNX();
+      m_iNY = m_Result.getWindowGridExtent().getNY();
+
+      calculateStatisticalValues();
+
+      calculateSuitability();
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void calculateSuitability() {
+
+      switch (m_iMethod) {
+         case DISTTOAVG:
+            calculateDistanceToAverage();
+            break;
+         case MAHALANOBIS:
+            calculateMahalanobisDistance();
+            break;
+         case BIOCLIM:
+            calculateBioclim();
+            break;
+      }
+
+   }
+
+
+   private void calculateBioclim() {
+
+      int i;
+      int x, y;
+      double dValue;
+      double dSuitability;
+      boolean bNoDataValue;
+
+      setProgressText(Sextante.getText("Calculating_distances"));
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            bNoDataValue = false;
+            dSuitability = 1;
+            for (i = 0; i < m_Windows.length; i++) {
+               dValue = m_Windows[i].getCellValueAsDouble(x, y);
+               if (m_Windows[i].isNoDataValue(dValue)) {
+                  bNoDataValue = true;
+                  break;
+               }
+               else {
+                  if (Math.abs(dValue - m_dMean[i]) > m_dCutoff * m_dStdDev[i]) {
+                     if ((dValue > m_dMax[i]) && (dValue < m_dMin[i])) {
+                        dSuitability = 0.5;
+                     }
+                     else {
+                        dSuitability = 0;
+                        break;
+                     }
+                  }
+               }
+            }
+            if (bNoDataValue) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               m_Result.setCellValue(x, y, dSuitability);
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateDistanceToAverage() {
+
+      int i;
+      int x, y;
+      double dValue;
+      double dDist;
+      boolean bNoDataValue;
+      final double dNormalizeFactor = Math.sqrt(m_Windows.length);
+
+      setProgressText(Sextante.getText("Calculating_distances"));
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            bNoDataValue = false;
+            dDist = 0;
+            for (i = 0; i < m_Windows.length; i++) {
+               dValue = m_Windows[i].getCellValueAsDouble(x, y);
+               if (m_Windows[i].isNoDataValue(dValue)) {
+                  bNoDataValue = true;
+                  break;
+               }
+               else {
+                  dDist += Math.pow((dValue - m_dMean[i]) / (m_dMax[i] - m_dMin[i]), 2.);
+               }
+            }
+            if (bNoDataValue) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               m_Result.setCellValue(x, y, dDist / dNormalizeFactor);
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateMahalanobisDistance() {
+
+      int i;
+      int x, y;
+      double dValue;
+      double dDist;
+      boolean bNoDataValue;
+      final Matrix values = new Matrix(1, m_Windows.length);
+
+      setProgressText(Sextante.getText("Calculating_distances"));
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            bNoDataValue = false;
+            for (i = 0; i < m_Windows.length; i++) {
+               dValue = m_Windows[i].getCellValueAsDouble(x, y);
+               if (m_Windows[i].isNoDataValue(dValue)) {
+                  bNoDataValue = true;
+                  break;
+               }
+               else {
+                  values.set(0, i, dValue - m_dMean[i]);
+               }
+            }
+            if (bNoDataValue) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               final Matrix temp = values.times(m_Inverse);
+               dDist = temp.times(values.transpose()).get(0, 0);
+               m_Result.setCellValue(x, y, dDist);
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateStatisticalValues() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iCount;
+      int iRow, iCol;
+      int iValues[];
+      double dValue;
+      double dCov;
+      final double covariances[][] = new double[m_Windows.length][m_Windows.length];
+      double values[][];
+      Coordinate pt;
+
+      try {
+         iCount = m_Points.getShapesCount();
+         values = new double[m_Windows.length][iCount];
+         iValues = new int[m_Windows.length];
+         m_dMean = new double[m_Windows.length];
+         m_dMin = new double[m_Windows.length];
+         m_dMax = new double[m_Windows.length];
+         m_dStdDev = new double[m_Windows.length];
+         for (i = 0; i < m_Windows.length; i++) {
+            m_dMin[i] = Double.MAX_VALUE;
+            m_dMax[i] = Double.NEGATIVE_INFINITY;
+         }
+         setProgressText(Sextante.getText("Calculating_statistical_values"));
+         final IFeatureIterator iter = m_Points.iterator();
+         i = 0;
+         while (iter.hasNext() && setProgress(i, iCount)) {
+            final IFeature feature = iter.next();
+            pt = feature.getGeometry().getCoordinate();
+            for (j = 0; j < m_Windows.length; j++) {
+               dValue = m_Windows[j].getValueAt(pt.x, pt.y);
+               if (!m_Windows[j].isNoDataValue(dValue)) {
+                  values[j][i] = dValue;
+                  m_dMean[j] += dValue;
+                  m_dMin[j] = Math.min(m_dMin[j], dValue);
+                  m_dMax[j] = Math.max(m_dMax[j], dValue);
+                  iValues[j]++;
+               }
+               else {
+                  values[j][i] = NODATA;
+               }
+            }
+            i++;
+         }
+         iter.close();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+         for (i = 0; i < m_Windows.length; i++) {
+            if (iValues[i] != 0) {
+               m_dMean[i] /= iValues[i];
+            }
+            else {
+               throw new GeoAlgorithmExecutionException(Sextante.getText("Error_calculando_valores_estadisticos"));
+            }
+         }
+
+         if (m_iMethod == MAHALANOBIS) {
+            for (iRow = 0; iRow < m_Windows.length; iRow++) {
+               for (iCol = 0; iCol < iRow + 1; iCol++) {
+                  dCov = calculateCovariance(values[iCol], m_dMean[iCol], values[iRow], m_dMean[iRow]);
+                  if (dCov != NODATA) {
+                     covariances[iRow][iCol] = dCov;
+                     covariances[iCol][iRow] = dCov;
+                  }
+                  else {
+                     throw new GeoAlgorithmExecutionException(Sextante.getText("Error_calculando_valores_estadisticos"));
+                  }
+               }
+            }
+
+            final Matrix C = new Matrix(covariances);
+            m_Inverse = C.inverse();
+         }
+         else if (m_iMethod == BIOCLIM) {
+            for (i = 0; i < m_Windows.length; i++) {
+               m_dStdDev[i] = calculateCovariance(values[i], m_dMean[i], values[i], m_dMean[i]);
+            }
+         }
+
+
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Error_calculando_valores_estadisticos"));
+      }
+   }
+
+
+   private double calculateCovariance(final double[] xx,
+                                      final double x,
+                                      final double[] yy,
+                                      final double y) {
+
+      double dSum = 0;
+      int iValues = 0;
+
+      for (int i = 0; i < yy.length; i++) {
+         if ((xx[i] != NODATA) && (yy[i] != NODATA)) {
+            dSum += (xx[i] - x) * (yy[i] - y);
+            iValues++;
+         }
+      }
+      if (iValues > 1) {
+         return dSum / (iValues - 1);
+      }
+      else {
+         return NODATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/predictiveModels/PredictiveModelsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassification/SupervisedClassificationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassification/SupervisedClassificationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassification/SupervisedClassificationAlgorithm.java	(revision 369)
@@ -0,0 +1,561 @@
+package es.unex.sextante.gridAnalysis.supervisedClassification;
+
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+public class SupervisedClassificationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT                 = "INPUT";
+   public static final String POLYGONS              = "POLYGONS";
+   public static final String FIELD                 = "FIELD";
+   public static final String METHOD                = "METHOD";
+   public static final String CLASSIFICATION        = "CLASSIFICATION";
+   public static final String CLASSES               = "CLASSES";
+
+   public static final int    METHOD_PARALELLPIPED  = 0;
+   public static final int    METHOD_MIN_DISTANCE   = 1;
+   public static final int    METHOD_MAX_LIKELIHOOD = 2;
+
+   private int                m_iMinX, m_iMinY;
+   private int                m_iField;
+   private IRasterLayer[]     m_Window;
+   private IRasterLayer       m_Output;
+   private ArrayList          m_Bands;
+   private IVectorLayer       m_Polygons;
+   private ITable             m_Table;
+   private HashMap            m_Classes;
+   private int[]              m_iBands;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Parallelepiped"), Sextante.getText("Minimum_distance"),
+               Sextante.getText("Maximum_likelihood") };
+
+      setName(Sextante.getText("Supervised_classification"));
+      setGroup(Sextante.getText("Raster_layer_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Bands"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field_with_class_value"), "POLYGONS");
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         addOutputRasterLayer(CLASSIFICATION, Sextante.getText("Classification"));
+         addOutputTable(CLASSES, Sextante.getText("Classes"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      AnalysisExtent ge;
+
+      final int iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      m_Bands = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_Polygons = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+
+      if (m_Bands.size() == 0) {
+         throw new GeoAlgorithmExecutionException("At least one band is needed to run this algorithm");
+      }
+
+      m_Classes = new HashMap();
+
+      getClassInformation();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      m_Output = getNewRasterLayer(CLASSIFICATION, Sextante.getText("Classification"), IRasterLayer.RASTER_DATA_TYPE_SHORT);
+      m_Output.setNoDataValue(-1);
+      ge = m_Output.getWindowGridExtent();
+
+      for (i = 0; i < m_Window.length; i++) {
+         m_Window[i].setWindowExtent(ge);
+      }
+
+      switch (iMethod) {
+         case 0:
+            doParalellpiped();
+         case 1:
+         default:
+            doMinimumDistance();
+         case 2:
+            doMaximumLikelihood();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void getClassInformation() throws UnsupportedOutputChannelException {
+
+      int i, j;
+      int iGrid;
+      Object classID;
+      Set set;
+      Iterator iter;
+      RasterLayerAndBand band;
+      ArrayList stats;
+      String sClass;
+      final String sField[] = new String[1 + m_Bands.size() * 2];
+      final Class types[] = new Class[1 + m_Bands.size() * 2];
+      final Object values[] = new Object[m_Bands.size() * 2 + 1];
+      SimpleStats substats;
+
+      sField[0] = Sextante.getText("Name");
+      types[0] = String.class;
+      m_Window = new IRasterLayer[m_Bands.size()];
+      for (i = 0; i < m_Bands.size(); i++) {
+         band = (RasterLayerAndBand) m_Bands.get(i);
+         m_iBands = new int[m_Bands.size()];
+         m_iBands[i] = band.getBand();
+         m_Window[i] = band.getRasterLayer();
+         final AnalysisExtent extent = getAdjustedGridExtent(i);
+         m_Window[i].setWindowExtent(extent);
+         sField[i * 2 + 1] = band.getRasterLayer().getName() + "|" + Integer.toString(band.getBand());
+         sField[i * 2 + 2] = band.getRasterLayer().getName() + "|" + Integer.toString(band.getBand());
+         types[i * 2 + 1] = Double.class;
+         types[i * 2 + 2] = Double.class;
+      }
+
+
+      setProgressText(Sextante.getText("Calculating_spectral_signatures"));
+      i = 0;
+      final int iShapeCount = m_Polygons.getShapesCount();
+      final IFeatureIterator featureIter = m_Polygons.iterator();
+      while (featureIter.hasNext() && setProgress(i, iShapeCount)) {
+         IFeature feature;
+         try {
+            feature = featureIter.next();
+            final Geometry geometry = feature.getGeometry();
+            final Object[] record = feature.getRecord().getValues();
+            sClass = record[m_iField].toString();
+            if (m_Classes.containsKey(sClass)) {
+               stats = (ArrayList) m_Classes.get(sClass);
+            }
+            else {
+               stats = new ArrayList();
+               for (j = 0; j < m_Bands.size(); j++) {
+                  stats.add(new SimpleStats());
+               }
+               m_Classes.put(sClass, stats);
+            }
+            doPolygon(geometry, stats);
+            i++;
+         }
+         catch (final IteratorException e) {
+            //we ignore wrong features
+         }
+      }
+      featureIter.close();
+
+      if (m_Task.isCanceled()) {
+         return;
+      }
+
+      m_Table = getNewTable(CLASSES, Sextante.getText("Classes"), types, sField);
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+
+      while (iter.hasNext()) {
+         classID = iter.next();
+         stats = (ArrayList) m_Classes.get(classID);
+         values[0] = new String(classID.toString());
+         for (iGrid = 0; iGrid < m_Bands.size(); iGrid++) {
+            substats = (SimpleStats) stats.get(iGrid);
+            values[1 + iGrid * 2] = new Double(substats.getMean());
+            values[2 + iGrid * 2] = new Double(substats.getStdDev());
+         }
+         m_Table.addRecord(values);
+      }
+
+   }
+
+
+   private void doPolygon(final Geometry geom,
+                          final ArrayList stats) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part, stats);
+      }
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+
+   }
+
+
+   private AnalysisExtent getAdjustedGridExtent(final int iLayer) {
+
+      double iMaxX, iMaxY;
+      double dMinX, dMinY;
+      double dMinX2, dMinY2, dMaxX2, dMaxY2;
+      double dCellSize;
+      final AnalysisExtent ge = new AnalysisExtent();
+
+      final Rectangle2D rect = m_Polygons.getFullExtent();
+      dMinX = m_Window[iLayer].getLayerGridExtent().getXMin();
+      dMinY = m_Window[iLayer].getLayerGridExtent().getYMin();
+      dCellSize = m_Window[iLayer].getLayerGridExtent().getCellSize();
+
+      m_iMinX = (int) Math.floor((rect.getMinX() - dMinX) / dCellSize);
+      iMaxX = Math.ceil((rect.getMaxX() - dMinX) / dCellSize);
+      m_iMinY = (int) Math.floor((rect.getMinY() - dMinY) / dCellSize);
+      iMaxY = Math.ceil((rect.getMaxY() - dMinY) / dCellSize);
+
+      dMinX2 = dMinX + m_iMinX * dCellSize;
+      dMinY2 = dMinY + m_iMinY * dCellSize;
+      dMaxX2 = dMinX + iMaxX * dCellSize;
+      dMaxY2 = dMinY + iMaxY * dCellSize;
+
+      ge.setCellSize(dCellSize);
+      ge.setXRange(dMinX2, dMaxX2, true);
+      ge.setYRange(dMinY2, dMaxY2, true);
+
+      return ge;
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom,
+                              final ArrayList stats) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int iNX, iNY;
+      int i;
+      int x, y, ix, xStart, xStop;
+      int iPoint;
+      double yPos;
+      double dValue;
+      AnalysisExtent ge;
+      SimpleStats substats;
+      Coordinate pLeft, pRight, pa, pb, p;
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (i = 0; i < m_Window.length; i++) {
+         p = new Coordinate();
+         substats = (SimpleStats) stats.get(i);
+         ge = m_Window[i].getWindowGridExtent();
+         iNX = ge.getNX();
+         iNY = ge.getNY();
+         bCrossing = new boolean[iNX];
+
+         xStart = (int) ((extent.getMinX() - ge.getXMin()) / ge.getCellSize()) - 1;
+         if (xStart < 0) {
+            xStart = 0;
+         }
+
+         xStop = (int) ((extent.getMaxX() - ge.getXMin()) / ge.getCellSize()) + 1;
+         if (xStop >= iNX) {
+            xStop = iNX - 1;
+         }
+
+         for (y = 0, yPos = ge.getYMax(); y < iNY; y++, yPos -= ge.getCellSize()) {
+            if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+               Arrays.fill(bCrossing, false);
+               pLeft = new Coordinate(ge.getXMin() - 1.0, yPos);
+               pRight = new Coordinate(ge.getXMax() + 1.0, yPos);
+
+               pb = points[points.length - 1];
+
+               for (iPoint = 0; iPoint < points.length; iPoint++) {
+                  pa = pb;
+                  pb = points[iPoint];
+
+                  if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                     getCrossing(p, pa, pb, pLeft, pRight);
+
+                     ix = (int) ((p.x - ge.getXMin()) / ge.getCellSize() + 1.0);
+
+                     if (ix < 0) {
+                        ix = 0;
+                     }
+                     else if (ix >= iNX) {
+                        ix = iNX - 1;
+                     }
+
+                     bCrossing[ix] = !bCrossing[ix];
+                  }
+               }
+
+               for (x = xStart, bFill = false; x <= xStop; x++) {
+                  if (bCrossing[x]) {
+                     bFill = !bFill;
+                  }
+                  if (bFill) {
+                     dValue = m_Window[i].getCellValueAsDouble(x /*+ m_iMinX - 1*/, y /*+ m_iMinY - 1*/);
+                     if (!m_Window[i].isNoDataValue(dValue)) {
+                        substats.addValue(dValue);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void doParalellpiped() {
+
+      int iNX, iNY;
+      int x, y;
+      int iMatchingClass = 0;
+      int iClass, iGrid;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      final double dStdDev[][] = new double[m_Classes.size()][m_Window.length];
+      double dValue;
+      ArrayList stats;
+      SimpleStats substats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            substats = ((SimpleStats) stats.get(iGrid));
+            dMean[iClass][iGrid] = substats.getMean();
+            dStdDev[iClass][iGrid] = Math.sqrt(substats.getVariance());
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0; iClass < m_Classes.size(); iClass++) {
+               iMatchingClass = iClass;
+               for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     if (Math.abs(m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid]) > dStdDev[iClass][iGrid]) {
+                        iMatchingClass = -1;
+                        break;
+                     }
+                  }
+                  else {
+                     break;
+                  }
+               }
+               if (iMatchingClass != -1) {
+                  break;
+               }
+            }
+            if (iMatchingClass != -1) {
+               m_Output.setCellValue(x, y, iMatchingClass + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void doMinimumDistance() {
+
+      int iNX, iNY;
+      int x, y;
+      int iClass, iGrid, iMin = 0;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      double dMin, d, e;
+      double dValue;
+      ArrayList stats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            dMean[iClass][iGrid] = ((SimpleStats) stats.get(iGrid)).getMean();
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0, dMin = -1.0; iClass < m_Classes.size(); iClass++) {
+               for (iGrid = 0, d = 0.0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     e = m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid];
+                     d += e * e;
+                     if ((dMin < 0.0) || (dMin > d)) {
+                        dMin = d;
+                        iMin = iClass;
+                     }
+                  }
+                  else {
+                     dMin = -1;
+                  }
+               }
+            }
+
+            if (dMin >= 0.0) {
+               m_Output.setCellValue(x, y, iMin + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void doMaximumLikelihood() {
+
+      int iNX, iNY;
+      int x, y;
+      int iClass, iGrid, iMax = 0;
+      final double dMean[][] = new double[m_Classes.size()][m_Window.length];
+      final double dStdDev[][] = new double[m_Classes.size()][m_Window.length];
+      final double dK[][] = new double[m_Classes.size()][m_Window.length];
+      double dMax, d, e;
+      double dValue;
+      ArrayList stats;
+      SimpleStats substats;
+      Set set;
+      Iterator iter;
+
+      iNX = m_Output.getWindowGridExtent().getNX();
+      iNY = m_Output.getWindowGridExtent().getNY();
+
+      set = m_Classes.keySet();
+      iter = set.iterator();
+      iClass = 0;
+      while (iter.hasNext()) {
+         stats = (ArrayList) m_Classes.get(iter.next());
+         for (iGrid = 0; iGrid < m_Window.length; iGrid++) {
+            substats = ((SimpleStats) stats.get(iGrid));
+            dMean[iClass][iGrid] = substats.getMean();
+            dStdDev[iClass][iGrid] = Math.sqrt(substats.getVariance());
+            dK[iClass][iGrid] = 1.0 / (dStdDev[iClass][iGrid] * Math.sqrt(2.0 * Math.PI));
+         }
+         iClass++;
+      }
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            for (iClass = 0, dMax = 0.0; iClass < m_Classes.size(); iClass++) {
+               for (iGrid = 0, d = 0.0; iGrid < m_Window.length; iGrid++) {
+                  dValue = m_Window[iGrid].getCellValueAsDouble(x, y);
+                  if (!m_Window[iGrid].isNoDataValue(dValue)) {
+                     e = (m_Window[iGrid].getCellValueAsDouble(x, y) - dMean[iClass][iGrid]) / dStdDev[iClass][iGrid];
+                     e = dK[iClass][iGrid] * Math.exp(-0.5 * e * e);
+                     d += e * e;
+                     if (dMax < d) {
+                        dMax = d;
+                        iMax = iClass;
+                     }
+                  }
+                  else {
+                     dMax = -1;
+                  }
+               }
+            }
+
+            if (dMax > 0.0) {
+               m_Output.setCellValue(x, y, iMax + 1);
+            }
+            else {
+               m_Output.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/supervisedClassification/SupervisedClassificationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/fuzzify/FuzzifyAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/fuzzify/FuzzifyAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/fuzzify/FuzzifyAlgorithm.java	(revision 369)
@@ -0,0 +1,144 @@
+package es.unex.sextante.gridAnalysis.fuzzify;
+
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+
+public class FuzzifyAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT                     = "INPUT";
+   public static final String FUNCTIONTYPE              = "FUNCTIONTYPE";
+   public static final String RESULT                    = "RESULT";
+   public static final String A                         = "A";
+   public static final String B                         = "B";
+   public static final String C                         = "C";
+   public static final String D                         = "D";
+
+   public static final int    MEMBER_FUNCTION_LINEAL    = 0;
+   public static final int    MEMBER_FUNCTION_SIGMOIDAL = 1;
+   public static final int    MEMBER_FUNCTION_J_SHAPED  = 2;
+
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Grid;
+   IRasterLayer               m_Result;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sOptions = { Sextante.getText("Linear"), Sextante.getText("Sigmoidal"), Sextante.getText("J-shaped") };
+
+      setName(Sextante.getText("Fuzzify"));
+      setGroup(Sextante.getText("Fuzzy_logic"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Input_Layer"), true);
+         m_Parameters.addSelection(FUNCTIONTYPE, Sextante.getText("Member_function"), sOptions);
+         m_Parameters.addNumericalValue(A, Sextante.getText("Control_point_A"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(B, Sextante.getText("Control_point_B"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(C, Sextante.getText("Control_point_C"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(D, Sextante.getText("Control_point_D"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dX;
+      double dW;
+      double dValue;
+
+      m_Grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final int iType = m_Parameters.getParameterValueAsInt(FUNCTIONTYPE);
+      double dA = m_Parameters.getParameterValueAsDouble(A);
+      double dB = m_Parameters.getParameterValueAsDouble(B);
+      double dC = m_Parameters.getParameterValueAsDouble(C);
+      double dD = m_Parameters.getParameterValueAsDouble(D);
+
+      final double dPts[] = new double[4];
+      dPts[0] = dA;
+      dPts[1] = dB;
+      dPts[2] = dC;
+      dPts[3] = dD;
+      Arrays.sort(dPts);
+      dA = dPts[0];
+      dB = dPts[1];
+      dC = dPts[2];
+      dD = dPts[3];
+
+      m_Result = getNewRasterLayer(RESULT, m_Grid.getName() + "_" + Sextante.getText("[fuzzy]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+
+      m_Grid.setWindowExtent(extent);
+      m_Grid.setInterpolationMethod(GridWrapper.INTERPOLATION_BSpline);
+
+      final int iNX = m_Grid.getNX();
+      final int iNY = m_Grid.getNY();
+
+      for (y = 0; (y < iNY) & setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_Grid.getCellValueAsDouble(x, y);
+            if (!m_Grid.isNoDataValue(dValue)) {
+               if ((dValue <= dA) || (dValue >= dD)) {
+                  m_Result.setCellValue(x, y, 0);
+               }
+               else if ((dValue >= dB) && (dValue <= dC)) {
+                  m_Result.setCellValue(x, y, 1);
+               }
+               else {
+                  if (dValue < dB) {
+                     dX = dValue - dA;
+                     dW = dB - dA;
+                  }
+                  else {
+                     dX = dD - dValue;
+                     dW = dD - dC;
+                  }
+                  switch (iType) {
+                     case 0:
+                        m_Result.setCellValue(x, y, dX / dW);
+                        break;
+                     case 1:
+                        m_Result.setCellValue(x, y, Math.pow(Math.sin(dX / dW * Math.PI / 2.), 2.));
+                        break;
+                     case 2:
+                        m_Result.setCellValue(x, y, 1. / (1 + Math.pow((dW - dX) / dW, 2.)));
+                        break;
+                  }
+               }
+            }
+            else {
+               m_Result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridAnalysis/fuzzify/FuzzifyAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier2.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier2.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier2.java	(revision 369)
@@ -0,0 +1,703 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+package es.unex.sextante.tin.smoothTinBezier;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
+
+class Bezier2 {
+   Coordinate normalN1 = null;
+   Coordinate normalN2 = null;
+   Coordinate normalN3 = null;
+   Coordinate b300;
+   Coordinate b030;
+   Coordinate b003;
+   Coordinate b012     = null;
+   Coordinate b021     = null;
+   Coordinate b102     = null;
+   Coordinate b120     = null;
+   Coordinate b210     = null;
+   Coordinate b201     = null;
+   Coordinate A111     = null;
+   Coordinate B111     = null;
+   Coordinate C111     = null;
+
+   Coordinate G        = null;
+
+   Coordinate A201, A102, A012, A021, B201, B102;
+
+   Coordinate n200     = null;
+   Coordinate n020     = null;
+   Coordinate n002     = null;
+   Coordinate n110     = null;
+   Coordinate n011     = null;
+   Coordinate n101     = null;
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param T
+    *                Trinagle fom original TIN
+    * @param listA -
+    *                normal vectors of planes in point A of triangle T
+    * @param listB -
+    *                normal vectors of planes in point B of triangle T
+    * @param listC -
+    *                normal vectors of planes in point C of triangle T
+    */
+   Bezier2(final TriangleDT T,
+           final LinkedList listA,
+           final LinkedList listB,
+           final LinkedList listC,
+           final int typeOfBreakLine) {
+      b300 = T.A;
+      b030 = T.B;
+      b003 = T.C;
+      setNormalVector(listA, listB, listC);
+      setControlPoints(typeOfBreakLine);
+
+   }
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param coords -
+    *                array of three vertexes which generate triangle
+    */
+   Bezier2(final Coordinate[] coords) {
+      b300 = coords[0];
+      b030 = coords[1];
+      b003 = coords[2];
+   }
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param coords -
+    *                array of three vertexes which generate triangle
+    * @param listA -
+    *                list of normal vektors around vertex A
+    * @param listB -
+    *                list of normal vektors around vertex B
+    * @param listC -
+    *                list of normal vektors around vertex C
+    * @param typeOfBreakLine -
+    *                type of break line which triangle contains
+    */
+   Bezier2(final Coordinate[] coords,
+           final LinkedList listA,
+           final LinkedList listB,
+           final LinkedList listC,
+           final int typeOfBreakLine) {
+      b300 = coords[0];
+      b030 = coords[1];
+      b003 = coords[2];
+      setNormalVector(listA, listB, listC);
+      setControlPoints(typeOfBreakLine);
+   }
+
+
+   /******************************************************************************************************************************
+    * The Protected method for setting one normals for each vertex of T
+    * 
+    * @param listA -
+    *                normal vectors of planes in point A of triangle T
+    * @param listB -
+    *                normal vectors of planes in point B of triangle T
+    * @param listC -
+    *                normal vectors of planes in point C of triangle T
+    */
+   protected void setNormalVector(final LinkedList listA,
+                                  final LinkedList listB,
+                                  final LinkedList listC) {
+      normalN1 = countVector(listA, b300);
+      normalN2 = countVector(listB, b030);
+      normalN3 = countVector(listC, b003);
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which sets new vecter between points A and B
+    * 
+    * @param A -
+    *                start point
+    * @param B -
+    *                stop point
+    * @return vector AB
+    */
+   protected static Coordinate setVector(final Coordinate A,
+                                         final Coordinate B) {
+      return new Coordinate(B.x - A.x, B.y - A.y, B.z - A.z);
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The method for setting normal vectors of two vectors
+    * 
+    * @param A -
+    *                vector A
+    * @param B -
+    *                vector B
+    * @return normal vector
+    */
+   protected static Coordinate setNormalVector(final Coordinate A,
+                                               final Coordinate B) {
+      final Coordinate normal = new Coordinate(A.y * B.z - A.z * B.y, A.z * B.x - A.x * B.z, (A.x * B.y - A.y * B.x));
+      final double sum = Math.sqrt(Math.pow(normal.x, 2) + Math.pow(normal.y, 2) + Math.pow(normal.z, 2));
+      //double sum = 1;
+      if (normal.z > 0) {
+         return new Coordinate((normal.x / sum), (normal.y / sum), (normal.z / sum));
+      }
+      else {
+         return new Coordinate((-1) * (normal.x / sum), (-1) * (normal.y / sum), (-1) * (normal.z / sum));
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method counts one normal vector from normal vectors of every plane in vertex of triangle
+    * 
+    * @param list -
+    *                normal vectors of planes in point of triangle T
+    * @param P /
+    *                vertex of T
+    * @return normal vector
+    */
+   private static Coordinate countVector(final LinkedList list,
+                                         final Coordinate P) {
+      final Iterator iter = list.iterator();
+      //double koeficient = 1D;
+      double sumX = 0;
+      double sumY = 0;
+      double sumZ = 0;
+      while (iter.hasNext()) {
+         final Coordinate X = (Coordinate) iter.next();
+         sumX += X.x;
+         sumY += X.y;
+         sumZ += X.z;
+      }
+      final double sum = Math.sqrt(Math.pow(sumX, 2) + Math.pow(sumY, 2) + Math.pow(sumZ, 2));
+      return new Coordinate((sumX / sum), (sumY / sum), (sumZ / sum));
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method counts Scalar product of two vectors v1,v2
+    * 
+    * @param v1 -
+    *                vector
+    * @param v2 -
+    *                vector
+    * @return - scalar product
+    */
+   protected static double countScalarProduct(final Coordinate v1,
+                                              final Coordinate v2) {
+      final double scalar = v1.x * v2.x + v1.y * v2.y + v1.z * v2.z;
+      return scalar;
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected function counts cross vector product of two vectors A,B
+    * 
+    * @param A -
+    *                vector
+    * @param B -
+    *                vector
+    * @return - cross product
+    */
+   protected static Coordinate countCrossProduct(final Coordinate A,
+                                                 final Coordinate B) {
+      final Coordinate normal = new Coordinate(A.y * B.z - A.z * B.y, A.z * B.x - A.x * B.z, (A.x * B.y - A.y * B.x));
+      final double sum = Math.sqrt(Math.pow(normal.x, 2) + Math.pow(normal.y, 2) + Math.pow(normal.z, 2));
+      if (normal.z > 0) {
+         return new Coordinate((normal.x / sum), (normal.y / sum), (normal.z / sum));
+      }
+      else {
+         return new Coordinate((-1) * (normal.x / sum), (-1) * (normal.y / sum), (-1) * (normal.z / sum));
+      }
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method counts difference of two vectors v1, v2
+    * 
+    * @param v1 -
+    *                vector
+    * @param v2 -
+    *                vector
+    * @return difference vector
+    */
+   protected static Coordinate countDifferenceProduct(final Coordinate v1,
+                                                      final Coordinate v2) {
+      return new Coordinate(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected function counts sum of two vectors v1, v2
+    * 
+    * @param v1 -
+    *                vector
+    * @param v2 -
+    *                vector
+    * @return sum vector
+    */
+   protected static Coordinate countSumProduct(final Coordinate v1,
+                                               final Coordinate v2) {
+      return new Coordinate(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected function which normalize vector v
+    * 
+    * @param v -
+    *                vector
+    * @return normalized vector
+    */
+   protected static Coordinate normalizeVect(final Coordinate v) {
+      final double sum = Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2) + Math.pow(v.z, 2));
+      return new Coordinate((v.x / sum), (v.y / sum), (v.z / sum));
+   }
+
+
+   /******************************************************************************************************************************
+    * The private function for help calculation
+    */
+   private double helpCount(final Coordinate Pi,
+                            final Coordinate Pj,
+                            final Coordinate Ni,
+                            final Coordinate Nj) {
+      return 2 * (countScalarProduct(countDifferenceProduct(Pj, Pi), countSumProduct(Ni, Nj)) / countScalarProduct(
+               countDifferenceProduct(Pj, Pi), countDifferenceProduct(Pj, Pi)));
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method sets Quadratic normals of Bezier triangle
+    */
+   protected void setQuadraticNormals() {
+      n200 = normalN1;
+      n020 = normalN2;
+      n002 = normalN3;
+
+
+      double help = helpCount(b300, b030, normalN1, normalN2);
+      Coordinate dif = countDifferenceProduct(b030, b300);
+      dif.x = dif.x * help;
+      dif.y = dif.y * help;
+      dif.z = dif.z * help;
+      n110 = normalizeVect(countDifferenceProduct(countSumProduct(normalN1, normalN2), dif));
+      help = helpCount(b030, b003, normalN2, normalN3);
+      dif = countDifferenceProduct(b003, b030);
+      dif.x = dif.x * help;
+      dif.y = dif.y * help;
+      dif.z = dif.z * help;
+      n011 = normalizeVect(countDifferenceProduct(countSumProduct(normalN2, normalN3), dif));
+      help = helpCount(b003, b300, normalN3, normalN1);
+      dif = countDifferenceProduct(b300, b003);
+      dif.x = dif.x * help;
+      dif.y = dif.y * help;
+      dif.z = dif.z * help;
+      n101 = normalizeVect(countDifferenceProduct(countSumProduct(normalN3, normalN1), dif));
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method gets normal into Bezier triangle with barycentric coordinate
+    * 
+    * @param u -
+    *                barycentric coordinate u
+    * @param v -
+    *                barycentric coordinate u
+    * @return normal of surface
+    */
+   protected Coordinate getNormal(final double u,
+                                  final double v) {
+      final double w = 1 - (u + v);
+      final double x = n200.x * Math.pow(w, 2) + n020.x * Math.pow(u, 2) + n002.x * Math.pow(v, 2) + n110.x * w * u + n011.x * u
+                       * v + n101.x * w * v;
+
+      final double y = n200.y * Math.pow(w, 2) + n020.y * Math.pow(u, 2) + n002.y * Math.pow(v, 2) + n110.y * w * u + n011.y * u
+                       * v + n101.y * w * v;
+
+      final double z = n200.z * Math.pow(w, 2) + n020.z * Math.pow(u, 2) + n002.z * Math.pow(v, 2) + n110.z * w * u + n011.z * u
+                       * v + n101.z * w * v;
+      return new Coordinate(x, y, z);
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method counts project point to plane
+    * 
+    * @param pointOfPlane -
+    *                point which is contained into plane
+    * @param normalOfPlane -
+    *                normal vector of plane
+    * @param pointOfLine -
+    *                point which will project to plane
+    * @param normalOfLine -
+    *                normal wich get direction of projection to plane
+    * @return coordinates of projected point in plane
+    */
+   protected Coordinate countProjectOnToPlane(final Coordinate pointOfPlane,
+                                              final Coordinate normalOfPlane,
+                                              final Coordinate pointOfLine,
+                                              final Coordinate normalOfLine) {
+      final double d = -normalOfPlane.x * pointOfPlane.x - normalOfPlane.y * pointOfPlane.y - normalOfPlane.z * pointOfPlane.z;
+      final double param = (-pointOfLine.x * normalOfPlane.x - pointOfLine.y * normalOfPlane.y - pointOfLine.z * normalOfPlane.z - d)
+                           / (normalOfLine.x * normalOfPlane.x + normalOfLine.y * normalOfPlane.y + normalOfLine.z
+                                                                                                    * normalOfPlane.z);
+      return new Coordinate(pointOfLine.x + param * normalOfLine.x, pointOfLine.y + param * normalOfLine.y, pointOfLine.z + param
+                                                                                                            * normalOfLine.z);
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The method for setting control points of bezier triangle
+    * 
+    * @param typeOfBreakLine -
+    *                type of break which triangle contains
+    */
+   protected void setControlPoints(final int typeOfBreakLine) {
+      setQuadraticNormals();
+
+      switch (typeOfBreakLine) {
+         case (-1): {
+            b210 = new Coordinate((2 * b300.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b300), normalN1) * normalN1.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b030), normalN2) * normalN2.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b030), normalN2) * normalN2.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b003), normalN3) * normalN3.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b300), normalN1) * normalN1.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b003), normalN3) * normalN3.z) / 3);
+            break;
+         }
+         case (0): {
+            b210 = new Coordinate((2 * b300.x + b030.x) / 3, (2 * b300.y + b030.y) / 3, (2 * b300.z + b030.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x) / 3, (2 * b030.y + b300.y) / 3, (2 * b030.z + b300.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b030), normalN2) * normalN2.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b003), normalN3) * normalN3.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b300), normalN1) * normalN1.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b003), normalN3) * normalN3.z) / 3);
+            break;
+         }
+         case (1): {
+            b210 = new Coordinate((2 * b300.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b300), normalN1) * normalN1.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b030), normalN2) * normalN2.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x) / 3, (2 * b030.y + b003.y) / 3, (2 * b030.z + b003.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x) / 3, (2 * b003.y + b030.y) / 3, (2 * b003.z + b030.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b300), normalN1) * normalN1.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b003), normalN3) * normalN3.z) / 3);
+            break;
+         }
+         case (2): {
+            b210 = new Coordinate((2 * b300.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b300), normalN1) * normalN1.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b030), normalN2) * normalN2.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b030), normalN2) * normalN2.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b003), normalN3) * normalN3.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x) / 3, (2 * b300.y + b003.y) / 3, (2 * b300.z + b003.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x) / 3, (2 * b003.y + b300.y) / 3, (2 * b003.z + b300.z) / 3);
+            break;
+         }
+         case (3): {
+            b210 = new Coordinate((2 * b300.x + b030.x) / 3, (2 * b300.y + b030.y) / 3, (2 * b300.z + b030.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x) / 3, (2 * b030.y + b300.y) / 3, (2 * b030.z + b300.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b030), normalN2) * normalN2.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b003), normalN3) * normalN3.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x) / 3, (2 * b300.y + b003.y) / 3, (2 * b300.z + b003.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x) / 3, (2 * b003.y + b300.y) / 3, (2 * b003.z + b300.z) / 3);
+            break;
+         }
+
+         case (5): {
+            b210 = new Coordinate((2 * b300.x + b030.x - countScalarProduct(countDifferenceProduct(b030, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b030.y - countScalarProduct(
+                     countDifferenceProduct(b030, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b030.z - countScalarProduct(countDifferenceProduct(b030, b300), normalN1) * normalN1.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b030), normalN2)
+                                                         * normalN2.x) / 3, (2 * b030.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b030), normalN2)
+                                                                                                   * normalN2.y) / 3,
+                     (2 * b030.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b030), normalN2) * normalN2.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x) / 3, (2 * b030.y + b003.y) / 3, (2 * b030.z + b003.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x) / 3, (2 * b003.y + b030.y) / 3, (2 * b003.z + b030.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x) / 3, (2 * b300.y + b003.y) / 3, (2 * b300.z + b003.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x) / 3, (2 * b003.y + b300.y) / 3, (2 * b003.z + b300.z) / 3);
+            break;
+         }
+         case (4): {
+            b210 = new Coordinate((2 * b300.x + b030.x) / 3, (2 * b300.y + b030.y) / 3, (2 * b300.z + b030.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x) / 3, (2 * b030.y + b300.y) / 3, (2 * b030.z + b300.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x) / 3, (2 * b030.y + b003.y) / 3, (2 * b030.z + b003.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x) / 3, (2 * b003.y + b030.y) / 3, (2 * b003.z + b030.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x - countScalarProduct(countDifferenceProduct(b003, b300), normalN1)
+                                                         * normalN1.x) / 3, (2 * b300.y + b003.y - countScalarProduct(
+                     countDifferenceProduct(b003, b300), normalN1)
+                                                                                                   * normalN1.y) / 3,
+                     (2 * b300.z + b003.z - countScalarProduct(countDifferenceProduct(b003, b300), normalN1) * normalN1.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x - countScalarProduct(countDifferenceProduct(b300, b003), normalN3)
+                                                         * normalN3.x) / 3, (2 * b003.y + b300.y - countScalarProduct(
+                     countDifferenceProduct(b300, b003), normalN3)
+                                                                                                   * normalN3.y) / 3,
+                     (2 * b003.z + b300.z - countScalarProduct(countDifferenceProduct(b300, b003), normalN3) * normalN3.z) / 3);
+            break;
+         }
+         case (6): {
+            b210 = new Coordinate((2 * b300.x + b030.x) / 3, (2 * b300.y + b030.y) / 3, (2 * b300.z + b030.z) / 3);
+
+            b120 = new Coordinate((2 * b030.x + b300.x) / 3, (2 * b030.y + b300.y) / 3, (2 * b030.z + b300.z) / 3);
+
+            b021 = new Coordinate((2 * b030.x + b003.x) / 3, (2 * b030.y + b003.y) / 3, (2 * b030.z + b003.z) / 3);
+
+            b012 = new Coordinate((2 * b003.x + b030.x) / 3, (2 * b003.y + b030.y) / 3, (2 * b003.z + b030.z) / 3);
+
+            b201 = new Coordinate((2 * b300.x + b003.x) / 3, (2 * b300.y + b003.y) / 3, (2 * b300.z + b003.z) / 3);
+
+            b102 = new Coordinate((2 * b003.x + b300.x) / 3, (2 * b003.y + b300.y) / 3, (2 * b003.z + b300.z) / 3);
+         }
+      }
+
+
+      G = new Coordinate((b300.x + b030.x + b003.x) / 3, (b300.y + b030.y + b003.y) / 3, (b300.z + b030.z + b003.z) / 3);
+      final Coordinate normalOfT = new Coordinate(0, 0, 1);
+
+      A111 = new Coordinate((b300.x + b030.x + G.x) / 3, (b300.y + b030.y + G.y) / 3, (b300.z + b030.z + G.z) / 3);
+
+      Coordinate e1 = normalizeVect(getNormal(1D / 2D, 0D));
+      Coordinate e2 = normalizeVect(countDifferenceProduct(b120, b210));
+      Coordinate normalOfPlane = setNormalVector(countCrossProduct(e1, e2), e2);
+
+      A111 = new Coordinate(countProjectOnToPlane(b120, normalOfPlane, A111, normalOfT));//getNormal(4D/9D, 1D/9D)));
+
+      B111 = new Coordinate((b003.x + b030.x + G.x) / 3, (b003.y + b030.y + G.y) / 3, (b003.z + b030.z + G.z) / 3);
+
+      e1 = normalizeVect(getNormal(1D / 2D, 1D / 2D));
+      e2 = normalizeVect(countDifferenceProduct(b012, b021));
+      normalOfPlane = setNormalVector(countCrossProduct(e1, e2), e2);
+      B111 = new Coordinate(countProjectOnToPlane(b012, normalOfPlane, B111, normalOfT));//getNormal(4D/9D, 4D/9D)));
+
+
+      C111 = new Coordinate((b003.x + b300.x + G.x) / 3, (b003.y + b300.y + G.y) / 3, (b003.z + b300.z + G.z) / 3);
+
+      e1 = normalizeVect(getNormal(0, 1 / 2D));
+      e2 = normalizeVect(countDifferenceProduct(b201, b102));
+      normalOfPlane = setNormalVector(countCrossProduct(e1, e2), e2);
+      C111 = new Coordinate(countProjectOnToPlane(b201, normalOfPlane, C111, normalOfT));//getNormal(1D/9D, 4D/9D)));
+
+
+      A201 = new Coordinate((b300.x + b210.x + b201.x) / 3, (b300.y + b210.y + b201.y) / 3, (b300.z + b210.z + b201.z) / 3);
+      A021 = new Coordinate((b030.x + b120.x + b021.x) / 3, (b030.y + b120.y + b021.y) / 3, (b030.z + b120.z + b021.z) / 3);
+      B102 = new Coordinate((b012.x + b102.x + b003.x) / 3, (b012.y + b102.y + b003.y) / 3, (b012.z + b102.z + b003.z) / 3);
+
+      A102 = new Coordinate((A111.x + A201.x + C111.x) / 3, (A111.y + A201.y + C111.y) / 3, (A111.z + A201.z + C111.z) / 3);
+      A012 = new Coordinate((B111.x + A021.x + A111.x) / 3, (B111.y + A021.y + A111.y) / 3, (B111.z + A021.z + A111.z) / 3);
+      B201 = new Coordinate((C111.x + B111.x + B102.x) / 3, (C111.y + B111.y + B102.y) / 3, (C111.z + B111.z + B102.z) / 3);
+
+      G = new Coordinate((A102.x + A012.x + B201.x) / 3, (A102.y + A012.y + B201.y) / 3, (A102.z + A012.z + B201.z) / 3);
+   }
+
+
+   /******************************************************************************************************************************
+    * The method to print Bezier triangle to console
+    */
+   protected void printToConsole() {
+      System.out.println("=========MACRO TRIANGLE=============================");
+      System.out.println(b300.toString());
+      System.out.println(b030.toString());
+      System.out.println(b003.toString());
+      System.out.println("Normals:");
+      if (normalN1 != null) {
+         System.out.println(normalN1.toString());
+         System.out.println(normalN2.toString());
+         System.out.println(normalN3.toString());
+         System.out.println("Koeficients");
+
+         System.out.println(b012.toString());
+         System.out.println(b021.toString());
+         System.out.println(b102.toString());
+         System.out.println(b120.toString());
+         System.out.println(b210.toString());
+         System.out.println(b201.toString());
+         //System.out.println(b111.toString());
+
+      }
+      System.out.println("======================================");
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method for getting envelope of triangle
+    * 
+    * @return envelope of triangle
+    */
+   protected Envelope getEnvelope() {
+      final Coordinate[] newPoint = new Coordinate[4];
+      newPoint[0] = b003;
+      newPoint[1] = b030;
+      newPoint[2] = b300;
+      newPoint[3] = b003;
+      final CoordinateArraySequence newPointsTriangle = new CoordinateArraySequence(newPoint);
+
+      final LinearRing trianglesPoints = new LinearRing(newPointsTriangle, new GeometryFactory());
+
+      return trianglesPoints.getEnvelopeInternal();
+   }
+
+
+   /******************************************************************************************************************************
+    * The protected method gets normal into Bezier triangle with barycentric coordinate
+    * 
+    * @param u -
+    *                barycentric coordinate u
+    * @param v -
+    *                barycentric coordinate u
+    * @return normal of surface
+    */
+   protected Bezier getBezierPatch(final int index) {
+      switch (index) {
+         case 0: {
+            return new Bezier(b300, b030, G, b210, b120, A021, A012, A102, A201, A111);
+         }
+         case 1: {
+            return new Bezier(b030, b003, G, b021, b012, B102, B201, A012, A021, B111);
+         }
+         case 2: {
+            return new Bezier(b003, b300, G, b102, b201, A201, A102, B201, B102, C111);
+         }
+      }
+      return null;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier2.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/BezierSurface.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/BezierSurface.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/BezierSurface.java	(revision 369)
@@ -0,0 +1,888 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+package es.unex.sextante.tin.smoothTinBezier;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.TreeMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+public class BezierSurface {
+   //	private Data data;
+   //	private DataDefinition dd = new DataDefinition("US-ASCII");
+   private final STRtree trianglesIndex;
+   Coordinate[][]        triangles;
+   TreeMap               breakLines = new TreeMap();
+   Bezier                miniBezierTriangles[];
+   double                scaleZ;
+   int                   index      = 0;
+   int                   m_LoD;
+   byte[]                trianIndex;
+   float[][]             barycentrCoor;
+
+   /******************************************************************************************************************************
+    * The private class for defining object triangle
+    */
+   private class Triangle {
+      int        index;
+      Coordinate coord[] = new Coordinate[3];
+      int        typeOfBreakLine;
+
+
+      /***************************************************************************************************************************
+       * Constructor
+       * 
+       * @param index -
+       *                index of triangle
+       * @param coord -
+       *                array of vertexes of triangle
+       * @param typeOfBreakLine -
+       *                type of break line which triangle contains
+       */
+      Triangle(final int index,
+               final Coordinate[] coord,
+               final int typeOfBreakLine) {
+         this.index = index;
+         this.coord = coord;
+         this.typeOfBreakLine = typeOfBreakLine;
+      }
+
+
+      /***************************************************************************************************************************
+       * Constructor
+       * 
+       * @param index -
+       *                index of triangle
+       * @param A -
+       *                vertex A of triangle
+       * @param B -
+       *                vertex B of triangle
+       * @param C -
+       *                vertex C of triangle
+       * @param typeOfBreakLine -
+       *                type of break line which triangle contains
+       */
+      Triangle(final int index,
+               final Coordinate A,
+               final Coordinate B,
+               final Coordinate C,
+               final int typeOfBreakLine) {
+         this.index = index;
+         coord[0] = A;
+         coord[1] = B;
+         coord[2] = C;
+         this.typeOfBreakLine = typeOfBreakLine;
+      }
+
+
+      void printToConsole() {
+         System.out.println(coord[0]);
+         System.out.println(coord[1]);
+         System.out.println(coord[2]);
+         System.out.println(index);
+         System.out.println(typeOfBreakLine);
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param triangles -
+    *                array of triangle's vertexes
+    * @param trainglesIndex -
+    *                RTree index of triangles
+    * @param breakLine -
+    *                map of break lines
+    * @param scaleZ -
+    *                scale of Z coordinate to optimize data
+    * @param m_LoD -
+    *                Level of Detail
+    */
+   public BezierSurface(final Coordinate[][] triangles,
+                        final STRtree trianglesIndex,
+                        final TreeMap breakLines,
+                        final double scaleZ,
+                        final int m_LoD) {
+      this.trianglesIndex = trianglesIndex;
+      this.triangles = triangles;
+      this.breakLines = breakLines;
+      this.scaleZ = scaleZ;
+      this.m_LoD = m_LoD;
+
+      for (int k = 0; k < triangles.length; k++) {
+         for (int l = 0; l < 3; l++) {
+            triangles[k][l].z /= scaleZ;
+         }
+      }
+      setBaryCoordinates();
+      //dd.addField(Integer.class);
+   }
+
+
+   /******************************************************************************************************************************
+    * The method tests list of bezier triangle if has next
+    * 
+    * @param true -
+    *                hasNext, false hasn't Next
+    */
+   public boolean hasNext() {
+      if (index == triangles.length) {
+         return false;
+      }
+      return true;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method gets next group of small triangles of main Bezier triangle
+    * 
+    * @return coordinates of vertexes of new small triangles
+    */
+   public Coordinate[][] nextTrinagle() {
+      final int indexOfInterpolatedTriangles = 0;
+      final Bezier2 newBezierTriangles = new Bezier2(triangles[index]);
+
+      newBezierTriangles.setNormalVector(searchVectors(newBezierTriangles, newBezierTriangles.b300, index), searchVectors(
+               newBezierTriangles, newBezierTriangles.b030, index), searchVectors(newBezierTriangles, newBezierTriangles.b003,
+               index));
+      if (breakLines.containsKey(index)) {
+         newBezierTriangles.setControlPoints((Integer) breakLines.get(index));
+      }
+      else {
+         newBezierTriangles.setControlPoints(-1);
+      }
+
+      index++;
+      return getInterpolatedTriangles2(newBezierTriangles);
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method sets barycentric coordinates for current LoD (Level of Detail)
+    */
+   private void setBaryCoordinates() {
+      switch (m_LoD) {
+         case 1: {
+            final byte[] tIndex = { 0, 0, 2, 0, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 2F, 0 }, { 1 / 2F, 0 }, { 1 / 2F, 0 }, { 1 / 2F, 0 }, { 1 / 2F, 0 } };
+
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 2: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 3F, 0 }, { 2 / 3F, 0 }, { 1 / 3F, 0 }, { 0, 1 }, { 2 / 3F, 0 }, { 0, 1 },
+                     { 1 / 3F, 0 }, { 2 / 3F, 0 }, { 0, 1 }, { 2 / 3F, 0 }, { 1 / 3F, 0 } };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 3: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 4F, 0 }, { 3 / 4F, 0 }, { 1 / 4F, 0 }, { 0, 3 / 4F }, { 3 / 4F, 0 },
+                     { 1 / 4F, 0 }, { 2 / 4F, 0 }, { 0, 3 / 4F }, { 0, 3 / 4F }, { 2 / 4F, 0 }, { 1 / 4F, 3 / 4F },
+                     { 1 / 4F, 3 / 4F }, { 2 / 4F, 0 }, { 3 / 4F, 0 }, { 0, 3 / 4F }, { 0, 3 / 4F }, { 0, 3 / 4F }
+
+            };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 4: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 5F, 0 }, { 4 / 5F, 0 }, { 1 / 5F, 0 }, { 0, 3 / 5F }, { 4 / 5F, 0 },
+                     { 1 / 5F, 3 / 5F }, { 0, 3 / 5F }, { 1 / 5F, 3 / 5F }, { 0, 3 / 5F }, { 1 / 5F, 0 }, { 2 / 5F, 0 },
+                     { 0, 3 / 5F }, { 2 / 5F, 0 }, { 1 / 5F, 3 / 5F }, { 1 / 5F, 3 / 5F }, { 2 / 5F, 0 }, { 3 / 5F, 0 },
+                     { 1 / 5F, 3 / 5F }, { 3 / 5F, 0 }, { 2 / 5F, 3 / 5F }, { 2 / 5F, 3 / 5F }, { 3 / 5F, 0 }, { 4 / 5F, 0 },
+                     { 1 / 5F, 3 / 5F }, { 1 / 5F, 3 / 5F }, { 1 / 5F, 3 / 5F },
+
+            };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 5: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 4, 4, 4 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 6F, 0 }, { 5 / 6F, 0 }, { 1 / 6F, 0 }, { 0, 1 / 2F }, { 5 / 6F, 0 },
+                     { 0, 1 / 2F }, { 1 / 6F, 1 / 2F }, { 1 / 3F, 1 / 2F }, { 1 / 6F, 1 / 2F }, { 0, 1 }, { 1 / 3F, 1 / 2F },
+
+                     { 1 / 6F, 0 }, { 2 / 6F, 0 }, { 0, 1 / 2F }, { 2 / 6F, 0 }, { 3 / 6F, 0 }, { 1 / 6F, 1 / 2F },
+                     { 3 / 6F, 0 }, { 4 / 6F, 0 }, { 1 / 3F, 1 / 2F }, { 4 / 6F, 0 }, { 5 / 6F, 0 }, { 1 / 2F, 1 / 2F },
+
+                     { 2 / 6F, 0 }, { 0, 1 / 2F }, { 1 / 6F, 1 / 2F }, { 3 / 6F, 0 }, { 1 / 6F, 1 / 2F }, { 1 / 3F, 1 / 2F },
+                     { 4 / 6F, 0 }, { 1 / 3F, 1 / 2F }, { 1 / 2F, 1 / 2F }, { 1 / 6F, 1 / 2F }, { 1 / 3F, 1 / 2F }, { 0, 1 },
+
+                     { 1 / 6F, 1 / 2F }, { 1 / 4F, 1 / 2F }, { 0, 1 } //superfluous
+
+            };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 6: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 7F, 0 }, { 6 / 7F, 0 }, { 1 / 7F, 0 }, { 0, 3 / 7F }, { 6 / 7F, 0 },
+                     { 0, 3 / 7F }, { 1 / 7F, 3 / 7F }, { 3 / 7F, 3 / 7F }, { 0, 6 / 7F }, { 1 / 7F, 3 / 7F },
+                     { 3 / 7F, 3 / 7F },
+
+                     { 1 / 7F, 0 }, { 2 / 7F, 0 }, { 0, 3 / 7F }, { 2 / 7F, 0 }, { 3 / 7F, 0 }, { 1 / 7F, 3 / 7F },
+                     { 3 / 7F, 0 }, { 4 / 7F, 0 }, { 2 / 7F, 3 / 7F }, { 4 / 7F, 0 }, { 5 / 7F, 0 }, { 3 / 7F, 3 / 7F },
+                     { 5 / 7F, 0 }, { 6 / 7F, 0 }, { 4 / 7F, 3 / 7F },
+
+                     { 2 / 7F, 0 }, { 1 / 7F, 3 / 7F }, { 0, 3 / 7F }, { 3 / 7F, 0 }, { 2 / 7F, 3 / 7F }, { 1 / 7F, 3 / 7F },
+                     { 4 / 7F, 0 }, { 3 / 7F, 3 / 7F }, { 2 / 7F, 3 / 7F }, { 5 / 7F, 0 }, { 4 / 7F, 3 / 7F },
+                     { 3 / 7F, 3 / 7F },
+
+                     { 0, 6 / 7F }, { 2 / 7F, 3 / 7F }, { 1 / 7F, 3 / 7F }, { 1 / 7F, 6 / 7F }, { 3 / 7F, 3 / 7F },
+                     { 2 / 7F, 3 / 7F }, { 0, 6 / 7F }, { 1 / 7F, 6 / 7F }, { 2 / 7F, 3 / 7F },
+
+                     { 0, 6 / 7F }, { 0, 6 / 7F }, { 0, 6 / 7F },
+
+
+            };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 7: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 8F, 0 }, { 7 / 8F, 0 }, { 1 / 8F, 0 }, { 0, 3 / 8F }, { 7 / 8F, 0 },
+                     { 0, 3 / 8F }, { 1 / 8F, 3 / 8F }, { 4 / 8F, 3 / 8F }, { 0, 6 / 8F }, { 1 / 8F, 3 / 8F },
+                     { 4 / 8F, 3 / 8F }, { 0, 6 / 8F }, { 1 / 8F, 6 / 8F }, { 1 / 8F, 6 / 8F },
+
+                     { 1 / 8F, 0 }, { 2 / 8F, 0 }, { 0, 3 / 8F }, { 2 / 8F, 0 }, { 3 / 8F, 0 }, { 1 / 8F, 3 / 8F },
+                     { 3 / 8F, 0 }, { 4 / 8F, 0 }, { 2 / 8F, 3 / 8F }, { 4 / 8F, 0 }, { 5 / 8F, 0 }, { 3 / 8F, 3 / 8F },
+                     { 5 / 8F, 0 }, { 6 / 8F, 0 }, { 4 / 8F, 3 / 8F }, { 6 / 8F, 0 }, { 7 / 8F, 0 }, { 5 / 8F, 3 / 8F },
+
+                     { 1 / 8F, 3 / 8F }, { 2 / 8F, 0 }, { 0, 3 / 8F }, { 2 / 8F, 3 / 8F }, { 3 / 8F, 0 }, { 1 / 8F, 3 / 8F },
+                     { 3 / 8F, 3 / 8F }, { 4 / 8F, 0 }, { 2 / 8F, 3 / 8F }, { 4 / 8F, 3 / 8F }, { 5 / 8F, 0 },
+                     { 3 / 8F, 3 / 8F }, { 5 / 8F, 3 / 8F }, { 6 / 8F, 0 }, { 4 / 8F, 3 / 8F },
+
+                     { 2 / 8F, 3 / 8F }, { 0, 6 / 8F }, { 1 / 8F, 3 / 8F }, { 3 / 8F, 3 / 8F }, { 1 / 8F, 6 / 8F },
+                     { 2 / 8F, 3 / 8F }, { 4 / 8F, 3 / 8F }, { 2 / 8F, 6 / 8F }, { 3 / 8F, 3 / 8F },
+
+                     { 2 / 8F, 3 / 8F }, { 0, 6 / 8F }, { 1 / 8F, 6 / 8F }, { 3 / 8F, 3 / 8F }, { 1 / 8F, 6 / 8F },
+                     { 2 / 8F, 6 / 8F },
+
+                     { 1 / 8F, 6 / 8F }, { 1 / 8F, 6 / 8F }, { 1 / 8F, 6 / 8F }, };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 8: {
+            final byte[] tIndex = { 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = { { 0, 0 }, { 1 / 9F, 0 }, { 8 / 9F, 0 }, { 1 / 9F, 0 }, { 0, 1 / 3F }, { 8 / 9F, 0 },
+                     { 0, 1 / 3F }, { 1 / 9F, 1 / 3F }, { 5 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 2 / 3F }, { 2 / 9F, 2 / 3F }, { 0, 1 }, { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 2 / 3F },
+
+                     { 1 / 9F, 0 }, { 2 / 9F, 0 }, { 0, 1 / 3F }, { 2 / 9F, 0 }, { 3 / 9F, 0 }, { 1 / 9F, 1 / 3F },
+                     { 3 / 9F, 0 }, { 4 / 9F, 0 }, { 2 / 9F, 1 / 3F }, { 4 / 9F, 0 }, { 5 / 9F, 0 }, { 3 / 9F, 1 / 3F },
+                     { 5 / 9F, 0 }, { 6 / 9F, 0 }, { 4 / 9F, 1 / 3F }, { 6 / 9F, 0 }, { 7 / 9F, 0 }, { 5 / 9F, 1 / 3F },
+                     { 7 / 9F, 0 }, { 8 / 9F, 0 }, { 6 / 9F, 1 / 3F },
+
+
+                     { 1 / 9F, 1 / 3F }, { 2 / 9F, 0 }, { 0, 1 / 3F }, { 2 / 9F, 1 / 3F }, { 3 / 9F, 0 }, { 1 / 9F, 1 / 3F },
+                     { 3 / 9F, 1 / 3F }, { 4 / 9F, 0 }, { 2 / 9F, 1 / 3F }, { 4 / 9F, 1 / 3F }, { 5 / 9F, 0 },
+                     { 3 / 9F, 1 / 3F }, { 5 / 9F, 1 / 3F }, { 6 / 9F, 0 }, { 4 / 9F, 1 / 3F }, { 6 / 9F, 1 / 3F },
+                     { 7 / 9F, 0 }, { 5 / 9F, 1 / 3F },
+
+                     { 2 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 1 / 3F }, { 3 / 9F, 1 / 3F }, { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 1 / 3F }, { 4 / 9F, 1 / 3F }, { 2 / 9F, 2 / 3F }, { 3 / 9F, 1 / 3F }, { 5 / 9F, 1 / 3F },
+                     { 1 / 3F, 2 / 3F }, { 4 / 9F, 1 / 3F },
+
+                     { 2 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 2 / 3F }, { 3 / 9F, 1 / 3F }, { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 2 / 3F }, { 4 / 9F, 1 / 3F }, { 2 / 9F, 2 / 3F }, { 3 / 9F, 2 / 3F },
+
+                     { 0, 1 }, { 1 / 9F, 2 / 3F }, { 2 / 9F, 2 / 3F },
+
+            };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+         case 9: {
+            final byte[] tIndex = { 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4 };
+            //two barycentric coordinates for one trianIndex
+            final float[][] bCoor = {
+                     { 0, 0 },
+                     { 1 / 9F, 0 },
+                     { 0, 1 / 6F },
+                     { 0, 0 },
+                     { 0, 1 / 6F },
+                     { 8 / 9F, 0 },
+                     //	{0,0}, {0,0}, {0,0},
+                     { 0, 1 / 6F },
+                     { 1 / 9F, 0 },
+                     { 1 / 9F, 1 / 6F },
+                     { 0, 1 / 6F },
+                     { 0, 1 / 3F },
+                     { 1 / 9F, 1 / 6F },
+                     { 0, 1 / 3F },
+                     { 1 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 3F },
+                     { 0, 2 / 3F },
+                     { 1 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 3F },
+                     { 0, 2 / 3F },
+                     { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 2 / 3F },
+                     { 0, 1 },
+                     { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 2 / 3F },
+
+
+                     { 1 / 9F, 0 },
+                     { 2 / 9F, 0 },
+                     { 1 / 9F, 1 / 6F },
+                     { 2 / 9F, 1 / 6F },
+                     { 2 / 9F, 0 },
+                     { 1 / 9F, 1 / 6F },
+                     { 2 / 9F, 0 },
+                     { 3 / 9F, 0 },
+                     { 2 / 9F, 1 / 6F },
+                     { 3 / 9F, 1 / 6F },
+                     { 3 / 9F, 0 },
+                     { 2 / 9F, 1 / 6F },
+                     { 3 / 9F, 0 },
+                     { 4 / 9F, 0 },
+                     { 3 / 9F, 1 / 6F },
+                     { 4 / 9F, 1 / 6F },
+                     { 4 / 9F, 0 },
+                     { 3 / 9F, 1 / 6F },
+                     { 4 / 9F, 0 },
+                     { 5 / 9F, 0 },
+                     { 4 / 9F, 1 / 6F },
+                     { 5 / 9F, 1 / 6F },
+                     { 5 / 9F, 0 },
+                     { 4 / 9F, 1 / 6F },
+                     { 5 / 9F, 0 },
+                     { 6 / 9F, 0 },
+                     { 5 / 9F, 1 / 6F },
+                     { 6 / 9F, 1 / 6F },
+                     { 6 / 9F, 0 },
+                     { 5 / 9F, 1 / 6F },
+                     { 6 / 9F, 0 },
+                     { 7 / 9F, 0 },
+                     { 6 / 9F, 1 / 6F },
+                     { 7 / 9F, 1 / 6F },
+                     { 7 / 9F, 0 },
+                     { 6 / 9F, 1 / 6F },
+                     { 7 / 9F, 0 },
+                     { 8 / 9F, 0 },
+                     { 7 / 9F, 1 / 6F },
+                     //{8/9F,1/6F},{8/9F,0},{7/9F,1/6F},
+
+
+                     //	{0,0}, {0,0}, {0,0},
+
+                     //{0,0}, {0,0}, {0,0},
+
+                     { 1 / 9F, 1 / 3F },
+                     { 1 / 9F, 1 / 6F },
+                     { 0, 1 / 3F },
+                     { 1 / 9F, 1 / 3F },
+                     { 1 / 9F, 1 / 6F },
+                     { 2 / 9F, 1 / 6F },
+
+                     { 2 / 9F, 1 / 3F },
+                     { 2 / 9F, 1 / 6F },
+                     { 1 / 9F, 1 / 3F },
+                     { 2 / 9F, 1 / 3F },
+                     { 2 / 9F, 1 / 6F },
+                     { 3 / 9F, 1 / 6F },
+
+                     { 3 / 9F, 1 / 3F },
+                     { 3 / 9F, 1 / 6F },
+                     { 2 / 9F, 1 / 3F },
+                     { 3 / 9F, 1 / 3F },
+                     { 3 / 9F, 1 / 6F },
+                     { 4 / 9F, 1 / 6F },
+
+                     { 4 / 9F, 1 / 3F },
+                     { 4 / 9F, 1 / 6F },
+                     { 3 / 9F, 1 / 3F },
+                     { 4 / 9F, 1 / 3F },
+                     { 4 / 9F, 1 / 6F },
+                     { 5 / 9F, 1 / 6F },
+
+                     { 5 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 6F },
+                     { 4 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 3F },
+                     { 5 / 9F, 1 / 6F },
+                     { 6 / 9F, 1 / 6F },
+
+                     { 6 / 9F, 1 / 3F },
+                     { 6 / 9F, 1 / 6F },
+                     { 5 / 9F, 1 / 3F },
+                     { 6 / 9F, 1 / 3F },
+                     { 6 / 9F, 1 / 6F },
+                     { 7 / 9F, 1 / 6F },
+
+                     { 6 / 9F, 1 / 3F },
+                     { 15 / 18F, 1 / 6F },
+                     { 7 / 9F, 1 / 6F },
+                     { 8 / 9F, 0 },
+                     { 15 / 18F, 1 / 6F },
+                     { 7 / 9F, 1 / 6F },
+
+                     //{1/9F,0},{2/9F,0},{1/18F,1/6F},
+                     //{2/9F,0},{0,1/3F},{1/18F,1/6F},
+                     //{2/9F,0},{3/9F,0},{3/18F,1/6F},
+                     //	{3/9F,0},{1/9F,1/3F},{3/18F,1/6F},
+                     //{3/9F,0},{4/9F,0},{5/18F,1/6F},
+                     //{4/9F,0},{2/9F,1/3F},{5/18F,1/6F},
+                     //{4/9F,0},{5/9F,0},{7/18F,1/6F},
+                     //{5/9F,0},{3/9F,1/3F},{7/18F,1/6F},
+                     //{5/9F,0},{6/9F,0},{9/18F,1/6F},
+                     //{6/9F,0},{4/9F,1/3F},{9/18F,1/6F},
+                     //{6/9F,0},{7/9F,0},{11/18F,1/6F},
+                     //{7/9F,0},{5/9F,1/3F},{11/18F,1/6F},
+                     //{7/9F,0},{8/9F,0},{13/18F,1/6F},
+                     //	{8/9F,0},{6/9F,1/3F},{13/18F,1/6F},
+
+
+                     //{1/9F,1/3F},{3/18F,1/6F},{0,1/3F},
+                     //{3/18F,1/6F},{2/9F,0},{0,1/3F},
+                     //{2/9F,1/3F},{5/18F,1/6F},{1/9F,1/3F},
+                     //{5/18F,1/6F},{3/9F,0},{1/9F,1/3F},
+                     //{3/9F,1/3F},{7/18F,1/6F},{2/9F,1/3F},
+                     //{7/18F,1/6F},{4/9F,0},{2/9F,1/3F},
+                     //{4/9F,1/3F},{9/18F,1/6F},{3/9F,1/3F},
+                     //{9/18F,1/6F},{5/9F,0},{3/9F,1/3F},
+                     //{5/9F,1/3F},{11/18F,1/6F},{4/9F,1/3F},
+                     //{11/18F,1/6F},{6/9F,0},{4/9F,1/3F},
+                     //{6/9F,1/3F},{13/18F,1/6F},{5/9F,1/3F},
+                     //{13/18F,1/6F},{7/9F,0},{5/9F,1/3F},
+
+
+                     { 2 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 1 / 3F }, { 3 / 9F, 1 / 3F }, { 1 / 9F, 2 / 3F },
+                     { 2 / 9F, 1 / 3F }, { 4 / 9F, 1 / 3F }, { 2 / 9F, 2 / 3F }, { 3 / 9F, 1 / 3F }, { 5 / 9F, 1 / 3F },
+                     { 1 / 3F, 2 / 3F }, { 4 / 9F, 1 / 3F }, { 2 / 9F, 1 / 3F }, { 0, 2 / 3F }, { 1 / 9F, 2 / 3F },
+                     { 3 / 9F, 1 / 3F }, { 1 / 9F, 2 / 3F }, { 2 / 9F, 2 / 3F }, { 4 / 9F, 1 / 3F }, { 2 / 9F, 2 / 3F },
+                     { 3 / 9F, 2 / 3F },
+
+                     { 0, 1 }, { 1 / 9F, 2 / 3F }, { 2 / 9F, 2 / 3F }, };
+            trianIndex = tIndex;
+            barycentrCoor = bCoor;
+            break;
+         }
+      }
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method interpolates coordinates of new small triangles of main Bezier triangle
+    * 
+    * @param newBezierTriangles -
+    *                three path of main Bezier triangle
+    * @return coordinate of vertxes of new small triangles
+    */
+   private Coordinate[][] getInterpolatedTriangles2(final Bezier2 newBezierTriangles) {
+      final Bezier[] bezierPatch = new Bezier[3];
+
+      for (int i = 0; i < 3; i++) {
+         bezierPatch[i] = newBezierTriangles.getBezierPatch(i);
+      }
+
+      Coordinate[][] newTriangles = new Coordinate[(int) Math.pow(m_LoD + 1, 2)][3];
+      ///////////////////
+      if (m_LoD == 9) {
+         newTriangles = new Coordinate[129][3];
+      }
+      int indexOfNewTriangles = 0;
+      for (int i = 2; i < trianIndex.length - 1;) {
+         for (int j = 0; j < 3; j++) {
+            newTriangles[indexOfNewTriangles][0] = bezierPatch[(trianIndex[i - 2] + j) % 3].getElevation(barycentrCoor[i - 2][0],
+                     barycentrCoor[i - 2][1], scaleZ);
+            newTriangles[indexOfNewTriangles][1] = bezierPatch[(trianIndex[i - 1] + j) % 3].getElevation(barycentrCoor[i - 1][0],
+                     barycentrCoor[i - 1][1], scaleZ);
+            newTriangles[indexOfNewTriangles][2] = bezierPatch[(trianIndex[i] + j) % 3].getElevation(barycentrCoor[i][0],
+                     barycentrCoor[i][1], scaleZ);
+            indexOfNewTriangles++;
+         }
+         i += 3;
+      }
+      if ((m_LoD != 2) && (m_LoD != 5) && (m_LoD != 8) && (m_LoD != 9)) {
+         newTriangles[indexOfNewTriangles][0] = bezierPatch[0].getElevation(barycentrCoor[barycentrCoor.length - 3][0],
+                  barycentrCoor[barycentrCoor.length - 3][1], scaleZ);
+         newTriangles[indexOfNewTriangles][1] = bezierPatch[1].getElevation(barycentrCoor[barycentrCoor.length - 2][0],
+                  barycentrCoor[barycentrCoor.length - 2][1], scaleZ);
+         newTriangles[indexOfNewTriangles][2] = bezierPatch[2].getElevation(barycentrCoor[barycentrCoor.length - 1][0],
+                  barycentrCoor[barycentrCoor.length - 1][1], scaleZ);
+      }
+      return newTriangles;
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method for automatic generating barycentric coordinates for current LoD method divides tree Bezier path of main
+    * Bezier triangle
+    * 
+    * @param newBezierTriangles -
+    *                three path of main Bezier triangle
+    * @return coordinate of vertxes of new small triangles
+    */
+   private Coordinate[][] getInterpolatedTriangles(final Bezier2 newBezierTriangles) {
+      final Coordinate[][] newTriangles = new Coordinate[(int) Math.pow(m_LoD + 1, 2) * 3][3];
+      int indexOfNewTriangles = 0;
+      final double[] indexes = new double[m_LoD + 2];
+      final double koeficient = 1 / ((double) m_LoD + 1);
+      for (int i = 0; i <= m_LoD + 1; i++) {
+         indexes[i] = koeficient * i;
+      }
+      for (int k = 0; k < 3; k++) {
+         final Bezier bezierTriangles2 = newBezierTriangles.getBezierPatch(k);
+
+         final int maxTi = m_LoD + 1;
+         int maxTj = m_LoD;
+         for (int i = 0; i <= maxTi; i++) {
+            for (int j = 0; j <= maxTj; j++) {
+               newTriangles[indexOfNewTriangles][0] = bezierTriangles2.getElevation(indexes[i], indexes[j], scaleZ);
+               newTriangles[indexOfNewTriangles][1] = bezierTriangles2.getElevation(indexes[i], indexes[j + 1], scaleZ);
+               newTriangles[indexOfNewTriangles++][2] = bezierTriangles2.getElevation(indexes[i + 1], indexes[j], scaleZ);
+            }
+            maxTj--;
+         }
+         maxTj = m_LoD - 1;
+         for (int i = 1; i <= maxTi; i++) {
+            for (int j = 0; j <= maxTj; j++) {
+               newTriangles[indexOfNewTriangles][0] = bezierTriangles2.getElevation(indexes[i], indexes[j], scaleZ);
+               newTriangles[indexOfNewTriangles][1] = bezierTriangles2.getElevation(indexes[i], indexes[j + 1], scaleZ);
+               newTriangles[indexOfNewTriangles++][2] = bezierTriangles2.getElevation(indexes[i - 1], indexes[j + 1], scaleZ);
+            }
+            maxTj--;
+         }
+      }
+      return newTriangles;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method searchs normals vector for vertex P of triangle T
+    * 
+    * @param T -
+    *                triangle
+    * @param P -
+    *                vertex of triangle
+    * @return - linked list of vectors
+    */
+   private LinkedList searchVectors(final Bezier2 bezierT,
+                                    final Coordinate P,
+                                    final int indexOfBezierT) {
+      LinkedList vectors = new LinkedList();
+      //System.out.println();
+      List<Integer> listOfTrianglesIndex = null;
+      try {
+         listOfTrianglesIndex = trianglesIndex.query(new Envelope(P));
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+
+      Iterator<Integer> iterTrianglesIndex = listOfTrianglesIndex.iterator();
+
+      boolean haveBreakLine = false;
+      boolean testingBreakLine = true;
+      while (iterTrianglesIndex.hasNext()) {
+         final int index = iterTrianglesIndex.next();
+         final Coordinate[] TT = triangles[index];
+         switch (compareReturnIndex(TT, P)) {
+            case 'A': {
+               if (testingBreakLine) {
+                  haveBreakLine = testOfBreakLine('A', index);
+               }
+               final Coordinate v1 = Bezier2.setVector(P, TT[1]);
+               final Coordinate v2 = Bezier2.setVector(P, TT[2]);
+               final double scalar = Bezier2.countScalarProduct(v1, v2);
+               final double scalarJ = (Bezier2.countScalarProduct(v1, v1) * Bezier2.countScalarProduct(v2, v2));
+               double alfa;
+               if (Math.abs(scalar) < Math.abs(scalarJ)) {
+                  alfa = Math.acos(scalar / scalarJ);
+               }
+               else {
+                  alfa = 1;
+               }
+               final Coordinate normal = Bezier2.setNormalVector(v1, v2);
+               vectors.add(new Coordinate(normal.x * alfa, normal.y * alfa, normal.z * alfa));
+               break;
+            }
+            case 'B': {
+               if (testingBreakLine) {
+                  haveBreakLine = testOfBreakLine('B', index);
+               }
+               final Coordinate v1 = Bezier2.setVector(P, TT[0]);
+               final Coordinate v2 = Bezier2.setVector(P, TT[2]);
+               final double scalar = Bezier2.countScalarProduct(v1, v2);
+               final double scalarJ = (Bezier2.countScalarProduct(v1, v1) * Bezier2.countScalarProduct(v2, v2));
+               double alfa;
+               if (Math.abs(scalar) < Math.abs(scalarJ)) {
+                  alfa = Math.acos(scalar / scalarJ);
+               }
+               else {
+                  alfa = 1;
+               }
+               final Coordinate normal = Bezier2.setNormalVector(v1, v2);
+               vectors.add(new Coordinate(normal.x * alfa, normal.y * alfa, normal.z * alfa));
+               break;
+            }
+            case 'C': {
+               if (testingBreakLine) {
+                  haveBreakLine = testOfBreakLine('C', index);
+               }
+               final Coordinate v1 = Bezier2.setVector(P, TT[0]);
+               final Coordinate v2 = Bezier2.setVector(P, TT[1]);
+               final double scalar = Bezier2.countScalarProduct(v1, v2);
+               final double scalarJ = (Bezier2.countScalarProduct(v1, v1) * Bezier2.countScalarProduct(v2, v2));
+               double alfa;
+               if (Math.abs(scalar) < Math.abs(scalarJ)) {
+                  alfa = Math.acos(scalar / scalarJ);
+               }
+               else {
+                  alfa = 1;
+               }
+               final Coordinate normal = Bezier2.setNormalVector(v1, v2);
+               vectors.add(new Coordinate(normal.x * alfa, normal.y * alfa, normal.z * alfa));
+            }
+         }
+         if (haveBreakLine) {
+            testingBreakLine = false;
+            haveBreakLine = false;
+            vectors = new LinkedList();
+            iterTrianglesIndex = setCorectTrianglesIndex(listOfTrianglesIndex, bezierT, P, indexOfBezierT).iterator();
+
+         }
+      }
+      return vectors;
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method sets corect list of triangles neighbour for current Bezier triangle The method divides two TIN with
+    * hardBreakLines
+    * 
+    * @param listOfTrianglesIndex -
+    *                index of trinagle's neighbours
+    * @param bezierT -
+    *                current Bezier triangle
+    * @param P -
+    *                vertex of current Bezier triangle
+    * @param indexOfBezierT -
+    *                index of triangles bezierT
+    * @return list of corect neighbour
+    */
+   private LinkedList setCorectTrianglesIndex(final List<Integer> listOfTrianglesIndex,
+                                              final Bezier2 bezierT,
+                                              final Coordinate P,
+                                              final int indexOfBezierT) {
+      final TreeMap allTriangles = new TreeMap();
+      final TreeMap newTriangles = new TreeMap();
+      final Iterator<Integer> iterOfTrianglesIndex = listOfTrianglesIndex.iterator();
+      int typeOfBreakLine;
+      while (iterOfTrianglesIndex.hasNext()) {
+         final int index = iterOfTrianglesIndex.next();
+         //int index = (Integer)(data2).getValue(0);
+         final Coordinate[] TT = triangles[index];
+         final Object typeOfBreakL = breakLines.get(index);
+         if (typeOfBreakL != null) {
+            typeOfBreakLine = ((Integer) typeOfBreakL).intValue();
+         }
+         else {
+            typeOfBreakLine = -1;
+         }
+
+         switch (compareReturnIndex(TT, P)) {
+            case 'A': {
+               allTriangles.put(index, new Triangle(index, TT, typeOfBreakLine));
+               break;
+            }
+            case 'B': {
+               if (typeOfBreakLine != -1) {
+                  if ((typeOfBreakLine < 3)) {
+                     typeOfBreakLine = (typeOfBreakLine + 2) % 3;
+                  }
+                  else if (typeOfBreakLine != 6) {
+                     typeOfBreakLine = (typeOfBreakLine + 2) % 3 + 3;
+                  }
+               }
+               allTriangles.put(index, new Triangle(index, TT[1], TT[2], TT[0], typeOfBreakLine));
+               break;
+            }
+            case 'C': {
+               if (typeOfBreakLine != -1) {
+                  if (typeOfBreakLine < 3) {
+                     typeOfBreakLine = (typeOfBreakLine + 1) % 3;
+                  }
+                  else if (typeOfBreakLine != 6) {
+                     typeOfBreakLine = (typeOfBreakLine + 1) % 3 + 3;
+                  }
+               }
+               allTriangles.put(index, new Triangle(index, TT[2], TT[0], TT[1], typeOfBreakLine));
+               break;
+            }
+         }
+      }
+      Triangle T = (Triangle) allTriangles.get(indexOfBezierT);
+
+      newTriangles.put(indexOfBezierT, T);
+      allTriangles.remove(indexOfBezierT);
+
+      //TEST OF TRIANGLES ON THE RIGHT SIDE
+      Triangle rightT = T;
+      boolean change = true;
+      while ((rightT.typeOfBreakLine != 6) && (rightT.typeOfBreakLine != 3) && (rightT.typeOfBreakLine != 2)
+             && (rightT.typeOfBreakLine != 5) && !allTriangles.isEmpty() && change) {
+         change = false;
+         final Iterator iterAllTriangles = allTriangles.values().iterator();
+         while (iterAllTriangles.hasNext()) {
+            T = (Triangle) iterAllTriangles.next();
+            if (rightT.coord[2].equals2D(T.coord[1])) {
+               change = true;
+               newTriangles.put(T.index, T);
+               allTriangles.remove(T.index);
+               rightT = T;
+               break;
+            }
+         }
+      }
+      //TEST OF TRIANGLES ON THE LEFT SIDE
+      Triangle leftT = (Triangle) newTriangles.get(indexOfBezierT);
+      change = true;
+      while ((leftT.typeOfBreakLine != 6) && (leftT.typeOfBreakLine != 3) && (leftT.typeOfBreakLine != 0)
+             && (leftT.typeOfBreakLine != 4) && !allTriangles.isEmpty() && change) {
+         change = false;
+         final Iterator iterAllTriangles = allTriangles.values().iterator();
+         while (iterAllTriangles.hasNext()) {
+            T = (Triangle) iterAllTriangles.next();
+            if (leftT.coord[1].equals2D(T.coord[2])) {
+               change = true;
+               newTriangles.put(T.index, T);
+               allTriangles.remove(T.index);
+               leftT = T;
+               break;
+            }
+         }
+      }
+
+      //Creating of list of indexes for computing normals
+      final LinkedList finalTriangles = new LinkedList();
+      try {
+         final Iterator iterOfNewTriangles = newTriangles.values().iterator();
+         while (iterOfNewTriangles.hasNext()) {
+            //				data = new Data(dd);
+            //				data.addValue();
+            finalTriangles.add(new Integer(((Triangle) iterOfNewTriangles.next()).index));
+         }
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+
+      return finalTriangles;
+
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method tests break line if passes current vertex of triangle
+    * 
+    * @param vertex -
+    *                vertex of triangle
+    * @param indexTT -
+    *                index of triangle in main data structure
+    * @return true - break line passes coordinate of vertxes of new small triangles
+    */
+   private boolean testOfBreakLine(final char vertex,
+                                   final int indexTT) {
+      if (breakLines.containsKey(indexTT)) {
+         int typeOfBreakLine;
+         final Object typeOfBreakL = breakLines.get(indexTT);
+         if (typeOfBreakL != null) {
+            typeOfBreakLine = ((Integer) typeOfBreakL).intValue();
+         }
+         else {
+            typeOfBreakLine = -1;
+         }
+
+         switch (vertex) {
+            case 'A': {
+               if (typeOfBreakLine == 1) {
+                  return false;
+               }
+               else {
+                  return true;
+               }
+            }
+            case 'B': {
+               if (typeOfBreakLine == 2) {
+                  return false;
+               }
+               else {
+                  return true;
+               }
+            }
+            case 'C': {
+               if (typeOfBreakLine == 0) {
+                  return false;
+               }
+               else {
+                  return true;
+               }
+            }
+         }
+      }
+      return false;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which compare points
+    * 
+    * @param P -
+    *                points for comparing
+    * @return index A,B,C which point is same or N if point P not exist in triangle
+    */
+   protected char compareReturnIndex(final Coordinate[] triangle,
+                                     final Coordinate P) {
+      if (P.equals2D(triangle[0])) {
+         return 'A';
+      }
+      if (P.equals2D(triangle[1])) {
+         return 'B';
+      }
+      if (P.equals2D(triangle[2])) {
+         return 'C';
+      }
+      return 'N';
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/BezierSurface.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/SmoothTinBezierAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/SmoothTinBezierAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/SmoothTinBezierAlgorithm.java	(revision 369)
@@ -0,0 +1,183 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+
+package es.unex.sextante.tin.smoothTinBezier;
+
+import java.util.TreeMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class SmoothTinBezierAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TIN        = "TIN";
+   public static final String TINB       = "TINB";
+   public static final String LoD        = "LoD";
+   public static final String Smooth     = "Smooth";
+
+   private IVectorLayer       m_Triangles;
+   private IVectorLayer       m_TrianglesOut;
+   private int                m_LoD;
+   private double             m_Smooth;
+
+   private STRtree            trianglesIndex;
+   Coordinate[][]             triangles;
+   TreeMap                    breakLines = new TreeMap();
+   Bezier                     miniBezierTriangles[];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Bezier_surface"));
+      setGroup(Sextante.getText("TIN"));
+      setUserCanDefineAnalysisExtent(false);
+      final String[] sDistance = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+      try {
+         m_Parameters.addInputVectorLayer(TIN, Sextante.getText("TIN"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+
+         m_Parameters.addSelection(LoD, Sextante.getText("Level_of_detail"), sDistance);
+         m_Parameters.addNumericalValue(Smooth, Sextante.getText("Smoothing_coef"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0.1, 1);
+
+         addOutputVectorLayer(TINB, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+      double scaleZ = Double.NEGATIVE_INFINITY;
+
+
+      m_Triangles = m_Parameters.getParameterValueAsVectorLayer(TIN);
+      m_LoD = m_Parameters.getParameterValueAsInt(LoD);
+      m_Smooth = m_Parameters.getParameterValueAsDouble(Smooth);
+
+      final Class types[] = { Integer.class, String.class, Integer.class };
+      final String sNames[] = { "ID", "HardLines", "type" };
+      m_TrianglesOut = getNewVectorLayer(TINB, m_Triangles.getName() + "_bezier", IVectorLayer.SHAPE_TYPE_POLYGON, types, sNames);
+
+
+      i = 0;
+      iShapeCount = m_Triangles.getShapesCount();
+      triangles = new Coordinate[iShapeCount][3];
+      IFeatureIterator iter = m_Triangles.iterator();
+      try {
+         //			dd.addField(Integer.class);
+         //			PageStore ps = new MemoryPageStore(dd);
+         trianglesIndex = new STRtree();
+         while (iter.hasNext()) {
+            final IFeature feature = iter.next();
+            //TODO: this is supposed to be TIN input, so we should check an throw an error if
+            //TODO: we get a polygon which is not a triangle!
+
+            final IRecord record = feature.getRecord();
+            if (((String) record.getValue(1)) == "Y") {
+               breakLines.put(i, record.getValue(2));
+            }
+
+            triangles[i][0] = (Coordinate) feature.getGeometry().getCoordinates()[0].clone();
+            triangles[i][1] = (Coordinate) feature.getGeometry().getCoordinates()[1].clone();
+            triangles[i][2] = (Coordinate) feature.getGeometry().getCoordinates()[2].clone();
+            //TODO: add fake Z-coordinates (0.0) if this is a 2D input TIN
+
+            //				data = new Data(dd);
+            //				data.addValue(i);
+
+            //trianglesIndex.insert(trianglePolygon.getEnvelopeInternal(), new Integer(i));
+            trianglesIndex.insert(feature.getGeometry().getEnvelopeInternal(), new Integer(i));
+
+            /* DEBUG */
+            System.err.println("TRIANGLE " + i + " = " + triangles[i][0] + ", " + triangles[i][1] + ", " + triangles[i][2]);
+
+            for (int k = 0; k < 2; k++) {
+               final double diffZ = triangles[i][k].z - triangles[i][k + 1].z;
+               final double diffXY = Math.sqrt(Math.pow((triangles[i][k].x - triangles[i][k + 1].x), 2)
+                                               + Math.pow((triangles[i][k].y - triangles[i][k + 1].y), 2));
+
+               //TODO: if
+               if (scaleZ < Math.abs(diffZ / diffXY)) {
+                  scaleZ = Math.abs(diffZ / diffXY);
+               }
+            }
+            setProgress(i, 2 * iShapeCount);
+            i++;
+         }
+         iter.close();
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+
+      // TODO: what happens if we have only fake Z coordinates (=0.0) ???
+      // TODO: in that case, scaleZ*m_smooth (see below) will be = 0
+      // TODO: would that be a problem?
+      System.err.println("SCALEZ = " + scaleZ);
+
+      m_Triangles = null;
+      iter = null;
+      final BezierSurface bezierSurface = new BezierSurface(triangles, trianglesIndex, breakLines, scaleZ * m_Smooth, m_LoD + 1);
+
+
+      int indexOfInterpolatedTriangles = 0;
+      while (bezierSurface.hasNext()) {
+         setProgress(i++, 2 * iShapeCount);
+         final Coordinate newTin[][] = bezierSurface.nextTrinagle();
+         System.err.println("GOT " + newTin.length + " TRIANGLES");
+         for (int l = 0; l < newTin.length; l++) {
+            final Object[] record = { new Integer(indexOfInterpolatedTriangles), "", -1 };
+            final GeometryFactory gf = new GeometryFactory();
+            final Coordinate[] coords = new Coordinate[4];
+            for (int m = 0; m < 3; m++) {
+               coords[m] = newTin[l][m];
+               if (coords[m] != null) {
+                  /* DEBUG */
+                  System.err.println(coords[m]);
+               }
+
+            }
+            coords[3] = newTin[l][0];
+
+            /* DEBUG */
+            System.err.println(coords[3]);
+
+            /* BUG */
+            //TODO: for some reason, bezierSurface.nextTriangle() only writes invalid triangles into newTin[][]
+            //TODO: this leads to gf.createLinearRing() falling over
+            final LinearRing ring = gf.createLinearRing(coords);
+            m_TrianglesOut.addFeature(gf.createPolygon(ring, null), record);
+            indexOfInterpolatedTriangles++;
+         }
+      }
+      return !m_Task.isCanceled();
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/SmoothTinBezierAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/TriangleDT.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/TriangleDT.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/TriangleDT.java	(revision 369)
@@ -0,0 +1,295 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+
+package es.unex.sextante.tin.smoothTinBezier;
+
+import java.awt.geom.GeneralPath;
+import java.io.Serializable;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
+
+public class TriangleDT
+         implements
+            Serializable {
+   public Coordinate A;
+   public Coordinate B;
+   public Coordinate C;
+   public boolean    haveBreakLine = false;
+   public int        typeBreakLine = -1;
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param T -
+    *                triangle will be cloned
+    * 
+    */
+   public TriangleDT(final TriangleDT T) {
+      A = T.A;
+      B = T.B;
+      C = T.C;
+   }
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param A -
+    *                first vertex
+    * @param B -
+    *                second vertex
+    * @param C -
+    *                third vertex
+    * 
+    */
+   public TriangleDT(final Coordinate A,
+                     final Coordinate B,
+                     final Coordinate C) {
+      this.A = A;
+      this.B = B;
+      this.C = C;
+   }
+
+
+   public TriangleDT(final Coordinate[] coords) {
+      this.A = new Coordinate(coords[0].x, coords[0].y, coords[0].z);
+      this.B = new Coordinate(coords[1].x, coords[1].y, coords[1].z);
+      this.C = new Coordinate(coords[2].x, coords[2].y, coords[2].z);
+   }
+
+
+   /******************************************************************************************************************************
+    * implicit Constructor
+    */
+   public TriangleDT() {}
+
+
+   /******************************************************************************************************************************
+    * The method which testing, if the line intersect the triangle
+    * 
+    * @param newL -
+    *                Geometry of line
+    * 
+    * @return boolean true - line intersect triangle false - line doesn't intersect triangle
+    */
+   public boolean containsLine(final LineString newL) {
+      final Coordinate[] newPoints = { A, B, C, A };
+      final CoordinateArraySequence newPointsTriangle = new CoordinateArraySequence(newPoints);
+      final LinearRing trianglesPoints = new LinearRing(newPointsTriangle, new GeometryFactory());
+      return newL.crosses(trianglesPoints.convexHull());
+   }
+
+
+   protected Coordinate getCentroid() {
+      return new Coordinate((A.x + B.x + C.x) / 3, (A.y + B.y + C.y) / 3);
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which testing, if the triangle contains the point
+    * 
+    * @param P -
+    *                point which will be tested
+    * 
+    * @return boolean true - the triangle contains the point false - the triangle doesn't contains point
+    * 
+    */
+   public boolean contains(final Coordinate P) {
+      final GeneralPath triangle = new GeneralPath();
+      triangle.moveTo((float) A.x, (float) A.y);
+      triangle.lineTo((float) B.x, (float) B.y);
+      triangle.lineTo((float) C.x, (float) C.y);
+      triangle.lineTo((float) A.x, (float) A.y);
+      triangle.closePath();
+      return triangle.contains(P.x, P.y);
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which testing, if the triangle contains the point
+    * 
+    * @param P -
+    *                point which will be tested
+    * 
+    * @return boolean true - the triangle contains the point false - the triangle doesn't contains point
+    * 
+    */
+   public boolean containsPointAsVertex(final Coordinate P) {
+      if (A.equals2D(P) || B.equals2D(P) || C.equals2D(P)) {
+         return true;
+      }
+      else {
+         return false;
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which testing two triangles, if the triangles have one same point
+    * 
+    * @param T -
+    *                triangle to test
+    * 
+    * @return boolean true - the triangles have one same point false - the triangles haven't one same point
+    * 
+    */
+   protected boolean containsOneSamePointWith(final TriangleDT T) {
+      if (T.A.equals2D(A) || T.A.equals2D(B) || T.A.equals2D(C)) {
+         return true;
+      }
+      if (T.B.equals2D(A) || T.B.equals2D(B) || T.B.equals2D(C)) {
+         return true;
+      }
+      if (T.C.equals2D(A) || T.C.equals2D(B) || T.C.equals2D(C)) {
+         return true;
+      }
+      else {
+         return false;
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which testing two triangles, if the triangles have two same points
+    * 
+    * @param P1 -
+    *                point for testing
+    * @param P2 -
+    *                point for testing
+    * @return boolean true - the triangles have two same point false - the triangles haven't two same point
+    * 
+    */
+   public boolean containsTwoPoints(final Coordinate P1,
+                                    final Coordinate P2) {
+      if ((A.equals2D(P1) || B.equals2D(P1) || C.equals2D(P1)) && (A.equals2D(P2) || B.equals2D(P2) || C.equals2D(P2))) {
+         return true;
+      }
+      return false;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method for converting to String
+    * 
+    * 
+    */
+   /*	public void toStringa() {
+   		//return ("TriangleDT: " + A.toString() + B.toString() + C.toString()+" KEY "+key[0]+" "+key[1]+"  neighbour>"+neighbour_idx[0][0]+ " ");
+   		System.out.println("--------------------------------------------------------------------");
+   		  System.out.println("TDT: " + A.toString() + B.toString() + C.toString());
+   		  System.out.println(" k:"+typeBreakLine);
+   		System.out.println("--------------------------------------------------------------------");
+   	}*/
+
+   /******************************************************************************************************************************
+    * The method which testing triangle, if the triangles is'nt line
+    * 
+    * @return boolean true - the triangle is triangle false - the triangle is line
+    * 
+    */
+   protected boolean isTriangle() {
+      final Coordinate[] newPoint = new Coordinate[4];
+      newPoint[0] = A;
+      newPoint[1] = B;
+      newPoint[2] = C;
+      newPoint[3] = A;
+      final CoordinateArraySequence newPointsTriangle = new CoordinateArraySequence(newPoint);
+      final LinearRing trianglesPoints = new LinearRing(newPointsTriangle, new GeometryFactory());
+      if (trianglesPoints.convexHull().getGeometryType() == "Polygon") {
+         return true;
+      }
+      else {
+         return false;
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which comparing two triangles, if the triangles have same coordinates of vertexes
+    * 
+    * @param T -
+    *                triangle to test
+    * 
+    * @return boolean true - the triangles are same false - the triangles aren't same
+    * 
+    */
+   public boolean compare(final TriangleDT T) {
+      if ((T.A.equals2D(A) || T.A.equals2D(B) || T.A.equals2D(C)) && (T.B.equals2D(A) || T.B.equals2D(B) || T.B.equals2D(C))
+          && (T.C.equals2D(A) || T.C.equals2D(B) || T.C.equals2D(C))) {
+
+         return true;
+      }
+
+      return false;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which compare points
+    * 
+    * @param P -
+    *                points for comparing
+    * @return index A,B,C which point is same or N if point P not exist in triangle
+    */
+   public char compareReturnIndex(final Coordinate P) {
+      if (P.equals2D(A)) {
+         return 'A';
+      }
+      if (P.equals2D(B)) {
+         return 'B';
+      }
+      if (P.equals2D(C)) {
+         return 'C';
+      }
+      return 'N';
+
+   }
+
+
+   /******************************************************************************************************************************
+    * Protected method for getting envelope of triangle
+    * 
+    * @return envelope of triangle
+    */
+   public Envelope getEnvelope() {
+      final Coordinate[] newPoint = new Coordinate[4];
+      newPoint[0] = A;
+      newPoint[1] = B;
+      newPoint[2] = C;
+      newPoint[3] = A;
+      final CoordinateArraySequence newPointsTriangle = new CoordinateArraySequence(newPoint);
+
+      final LinearRing trianglesPoints = new LinearRing(newPointsTriangle, new GeometryFactory());
+
+      return trianglesPoints.getEnvelopeInternal();
+   }
+
+
+   public void normalizePolygon() {
+      Coordinate[] coords = new Coordinate[4];
+      final GeometryFactory gf = new GeometryFactory();
+      coords[0] = A;
+      coords[1] = B;
+      coords[2] = C;
+      coords[3] = A;
+      final LinearRing ring = gf.createLinearRing(coords);
+      final Polygon poly = gf.createPolygon(ring, null);
+      poly.normalize();
+      coords = poly.getCoordinates();
+      A = coords[0];
+      B = coords[1];
+      C = coords[2];
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/TriangleDT.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier.java	(revision 369)
@@ -0,0 +1,126 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+package es.unex.sextante.tin.smoothTinBezier;
+
+import java.awt.geom.GeneralPath;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+public class Bezier {
+
+   Coordinate  b300;
+   Coordinate  b030;
+   Coordinate  b003;
+   Coordinate  b012         = null;
+   Coordinate  b021         = null;
+   Coordinate  b102         = null;
+   Coordinate  b120         = null;
+   Coordinate  b210         = null;
+   Coordinate  b201         = null;
+   Coordinate  b111         = null;
+   GeneralPath trianglePath = new GeneralPath();
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param bxxx -
+    *                control points of control mesh
+    */
+   protected Bezier(final Coordinate b300,
+                    final Coordinate b030,
+                    final Coordinate b003,
+                    final Coordinate b210,
+                    final Coordinate b120,
+                    final Coordinate b021,
+                    final Coordinate b012,
+                    final Coordinate b102,
+                    final Coordinate b201,
+                    final Coordinate b111) {
+      this.b300 = b300;
+      this.b030 = b030;
+      this.b003 = b003;
+      this.b012 = b012;
+      this.b021 = b021;
+      this.b102 = b102;
+      this.b120 = b120;
+      this.b210 = b210;
+      this.b201 = b201;
+      this.b111 = b111;
+      trianglePath.moveTo((float) b300.x, (float) b300.y);
+      trianglePath.lineTo((float) b030.x, (float) b030.y);
+      trianglePath.lineTo((float) b003.x, (float) b003.y);
+      trianglePath.lineTo((float) b300.x, (float) b300.y);
+      trianglePath.closePath();
+
+   }
+
+
+   /******************************************************************************************************************************
+    * Protected method for counting elevation of triangle's point with coordinates u,v
+    * 
+    * @param u -
+    *                barycentric koeficient u
+    * @param v -
+    *                barycentric koeficient v
+    * @return new point
+    */
+   protected Coordinate getElevation(final double u,
+                                     final double v,
+                                     final double scaleZ) {
+      final double w = 1 - u - v;
+      final double x = b300.x * Math.pow(w, 3) + b030.x * Math.pow(u, 3) + b003.x * Math.pow(v, 3) + 3 * b210.x * Math.pow(w, 2)
+                       * u + 3 * b120.x * Math.pow(u, 2) * w + 3 * b201.x * Math.pow(w, 2) * v + 3 * b021.x * Math.pow(u, 2) * v
+                       + 3 * b102.x * Math.pow(v, 2) * w + 3 * b012.x * u * Math.pow(v, 2) + 6 * b111.x * u * v * w;
+
+      final double y = b300.y * Math.pow(w, 3) + b030.y * Math.pow(u, 3) + b003.y * Math.pow(v, 3) + 3 * b210.y * Math.pow(w, 2)
+                       * u + 3 * b120.y * Math.pow(u, 2) * w + 3 * b201.y * Math.pow(w, 2) * v + 3 * b021.y * Math.pow(u, 2) * v
+                       + 3 * b102.y * Math.pow(v, 2) * w + 3 * b012.y * u * Math.pow(v, 2) + 6 * b111.y * u * v * w;
+
+      final double z = (b300.z * Math.pow(w, 3) + b030.z * Math.pow(u, 3) + b003.z * Math.pow(v, 3) + 3 * b210.z * Math.pow(w, 2)
+                        * u + 3 * b120.z * Math.pow(u, 2) * w + 3 * b201.z * Math.pow(w, 2) * v + 3 * b021.z * Math.pow(u, 2) * v
+                        + 3 * b102.z * Math.pow(v, 2) * w + 3 * b012.z * u * Math.pow(v, 2) + 6 * b111.z * u * v * w)
+                       * scaleZ;
+
+      return new Coordinate(x, y, z);
+   }
+
+
+   protected void printToConsole() {
+      System.out.println("======================================");
+      System.out.println(b300.toString());
+      System.out.println(b030.toString());
+      System.out.println(b003.toString());
+      System.out.println("Normals:");
+
+      System.out.println(b210.toString());
+      System.out.println(b120.toString());
+      System.out.println(b021.toString());
+      System.out.println(b012.toString());
+      System.out.println(b102.toString());
+      System.out.println(b201.toString());
+      System.out.println(b111.toString());
+
+      System.out.println("======================================");
+   }
+
+
+   /******************************************************************************************************************************
+    * The method which testing, if the triangle contains the point
+    * 
+    * @param P -
+    *                point which will be tested
+    * 
+    * @return boolean true - the triangle contains the point false - the triangle doesn't contains point
+    * 
+    */
+
+   public boolean contains(final Coordinate P) {
+      return trianglePath.contains(P.x, P.y);
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/smoothTinBezier/Bezier.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/tinWithBreaklines/TinWithBreaklinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/tinWithBreaklines/TinWithBreaklinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/tinWithBreaklines/TinWithBreaklinesAlgorithm.java	(revision 369)
@@ -0,0 +1,136 @@
+
+
+package es.unex.sextante.tin.tinWithBreaklines;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.triangulate.ConformingDelaunayTriangulationBuilder;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class TinWithBreaklinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS          = "POINTS";
+   public static final String LINES           = "LINES";
+   public static final String TRIANGLES       = "TRIANGLES";
+   public static final String ELEVATION_FIELD = "ELEVATION_FIELD";
+
+   private IVectorLayer       m_Points        = null;
+   private IVectorLayer       m_Lines         = null;
+   private IVectorLayer       m_Triangles     = null;
+   private int                m_iElevationField;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_tin_with_breaklines"));
+      setGroup(Sextante.getText("TIN"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Breaklines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+
+         m_Parameters.addTableField(ELEVATION_FIELD, Sextante.getText("Height_field"), "POINTS");
+
+         addOutputVectorLayer(TRIANGLES, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+      final GeometryFactory gf = new GeometryFactory();
+
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      m_Lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         m_Points.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+         m_Lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_iElevationField = m_Parameters.getParameterValueAsInt(ELEVATION_FIELD);
+
+      final Class types[] = { Integer.class, String.class, Integer.class, Double.class };
+      final String sNames[] = { "ID", "HardLines", "type", "elevation" };
+      m_Triangles = getNewVectorLayer(TRIANGLES, "TIN_" + m_Points.getName(), IVectorLayer.SHAPE_TYPE_POLYGON, types, sNames);
+
+      i = 0;
+      final ArrayList<Geometry> pointsList = new ArrayList<Geometry>();
+      iShapeCount = m_Points.getShapesCount();
+      IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         try {
+            final double dElevation = Double.parseDouble(feature.getRecord().getValue(m_iElevationField).toString());
+            coord.z = dElevation;
+         }
+         catch (final Exception e) {
+            throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_values_in_elevation_field"));
+         }
+         pointsList.add(gf.createPoint(coord));
+         i++;
+      }
+      iter.close();
+
+      final ArrayList<Geometry> linesList = new ArrayList<Geometry>();
+      iShapeCount = m_Lines.getShapesCount();
+      iter = m_Lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         linesList.add(feature.getGeometry());
+         i++;
+      }
+      iter.close();
+      m_Task.setDeterminate(false);
+      final Geometry pointsGeomcol = gf.createGeometryCollection(pointsList.toArray(new Geometry[0]));
+      final Geometry linesGeomcol = gf.createGeometryCollection(linesList.toArray(new Geometry[0]));
+      final ConformingDelaunayTriangulationBuilder delaunay = new ConformingDelaunayTriangulationBuilder();
+      delaunay.setSites(pointsGeomcol);
+      delaunay.setConstraints(linesGeomcol);
+      final Geometry triangles = delaunay.getTriangles(gf);
+
+      final int iTriangles = triangles.getNumGeometries();
+      for (int iTriangle = 0; iTriangle < iTriangles; iTriangle++) {
+         final Geometry triangle = triangles.getGeometryN(iTriangle);
+         final Object[] record = { new Integer(iTriangle), "", -1, getElevation(triangle) };
+         m_Triangles.addFeature(triangle, record);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   /* return elevation as average of all 3 triangle vertices */
+   private double getElevation(final Geometry triangle) {
+
+      final Coordinate[] coords = triangle.getCoordinates();
+      return (coords[0].z + coords[1].z + coords[2].z) / 3.;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/tinWithBreaklines/TinWithBreaklinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearContourLines.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearContourLines.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearContourLines.java	(revision 369)
@@ -0,0 +1,335 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+package es.unex.sextante.tin.linearIsolinesFromTin;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.TreeMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+public class LinearContourLines {
+
+   ArrayList finalIsolines = null;
+   double    elevatedStep;
+   double    clusterTol;
+   double    minIso;
+   double    maxIso;
+   int       numberOfIsolines;
+   TreeMap   treeIndex;
+
+
+   /******************************************************************************************************************************
+    * Constructor
+    * 
+    * @param equidistance -
+    *                equidistance between isolines
+    * @param clusterTol -
+    *                minimum diference in X,Y coordinates between points where the points are indetical
+    */
+   public LinearContourLines(final double equiDistance,
+                             double clusterTol) {
+      elevatedStep = equiDistance;
+      int coeficient = 1;
+      while (clusterTol < 1) {
+         coeficient *= 10;
+         clusterTol *= 10;
+         //System.out.println(clusterTol);
+      }
+      this.clusterTol = coeficient * 10;
+      finalIsolines = new ArrayList();
+      treeIndex = new TreeMap<Integer, BinaryTree>();
+   }
+
+
+   /******************************************************************************************************************************
+    * Private function which generetes izolines from triangle with defined elevated Step
+    * 
+    * @param T -
+    *                triangle
+    */
+   private void trianglesIsoLines(final Coordinate[] triangle) {
+      Double minZ = new Double(0);
+      Double maxZ = new Double(0);
+      Coordinate startIZO = null;
+      Coordinate stopIZO = null;
+      double elev = Double.NEGATIVE_INFINITY;
+
+      //TEST OF SINGULAR POINTS
+      if (triangle[0].z / elevatedStep == (int) (triangle[0].z / elevatedStep)) {
+         triangle[0].z = triangle[0].z + elevatedStep * 0.01;//Float.MIN_VALUE;
+      }
+      if (triangle[1].z / elevatedStep == (int) (triangle[1].z / elevatedStep)) {
+         triangle[1].z = triangle[1].z + elevatedStep * 0.01;//Float.MIN_VALUE;
+      }
+      if (triangle[2].z / elevatedStep == (int) (triangle[2].z / elevatedStep)) {
+         triangle[2].z = triangle[2].z + elevatedStep * 0.01;//Float.MIN_VALUE;
+      }
+
+      minZ = triangle[0].z;
+      maxZ = triangle[0].z;
+      if (minZ > triangle[1].z) {
+         minZ = triangle[1].z;
+      }
+      if (minZ > triangle[2].z) {
+         minZ = triangle[2].z;
+      }
+      if (maxZ < triangle[1].z) {
+         maxZ = triangle[1].z;
+      }
+      if (maxZ < triangle[2].z) {
+         maxZ = triangle[2].z;
+      }
+      if (minZ >= 0) {
+         elev = ((int) (minZ / elevatedStep + 1)) * elevatedStep;
+      }
+      else {
+         elev = ((int) (minZ / elevatedStep)) * elevatedStep;
+      }
+
+      if (elev <= minZ) {
+         elev += elevatedStep;
+      }
+
+      while (elev < maxZ) {
+         if (((triangle[0].z < elev) & (triangle[1].z > elev)) || ((triangle[0].z > elev) & (triangle[1].z < elev))) {
+            startIZO = solveLinearInterpolation(triangle[0], triangle[1], elev);
+         }
+         if (((triangle[0].z < elev) & (triangle[2].z > elev)) || ((triangle[0].z > elev) & (triangle[2].z < elev))) {
+            if (startIZO == null) {
+               startIZO = solveLinearInterpolation(triangle[0], triangle[2], elev);
+            }
+            else {
+               stopIZO = solveLinearInterpolation(triangle[0], triangle[2], elev);
+            }
+         }
+         if (((triangle[1].z < elev) & (triangle[2].z > elev)) || ((triangle[1].z > elev) & (triangle[2].z < elev))) {
+            if (startIZO == null) {
+               startIZO = solveLinearInterpolation(triangle[1], triangle[2], elev);
+            }
+            if (stopIZO == null) {
+               stopIZO = solveLinearInterpolation(triangle[1], triangle[2], elev);
+            }
+         }
+
+         startIZO.x = Math.round(startIZO.x * clusterTol) / clusterTol;
+         startIZO.y = Math.round(startIZO.y * clusterTol) / clusterTol;
+         stopIZO.x = Math.round(stopIZO.x * clusterTol) / clusterTol;
+         stopIZO.y = Math.round(stopIZO.y * clusterTol) / clusterTol;
+
+         if (!startIZO.equals2D(stopIZO)) {
+            sortIsolines(startIZO, stopIZO, elev); //
+         }
+
+         startIZO = null;
+         stopIZO = null;
+         elev += elevatedStep;
+
+      }
+
+   }
+
+
+   /******************************************************************************************************************************
+    * Private function which computes point on line, (Linear interpolation)
+    * 
+    * @param A -
+    *                start point of line
+    * @param B -
+    *                end point of line
+    * @param elev -
+    *                defined elevation
+    * @return - coordinate of point with definied elevation
+    */
+   private Coordinate solveLinearInterpolation(final Coordinate A,
+                                               final Coordinate B,
+                                               final double elev) {
+      final double koef;
+      double rate;
+      if (B.z > A.z) {
+         rate = (elev - A.z) / (B.z - A.z);
+         return new Coordinate((A.x + (B.x - A.x) * rate), (A.y + (B.y - A.y) * rate), elev);
+      }
+      else {
+         rate = (elev - B.z) / (A.z - B.z);
+         return new Coordinate((B.x + (A.x - B.x) * rate), (B.y + (A.y - B.y) * rate), elev);
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method for counting isolines from TIN
+    * 
+    * @param triangles -
+    *                array of vertexes of triangles
+    */
+   public void countIsolines(final Coordinate[][] triangles) {
+      for (int i = 0; i < triangles.length; i++) {
+         trianglesIsoLines(triangles[i]);
+         triangles[i] = null;
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method gets list of isolines
+    * 
+    * @return ArrayList of isolines
+    */
+   public ArrayList getIsolines() {
+      return finalIsolines;
+   }
+
+
+   /******************************************************************************************************************************
+    * The method sorts segment of isoline to LineString
+    * 
+    * @param coordA -
+    *                start vertex of isoline's segment
+    * @param coordB -
+    *                stop vertex of isoline's segment
+    * @param elevation -
+    *                elevation of isoline's segment
+    */
+   private void sortIsolines(final Coordinate coordA,
+                             final Coordinate coordB,
+                             final double elevation) {
+      DVertex izoA = null;
+      DVertex izoB = null;
+      int indexA = 0;
+      int indexB = 0;
+      BinaryTree tree = null;
+
+      final int elevIndex = new Double((elevation - minIso) / elevatedStep).intValue();
+
+      if (treeIndex.containsKey(elevIndex)) {
+         tree = (BinaryTree) treeIndex.get(elevIndex);
+      }
+      else {
+         tree = new BinaryTree();
+         treeIndex.put(elevIndex, tree);
+      }
+
+      izoA = (DVertex) tree.search(coordA);
+      izoB = (DVertex) tree.search(coordB);
+
+      if (izoA != null) {
+         indexA = 1;
+      }
+      if (izoB != null) {
+         indexB = 2;
+      }
+
+      switch (indexA + indexB) {
+         case 0: {
+            final LinkedList izoList = new LinkedList();
+            izoList.add(coordA);
+            izoList.add(coordB);
+
+            tree.insert(coordA, new Integer(finalIsolines.size()));
+            tree.insert(coordB, new Integer(finalIsolines.size()));
+            finalIsolines.add(finalIsolines.size(), izoList);
+            break;
+         }
+         case 1: {
+            final LinkedList izoList = (LinkedList) finalIsolines.get(izoA.data);
+            if (izoList == null) {
+               break;
+            }
+            tree.remove(coordA);
+            if (((Coordinate) izoList.getFirst()).equals2D(coordA)) {
+               izoList.addFirst(coordB);
+               tree.insert(coordB, izoA.data);
+            }
+            else {
+
+               izoList.addLast(coordB);
+               tree.insert(coordB, izoA.data);
+            }
+            break;
+         }
+         case 2: {
+            final LinkedList izoList = (LinkedList) finalIsolines.get(izoB.data);
+            if (izoList == null) {
+               break;
+            }
+            tree.remove(coordB);
+            if (((Coordinate) izoList.getFirst()).equals2D(coordB)) {
+               izoList.addFirst(coordA);
+               tree.insert(coordA, izoB.data);
+
+            }
+            else {
+               izoList.addLast(coordA);
+               tree.insert(coordA, izoB.data);
+            }
+            break;
+         }
+         case 3: {
+            final LinkedList izoList = (LinkedList) finalIsolines.get(izoA.data);
+            if (izoList == null) {
+               break;
+            }
+            if ((izoA.data.intValue() == izoB.data.intValue())) {
+               tree.remove(coordA);
+               tree.remove(coordB);
+               if (((Coordinate) izoList.getFirst()).equals2D(coordA)) {
+                  izoList.addLast(coordA);
+               }
+               else {
+                  izoList.addFirst(coordA);
+               }
+            }
+            else {
+               final LinkedList izoListB = (LinkedList) finalIsolines.get(izoB.data);
+               if (izoListB == null) {
+                  break;
+               }
+               if (((Coordinate) izoList.getFirst()).equals2D(coordA)) {
+                  if (((Coordinate) izoListB.getFirst()).equals2D(coordB)) {
+                     final Iterator iterIzoB = izoListB.iterator();
+                     while (iterIzoB.hasNext()) {
+                        izoList.addFirst(iterIzoB.next());
+                     }
+                  }
+                  else {
+                     final Iterator iterIzoB = izoListB.descendingIterator();
+                     while (iterIzoB.hasNext()) {
+                        izoList.addFirst(iterIzoB.next());
+                     }
+                  }
+               }
+               else {
+                  if (((Coordinate) izoListB.getFirst()).equals2D(coordB)) {
+                     final Iterator iterIzoB = izoListB.iterator();
+                     while (iterIzoB.hasNext()) {
+                        izoList.addLast(iterIzoB.next());
+                     }
+                  }
+                  else {
+                     final Iterator iterIzoB = izoListB.descendingIterator();
+                     while (iterIzoB.hasNext()) {
+                        izoList.addLast(iterIzoB.next());
+                     }
+                  }
+
+               }
+               finalIsolines.set(izoB.data, null);
+               ((DVertex) tree.search((Coordinate) izoList.getLast())).data = izoA.data;
+               ((DVertex) tree.search((Coordinate) izoList.getFirst())).data = izoA.data;
+
+            }
+            tree.remove(coordA);
+            tree.remove(coordB);
+
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearContourLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/BinaryTree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/BinaryTree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/BinaryTree.java	(revision 369)
@@ -0,0 +1,146 @@
+/**
+ *    @author      	Josef Bezdek, ZCU Plzen
+ *	  @version     	1.0
+ *    @since 		JDK1.5
+ */
+
+
+package es.unex.sextante.tin.linearIsolinesFromTin;
+
+import java.util.LinkedList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+class DVertex {
+   Coordinate pointKey;
+   Integer    data;
+   DVertex    left;
+   DVertex    right;
+
+
+   DVertex(final Coordinate pointKey,
+           final Integer data) {
+      this.pointKey = pointKey;
+      this.data = data;
+   }
+}
+
+
+public class BinaryTree {
+   DVertex    root = null;
+   LinkedList helpList;
+
+
+   /******************************************************************************************************************************
+    * The method searchs object with pointKey index
+    * 
+    * @param pointKey -
+    *                index of object
+    * @return object with current index
+    */
+   public Object search(final Coordinate pointKey) {
+      return searchV(root, pointKey);
+   }
+
+
+   /******************************************************************************************************************************
+    * The private method for recursive searching
+    * 
+    * @param v -
+    *                vertex of tree
+    * @param pointKey -
+    *                index of object
+    * @return object with current index
+    */
+   private Object searchV(final DVertex v,
+                          final Coordinate pointKey) {
+      if (v == null) {
+         return null;
+      }
+      if (pointKey.x == v.pointKey.x) {
+         if (pointKey.y == v.pointKey.y) {
+            return v;
+         }
+         else {
+            return searchV(v.left, pointKey);
+         }
+      }
+      if (pointKey.x < v.pointKey.x) {
+         return searchV(v.left, pointKey);
+      }
+      else {
+         return searchV(v.right, pointKey);
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method inserts new object into tree
+    * 
+    * @param pointKey -
+    *                index of object
+    * @param data -
+    *                integer index of object to main data structure
+    */
+   public void insert(final Coordinate pointKey,
+                      final Integer data) {
+      DVertex v = null;
+      DVertex vNext = root;
+
+      while (vNext != null) {
+         v = vNext;
+         if (pointKey.x <= vNext.pointKey.x) {
+            vNext = vNext.left;
+         }
+         else {
+            vNext = vNext.right;
+         }
+      }
+      final DVertex newVertex = new DVertex(pointKey, data);
+      if (v == null) {
+         root = newVertex;
+      }
+      else if (pointKey.x <= v.pointKey.x) {
+         v.left = newVertex;
+      }
+      else {
+         v.right = newVertex;
+      }
+   }
+
+
+   /******************************************************************************************************************************
+    * The method removes object from tree
+    * 
+    * @param pointKey -
+    *                index of object
+    */
+   public void remove(final Coordinate pointKey) {
+      DVertex v = root;
+      while ((v != null) && (pointKey.x != v.pointKey.x) && (v.pointKey.y != pointKey.y)) {
+         if (pointKey.x < v.pointKey.x) {
+            v = v.left;
+         }
+         else {
+            v = v.right;
+         }
+      }
+
+      DVertex y = v;
+      if ((v.left != null) && (v.right != null)) {
+         y = v.right;
+         while (y.left != null) {
+            y = y.left;
+         }
+      }
+
+      DVertex x;
+      if (y.left != null) {
+         x = y.left;
+      }
+      else {
+         x = y.right;
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/BinaryTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearIsolinesFromTinAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearIsolinesFromTinAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearIsolinesFromTinAlgorithm.java	(revision 369)
@@ -0,0 +1,194 @@
+/**
+ * @author Josef Bezdek, ZCU Plzen
+ * @version 1.0
+ * @since JDK1.5
+ */
+
+
+//TODO: This currently returns an empty result.
+//TODO: Before extracting the isolines, it attempts a Bezier interpolation.
+//TODO: So I assume the problem(s) here to be identical with smoothTinBezier/SmoothTinBezierAlgorithm.java.
+//TODO: If we fix the former, the same fixes should be applied here!
+package es.unex.sextante.tin.linearIsolinesFromTin;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.TreeMap;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.tin.smoothTinBezier.Bezier;
+import es.unex.sextante.tin.smoothTinBezier.BezierSurface;
+
+public class LinearIsolinesFromTinAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TIN          = "TIN";
+   public static final String ISOLINES     = "ISOLINES";
+   public static final String EQUIDISTANCE = "EQUIDISTANCE";
+   public static final String LoD          = "LoD";
+   public static final String ClusterTol   = "ClusterTol";
+   public static final String Smooth       = "Smooth";
+
+   private IVectorLayer       m_Triangles;
+   private IVectorLayer       m_Isolines;
+   private double             m_EquiDistance;
+   private int                m_LoD;
+   private double             m_ClusterTol;
+   private double             m_Smooth;
+
+   private STRtree            trianglesIndex;
+   Coordinate[][]             triangles;
+   TreeMap                    breakLines   = new TreeMap();
+   Bezier                     miniBezierTriangles[];
+   double                     scaleZ;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Extract_isolines"));
+      setGroup(Sextante.getText("TIN"));
+      setUserCanDefineAnalysisExtent(false);
+      final String[] sDistance = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+      try {
+         m_Parameters.addInputVectorLayer(TIN, Sextante.getText("TIN"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON, true);
+
+         m_Parameters.addNumericalValue(EQUIDISTANCE, Sextante.getText("Equidistance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0, Double.MAX_VALUE);
+
+         m_Parameters.addSelection(LoD, Sextante.getText("Level_of_detail"), sDistance);
+
+         m_Parameters.addNumericalValue(ClusterTol, Sextante.getText("Cluster_tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0.001, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(Smooth, Sextante.getText("Smoothing_coef"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0.1, 1);
+
+
+         addOutputVectorLayer(ISOLINES, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShapeCount;
+      final double maxZValue = Double.NEGATIVE_INFINITY;
+      final double minZValue = Double.POSITIVE_INFINITY;
+
+      m_Triangles = m_Parameters.getParameterValueAsVectorLayer(TIN);
+      m_EquiDistance = m_Parameters.getParameterValueAsDouble(EQUIDISTANCE);
+      m_LoD = m_Parameters.getParameterValueAsInt(LoD);
+      m_ClusterTol = m_Parameters.getParameterValueAsDouble(ClusterTol);
+      m_Smooth = m_Parameters.getParameterValueAsDouble(Smooth);
+
+      final Class types[] = { Integer.class, Double.class };
+      final String sNames[] = { "ID", "Value" };
+      m_Isolines = getNewVectorLayer(ISOLINES, m_Triangles.getName() + "_Isolines", IVectorLayer.SHAPE_TYPE_LINE, types, sNames);
+
+      i = 0;
+      iShapeCount = m_Triangles.getShapesCount();
+      triangles = new Coordinate[iShapeCount][3];
+      IFeatureIterator iter = m_Triangles.iterator();
+      try {
+         //			dd.addField(Integer.class);
+         //			PageStore ps = new MemoryPageStore(dd);
+         trianglesIndex = new STRtree();
+         while (iter.hasNext()) {
+            //TODO: We assume the input to be a TIN. So if this feature != triangle, then we need to throw an error here
+            final IFeature feature = iter.next();
+            final IRecord record = feature.getRecord();
+            if (((String) record.getValue(1)) == "Y") {
+               breakLines.put(i, record.getValue(2));
+            }
+
+            triangles[i][0] = (Coordinate) feature.getGeometry().getCoordinates()[0].clone();
+            triangles[i][1] = (Coordinate) feature.getGeometry().getCoordinates()[1].clone();
+            triangles[i][2] = (Coordinate) feature.getGeometry().getCoordinates()[2].clone();
+
+            //				data = new Data(dd);
+            //				data.addValue(i);
+            trianglesIndex.insert(feature.getGeometry().getEnvelopeInternal(), new Integer(i));
+
+            for (int k = 0; k < 2; k++) {
+               final double diffZ = triangles[i][k].z - triangles[i][k + 1].z;
+               final double diffXY = Math.sqrt(Math.pow((triangles[i][k].x - triangles[i][k + 1].x), 2)
+                                               + Math.pow((triangles[i][k].y - triangles[i][k + 1].y), 2));
+
+               if (scaleZ < Math.abs(diffZ / diffXY)) {
+                  scaleZ = Math.abs(diffZ / diffXY);
+               }
+            }
+            setProgress(i, 2 * iShapeCount);
+            i++;
+         }
+         iter.close();
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+      }
+      m_Triangles = null;
+      iter = null;
+
+      final LinearContourLines isoLineFactory = new LinearContourLines(m_EquiDistance, m_ClusterTol);
+
+
+      if (m_LoD != 0) {
+         final BezierSurface bezierSurface = new BezierSurface(triangles, trianglesIndex, breakLines, scaleZ * m_Smooth, m_LoD);
+         while (bezierSurface.hasNext()) {
+            setProgress(i++, 2 * iShapeCount);
+            final Coordinate newTin[][] = bezierSurface.nextTrinagle();
+            isoLineFactory.countIsolines(newTin);
+         }
+      }
+      else {
+         isoLineFactory.countIsolines(triangles);
+      }
+
+      final ArrayList isolines = isoLineFactory.getIsolines();
+      final Iterator iterIso = isolines.iterator();
+      int j = 0;
+      for (int l = 0; l < isolines.size(); l++) {
+         final Object o = isolines.get(l);
+         if (o != null) {
+            final GeometryFactory gf = new GeometryFactory();
+            final Iterator isoL = ((LinkedList) o).iterator();
+            final Coordinate[] coords = new Coordinate[((LinkedList) o).size()];
+            int k = 0;
+            while (isoL.hasNext()) {
+               coords[k] = (Coordinate) isoL.next();
+               k++;
+            }
+            final Object[] record = { new Integer(j), coords[0].z };
+            final LineString isoline = gf.createLineString(coords);
+            m_Isolines.addFeature(isoline, record);
+            j++;
+
+         }
+      }
+
+      return !m_Task.isCanceled();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tin/linearIsolinesFromTin/LinearIsolinesFromTinAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/medianCenter/MedianCenterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/medianCenter/MedianCenterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/medianCenter/MedianCenterAlgorithm.java	(revision 369)
@@ -0,0 +1,165 @@
+
+
+package es.unex.sextante.pointAnalysis.medianCenter;
+
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class MedianCenterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final int    METHOD_NOT_WEIGHTED = 0;
+   public static final int    METHOD_WEIGHTED     = 1;
+
+   public static final String METHOD              = "METHOD";
+   public static final String FIELD               = "FIELD";
+   public static final String POINTS              = "POINTS";
+   public static final String RESULT              = "RESULT";
+
+   private static final int   ITERATIONS          = 100;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iField;
+      int iMethod;
+      double dSumX = 0, dSumY = 0;
+      double dX[], dY[], dWeight[];
+      double dDist;
+      double dDistWeight;
+      double dSumWeight = 0;
+      double xCenter, yCenter;
+      int iCount;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+      iCount = layer.getShapesCount();
+      if (iCount == 0) {
+         throw new GeoAlgorithmExecutionException("0 points in layer");
+      }
+
+      dX = new double[iCount];
+      dY = new double[iCount];
+      dWeight = new double[iCount];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         dX[i] = coord.x;
+         dY[i] = coord.y;
+         if (iMethod == METHOD_WEIGHTED) {
+            try {
+               dWeight[i] = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            }
+            catch (final Exception e) {
+               dWeight[i] = 1;
+            }
+         }
+         else {
+            dWeight[i] = 1;
+         }
+         dSumWeight += dWeight[i];
+         dSumX += (dWeight[i] * dX[i]);
+         dSumY += (dWeight[i] * dY[i]);
+         i++;
+      }
+      iter.close();
+
+      xCenter = dSumX / dSumWeight;
+      yCenter = dSumY / dSumWeight;
+
+      for (j = 0; j < ITERATIONS; j++) {
+         dSumX = 0;
+         dSumY = 0;
+         dSumWeight = 0;
+         setProgressText(Sextante.getText("Iteration") + Integer.toString(j));
+         for (i = 0; (i < iCount) && setProgress(i, iCount); i++) {
+            dDist = Math.sqrt(Math.pow(dX[i] - xCenter, 2) + Math.pow(dY[i] - yCenter, 2));
+            dDistWeight = dWeight[i] / dDist;
+            dSumWeight += dDistWeight;
+            dSumX += (dDistWeight * dX[i]);
+            dSumY += (dDistWeight * dY[i]);
+         }
+         xCenter = dSumX / dSumWeight;
+         yCenter = dSumY / dSumWeight;
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Median_center"), IVectorLayer.SHAPE_TYPE_LINE,
+               new Class[] { Double.class }, new String[] { Sextante.getText("Coord") });
+      final Coordinate coords[] = new Coordinate[2];
+      final Rectangle2D rect = layer.getFullExtent();
+      final Object[] value = new Object[1];
+      value[0] = new Double(xCenter);
+      coords[0] = new Coordinate(xCenter, rect.getMinY());
+      coords[1] = new Coordinate(xCenter, rect.getMaxY());
+      final LineString line = gf.createLineString(coords);
+      output.addFeature(line, value);
+      value[0] = new Double(yCenter);
+      final Coordinate coords2[] = new Coordinate[2];
+      coords2[0] = new Coordinate(rect.getMinX(), yCenter);
+      coords2[1] = new Coordinate(rect.getMaxX(), yCenter);
+      final LineString line2 = gf.createLineString(coords2);
+      output.addFeature(line2, value);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sOptions[] = { Sextante.getText("Median_center"), Sextante.getText("Weighted_median_center") };
+
+      setName(Sextante.getText("Median_center"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Weights"), POINTS);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sOptions);
+         addOutputVectorLayer(RESULT, Sextante.getText("Median_center"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/medianCenter/MedianCenterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/distanceMatrix/DistanceMatrixAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/distanceMatrix/DistanceMatrixAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/distanceMatrix/DistanceMatrixAlgorithm.java	(revision 369)
@@ -0,0 +1,113 @@
+
+
+package es.unex.sextante.pointAnalysis.distanceMatrix;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class DistanceMatrixAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String POINTS = "POINTS";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0, j = 0;
+      double x1, x2, y1, y2;
+      double dDifX, dDifY;
+      int iCount;
+      String[] sFields;
+      Class[] types;
+      Object[] values;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iCount = layer.getShapesCount();
+      final double[][] d = new double[iCount][iCount];
+      sFields = new String[iCount + 1];
+      types = new Class[iCount + 1];
+      values = new Object[iCount + 1];
+      sFields[0] = "ID";
+      types[0] = Integer.class;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         IFeature feature = iter.next();
+         sFields[i + 1] = Integer.toString(i + 1);
+         types[i + 1] = Double.class;
+         Geometry geom = feature.getGeometry();
+         Coordinate coord = geom.getCoordinate();
+         x1 = coord.x;
+         y1 = coord.y;
+         final IFeatureIterator iter2 = layer.iterator();
+         j = 0;
+         while (iter2.hasNext()) {
+            feature = iter2.next();
+            geom = feature.getGeometry();
+            coord = geom.getCoordinate();
+            x2 = coord.x;
+            y2 = coord.y;
+            dDifX = x2 - x1;
+            dDifY = y2 - y1;
+            d[i][j] = Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+            j++;
+         }
+         iter2.close();
+         i++;
+      }
+      iter.close();
+
+      final String sTableName = Sextante.getText("Distance_matrix_[") + layer.getName() + "]";
+
+      final ITable driver = getNewTable(RESULT, sTableName, types, sFields);
+
+      for (i = 0; (i < iCount) && setProgress(i, iCount); i++) {
+         values[0] = new Integer(i + 1);
+         for (j = 0; j < iCount; j++) {
+            final double dDist = d[i][j];
+            values[j + 1] = new Double(dDist);
+         }
+         driver.addRecord(values);
+
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Distance_matrix"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         addOutputTable(RESULT, Sextante.getText("Distance_matrix"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/distanceMatrix/DistanceMatrixAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/spatialCorrelation/SpatialCorrelationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/spatialCorrelation/SpatialCorrelationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/spatialCorrelation/SpatialCorrelationAlgorithm.java	(revision 369)
@@ -0,0 +1,223 @@
+
+
+package es.unex.sextante.pointAnalysis.spatialCorrelation;
+
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+
+public class SpatialCorrelationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String CLOUD      = "CLOUD";
+   public static final String RESULT     = "RESULT";
+   public static final String INTERVAL   = "INTERVAL";
+   public static final String POINTS     = "POINTS";
+   public static final String FIELD      = "FIELD";
+   private IVectorLayer       m_Layer;
+   private int                m_iField;
+   private double             m_dMaxDist = 0;
+   private double             m_dInterval;
+   private double             m_dMean;
+   private double             m_dFieldValue[];
+   private double             m_dMoran[];
+   private double             m_dGeary[];
+   private double             m_dSemivar[];
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      double x1, x2, y1, y2;
+      double dDifX, dDifY;
+      double dValue;
+      int iCount;
+
+      m_dMean = 0;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_dInterval = m_Parameters.getParameterValueAsDouble(INTERVAL);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      iCount = m_Layer.getShapesCount();
+      if (iCount == 0) {
+         throw new GeoAlgorithmExecutionException("0 points in layer");
+      }
+      final double[][] d = new double[iCount][iCount];
+      m_dFieldValue = new double[iCount];
+      i = 0;
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x1 = coord.x;
+         y1 = coord.y;
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+            m_dMean += dValue;
+            m_dFieldValue[i] = dValue;
+         }
+         catch (final NumberFormatException e) {
+            throw new GeoAlgorithmExecutionException(Sextante.getText("ERROR_Spatial_autocorrelation_Invalid_value_in_table"));
+         }
+         j = 0;
+         final IFeatureIterator iter2 = m_Layer.iterator();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            final Geometry geom2 = feature2.getGeometry();
+            final Coordinate coord2 = geom2.getCoordinate();
+            x2 = coord2.x;
+            y2 = coord2.y;
+            dDifX = x2 - x1;
+            dDifY = y2 - y1;
+            d[i][j] = Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+            m_dMaxDist = Math.max(m_dMaxDist, d[i][j]);
+            j++;
+         }
+         iter2.close();
+         i++;
+      }
+      iter.close();
+
+      m_dMean /= iCount;
+
+      if (calculate(d)) {
+         createTables();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createTables() throws UnsupportedOutputChannelException {
+
+      int i;
+      final int iClasses = (int) (m_dMaxDist / m_dInterval + 2);
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Moran_I"), Sextante.getText("Geary_c"),
+               Sextante.getText("Semivariance") };
+      final Class[] types = { Double.class, Double.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Spatial_autocorrelation_[") + m_Layer.getName() + "]";
+      final Object[] values = new Object[4];
+      final ITable driver = getNewTable(RESULT, sTableName, types, sFields);
+
+      for (i = 0; i < iClasses; i++) {
+         values[0] = new Double(m_dInterval * i);
+         values[1] = new Double(m_dMoran[i]);
+         values[2] = new Double(m_dGeary[i]);
+         values[3] = new Double(m_dSemivar[i]);
+         driver.addRecord(values);
+      }
+
+   }
+
+
+   private boolean calculate(final double[][] dist) throws UnsupportedOutputChannelException {
+
+      int i, j;
+      int iClasses;
+      int iClass;
+      int[] iPointsInClass;
+      double[] dDen;
+      double dSemivar;
+      boolean bIsInClass[];
+      Object[] values = null;
+      ITable driver = null;
+
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Semivariance") };
+      final Class[] types = { Double.class, Double.class };
+      final String sTableName = Sextante.getText("Variogram_cloud_[") + m_Layer.getName() + "]";
+      values = new Object[2];
+      driver = getNewTable(CLOUD, sTableName, types, sFields);
+
+      iClasses = (int) (m_dMaxDist / m_dInterval + 2);
+      m_dMoran = new double[iClasses];
+      m_dGeary = new double[iClasses];
+      dDen = new double[iClasses];
+      m_dSemivar = new double[iClasses];
+      iPointsInClass = new int[iClasses];
+      bIsInClass = new boolean[iClasses];
+
+      for (i = 0; (i < dist.length) && setProgress(i, dist.length); i++) {
+         Arrays.fill(bIsInClass, false);
+         for (j = 0; j < dist.length; j++) {
+            iClass = (int) Math.floor((dist[i][j] + m_dInterval / 2.) / m_dInterval);
+            iPointsInClass[iClass]++;
+            dSemivar = Math.pow((m_dFieldValue[i] - m_dFieldValue[j]), 2.);
+            values[0] = new Double(dist[i][j]);
+            values[1] = new Double(dSemivar / 2.);
+            driver.addRecord(values);
+            m_dSemivar[iClass] += dSemivar;
+            m_dMoran[iClass] += (m_dFieldValue[i] - m_dMean) * (m_dFieldValue[j] - m_dMean);
+            m_dGeary[iClass] = m_dSemivar[iClass];
+            bIsInClass[iClass] = true;
+         }
+         for (j = 0; j < iClasses; j++) {
+            if (bIsInClass[j]) {
+               dDen[j] += Math.pow(m_dFieldValue[i] - m_dMean, 2.);
+            }
+         }
+      }
+
+      for (i = 0; i < iClasses; i++) {
+         if (dDen[i] != 0) {
+            m_dMoran[i] /= dDen[i];
+            m_dGeary[i] *= ((iPointsInClass[i] - 1) / (2. * iPointsInClass[i] * dDen[i]));
+            m_dSemivar[i] /= (2. * iPointsInClass[i]);
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Spatial_autocorrelation"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), POINTS);
+         m_Parameters.addNumericalValue(INTERVAL, Sextante.getText("Distance_interval"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         addOutputTable(RESULT, Sextante.getText("Spatial_autocorrelation"));
+         addOutputTable(CLOUD, Sextante.getText("Nube_del_variograma"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/spatialCorrelation/SpatialCorrelationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/meanCenter/MeanCenterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/meanCenter/MeanCenterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/meanCenter/MeanCenterAlgorithm.java	(revision 369)
@@ -0,0 +1,158 @@
+
+
+package es.unex.sextante.pointAnalysis.meanCenter;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class MeanCenterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int    METHOD_WEIGHTED     = 1;
+   private static final int    METHOD_NOT_WEIGHTED = 0;
+
+   private static final String POINTS              = "POINTS";
+   private static final String FIELD               = "FIELDS";
+   private static final String METHOD              = "METHOD";
+   private static final String RESULT              = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      int iMethod;
+      double x, y;
+      double dSumX = 0, dSumY = 0;
+      double dWeight, dSumWeight = 0;
+      double xCenter, yCenter;
+      double dDifX, dDifY, dDifDist = 0;
+      int iCount;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+      iCount = layer.getShapesCount();
+      if (iCount == 0) {
+         throw new GeoAlgorithmExecutionException("0 points in layer");
+      }
+
+      i = 0;
+      IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount * 2)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = coord.x;
+         y = coord.y;
+         if (iMethod == METHOD_WEIGHTED) {
+            try {
+               dWeight = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            }
+            catch (final Exception e) {
+               dWeight = 1;
+            }
+         }
+         else {
+            dWeight = 1;
+         }
+         dSumWeight += dWeight;
+         dSumX += (dWeight * x);
+         dSumY += (dWeight * y);
+         i++;
+      }
+      iter.close();
+
+      xCenter = dSumX / dSumWeight;
+      yCenter = dSumY / dSumWeight;
+      dSumWeight = 0;
+
+      iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount * 2)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = coord.x;
+         y = coord.y;
+         if (iMethod == METHOD_WEIGHTED) {
+            try {
+               dWeight = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            }
+            catch (final Exception e) {
+               dWeight = 1;
+            }
+         }
+         else {
+            dWeight = 1;
+         }
+         dSumWeight += dWeight;
+         dDifX = (x - xCenter);
+         dDifY = (y - yCenter);
+         dDifDist += ((dDifX * dDifX * dWeight) + (dDifY * dDifY * dWeight));
+         i++;
+      }
+      iter.close();
+
+      final double dStdDist = Math.sqrt(dDifDist / dSumWeight);
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Standard_distance"),
+               IVectorLayer.SHAPE_TYPE_POLYGON, new Class[] { Double.class },
+               new String[] { Sextante.getText("Radius__standard_deviation") });
+      final Object[] value = new Object[1];
+      value[0] = new Double(dStdDist);
+
+      final Geometry circle = ShapesTools.createCircle(xCenter, yCenter, dStdDist);
+      output.addFeature(circle, value);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sOptions[] = { Sextante.getText("Mean_center"), Sextante.getText("Weighted_mean_center") };
+
+      setName(Sextante.getText("Mean_center_and_standard_distance"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Weights"), "POINTS");
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sOptions);
+         addOutputVectorLayer(RESULT, Sextante.getText("Mean_center_and_standard_distance"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/meanCenter/MeanCenterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/quadrat/QuadratAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/quadrat/QuadratAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/quadrat/QuadratAlgorithm.java	(revision 369)
@@ -0,0 +1,160 @@
+
+
+package es.unex.sextante.pointAnalysis.quadrat;
+
+import java.text.DecimalFormat;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+
+public class QuadratAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String POINTS = "POINTS";
+   private static final String RESULT = "RESULT";
+   private IVectorLayer        m_Layer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Quadrant_analysis"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         addOutputText(RESULT, Sextante.getText("Statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iRow, iCol;
+      int iRows, iCols;
+      int iQuadratCount[][];
+      double x, y;
+      double dArea;
+      double dWidth;
+      double dXMin, dYMin;
+      int iCount;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iCount = m_Layer.getShapesCount();
+      if (iCount == 0) {
+         throw new GeoAlgorithmExecutionException("0 points in layer");
+      }
+      dArea = m_Layer.getFullExtent().getHeight() * m_Layer.getFullExtent().getWidth();
+      dXMin = m_Layer.getFullExtent().getMinX();
+      dYMin = m_Layer.getFullExtent().getMinY();
+      dWidth = Math.sqrt(dArea * 2 / iCount);
+      iCols = (int) Math.ceil(m_Layer.getFullExtent().getWidth() / dWidth);
+      iRows = (int) Math.ceil(m_Layer.getFullExtent().getHeight() / dWidth);
+      iQuadratCount = new int[iRows][iCols];
+      setProgressText(Sextante.getText("Creating_quadrants"));
+      i = 0;
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = coord.x;
+         y = coord.y;
+         iCol = (int) Math.floor((x - dXMin) / dWidth);
+         iRow = (int) Math.floor((y - dYMin) / dWidth);
+         iQuadratCount[iRow][iCol]++;
+         i++;
+      }
+      iter.close();
+
+      final int iQuadratsVector[] = new int[iRows * iCols];
+      for (i = 0; i < iRows; i++) {
+         for (j = 0; j < iCols; j++) {
+            iQuadratsVector[j + i * iCols] = iQuadratCount[i][j];
+         }
+      }
+
+      setProgressText(Sextante.getText("Analyzing_quadrants"));
+      calculateStats(iQuadratsVector);
+
+
+      return !m_Task.isCanceled();
+   }
+
+
+   private void calculateStats(final int[] quadrats) {
+
+      int i;
+      int iMax = 0;
+      double dMean = 0;
+      double dVar = 0;
+      double dClustering;
+
+      for (i = 0; i < quadrats.length; i++) {
+         dMean += quadrats[i];
+         dVar += (quadrats[i] * quadrats[i]);
+         iMax = Math.max(iMax, quadrats[i]);
+      }
+
+      dMean /= quadrats.length;
+      dVar = dVar / quadrats.length - dMean * dMean;
+      dClustering = dVar / dMean;
+
+      final int quadratsFreq[] = new int[iMax + 1];
+      for (i = 0; i < quadrats.length; i++) {
+         quadratsFreq[quadrats[i]]++;
+      }
+
+      double dObsProb = 0;
+      double dPoissonProb = 0;
+      double dMaxDiff = 0, dDiff = 0;
+      for (i = 0; i < quadratsFreq.length; i++) {
+         dObsProb += ((double) quadratsFreq[i] / (double) quadrats.length);
+         dPoissonProb += PDF.poisson(i, dMean);
+         dDiff = Math.abs(dObsProb - dPoissonProb);
+         dMaxDiff = Math.max(dMaxDiff, dDiff);
+      }
+
+      final double dKS = 1.36 / Math.sqrt(quadrats.length);
+
+      final DecimalFormat df = new DecimalFormat("##.######");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Quadrant_analysis"));
+      doc.addHeader(Sextante.getText("Quadrant_analysis"), 1);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Mean") + ": " + df.format(dMean));
+      doc.addListElement(Sextante.getText("Variance") + ": " + df.format(dVar));
+      doc.addListElement(Sextante.getText("Coefficient_of_variation_[~0") + ": " + df.format(dClustering));
+      doc.addListElement(Sextante.getText("D_value__Kolmogorov-Smirnov") + ": " + df.format(dMaxDiff));
+      doc.addListElement(Sextante.getText("Critical_value__at_5%") + ": " + df.format(dKS));
+      doc.closeUnorderedList();
+      doc.close();
+      addOutputText(RESULT, Sextante.getText("Statistics") + "[" + m_Layer.getName() + "]", doc.getHTMLCode());
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/quadrat/QuadratAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/ripleysK/RipleysKAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/ripleysK/RipleysKAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/ripleysK/RipleysKAlgorithm.java	(revision 369)
@@ -0,0 +1,162 @@
+
+
+package es.unex.sextante.pointAnalysis.ripleysK;
+
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+
+public class RipleysKAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String POINTS     = "POINTS";
+   private static final String RESULT     = "RESULT";
+
+   private final int           CLASSES    = 30;
+
+   private int                 m_iCount;
+   private double              m_dMaxDist = 0;
+   private double              m_dInterval;
+   private double              m_dArea;
+   private double              m_dK[];
+   private IVectorLayer        m_Layer;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      double x1, x2, y1, y2;
+      double dDifX, dDifY;
+      Rectangle2D rect;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_iCount = m_Layer.getShapesCount();
+      if (m_iCount == 0) {
+         throw new GeoAlgorithmExecutionException("0 points in layer");
+      }
+      rect = m_Layer.getFullExtent();
+      m_dArea = rect.getHeight() * rect.getWidth();
+      m_dMaxDist = Math.min(rect.getHeight(), rect.getWidth()) / 3;
+      m_dInterval = m_dMaxDist / CLASSES;
+      final double[][] d = new double[m_iCount][m_iCount];
+
+      i = 0;
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, m_iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x1 = coord.x;
+         y1 = coord.y;
+         j = 0;
+         final IFeatureIterator iter2 = m_Layer.iterator();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            final Geometry geom2 = feature2.getGeometry();
+            final Coordinate coord2 = geom2.getCoordinate();
+            x2 = coord2.x;
+            y2 = coord2.y;
+            dDifX = x2 - x1;
+            dDifY = y2 - y1;
+            d[i][j] = Math.sqrt(dDifX * dDifX + dDifY * dDifY);
+            j++;
+         }
+         i++;
+      }
+      iter.close();
+
+      calculate(d);
+      createTables();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createTables() throws UnsupportedOutputChannelException {
+
+      int i;
+      double dKPoisson;
+      double dL;
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("K"), Sextante.getText("K_Poisson"),
+               Sextante.getText("L") };
+      final Class[] types = { Double.class, Double.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Ripley_K") + "[" + m_Layer.getName() + "]";
+      final Object[] values = new Object[4];
+      final ITable driver = getNewTable(RESULT, sTableName, types, sFields);
+
+      for (i = 0; i < CLASSES; i++) {
+         values[0] = new Double(m_dInterval * i);
+         values[1] = new Double(m_dK[i]);
+         dKPoisson = Math.PI * Math.pow(i * m_dInterval, 2.);
+         values[2] = new Double(dKPoisson);
+         dL = Math.sqrt(m_dK[i] / Math.PI) - (i * m_dInterval);
+         values[3] = new Double(dL);
+         driver.addRecord(values);
+      }
+
+   }
+
+
+   private void calculate(final double[][] dist) {
+
+      int i, j;
+      int iCount;
+      int iClass;
+      double dDist;
+
+      m_dK = new double[CLASSES];
+
+      for (iClass = 1; iClass < CLASSES; iClass++) {
+         dDist = iClass * m_dInterval;
+         iCount = 0;
+         for (i = 0; i < dist.length; i++) {
+            for (j = 0; j < dist.length; j++) {
+               if (dist[i][j] < dDist) {
+                  iCount++;
+               }
+            }
+            setProgress(i, dist.length);
+         }
+         m_dK[iClass] = m_dArea / (m_iCount * m_iCount) * iCount;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Ripley_K"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         addOutputTable(RESULT, Sextante.getText("Ripley_K"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/ripleysK/RipleysKAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/nearestNeighbour/NNAnalysisAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/nearestNeighbour/NNAnalysisAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/nearestNeighbour/NNAnalysisAlgorithm.java	(revision 369)
@@ -0,0 +1,136 @@
+
+
+package es.unex.sextante.pointAnalysis.nearestNeighbour;
+
+import java.awt.geom.Rectangle2D;
+import java.text.DecimalFormat;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class NNAnalysisAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String RESULT = "RESULT";
+   private static final String POINTS = "POINTS";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      double x1, x2, y1, y2;
+      double dDifX, dDifY;
+      double dArea;
+      double dPerimeter;
+      double dMin;
+      double dAvg;
+      double dExpectedAvg, dExpectedAvgC;
+      double dVar, dVarC;
+      double dNNI, dNNIC;
+      double dZ, dZC;
+      double dSum = 0;
+      int iCount;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      final Rectangle2D rect = layer.getFullExtent();
+      dArea = rect.getWidth() * rect.getHeight();
+      dPerimeter = 2 * rect.getWidth() + 2 * rect.getHeight();
+      iCount = layer.getShapesCount();
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x1 = coord.x;
+         y1 = coord.y;
+         dMin = Double.MAX_VALUE;
+         j = 0;
+         final IFeatureIterator iter2 = layer.iterator();
+         while (iter2.hasNext()) {
+            final IFeature feature2 = iter2.next();
+            if (i != j) {
+               final Geometry geom2 = feature2.getGeometry();
+               final Coordinate coord2 = geom2.getCoordinate();
+               x2 = coord2.x;
+               y2 = coord2.y;
+               dDifX = x2 - x1;
+               dDifY = y2 - y1;
+               dMin = Math.min(dMin, Math.sqrt(dDifX * dDifX + dDifY * dDifY));
+            }
+            j++;
+         }
+         iter2.close();
+         dSum += dMin;
+         i++;
+      }
+      iter.close();
+
+      dAvg = dSum / iCount;
+      dExpectedAvg = 0.5 * Math.sqrt(dArea / iCount);
+      dExpectedAvgC = 0.5 * Math.sqrt(dArea / iCount) + (0.0514 + 0.041 / Math.sqrt(iCount)) * dPerimeter / iCount;
+      dVar = (1. / Math.PI - 0.25) * dArea / Math.pow(iCount, 2.);
+      dVarC = 0.0703 * dArea / Math.pow(iCount, 2.) + 0.037 * dPerimeter * Math.sqrt(dArea / Math.pow(iCount, 5.));
+      dNNI = dAvg / dExpectedAvg;
+      dNNIC = dAvg / dExpectedAvgC;
+      dZ = (dAvg - dExpectedAvg) / Math.sqrt(dVar);
+      dZC = (dAvg - dExpectedAvgC) / Math.sqrt(dVarC);
+
+      final DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Nearest_neighbour"));
+      doc.addHeader(Sextante.getText("Nearest_neighbour"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Mean_distance") + ": " + df.format(dAvg));
+      doc.addListElement(Sextante.getText("Expected_distance") + ": " + df.format(dExpectedAvg));
+      doc.addListElement(Sextante.getText("Edge-corrected_expected_distance") + ": " + df.format(dExpectedAvgC));
+      doc.addListElement(Sextante.getText("Variance") + ": " + df.format(dVar));
+      doc.addListElement(Sextante.getText("Edge-corrected_variance") + ": " + df.format(dVarC));
+      doc.addListElement(Sextante.getText("Nearest_neighbour_index") + ": " + df.format(dNNI));
+      doc.addListElement(Sextante.getText("Corrected_nearest_neighbour_index") + ": " + df.format(dNNIC));
+      doc.addListElement(Sextante.getText("Z_value") + ": " + df.format(dZ));
+      doc.addListElement(Sextante.getText("Corrected_Z_value") + ": " + df.format(dZC));
+      doc.closeUnorderedList();
+      doc.close();
+      addOutputText(RESULT, Sextante.getText("Statistics") + "[" + layer.getName() + "]", doc.getHTMLCode());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Nearest_neighbour_analysis"));
+      setGroup(Sextante.getText("Tools_for_point_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         addOutputText(RESULT, Sextante.getText("Statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/pointAnalysis/nearestNeighbour/NNAnalysisAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/devel/BenchmarkAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/devel/BenchmarkAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/devel/BenchmarkAlgorithm.java	(revision 369)
@@ -0,0 +1,86 @@
+
+
+package es.unex.sextante.devel;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class BenchmarkAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT = "INPUT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      long lTime, lTime2;
+
+
+      lTime = System.currentTimeMillis();
+      double dSum = 0;
+      for (x = 0; x < 100000000; x++) {
+         dSum++;
+      }
+      lTime2 = System.currentTimeMillis();
+      System.out.println("A simple loop:" + Long.toString(lTime2 - lTime));
+
+      IRasterLayer layer = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      layer.setFullExtent();
+      iNX = layer.getWindowGridExtent().getNX();
+      iNY = layer.getWindowGridExtent().getNY();
+      lTime = System.currentTimeMillis();
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            layer.getCellValueAsDouble(x, y);
+         }
+      }
+      lTime2 = System.currentTimeMillis();
+      System.out.println("Reading values:" + Long.toString(lTime2 - lTime));
+
+      lTime = System.currentTimeMillis();
+      layer = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, layer.getLayerGridExtent());
+      lTime2 = System.currentTimeMillis();
+      System.out.println("Layer creation:" + Long.toString(lTime2 - lTime));
+
+      iNX = layer.getWindowGridExtent().getNX();
+      iNY = layer.getWindowGridExtent().getNY();
+
+      lTime = System.currentTimeMillis();
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            layer.setCellValue(x, y, 1);
+         }
+      }
+      lTime2 = System.currentTimeMillis();
+      System.out.println("Writing values:" + Long.toString(lTime2 - lTime));
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Benchmarking"));
+      setGroup(Sextante.getText("Development"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, "Input", true);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/devel/BenchmarkAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMeanValue/MultiGridMeanValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMeanValue/MultiGridMeanValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMeanValue/MultiGridMeanValueAlgorithm.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gridStatistics.multiGridMeanValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMeanValueAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Mean"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+      int iValidCells = 0;
+
+      double dMean = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+
+      if (iValidCells > 0) {
+         return (dMean / iValidCells);
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMeanValue/MultiGridMeanValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinority/NeighborhoodMinorityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinority/NeighborhoodMinorityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinority/NeighborhoodMinorityAlgorithm.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gridStatistics.neighborhoodMinority;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMinorityAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minority__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iCount;
+      int iMinCount = Integer.MAX_VALUE;
+      double dValue;
+      double dReturn = NO_DATA;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            value = new Double(dValue);
+            count = (Integer) map.get(new Double(dValue));
+            if (count != null) {
+               count = new Integer(count.intValue() + 1);
+            }
+            else {
+               count = new Integer(1);
+            }
+            map.put(new Double(dValue), count);
+         }
+      }
+
+      final Set set = map.keySet();
+      final Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         value = (Double) iter.next();
+         dValue = value.doubleValue();
+         count = (Integer) map.get(value);
+         iCount = count.intValue();
+         if (iCount < iMinCount) {
+            dReturn = dValue;
+            iMinCount = iCount;
+         }
+         else if (iCount == iMinCount) {
+            dReturn = NO_DATA;
+         }
+      }
+
+      return dReturn;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinority/NeighborhoodMinorityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountLowerThan/NeighborhoodCountLowerThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountLowerThan/NeighborhoodCountLowerThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountLowerThan/NeighborhoodCountLowerThanAlgorithm.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gridStatistics.neighborhoodCountLowerThan;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsExtendedBaseAlgorithm;
+
+public class NeighborhoodCountLowerThanAlgorithm
+         extends
+            NeighborhoodStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Lower_values_count__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountLowerThan/NeighborhoodCountLowerThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridcountEqualTo/MultiGridCountEqualToAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridcountEqualTo/MultiGridCountEqualToAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridcountEqualTo/MultiGridCountEqualToAlgorithm.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gridStatistics.multiGridcountEqualTo;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsExtendedBaseAlgorithm;
+
+public class MultiGridCountEqualToAlgorithm
+         extends
+            MultiGridStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Equal_values_count"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue == m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridcountEqualTo/MultiGridCountEqualToAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMeanValue/NeighborhoodMeanValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMeanValue/NeighborhoodMeanValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMeanValue/NeighborhoodMeanValueAlgorithm.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.gridStatistics.neighborhoodMeanValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMeanValueAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Mean__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+      int iValidCells = 0;
+
+      double dMean = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+
+      if (iValidCells > 0) {
+         return (dMean / iValidCells);
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMeanValue/NeighborhoodMeanValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountGreaterThan/NeighborhoodCountGreaterThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountGreaterThan/NeighborhoodCountGreaterThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountGreaterThan/NeighborhoodCountGreaterThanAlgorithm.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gridStatistics.neighborhoodCountGreaterThan;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsExtendedBaseAlgorithm;
+
+public class NeighborhoodCountGreaterThanAlgorithm
+         extends
+            NeighborhoodStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Larger_values_count__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountGreaterThan/NeighborhoodCountGreaterThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhood/patternBase/PatternBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhood/patternBase/PatternBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhood/patternBase/PatternBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,86 @@
+package es.unex.sextante.gridStatistics.neighborhood.patternBase;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public abstract class PatternBaseAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+
+   protected int getNumberOfClasses() {
+
+      int i;
+      double dValue;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            value = new Double(dValue);
+            if (!map.containsKey(value)) {
+               map.put(value, "");
+            }
+         }
+      }
+
+      return map.size();
+
+   }
+
+
+   protected double getDiversity() {
+
+      int i;
+      int iCount = 0;
+      int iCells = 0;
+      double dProp;
+      double dValue;
+      double dReturn = 0;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            iCells++;
+            value = new Double(dValue);
+            count = (Integer) map.get(value);
+            if (count != null) {
+               count = new Integer(count.intValue() + 1);
+            }
+            else {
+               count = new Integer(1);
+            }
+            map.put(value, count);
+         }
+      }
+
+      if (iCells != 0) {
+         final Set set = map.keySet();
+         final Iterator iter = set.iterator();
+
+         while (iter.hasNext()) {
+            value = (Double) iter.next();
+            dValue = value.doubleValue();
+            count = (Integer) map.get(value);
+            iCount = count.intValue();
+            dProp = (double) iCount / (double) iCells;
+            dReturn += (dProp * Math.log(dProp));
+         }
+
+         return dReturn;
+      }
+      else {
+         return NO_DATA;
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhood/patternBase/PatternBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinValue/NeighborhoodMinValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinValue/NeighborhoodMinValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinValue/NeighborhoodMinValueAlgorithm.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gridStatistics.neighborhoodMinValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMinValueAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minimum__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      double dMin = Double.MAX_VALUE;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < dMin) {
+               dMin = dValue;
+            }
+         }
+      }
+
+      if (dMin == Double.MAX_VALUE) {
+         dMin = NO_DATA;
+      }
+
+      return dMin;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMinValue/NeighborhoodMinValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridVariance/MultiGridVarianceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridVariance/MultiGridVarianceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridVariance/MultiGridVarianceAlgorithm.java	(revision 369)
@@ -0,0 +1,49 @@
+package es.unex.sextante.gridStatistics.multiGridVariance;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridVarianceAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Variance"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dSum = 0;
+      double dVar = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            dSum += dValue;
+            dVar += (dValue * dValue);
+            iValidCells++;
+         }
+      }
+
+      if (iValidCells > 0) {
+         final double dMean = dSum / iValidCells;
+         return (dVar / iValidCells - dMean * dMean);
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridVariance/MultiGridVarianceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMaxValue/NeighborhoodMaxValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMaxValue/NeighborhoodMaxValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMaxValue/NeighborhoodMaxValueAlgorithm.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gridStatistics.neighborhoodMaxValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMaxValueAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Maximum__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      double dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > dMax) {
+               dMax = dValue;
+            }
+         }
+      }
+
+      if (dMax == Double.NEGATIVE_INFINITY) {
+         dMax = NO_DATA;
+      }
+
+      return dMax;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMaxValue/NeighborhoodMaxValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDiversity/NeighborhoodDiversityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDiversity/NeighborhoodDiversityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDiversity/NeighborhoodDiversityAlgorithm.java	(revision 369)
@@ -0,0 +1,27 @@
+package es.unex.sextante.gridStatistics.neighborhoodDiversity;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.neighborhood.patternBase.PatternBaseAlgorithm;
+
+public class NeighborhoodDiversityAlgorithm
+         extends
+            PatternBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Diversity"));
+      setGroup(Sextante.getText("Pattern_analysis"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      return getDiversity();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDiversity/NeighborhoodDiversityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodKurtosis/NeighborhoodKurtosisAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodKurtosis/NeighborhoodKurtosisAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodKurtosis/NeighborhoodKurtosisAlgorithm.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.gridStatistics.neighborhoodKurtosis;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodKurtosisAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Kurtosis__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dMean = 0;
+      double dDif, dDif2;
+      double dMom2 = 0;
+      double dMom4 = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+      dMean /= iValidCells;
+      if (iValidCells > 3) {
+         for (i = 0; i < m_dValues.length; i++) {
+            dDif = m_dValues[i] - dMean;
+            dDif2 = dDif * dDif;
+            dMom2 += dDif2;
+            dMom4 += (dDif2 * dDif2);
+         }
+         dMom2 /= iValidCells;
+         dMom4 /= iValidCells;
+         return (dMom4 / Math.pow(dMom2, 2));
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodKurtosis/NeighborhoodKurtosisAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountEqualTo/NeighborhoodCountEqualToAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountEqualTo/NeighborhoodCountEqualToAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountEqualTo/NeighborhoodCountEqualToAlgorithm.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gridStatistics.neighborhoodCountEqualTo;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsExtendedBaseAlgorithm;
+
+public class NeighborhoodCountEqualToAlgorithm
+         extends
+            NeighborhoodStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Equal_values_count__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue == m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodCountEqualTo/NeighborhoodCountEqualToAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridRange/MultiGridRangeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridRange/MultiGridRangeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridRange/MultiGridRangeAlgorithm.java	(revision 369)
@@ -0,0 +1,50 @@
+package es.unex.sextante.gridStatistics.multiGridRange;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridRangeAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Range"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double dValues[]) {
+
+      int i;
+      double dValue;
+
+      double dMin = Double.MAX_VALUE;
+      double dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < dMin) {
+               dMin = dValue;
+            }
+            if (dValue > dMax) {
+               dMax = dValue;
+            }
+         }
+      }
+
+      if ((dMax == Double.NEGATIVE_INFINITY) || (dMin == Double.MAX_VALUE)) {
+         return NO_DATA;
+      }
+      else {
+         return dMax - dMin;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridRange/MultiGridRangeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMajority/MultiGridMajorityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMajority/MultiGridMajorityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMajority/MultiGridMajorityAlgorithm.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gridStatistics.multiGridMajority;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMajorityAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Mayority"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      int iCount;
+      int iMaxCount = -1;
+      double dValue;
+      double dReturn = NO_DATA;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            value = new Double(dValue);
+            count = (Integer) map.get(new Double(dValue));
+            if (count != null) {
+               count = new Integer(count.intValue() + 1);
+            }
+            else {
+               count = new Integer(1);
+            }
+            map.put(new Double(dValue), count);
+         }
+      }
+
+      final Set set = map.keySet();
+      final Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         value = (Double) iter.next();
+         dValue = value.doubleValue();
+         count = (Integer) map.get(value);
+         iCount = count.intValue();
+         if (iCount > iMaxCount) {
+            dReturn = dValue;
+            iMaxCount = iCount;
+         }
+         else if (iCount == iMaxCount) {
+            dReturn = NO_DATA;
+         }
+      }
+
+      return dReturn;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMajority/MultiGridMajorityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridSkewness/MultiGridSkewnessAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridSkewness/MultiGridSkewnessAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridSkewness/MultiGridSkewnessAlgorithm.java	(revision 369)
@@ -0,0 +1,56 @@
+package es.unex.sextante.gridStatistics.multiGridSkewness;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridSkewnessAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Skewness"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dMean = 0;
+      double dDif;
+      double dDif2 = 0;
+      double dDif3 = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+      dMean /= iValidCells;
+      if (iValidCells > 2) {
+         for (i = 0; i < dValues.length; i++) {
+            dDif = dValues[i] - dMean;
+            dDif2 += (dDif * dDif);
+            dDif3 += (dDif * dDif * dDif);
+         }
+         dDif2 /= iValidCells;
+         dDif3 /= iValidCells;
+         return (dDif3 / Math.pow(dDif2, 1.5));
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridSkewness/MultiGridSkewnessAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodRange/NeighborhoodRangeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodRange/NeighborhoodRangeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodRange/NeighborhoodRangeAlgorithm.java	(revision 369)
@@ -0,0 +1,50 @@
+package es.unex.sextante.gridStatistics.neighborhoodRange;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodRangeAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Range__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+
+      double dMin = Double.MAX_VALUE;
+      double dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < dMin) {
+               dMin = dValue;
+            }
+            if (dValue > dMax) {
+               dMax = dValue;
+            }
+         }
+      }
+
+      if ((dMax == Double.NEGATIVE_INFINITY) || (dMin == Double.MAX_VALUE)) {
+         return NO_DATA;
+      }
+      else {
+         return dMax - dMin;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodRange/NeighborhoodRangeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMedian/NeighborhoodMedianAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMedian/NeighborhoodMedianAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMedian/NeighborhoodMedianAlgorithm.java	(revision 369)
@@ -0,0 +1,48 @@
+package es.unex.sextante.gridStatistics.neighborhoodMedian;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMedianAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Median__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      double dValue;
+      final ArrayList validCells = new ArrayList();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            validCells.add(new Double(dValue));
+         }
+      }
+
+      if (validCells.size() > 0) {
+         final Object[] array = validCells.toArray();
+         Arrays.sort(array);
+         return (((Double) array[validCells.size() / 2]).doubleValue());
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMedian/NeighborhoodMedianAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodFragmentation/NeighborhoodFragmentationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodFragmentation/NeighborhoodFragmentationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodFragmentation/NeighborhoodFragmentationAlgorithm.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gridStatistics.neighborhoodFragmentation;
+
+import java.util.HashMap;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.neighborhood.patternBase.PatternBaseAlgorithm;
+
+public class NeighborhoodFragmentationAlgorithm
+         extends
+            PatternBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Fragmentation"));
+      setGroup(Sextante.getText("Pattern_analysis"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iCells = 0;
+      double dValue;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            iCells++;
+            value = new Double(dValue);
+            if (!map.containsKey(value)) {
+               map.put(value, "");
+            }
+         }
+      }
+
+      return (((double) map.size() - 1) / ((double) iCells + 1));
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodFragmentation/NeighborhoodFragmentationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/semivariances/SemivariancesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/semivariances/SemivariancesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/semivariances/SemivariancesAlgorithm.java	(revision 369)
@@ -0,0 +1,172 @@
+
+
+package es.unex.sextante.gridStatistics.semivariances;
+
+import java.util.Arrays;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+
+public class SemivariancesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT  = "RESULT";
+   public static final String LAYER   = "LAYER";
+   public static final String MAXDIST = "MAXDIST";
+
+   private int                m_iNX, m_iNY;
+   private int                m_iMaxDist;
+   private double             m_dSemivarHorz[];
+   private double             m_dSemivarVert[];
+   private int                m_iValidCellsHorz[];
+   private int                m_iValidCellsVert[];
+   private IRasterLayer       m_Layer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(false);
+      setName(Sextante.getText("Semivariances__raster"));
+      setGroup(Sextante.getText("Geostatistics"));
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(MAXDIST, Sextante.getText("Maximum_distance__pixels"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 20, 1, Integer.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Semivariances"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+
+      m_iMaxDist = m_Parameters.getParameterValueAsInt(MAXDIST);
+      m_Layer = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_Layer.setFullExtent();
+
+      m_iNX = m_Layer.getNX();
+      m_iNY = m_Layer.getNY();
+
+      m_iMaxDist = Math.min(m_iMaxDist, m_iNX);
+      m_iMaxDist = Math.min(m_iMaxDist, m_iNY);
+
+      m_dSemivarHorz = new double[m_iMaxDist];
+      m_dSemivarVert = new double[m_iMaxDist];
+      m_iValidCellsHorz = new int[m_iMaxDist];
+      m_iValidCellsVert = new int[m_iMaxDist];
+
+      Arrays.fill(m_dSemivarHorz, 0.0);
+      Arrays.fill(m_dSemivarVert, 0.0);
+      Arrays.fill(m_iValidCellsHorz, 0);
+      Arrays.fill(m_iValidCellsVert, 0);
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            calculateSemivariances(x, y);
+         }
+      }
+
+      if (!m_Task.isCanceled()) {
+         postProcessValues();
+         createTable();
+      }
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createTable() throws UnsupportedOutputChannelException {
+
+      int i;
+      final String[] sFields = { Sextante.getText("Distance"), Sextante.getText("Semivar__Horz"),
+               Sextante.getText("Semivar__Vert") };
+      final Class types[] = { Double.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Semivariances[") + m_Layer.getName() + "]";
+      final Object[] values = new Object[3];
+      final ITable driver = getNewTable(RESULT, sTableName, types, sFields);
+
+      for (i = 0; i < m_iMaxDist; i++) {
+         values[0] = new Double(m_Layer.getWindowCellSize() * i);
+         values[1] = new Double(m_dSemivarHorz[i]);
+         values[2] = new Double(m_dSemivarVert[i]);
+         driver.addRecord(values);
+      }
+
+   }
+
+
+   private void postProcessValues() {
+
+      for (int i = 0; i < m_iMaxDist; i++) {
+         if (m_iValidCellsHorz[i] != 0) {
+            m_dSemivarHorz[i] /= (2. * m_iValidCellsHorz[i]);
+         }
+         if (m_iValidCellsVert[i] != 0) {
+            m_dSemivarVert[i] /= (2. * m_iValidCellsVert[i]);
+         }
+      }
+
+   }
+
+
+   private void calculateSemivariances(final int iInitX,
+                                       final int iInitY) {
+
+      int iDist;
+      int x, y;
+      int x1, x2, y1, y2;
+      double dValue;
+      final double dCenterValue = m_Layer.getCellValueAsDouble(iInitX, iInitY);
+
+      if (m_Layer.isNoDataValue(dCenterValue)) {
+         return;
+      }
+
+      x1 = Math.max(iInitX - m_iMaxDist, 0);
+      x2 = Math.min(iInitX + m_iMaxDist, m_iNX - 1);
+      y1 = Math.max(iInitY - m_iMaxDist, 0);
+      y2 = Math.min(iInitY + m_iMaxDist, m_iNY - 1);
+
+      for (x = x1; x < x2 + 1; x++) {
+         iDist = Math.abs(x - iInitX) - 1;
+         if (iDist > 0) {
+            dValue = m_Layer.getCellValueAsDouble(x, iInitY);
+            if (!m_Layer.isNoDataValue(dValue)) {
+               m_dSemivarHorz[iDist] += Math.pow(dValue - dCenterValue, 2);
+               m_iValidCellsHorz[iDist]++;
+            }
+         }
+      }
+
+      for (y = y1; y < y2 + 1; y++) {
+         iDist = Math.abs(y - iInitY) - 1;
+         if (iDist > 0) {
+            dValue = m_Layer.getCellValueAsDouble(iInitX, y);
+            if (!m_Layer.isNoDataValue(dValue)) {
+               m_dSemivarVert[iDist] += Math.pow(dValue - dCenterValue, 2);
+               m_iValidCellsVert[iDist]++;
+            }
+         }
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/semivariances/SemivariancesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinority/MultiGridMinorityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinority/MultiGridMinorityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinority/MultiGridMinorityAlgorithm.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gridStatistics.multiGridMinority;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMinorityAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minority"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      int iCount;
+      int iMinCount = Integer.MAX_VALUE;
+      double dValue;
+      double dReturn = NO_DATA;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            value = new Double(dValue);
+            count = (Integer) map.get(new Double(dValue));
+            if (count != null) {
+               count = new Integer(count.intValue() + 1);
+            }
+            else {
+               count = new Integer(1);
+            }
+            map.put(new Double(dValue), count);
+         }
+      }
+
+      final Set set = map.keySet();
+      final Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         value = (Double) iter.next();
+         dValue = value.doubleValue();
+         count = (Integer) map.get(value);
+         iCount = count.intValue();
+         if (iCount < iMinCount) {
+            dReturn = dValue;
+            iMinCount = iCount;
+         }
+         else if (iCount == iMinCount) {
+            dReturn = NO_DATA;
+         }
+      }
+
+      return dReturn;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinority/MultiGridMinorityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountLowerThan/MultiGridCountLowerThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountLowerThan/MultiGridCountLowerThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountLowerThan/MultiGridCountLowerThanAlgorithm.java	(revision 369)
@@ -0,0 +1,41 @@
+package es.unex.sextante.gridStatistics.multiGridCountLowerThan;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsExtendedBaseAlgorithm;
+
+public class MultiGridCountLowerThanAlgorithm
+         extends
+            MultiGridStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Lower_values_count"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountLowerThan/MultiGridCountLowerThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountGreaterThan/MultiGridCountGreaterThanAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountGreaterThan/MultiGridCountGreaterThanAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountGreaterThan/MultiGridCountGreaterThanAlgorithm.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.gridStatistics.multiGridCountGreaterThan;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsExtendedBaseAlgorithm;
+
+public class MultiGridCountGreaterThanAlgorithm
+         extends
+            MultiGridStatsExtendedBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Larger_values_count"));
+      setGroup(Sextante.getText("Local_statistics"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      int iCount = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > m_dValue) {
+               iCount++;
+            }
+         }
+      }
+
+      return iCount;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridCountGreaterThan/MultiGridCountGreaterThanAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValue/MultiGridMinValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValue/MultiGridMinValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValue/MultiGridMinValueAlgorithm.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gridStatistics.multiGridMinValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMinValueAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minimum"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      double dMin = Double.MAX_VALUE;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue < dMin) {
+               dMin = dValue;
+            }
+         }
+      }
+
+      if (dMin == Double.MAX_VALUE) {
+         dMin = NO_DATA;
+      }
+
+      return dMin;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValue/MultiGridMinValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValue/MultiGridMaxValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValue/MultiGridMaxValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValue/MultiGridMaxValueAlgorithm.java	(revision 369)
@@ -0,0 +1,45 @@
+package es.unex.sextante.gridStatistics.multiGridMaxValue;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMaxValueAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Maximum"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      double dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > dMax) {
+               dMax = dValue;
+            }
+         }
+      }
+
+      if (dMax == Double.NEGATIVE_INFINITY) {
+         dMax = NO_DATA;
+      }
+
+      return dMax;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValue/MultiGridMaxValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridKurtosis/MultiGridKurtosisAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridKurtosis/MultiGridKurtosisAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridKurtosis/MultiGridKurtosisAlgorithm.java	(revision 369)
@@ -0,0 +1,57 @@
+package es.unex.sextante.gridStatistics.multiGridKurtosis;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridKurtosisAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Kurtosis"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dMean = 0;
+      double dDif, dDif2;
+      double dMom2 = 0;
+      double dMom4 = 0;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+      dMean /= iValidCells;
+      if (iValidCells > 3) {
+         for (i = 0; i < dValues.length; i++) {
+            dDif = dValues[i] - dMean;
+            dDif2 = dDif * dDif;
+            dMom2 += dDif2;
+            dMom4 += (dDif2 * dDif2);
+         }
+         dMom2 /= iValidCells;
+         dMom4 /= iValidCells;
+         return (dMom4 / Math.pow(dMom2, 2));
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridKurtosis/MultiGridKurtosisAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValueGrid/MultiGridMinValueGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValueGrid/MultiGridMinValueGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValueGrid/MultiGridMinValueGridAlgorithm.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gridStatistics.multiGridMinValueGrid;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMinValueGridAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Minimum_value_layer"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      double dMin = Double.MAX_VALUE;
+      double layer = NO_DATA;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > dMin) {
+               dMin = dValue;
+               layer = i;
+            }
+         }
+      }
+
+      return layer;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMinValueGrid/MultiGridMinValueGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValueGrid/MultiGridMaxValueGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValueGrid/MultiGridMaxValueGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValueGrid/MultiGridMaxValueGridAlgorithm.java	(revision 369)
@@ -0,0 +1,43 @@
+package es.unex.sextante.gridStatistics.multiGridMaxValueGrid;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMaxValueGridAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Maximum_value_layer"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+
+      double dMax = Double.NEGATIVE_INFINITY;
+      double layer = NO_DATA;
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            if (dValue > dMax) {
+               dMax = dValue;
+               layer = i;
+            }
+         }
+      }
+
+      return layer;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMaxValueGrid/MultiGridMaxValueGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,116 @@
+
+
+package es.unex.sextante.gridStatistics.base;
+
+import java.awt.image.DataBuffer;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public abstract class MultiGridStatsBaseAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT        = "INPUT";
+   public static final String FORCE_NODATA = "NODATA";
+   public static final String RESULT       = "RESULT";
+
+
+   protected double           NO_DATA;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addBoolean(FORCE_NODATA, Sextante.getText("Force_no-data_value"), true);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      IRasterLayer[] window;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      final ArrayList input = m_Parameters.getParameterValueAsArrayList("INPUT");
+      final boolean bForceNoData = m_Parameters.getParameterValueAsBoolean("NODATA");
+
+      if (input.size() == 0) {
+         return false;
+      }
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      result.setNoDataValue(m_OutputFactory.getDefaultNoDataValue());
+      result.assignNoData();
+
+      window = new IRasterLayer[input.size()];
+      for (i = 0; i < input.size(); i++) {
+         window[i] = (IRasterLayer) input.get(i);
+         window[i].setWindowExtent(result.getWindowGridExtent());
+         if ((window[i].getDataType() == DataBuffer.TYPE_FLOAT) || (window[i].getDataType() == DataBuffer.TYPE_DOUBLE)) {
+            window[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+         }
+         else {
+            window[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+         }
+      }
+
+      iNX = window[0].getNX();
+      iNY = window[0].getNY();
+
+      final double dValues[] = new double[input.size()];
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            for (i = 0; i < window.length; i++) {
+               dValue = window[i].getCellValueAsDouble(x, y);
+               if (!window[i].isNoDataValue(dValue)) {
+                  dValues[i] = dValue;
+               }
+               else {
+                  if (bForceNoData) {
+                     result.setNoData(x, y);
+                     break;
+                  }
+                  else {
+                     dValues[i] = m_OutputFactory.getDefaultNoDataValue();
+                  }
+               }
+            }
+            result.setCellValue(x, y, processValues(dValues));
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   protected abstract double processValues(double[] dValues);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsExtendedBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsExtendedBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsExtendedBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,136 @@
+
+
+package es.unex.sextante.gridStatistics.base;
+
+import java.awt.image.DataBuffer;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+
+public abstract class MultiGridStatsExtendedBaseAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT        = "INPUT";
+   public static final String VALUE        = "VALUE";
+   public static final String FORCE_NODATA = "NODATA";
+   public static final String RESULT       = "RESULT";
+
+   protected double           NO_DATA;
+   protected double           m_dValue;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addNumericalValue(VALUE, Sextante.getText("Value"), 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addBoolean(FORCE_NODATA, Sextante.getText("Force_no-data_value"), true);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      IRasterLayer[] window;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      try {
+         final ArrayList input = m_Parameters.getParameterValueAsArrayList(INPUT);
+         final boolean bForceNoData = m_Parameters.getParameterValueAsBoolean(FORCE_NODATA);
+         m_dValue = m_Parameters.getParameterValueAsDouble(VALUE);
+
+         if (input.size() == 0) {
+            return false;
+         }
+
+         final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+         result.setNoDataValue(NO_DATA);
+         result.assignNoData();
+
+         window = new IRasterLayer[input.size()];
+         for (i = 0; i < input.size(); i++) {
+            window[i] = (IRasterLayer) input.get(i);
+            window[i].setWindowExtent(result.getWindowGridExtent());
+            if ((window[i].getDataType() == DataBuffer.TYPE_FLOAT) || (window[i].getDataType() == DataBuffer.TYPE_DOUBLE)) {
+               window[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+            }
+            else {
+               window[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+            }
+         }
+
+         iNX = window[0].getNX();
+         iNY = window[0].getNY();
+
+         final double dValues[] = new double[input.size()];
+
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               for (i = 0; i < window.length; i++) {
+                  dValue = window[i].getCellValueAsDouble(x, y);
+                  if (!window[i].isNoDataValue(dValue)) {
+                     dValues[i] = dValue;
+                  }
+                  else {
+                     if (bForceNoData) {
+                        result.setNoData(x, y);
+                        break;
+                     }
+                     else {
+                        dValues[i] = NO_DATA;
+                     }
+                  }
+               }
+               result.setCellValue(x, y, processValues(dValues));
+            }
+
+         }
+
+         return !m_Task.isCanceled();
+
+      }
+      catch (final WrongParameterTypeException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final WrongParameterIDException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final NullParameterValueException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      return false;
+
+   }
+
+
+   protected abstract double processValues(double[] dValues);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/MultiGridStatsExtendedBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,144 @@
+
+
+package es.unex.sextante.gridStatistics.base;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+;
+
+public abstract class NeighborhoodStatsBaseAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final String LAYER        = "LAYER";
+   private static final String RADIUS       = "RADIUS";
+   private static final String FORCE_NODATA = "NODATA";
+   private static final String RESULT       = "RESULT";
+
+   protected double            NO_DATA;
+
+   private int                 m_iRadius;
+   private boolean             m_bForceNoData;
+   private boolean             m_bIsValidCell[][];
+   private IRasterLayer        m_window;
+   protected double            m_dValues[];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 1, 20);
+         m_Parameters.addBoolean(FORCE_NODATA, Sextante.getText("Force_no-data_value"), true);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iValidCells = 0;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      m_iRadius = m_Parameters.getParameterValueAsInt(RADIUS);
+      m_window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_bForceNoData = m_Parameters.getParameterValueAsBoolean(FORCE_NODATA);
+
+      m_window.setFullExtent();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_window.getWindowGridExtent());
+
+      result.setNoDataValue(NO_DATA);
+      result.assignNoData();
+
+      iNX = m_window.getNX();
+      iNY = m_window.getNY();
+
+      m_bIsValidCell = new boolean[2 * m_iRadius + 1][2 * m_iRadius + 1];
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            final double dDist = Math.sqrt(x * x + y * y);
+            if (dDist <= m_iRadius) {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = true;
+               iValidCells++;
+            }
+            else {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = false;
+            }
+         }
+      }
+
+      m_dValues = new double[iValidCells];
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            if (setNeighborhoodValues(x, y)) {
+               result.setCellValue(x, y, processValues());
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean setNeighborhoodValues(final int iX,
+                                         final int iY) {
+
+      int x, y;
+      int iCell = 0;
+      double dValue;
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            if (m_bIsValidCell[x + m_iRadius][y + m_iRadius]) {
+               dValue = m_window.getCellValueAsDouble(iX + x, iY + y);
+               if (!m_window.isNoDataValue(dValue)) {
+                  m_dValues[iCell] = dValue;
+               }
+               else {
+                  if (m_bForceNoData) {
+                     return false;
+                  }
+                  else {
+                     m_dValues[iCell] = NO_DATA;
+                  }
+               }
+               iCell++;
+            }
+         }
+      }
+
+      return true;
+
+   }
+
+
+   protected abstract double processValues();
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsExtendedBaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsExtendedBaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsExtendedBaseAlgorithm.java	(revision 369)
@@ -0,0 +1,147 @@
+
+
+package es.unex.sextante.gridStatistics.base;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public abstract class NeighborhoodStatsExtendedBaseAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RADIUS       = "RADIUS";
+   public static final String LAYER        = "LAYER";
+   public static final String VALUE        = "VALUE";
+   public static final String FORCE_NODATA = "NODATA";
+   public static final String RESULT       = "RESULT";
+
+   protected double           NO_DATA;
+
+   private int                m_iRadius;
+   private boolean            m_bForceNoData;
+   private boolean            m_bIsValidCell[][];
+   private IRasterLayer       m_window;
+   protected double           m_dValues[];
+   protected double           m_dValue;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 1, 20);
+         m_Parameters.addNumericalValue(VALUE, Sextante.getText("Value"), 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addBoolean(FORCE_NODATA, Sextante.getText("Force_no-data_value"), true);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iValidCells = 0;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      m_iRadius = m_Parameters.getParameterValueAsInt(RADIUS);
+      m_window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_dValue = m_Parameters.getParameterValueAsDouble(VALUE);
+      m_bForceNoData = m_Parameters.getParameterValueAsBoolean(FORCE_NODATA);
+
+      m_window.setFullExtent();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_window.getWindowGridExtent());
+
+      result.setNoDataValue(NO_DATA);
+      result.assignNoData();
+
+      iNX = m_window.getNX();
+      iNY = m_window.getNY();
+
+      m_bIsValidCell = new boolean[2 * m_iRadius + 1][2 * m_iRadius + 1];
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            final double dDist = Math.sqrt(x * x + y * y);
+            if (dDist < m_iRadius) {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = true;
+               iValidCells++;
+            }
+            else {
+               m_bIsValidCell[x + m_iRadius][y + m_iRadius] = false;
+            }
+         }
+      }
+
+      m_dValues = new double[iValidCells];
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            if (setNeighborhoodValues(x, y)) {
+               result.setCellValue(x, y, processValues());
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private boolean setNeighborhoodValues(final int iX,
+                                         final int iY) {
+
+      int x, y;
+      int iCell = 0;
+      double dValue;
+
+
+      for (y = -m_iRadius; y < m_iRadius + 1; y++) {
+         for (x = -m_iRadius; x < m_iRadius + 1; x++) {
+            if (m_bIsValidCell[x + m_iRadius][y + m_iRadius]) {
+               dValue = m_window.getCellValueAsDouble(iX + x, iY + y);
+               if (!m_window.isNoDataValue(dValue)) {
+                  m_dValues[iCell] = dValue;
+               }
+               else {
+                  if (m_bForceNoData) {
+                     return false;
+                  }
+                  else {
+                     m_dValues[iCell] = NO_DATA;
+                  }
+               }
+               iCell++;
+            }
+         }
+      }
+
+      return true;
+
+   }
+
+
+   protected abstract double processValues();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/base/NeighborhoodStatsExtendedBaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMedian/MultiGridMedianAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMedian/MultiGridMedianAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMedian/MultiGridMedianAlgorithm.java	(revision 369)
@@ -0,0 +1,49 @@
+package es.unex.sextante.gridStatistics.multiGridMedian;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.MultiGridStatsBaseAlgorithm;
+
+public class MultiGridMedianAlgorithm
+         extends
+            MultiGridStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Median"));
+      setGroup(Sextante.getText("Local_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues(final double[] dValues) {
+
+      int i;
+      double dValue;
+      final ArrayList validCells = new ArrayList();
+
+      for (i = 0; i < dValues.length; i++) {
+         dValue = dValues[i];
+         if (dValue != NO_DATA) {
+            validCells.add(new Double(dValue));
+         }
+      }
+
+      if (validCells.size() > 0) {
+         final Object[] array = validCells.toArray();
+         Arrays.sort(array);
+         return (((Double) array[validCells.size() / 2]).doubleValue());
+      }
+      else {
+         return NO_DATA;
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/multiGridMedian/MultiGridMedianAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVariance/NeighborhoodVarianceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVariance/NeighborhoodVarianceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVariance/NeighborhoodVarianceAlgorithm.java	(revision 369)
@@ -0,0 +1,49 @@
+package es.unex.sextante.gridStatistics.neighborhoodVariance;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodVarianceAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Variance__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dSum = 0;
+      double dVar = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            dSum += dValue;
+            dVar += (dValue * dValue);
+            iValidCells++;
+         }
+      }
+
+      if (iValidCells > 0) {
+         final double dMean = dSum / iValidCells;
+         return (dVar / iValidCells - dMean * dMean);
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVariance/NeighborhoodVarianceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodNumberOfClasses/NeighborhoodNumberOfClassesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodNumberOfClasses/NeighborhoodNumberOfClassesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodNumberOfClasses/NeighborhoodNumberOfClassesAlgorithm.java	(revision 369)
@@ -0,0 +1,27 @@
+package es.unex.sextante.gridStatistics.neighborhoodNumberOfClasses;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.neighborhood.patternBase.PatternBaseAlgorithm;
+
+public class NeighborhoodNumberOfClassesAlgorithm
+         extends
+            PatternBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Number_of_different_classes"));
+      setGroup(Sextante.getText("Pattern_analysis"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      return getNumberOfClasses();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodNumberOfClasses/NeighborhoodNumberOfClassesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDominance/NeighborhoodDominanceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDominance/NeighborhoodDominanceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDominance/NeighborhoodDominanceAlgorithm.java	(revision 369)
@@ -0,0 +1,27 @@
+package es.unex.sextante.gridStatistics.neighborhoodDominance;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.neighborhood.patternBase.PatternBaseAlgorithm;
+
+public class NeighborhoodDominanceAlgorithm
+         extends
+            PatternBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Dominance"));
+      setGroup(Sextante.getText("Pattern_analysis"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      return (Math.log(getNumberOfClasses()) - getDiversity());
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodDominance/NeighborhoodDominanceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMajority/NeighborhoodMajorityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMajority/NeighborhoodMajorityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMajority/NeighborhoodMajorityAlgorithm.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gridStatistics.neighborhoodMajority;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodMajorityAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Mayority__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iCount;
+      int iMaxCount = -1;
+      double dValue;
+      double dReturn = NO_DATA;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            value = new Double(dValue);
+            count = (Integer) map.get(new Double(dValue));
+            if (count != null) {
+               count = new Integer(count.intValue() + 1);
+            }
+            else {
+               count = new Integer(1);
+            }
+            map.put(new Double(dValue), count);
+         }
+      }
+
+      final Set set = map.keySet();
+      final Iterator iter = set.iterator();
+
+      while (iter.hasNext()) {
+         value = (Double) iter.next();
+         dValue = value.doubleValue();
+         count = (Integer) map.get(value);
+         iCount = count.intValue();
+         if (iCount > iMaxCount) {
+            dReturn = dValue;
+            iMaxCount = iCount;
+         }
+         else if (iCount == iMaxCount) {
+            dReturn = NO_DATA;
+         }
+      }
+
+      return dReturn;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodMajority/NeighborhoodMajorityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVarianceRadius/NeighborhoodVarianceRadiusAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVarianceRadius/NeighborhoodVarianceRadiusAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVarianceRadius/NeighborhoodVarianceRadiusAlgorithm.java	(revision 369)
@@ -0,0 +1,196 @@
+
+
+package es.unex.sextante.gridStatistics.neighborhoodVarianceRadius;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class NeighborhoodVarianceRadiusAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER           = "LAYER";
+   public static final String MAXRADIUS       = "MAXRADIUS";
+   public static final String STDDEV          = "STDDEV";
+   public static final String UNITS           = "UNITS";
+   public static final String RESULT          = "RESULT";
+
+   public static final int    UNITS_CELLS     = 0;
+   public static final int    UNITS_MAP_UNITS = 1;
+
+   protected double           NO_DATA;
+
+   private int                m_iNX, m_iNY;
+   private int                m_iMaxRadius;
+   private int                m_Check[][];
+   private double             m_dStopVariance;
+   private boolean            m_bWriteGridsize;
+   private IRasterLayer       m_Window;
+   private IRasterLayer       m_InputQ;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Cells"), Sextante.getText("Map_units") };
+      setUserCanDefineAnalysisExtent(false);
+
+      setName(Sextante.getText("Radius_of_variance"));
+      setGroup(Sextante.getText("Geostatistics"));
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(MAXRADIUS, Sextante.getText("Maximum_radius__cells"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 20, 2, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"), 1.0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addSelection(UNITS, Sextante.getText("Units"), sMethod);
+         addOutputRasterLayer(RESULT, this.getName());
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      m_dStopVariance = m_Parameters.getParameterValueAsDouble(STDDEV);
+      m_dStopVariance *= m_dStopVariance;
+      m_iMaxRadius = m_Parameters.getParameterValueAsInt(MAXRADIUS);
+      m_bWriteGridsize = (m_Parameters.getParameterValueAsInt(UNITS) == 1);
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_Window.setFullExtent();
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_Window.getWindowGridExtent());
+
+      m_InputQ = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, m_Window.getWindowGridExtent());
+
+      result.setNoDataValue(NO_DATA);
+      result.assignNoData();
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      initialize();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            result.setCellValue(x, y, getRadius(x, y));
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void initialize() {
+
+      int x, y;
+      double d;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            d = m_Window.getCellValueAsDouble(x, y);
+            m_InputQ.setCellValue(x, y, d * d);
+         }
+      }
+
+      m_Check = new int[m_iMaxRadius + 1][m_iMaxRadius + 1];
+
+      for (y = 0; y <= m_iMaxRadius; y++) {
+         for (x = 0; x <= m_iMaxRadius; x++) {
+            m_Check[y][x] = (int) Math.sqrt((x + 0.5) * (x + 0.5) + (y + 0.5) * (y + 0.5));
+         }
+      }
+   }
+
+
+   private double getRadius(final int xPoint,
+                            final int yPoint) {
+
+      final double sqrt2 = 1.0 / Math.sqrt(2.0);
+
+      int x, y, dx, dy, sRadius, Radius = 0, nValues = 0;
+
+      double ArithMean, Variance, Sum = 0.0, SumQ = 0.0;
+
+      do {
+         sRadius = (int) (sqrt2 * Radius - 4.0);
+         if (sRadius < 0) {
+            sRadius = 0;
+         }
+
+         for (dy = sRadius; dy <= Radius; dy++) {
+            for (dx = sRadius; dx <= Radius; dx++) {
+               if (m_Check[dy][dx] == Radius) {
+                  y = yPoint - dy;
+                  if (y >= 0) {
+                     x = xPoint - dx;
+                     if (x >= 0) {
+                        Sum += m_Window.getCellValueAsDouble(x, y);
+                        SumQ += m_InputQ.getCellValueAsDouble(x, y);
+                        nValues++;
+                     }
+
+                     x = xPoint + dx;
+                     if (x < m_iNX) {
+                        Sum += m_Window.getCellValueAsDouble(x, y);
+                        SumQ += m_InputQ.getCellValueAsDouble(x, y);
+                        nValues++;
+                     }
+                  }
+
+                  y = yPoint + dy;
+                  if (y < m_iNY) {
+                     x = xPoint - dx;
+                     if (x >= 0) {
+                        Sum += m_Window.getCellValueAsDouble(x, y);
+                        SumQ += m_InputQ.getCellValueAsDouble(x, y);
+                        nValues++;
+                     }
+
+                     x = xPoint + dx;
+                     if (x < m_iNX) {
+                        Sum += m_Window.getCellValueAsDouble(x, y);
+                        SumQ += m_InputQ.getCellValueAsDouble(x, y);
+                        nValues++;
+                     }
+                  }
+               }
+            }
+         }
+
+         if (nValues != 0) {
+            ArithMean = Sum / nValues;
+            Variance = SumQ / nValues - ArithMean * ArithMean;
+         }
+         else {
+            Variance = 0;
+         }
+
+         Radius++;
+      }
+      while ((Variance < m_dStopVariance) && (Radius <= m_iMaxRadius));
+
+      return (m_bWriteGridsize ? Radius : Radius * m_Window.getWindowCellSize());
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodVarianceRadius/NeighborhoodVarianceRadiusAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodSkewness/NeighborhoodSkewnessAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodSkewness/NeighborhoodSkewnessAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodSkewness/NeighborhoodSkewnessAlgorithm.java	(revision 369)
@@ -0,0 +1,56 @@
+package es.unex.sextante.gridStatistics.neighborhoodSkewness;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gridStatistics.base.NeighborhoodStatsBaseAlgorithm;
+
+public class NeighborhoodSkewnessAlgorithm
+         extends
+            NeighborhoodStatsBaseAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Skeweness__neighbourhood"));
+      setGroup(Sextante.getText("Focal_statistics"));
+      super.defineCharacteristics();
+
+   }
+
+
+   @Override
+   protected double processValues() {
+
+      int i;
+      int iValidCells = 0;
+      double dValue;
+
+      double dMean = 0;
+      double dDif;
+      double dDif2 = 0;
+      double dDif3 = 0;
+
+      for (i = 0; i < m_dValues.length; i++) {
+         dValue = m_dValues[i];
+         if (dValue != NO_DATA) {
+            dMean += dValue;
+            iValidCells++;
+         }
+      }
+      dMean /= iValidCells;
+      if (iValidCells > 2) {
+         for (i = 0; i < m_dValues.length; i++) {
+            dDif = m_dValues[i] - dMean;
+            dDif2 += (dDif * dDif);
+            dDif3 += (dDif * dDif * dDif);
+         }
+         dDif2 /= iValidCells;
+         dDif3 /= iValidCells;
+         return (dDif3 / Math.pow(dDif2, 1.5));
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridStatistics/neighborhoodSkewness/NeighborhoodSkewnessAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/NearestNeighbourFinder.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/NearestNeighbourFinder.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/NearestNeighbourFinder.java	(revision 369)
@@ -0,0 +1,91 @@
+package es.unex.sextante.closestpts;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.core.ITaskMonitor;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+
+public class NearestNeighbourFinder {
+
+   private final STRtree m_Tree;
+   private final int     m_iPoints;
+   private final double  m_dX[];
+   private final double  m_dY[];
+   private final double  m_dZ[];
+
+
+   public NearestNeighbourFinder(final IVectorLayer layer,
+                                 final int iField,
+                                 final ITaskMonitor task) throws IteratorException {
+
+      int i;
+      float x, y;
+
+      task.setProgressText(Sextante.getText("Creating_index"));
+
+      m_Tree = new STRtree();
+
+      m_iPoints = layer.getShapesCount();
+      m_dX = new double[m_iPoints];
+      m_dY = new double[m_iPoints];
+      m_dZ = new double[m_iPoints];
+      i = 0;
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && !task.isCanceled()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+         x = (float) coord.x;
+         y = (float) coord.y;
+         final Envelope bounds = geom.getEnvelopeInternal();
+         m_Tree.insert(bounds, new Integer(i));
+         m_dX[i] = x;
+         m_dY[i] = y;
+         try {
+            m_dZ[i] = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+         }
+         catch (final NumberFormatException e) {
+            m_dZ[i] = 0;
+         }
+         if (i % 50 == 0) {
+            task.setProgress(i, m_iPoints);
+         }
+         i++;
+      }
+      iter.close();
+   }
+
+
+   public PtAndDistance[] getClosestPoints(final double x,
+                                           final double y,
+                                           final double dDistance) {
+
+      int i;
+      int iID;
+      double dDist;
+      final Coordinate pt = new Coordinate(x, y);
+      final Envelope search = new Envelope(pt);
+      search.expandBy(dDistance);
+      final List<Integer> list = m_Tree.query(search);
+      final int iSize = list.size();
+      final PtAndDistance pts[] = new PtAndDistance[iSize];
+      for (i = 0; i < iSize; i++) {
+         iID = list.get(i).intValue();
+         dDist = pt.distance(new Coordinate(m_dX[iID], m_dY[iID]));
+         pts[i] = new PtAndDistance(new Point3D(m_dX[iID], m_dY[iID], m_dZ[iID]), dDist);
+      }
+
+      return pts;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/NearestNeighbourFinder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/Point3D.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/Point3D.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/Point3D.java	(revision 369)
@@ -0,0 +1,60 @@
+package es.unex.sextante.closestpts;
+
+public class Point3D {
+
+   private double m_dX, m_dY, m_dZ;
+
+
+   public Point3D(final double dX,
+                  final double dY,
+                  final double dZ) {
+
+      m_dX = dX;
+      m_dY = dY;
+      m_dZ = dZ;
+
+   }
+
+
+   public double getZ() {
+
+      return m_dZ;
+
+   }
+
+
+   public void setZ(final double dZ) {
+
+      m_dZ = dZ;
+
+   }
+
+
+   public double getX() {
+
+      return m_dX;
+
+   }
+
+
+   public void setX(final double dX) {
+
+      m_dX = dX;
+
+   }
+
+
+   public double getY() {
+
+      return m_dY;
+
+   }
+
+
+   public void setY(final double dY) {
+
+      m_dY = dY;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/Point3D.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/PtAndDistance.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/PtAndDistance.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/PtAndDistance.java	(revision 369)
@@ -0,0 +1,55 @@
+package es.unex.sextante.closestpts;
+
+public class PtAndDistance
+         implements
+            Comparable {
+
+   private final Point3D m_Pt;
+   private final double  m_dDist;
+
+
+   public PtAndDistance(final Point3D pt,
+                        final double dDistance) {
+
+      m_Pt = pt;
+      m_dDist = dDistance;
+
+   }
+
+
+   public double getDist() {
+
+      return m_dDist;
+
+   }
+
+
+   public Point3D getPt() {
+
+      return m_Pt;
+
+   }
+
+
+   public int compareTo(final Object ob) throws ClassCastException {
+
+      if (!(ob instanceof PtAndDistance)) {
+         throw new ClassCastException();
+      }
+
+      final double dValue = ((PtAndDistance) ob).getDist();
+      final double dDif = this.m_dDist - dValue;
+
+      if (dDif > 0.0) {
+         return 1;
+      }
+      else if (dDif < 0.0) {
+         return -1;
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/closestpts/PtAndDistance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/tvi/TVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/tvi/TVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/tvi/TVIAlgorithm.java	(revision 369)
@@ -0,0 +1,35 @@
+package es.unex.sextante.vegetationIndices.tvi;
+
+import es.unex.sextante.vegetationIndices.base.SlopeBasedAlgorithm;
+
+public class TVIAlgorithm
+         extends
+            SlopeBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("TVI");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      final double dNDVI = getNDVI(dRed, dNIR);
+
+      if (dNDVI > -0.5) {
+         return Math.sqrt(dNDVI + 0.5);
+      }
+      else {
+         return m_dNoData;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/tvi/TVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ctvi/CTVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ctvi/CTVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ctvi/CTVIAlgorithm.java	(revision 369)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+CTVIAlgorithm.java
+Copyright (C) Victor Olaya
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+package es.unex.sextante.vegetationIndices.ctvi;
+
+import es.unex.sextante.vegetationIndices.base.SlopeBasedAlgorithm;
+
+public class CTVIAlgorithm
+         extends
+            SlopeBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("CTVI");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      final double dNDVI = getNDVI(dRed, dNIR);
+
+      return (dNDVI + 0.5) / Math.abs(dNDVI + 0.5) * Math.sqrt(Math.abs(dNDVI + 0.5));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ctvi/CTVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviWalther/PVIWaltherAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviWalther/PVIWaltherAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviWalther/PVIWaltherAlgorithm.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.vegetationIndices.pviWalther;
+
+import es.unex.sextante.vegetationIndices.base.DistanceBasedAlgorithm;
+
+public class PVIWaltherAlgorithm
+         extends
+            DistanceBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("PVI(Walther and Shabaani)");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      return (((dNIR - m_dIntercept) * (dRed + m_dSlope)) / Math.sqrt(1 + m_dIntercept));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviWalther/PVIWaltherAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ttvi/TTVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ttvi/TTVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ttvi/TTVIAlgorithm.java	(revision 369)
@@ -0,0 +1,30 @@
+package es.unex.sextante.vegetationIndices.ttvi;
+
+import es.unex.sextante.vegetationIndices.base.SlopeBasedAlgorithm;
+
+public class TTVIAlgorithm
+         extends
+            SlopeBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("TTVI");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      final double dNDVI = getNDVI(dRed, dNIR);
+
+      return Math.sqrt(Math.abs(dNDVI + 0.5));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ttvi/TTVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviQi/PVIQiAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviQi/PVIQiAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviQi/PVIQiAlgorithm.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.vegetationIndices.pviQi;
+
+import es.unex.sextante.vegetationIndices.base.DistanceBasedAlgorithm;
+
+public class PVIQiAlgorithm
+         extends
+            DistanceBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("PVI(Qi et al)");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      return ((dNIR * m_dIntercept) - (dRed * m_dSlope));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviQi/PVIQiAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/DistanceBasedAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/DistanceBasedAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/DistanceBasedAlgorithm.java	(revision 369)
@@ -0,0 +1,114 @@
+package es.unex.sextante.vegetationIndices.base;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+public abstract class DistanceBasedAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERRED  = "LAYERRED";
+   public static final String BANDRED   = "BANDRED";
+   public static final String LAYERNIR  = "LAYERNIR";
+   public static final String BANDNIR   = "BANDNIR";
+   public static final String SLOPE     = "SLOPE";
+   public static final String INTERCEPT = "INTERCEPT";
+   public static final String RESULT    = "RESULT";
+
+   private IRasterLayer       m_LayerRed, m_LayerNIR;
+
+   protected double           m_dNoData;
+   protected double           m_dSlope, m_dIntercept;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Vegetation_indices"));
+      try {
+         m_Parameters.addInputRasterLayer(LAYERRED, Sextante.getText("Red_layer"), true);
+         m_Parameters.addBand(BANDRED, Sextante.getText("Red_band"), LAYERRED);
+         m_Parameters.addInputRasterLayer(LAYERNIR, Sextante.getText("Near_infrared_layer"), true);
+         m_Parameters.addBand(BANDNIR, Sextante.getText("Near_infrared_band"), LAYERNIR);
+         m_Parameters.addNumericalValue(SLOPE, Sextante.getText("Soil_line_slope"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(INTERCEPT, Sextante.getText("Soil_line_intercept"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dRed;
+      double dNIR;
+      double dIndex;
+      AnalysisExtent extent;
+
+      m_LayerRed = m_Parameters.getParameterValueAsRasterLayer(LAYERRED);
+      final int iBandRed = m_Parameters.getParameterValueAsInt(BANDRED);
+      m_LayerNIR = m_Parameters.getParameterValueAsRasterLayer(LAYERNIR);
+      final int iBandNIR = m_Parameters.getParameterValueAsInt(BANDNIR);
+
+      m_dIntercept = m_Parameters.getParameterValueAsDouble(INTERCEPT);
+      m_dSlope = m_Parameters.getParameterValueAsDouble(SLOPE);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      extent = result.getWindowGridExtent();
+
+      m_LayerRed.setWindowExtent(extent);
+      m_LayerNIR.setWindowExtent(extent);
+      m_LayerRed.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      m_LayerNIR.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      iNX = m_LayerRed.getNX();
+      iNY = m_LayerRed.getNY();
+
+      m_dNoData = result.getNoDataValue();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dRed = m_LayerRed.getCellValueAsDouble(x, y, iBandRed);
+            dNIR = m_LayerNIR.getCellValueAsDouble(x, y, iBandNIR);
+            if (!m_LayerRed.isNoDataValue(dRed) && !m_LayerNIR.isNoDataValue(dNIR)) {
+               dIndex = getIndex(dRed, dNIR);
+               result.setCellValue(x, y, dIndex);
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected abstract double getIndex(double dRed,
+                                      double dNIR);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/DistanceBasedAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/SlopeBasedAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/SlopeBasedAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/SlopeBasedAlgorithm.java	(revision 369)
@@ -0,0 +1,111 @@
+package es.unex.sextante.vegetationIndices.base;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+public abstract class SlopeBasedAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERRED = "LAYERRED";
+   public static final String BANDRED  = "BANDRED";
+   public static final String BANDNIR  = "BANDNIR";
+   public static final String LAYERNIR = "LAYERNIR";
+   public static final String RESULT   = "RESULT";
+
+   private IRasterLayer       m_LayerRed, m_LayerNIR;
+   protected double           m_dNoData;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Vegetation_indices"));
+      this.setGroup(Sextante.getText("Vegetation_indices"));
+      try {
+         m_Parameters.addInputRasterLayer(LAYERRED, Sextante.getText("Red_layer"), true);
+         m_Parameters.addBand(BANDRED, Sextante.getText("Red_band"), LAYERRED);
+         m_Parameters.addInputRasterLayer(LAYERNIR, Sextante.getText("Near_infrared_layer"), true);
+         m_Parameters.addBand(BANDNIR, Sextante.getText("Near_infrared_band"), LAYERNIR);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dRed;
+      double dNIR;
+      double dIndex;
+      AnalysisExtent extent;
+
+      m_LayerRed = m_Parameters.getParameterValueAsRasterLayer(LAYERRED);
+      final int iBandRed = m_Parameters.getParameterValueAsInt(BANDRED);
+      m_LayerNIR = m_Parameters.getParameterValueAsRasterLayer(LAYERNIR);
+      final int iBandNIR = m_Parameters.getParameterValueAsInt(BANDNIR);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      extent = result.getWindowGridExtent();
+
+      m_LayerRed.setWindowExtent(extent);
+      m_LayerNIR.setWindowExtent(extent);
+      m_LayerRed.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      m_LayerNIR.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+      iNX = m_LayerRed.getNX();
+      iNY = m_LayerRed.getNY();
+
+      m_dNoData = result.getNoDataValue();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dRed = m_LayerRed.getCellValueAsDouble(x, y, iBandRed);
+            dNIR = m_LayerNIR.getCellValueAsDouble(x, y, iBandNIR);
+            if (!m_LayerRed.isNoDataValue(dRed) && !m_LayerNIR.isNoDataValue(dNIR)) {
+               dIndex = getIndex(dRed, dNIR);
+               result.setCellValue(x, y, dIndex);
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected double getNDVI(final double dRed,
+                            final double dNIR) {
+
+      return (dNIR - dRed) / (dNIR + dRed);
+
+   }
+
+
+   protected abstract double getIndex(double dRed,
+                                      double dNIR);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/base/SlopeBasedAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviRichardson/PVIRichardsonAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviRichardson/PVIRichardsonAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviRichardson/PVIRichardsonAlgorithm.java	(revision 369)
@@ -0,0 +1,36 @@
+package es.unex.sextante.vegetationIndices.pviRichardson;
+
+import es.unex.sextante.vegetationIndices.base.DistanceBasedAlgorithm;
+
+public class PVIRichardsonAlgorithm
+         extends
+            DistanceBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("PVI(Richardson and Wiegand)");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      final double dA1 = m_dSlope;
+      final double dA0 = m_dIntercept;
+      final double dB1 = 1 / m_dSlope;
+      final double dB0 = dRed - dB1 * dNIR;
+
+      final double dRgg5 = (dB1 * dA0 - dB0 * dA1) / (dB1 - dA1);
+      final double dRgg7 = (dA0 - dB0) / (dB1 - dA1);
+
+      return (Math.sqrt(Math.pow(dRgg5 - dRed, 2.) + Math.pow(dRgg7 - dNIR, 2.)));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviRichardson/PVIRichardsonAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/nrvi/NRVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/nrvi/NRVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/nrvi/NRVIAlgorithm.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.vegetationIndices.nrvi;
+
+import es.unex.sextante.vegetationIndices.base.SlopeBasedAlgorithm;
+
+public class NRVIAlgorithm
+         extends
+            SlopeBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("NRVI");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      return (dRed / dNIR - 1) / (dRed + dNIR + 1);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/nrvi/NRVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ndvi/NDVIAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ndvi/NDVIAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ndvi/NDVIAlgorithm.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.vegetationIndices.ndvi;
+
+import es.unex.sextante.vegetationIndices.base.SlopeBasedAlgorithm;
+
+public class NDVIAlgorithm
+         extends
+            SlopeBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("NDVI");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      return getNDVI(dRed, dNIR);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/ndvi/NDVIAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviPerry/PVIPerryAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviPerry/PVIPerryAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviPerry/PVIPerryAlgorithm.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.vegetationIndices.pviPerry;
+
+import es.unex.sextante.vegetationIndices.base.DistanceBasedAlgorithm;
+
+public class PVIPerryAlgorithm
+         extends
+            DistanceBasedAlgorithm {
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setName("PVI(Perry and Lautenschlager)");
+
+   }
+
+
+   @Override
+   protected double getIndex(final double dRed,
+                             final double dNIR) {
+
+      return ((m_dSlope * dNIR - dRed + m_dIntercept) / Math.sqrt(m_dSlope * m_dSlope + 1));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vegetationIndices/pviPerry/PVIPerryAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nearestNeighbour/NNInterpolationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nearestNeighbour/NNInterpolationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nearestNeighbour/NNInterpolationAlgorithm.java	(revision 369)
@@ -0,0 +1,99 @@
+
+
+package es.unex.sextante.nearestNeighbour;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.rTree.SextanteRTree;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class NNInterpolationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+   protected int              m_iField;
+
+   protected IVectorLayer     m_Layer;
+
+   private SextanteRTree      m_SearchEngine;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setName(Sextante.getText("Nearest_neighbour"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Point_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      m_SearchEngine = new SextanteRTree(m_Layer, m_iField, m_Task);
+      final IRasterLayer result = getNewRasterLayer(RESULT, m_Layer.getName() + Sextante.getText("[interpolated]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      setProgressText(Sextante.getText("Interpolating"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            result.setCellValue(x, y, getValueAt(x, y));
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      final Point3D closestPt = m_SearchEngine.getClosestPoint(pt.getX(), pt.getY());
+      return closestPt.getZ();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nearestNeighbour/NNInterpolationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/Geocoding.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/Geocoding.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/Geocoding.java	(revision 369)
@@ -0,0 +1,65 @@
+package es.unex.sextante.geosocial.twitter;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+
+public class Geocoding {
+
+   static String _coordinates = "0,0";
+
+
+   public static String getCoordinates(final String name) {
+
+      final String path = "http://ws.geonames.org/searchJSON?formatted=true&q=" + name + "&maxRows=1&lang=es&style=full";
+
+      URL url;
+      try {
+         url = new URL(path);
+
+
+         final URLConnection connection = url.openConnection();
+
+         connection.connect();
+
+         final BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+         String sCadena = "";
+         String response = "";
+         while ((sCadena = in.readLine()) != null) {
+            response = response + " " + sCadena;
+         }
+
+         final JSONObject responseJson = new JSONObject(response);
+
+         final JSONArray array = (JSONArray) responseJson.get("geonames");
+
+         int i = 0;
+         for (i = 0; i < array.length(); i++) {
+            Geocoding._coordinates = array.getJSONObject(i).get("lat") + "," + array.getJSONObject(i).get("lng");
+         }
+
+      }
+      catch (final MalformedURLException e) {
+         // TODO Auto-generated catch block
+         e.printStackTrace();
+      }
+      catch (final IOException e) {
+         // TODO Auto-generated catch block
+         e.printStackTrace();
+      }
+      catch (final JSONException e) {
+
+         e.printStackTrace();
+      }
+
+      return Geocoding._coordinates;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/Geocoding.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/SearchTwitterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/SearchTwitterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/SearchTwitterAlgorithm.java	(revision 369)
@@ -0,0 +1,115 @@
+package es.unex.sextante.geosocial.twitter;
+
+import java.awt.geom.Point2D;
+import java.util.Date;
+import java.util.List;
+
+import winterwell.jtwitter.Twitter;
+import winterwell.jtwitter.Twitter.Status;
+import winterwell.jtwitter.Twitter.User;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class SearchTwitterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT        = "RESULT";
+   public static final String SEARCH_STRING = "SEARCH_STRING";
+   public static final String INIT_DATE     = "INIT_DATE";
+   public static final String END_DATE      = "END_DATE";
+   public static final String POINT         = "POINT";
+   public static final String SEARCH_RADIUS = "SEARCH_RADIUS";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Search_twitter"));
+      setGroup(Sextante.getText("Geosocial"));
+
+      try {
+         m_Parameters.addString(SEARCH_STRING, Sextante.getText("Search_string"));
+         m_Parameters.addString(INIT_DATE, Sextante.getText("init_date"));
+         m_Parameters.addString(END_DATE, Sextante.getText("end_date"));
+         m_Parameters.addPoint(POINT, Sextante.getText("Search_coordinate"));
+         m_Parameters.addNumericalValue(SEARCH_RADIUS, Sextante.getText("Search_radius_km"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 50, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final String sSearch = m_Parameters.getParameterValueAsString(SEARCH_STRING);
+      final String sInitDate = m_Parameters.getParameterValueAsString(INIT_DATE);
+      final String sEndDate = m_Parameters.getParameterValueAsString(END_DATE);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      final double dRadius = m_Parameters.getParameterValueAsDouble(SEARCH_RADIUS);
+
+      final Class[] types = new Class[] { String.class, String.class };
+      final String[] sFields = new String[] { "user", "message" };
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Resultado"), IVectorLayer.SHAPE_TYPE_POINT, types,
+               sFields);
+
+      final Twitter twitter = new Twitter();
+      twitter.setMaxResults(300);
+      twitter.setSearchLocation(pt.getX(), pt.getY(), Double.toString(dRadius) + "km");
+      try {
+         final Date initDate = new Date(sInitDate);
+         twitter.setSinceDate(initDate);
+      }
+      catch (final Exception e) {}
+      try {
+         final Date endDate = new Date(sEndDate);
+         twitter.setUntilDate(endDate);
+      }
+      catch (final Exception e) {}
+
+      setProgressText(Sextante.getText("retrieving_tweets"));
+      final List<Twitter.Status> stati = new Twitter().search(sSearch, null, 90);
+
+      setProgressText(Sextante.getText("processing_tweets"));
+      final GeometryFactory gm = new GeometryFactory();
+      for (int i = 0; i < stati.size() && setProgress(i, stati.size()); i++) {
+         try {
+            final Status status = stati.get(i);
+            String sPosition = status.getGeo();
+            if (sPosition == null) {
+               final User user = twitter.show(status.getUser().getScreenName());
+               sPosition = Geocoding.getCoordinates(user.getLocation());
+            }
+            final String sLatitude = sPosition.substring(0, sPosition.indexOf(","));
+            final String sLongitude = sPosition.substring(sPosition.indexOf(",") + 1);
+            final double dLatitude = Double.parseDouble(sLatitude);
+            final double dLongitude = Double.parseDouble(sLongitude);
+            final Point point = gm.createPoint(new Coordinate(dLongitude, dLatitude));
+            final Object[] record = new Object[] { status.getUser().getScreenName(), status.getText() };
+            output.addFeature(point, record);
+         }
+         catch (final Exception e) {//ignore problematic tweets}
+
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/geosocial/twitter/SearchTwitterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/hillshade/HillshadeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/hillshade/HillshadeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/hillshade/HillshadeAlgorithm.java	(revision 369)
@@ -0,0 +1,237 @@
+package es.unex.sextante.lighting.hillshade;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class HillshadeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  METHOD                 = "METHOD";
+   public static final String  DEM                    = "DEM";
+   public static final String  AZIMUTH                = "AZIMUTH";
+   public static final String  DECLINATION            = "DECLINATION";
+   public static final String  EXAGGERATION           = "EXAGGERATION";
+   public static final String  SHADED                 = "SHADED";
+
+   public static final int     METHOD_STANDARD        = 0;
+   public static final int     METHOD_STANDARD_MAX_90 = 1;
+   public static final int     METHOD_COMBINED        = 2;
+   public static final int     METHOD_RAY_TRACE       = 3;
+
+   private static final double DEG_TO_RAD             = Math.PI / 180.;
+   private static final double DEG_90_IN_RAD          = Math.PI / 2;
+   private static final double DEG_180_IN_RAD         = Math.PI;
+
+   private double              m_dExaggeration;
+   private IRasterLayer        m_Hillshade;
+   private IRasterLayer        m_Window               = null;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iMethod;
+      double dAzimuth;
+      double dDeclination;
+
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Hillshade = getNewRasterLayer(SHADED, Sextante.getText("Shaded_relief"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      dAzimuth = m_Parameters.getParameterValueAsDouble(AZIMUTH) * DEG_TO_RAD;
+      dDeclination = m_Parameters.getParameterValueAsDouble(DECLINATION) * DEG_TO_RAD;
+      m_dExaggeration = m_Parameters.getParameterValueAsDouble(EXAGGERATION);
+
+      final AnalysisExtent extent = m_Hillshade.getWindowGridExtent();
+
+      m_Window.setWindowExtent(extent);
+
+      switch (iMethod) {
+         case METHOD_STANDARD:
+            getShading(dAzimuth, dDeclination, false, false);
+            break;
+         case METHOD_STANDARD_MAX_90:
+            getShading(dAzimuth, dDeclination, true, false);
+            break;
+         case METHOD_COMBINED:
+            getShading(dAzimuth, dDeclination, false, true);
+            break;
+         case METHOD_RAY_TRACE:
+            rayTrace(dAzimuth, dDeclination);
+            break;
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Standard"), Sextante.getText("Standard_max_90\u00b0"),
+               Sextante.getText("Combined"), "Ray tracing" };
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setName(Sextante.getText("Shaded_relief"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(DECLINATION, Sextante.getText("Sun_elevation_angle_[degrees]"), 45,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(AZIMUTH, Sextante.getText("Sun_azimuthal_angle_[degrees]"), 315,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(EXAGGERATION, Sextante.getText("Exaggeration"), 1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(SHADED, Sextante.getText("Shaded_relief"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   private void getShading(final double dAzimuth,
+                           final double dDeclination,
+                           final boolean bDelimit,
+                           final boolean bCombine) {
+
+      int iNX, iNY;
+      int x, y;
+      double dSlope;
+      double dAspect;
+      double dShading;
+      double dSinDec, dCosDec;
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dSlope = m_Window.getSlope(x, y);
+            dAspect = m_Window.getAspect(x, y);
+            if (!m_Window.isNoDataValue(dSlope) && !m_Window.isNoDataValue(dAspect)) {
+               dSinDec = Math.sin(dDeclination);
+               dCosDec = Math.cos(dDeclination);
+               dSlope = Math.tan(dSlope);
+               dShading = DEG_90_IN_RAD - Math.atan(m_dExaggeration * dSlope);
+               dShading = Math.acos(Math.sin(dShading) * dSinDec + Math.cos(dShading) * dCosDec * Math.cos(dAspect - dAzimuth));
+
+               if (bDelimit && (dShading > DEG_90_IN_RAD)) {
+                  dShading = DEG_90_IN_RAD;
+               }
+
+               if (bCombine) {
+                  dShading *= dSlope / DEG_90_IN_RAD;
+               }
+
+               m_Hillshade.setCellValue(x, y, dShading);
+            }
+            else {
+               m_Hillshade.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void rayTrace(double dAzimuth,
+                         final double dDeclination) {
+
+      int iNX, iNY;
+      int x, y, ix, iy, xStart, yStart, xStep, yStep;
+      double dx, dy, dz;
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      getShading(dAzimuth, dDeclination, true, false);
+
+      dAzimuth = dAzimuth + DEG_180_IN_RAD;
+
+      if (Math.sin(dAzimuth) > 0.0) {
+         xStart = 0;
+         xStep = 1;
+      }
+      else {
+         xStart = iNX - 1;
+         xStep = -1;
+      }
+
+      if (Math.cos(dAzimuth) > 0.0) {
+         yStart = 0;
+         yStep = 1;
+      }
+      else {
+         yStart = iNY - 1;
+         yStep = -1;
+      }
+
+      dx = Math.sin(dAzimuth);
+      dy = Math.cos(dAzimuth);
+
+      if (Math.abs(dx) > Math.abs(dy)) {
+         dy /= Math.abs(dx);
+         dx = dx < 0 ? -1 : 1;
+      }
+      else if (Math.abs(dy) > Math.abs(dx)) {
+         dx /= Math.abs(dy);
+         dy = dy < 0 ? -1 : 1;
+      }
+      else {
+         dx = dx < 0 ? -1 : 1;
+         dy = dy < 0 ? -1 : 1;
+      }
+
+      dz = Math.tan(dDeclination) * Math.sqrt(dx * dx + dy * dy) * m_Window.getWindowCellSize();
+
+      for (iy = 0, y = yStart; (iy < iNY) && setProgress(iy, iNY); iy++, y += yStep) {
+         for (ix = 0, x = xStart; ix < iNX; ix++, x += xStep) {
+            rayTrace_Trace(x, y, dx, dy, dz);
+         }
+
+      }
+   }
+
+
+   private void rayTrace_Trace(int x,
+                               int y,
+                               final double dx,
+                               final double dy,
+                               final double dz) {
+
+      double ix, iy, iz, iz2;
+
+      iz = m_Window.getCellValueAsDouble(x, y);
+
+      if (!m_Window.isNoDataValue(iz)) {
+         for (ix = x + 0.5, iy = y + 0.5, iz = m_Window.getCellValueAsDouble(x, y);;) {
+            ix += dx;
+            iy += dy;
+            iz -= dz;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            iz2 = m_Window.getCellValueAsDouble(x, y);
+
+            if (m_Window.isNoDataValue(iz) || (iz2 > iz)) {
+               break;
+            }
+            else if (!m_Window.isNoDataValue(iz)) {
+               m_Hillshade.setCellValue(x, y, DEG_90_IN_RAD);
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/hillshade/HillshadeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/los/LOSAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/los/LOSAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/los/LOSAlgorithm.java	(revision 369)
@@ -0,0 +1,221 @@
+package es.unex.sextante.lighting.los;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.renderer.xy.XYItemRenderer;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class LOSAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String       DEM       = "DEM";
+   public static final String       POINT     = "POINT";
+   public static final String       POINT2    = "POINT2";
+   public static final String       HEIGHT    = "HEIGHT";
+   public static final String       HEIGHT2   = "HEIGHT2";
+   public static final String       GRAPH     = "GRAPH";
+
+   private IRasterLayer             m_DEM     = null;
+   private GridCell                 m_Point, m_Point2;
+   private double                   m_dHeight, m_dHeight2;
+   private final XYSeriesCollection m_Dataset = new XYSeriesCollection();
+   private double                   m_dMin    = Double.MAX_VALUE;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      final Point2D pt2 = m_Parameters.getParameterValueAsPoint(POINT2);
+      m_dHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+      m_dHeight2 = m_Parameters.getParameterValueAsDouble(HEIGHT2);
+
+      final AnalysisExtent ge = new AnalysisExtent(m_DEM);
+      m_Point = ge.getGridCoordsFromWorldCoords(pt);
+      m_Point2 = ge.getGridCoordsFromWorldCoords(pt2);
+
+      final double x = ge.getXMin() + m_Point.getX() * ge.getCellSize();
+      final double y = ge.getYMax() - m_Point.getY() * ge.getCellSize();
+      final double x2 = ge.getXMin() + m_Point2.getX() * ge.getCellSize();
+      final double y2 = ge.getYMax() - m_Point2.getY() * ge.getCellSize();
+
+      ge.setXRange(x, x2, true);
+      ge.setYRange(y, y2, true);
+      ge.enlargeOneCell();
+
+      m_Point = ge.getGridCoordsFromWorldCoords(pt);
+      m_Point2 = ge.getGridCoordsFromWorldCoords(pt2);
+
+      m_DEM.setWindowExtent(ge);
+
+      calculateLOS(m_Point.getX(), m_Point.getY(), m_Point2.getX(), m_Point2.getY());
+      createChart();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addPoint(POINT, Sextante.getText("point") + " 1");
+         m_Parameters.addPoint(POINT2, Sextante.getText("point") + " 2");
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_point") + " 1", 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(HEIGHT2, Sextante.getText("Height_of_point") + " 2", 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputChart(GRAPH, Sextante.getText("Line_of_sight"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      setName(Sextante.getText("Line_of_sight"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+
+   }
+
+
+   private void calculateLOS(int x,
+                             int y,
+                             final int x2,
+                             final int y2) {
+
+      double dx, dy;
+      double ix, iy, iz, id, d, dist, z;
+      double dSlope, dMaxSlope = Double.MAX_VALUE;
+      double dLastZ, dLastD = 0;
+      boolean bSeen;
+      boolean bLast = true;
+      XYSeries serie = new XYSeries("serie");
+      final XYSeries lineSerie = new XYSeries("lineSerie");
+
+
+      m_Dataset.addSeries(serie);
+      dx = x2 - x;
+      dy = y2 - y;
+
+      d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      if (d > 0) {
+         dist = Math.sqrt(dx * dx + dy * dy);
+
+         dx /= d;
+         dy /= d;
+
+         d = dist / d;
+
+         id = 0.0;
+         ix = x + 0.5;
+         iy = y + 0.5;
+         iz = m_DEM.getCellValueAsDouble(x, y);
+
+         if (m_DEM.isNoDataValue(iz)) {
+            return;
+         }
+
+         iz += m_dHeight; // Add watcher height to watcher Z value
+         dLastZ = iz;
+
+         while (id < dist) {
+            id += d;
+
+            ix += dx;
+            iy += dy;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            z = m_DEM.getCellValueAsDouble(x, y);
+            if (!m_DEM.isNoDataValue(z)) {
+               dSlope = (z - iz) / id;
+               if (dMaxSlope == Double.MAX_VALUE) {
+                  dMaxSlope = dSlope;
+                  bSeen = bLast = true;
+                  serie.add(0, iz);
+               }
+               else if (dSlope <= dMaxSlope) {
+                  bSeen = false;
+               }
+               else {
+                  bSeen = true;
+                  dMaxSlope = dSlope;
+               }
+
+               if (bSeen == bLast) {
+                  serie.add(id * m_DEM.getWindowCellSize(), z);
+                  dLastD = id * m_DEM.getWindowCellSize();
+                  dLastZ = z;
+               }
+               else {
+                  serie = new XYSeries("sid"+id);
+                  m_Dataset.addSeries(serie);
+                  serie.add(dLastD, dLastZ);
+                  dLastD = id * m_DEM.getWindowCellSize();
+                  dLastZ = z;
+                  serie.add(dLastD, dLastZ);
+                  bLast = bSeen;
+               }
+               m_dMin = Math.min(m_dMin, dLastZ);
+            }
+         }
+         lineSerie.add(0, iz);
+         lineSerie.add(dLastD, dLastZ + m_dHeight2);
+         m_Dataset.addSeries(lineSerie);
+
+      }
+
+   }
+
+
+   private void createChart() {
+
+      int i;
+
+      final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, m_Dataset, PlotOrientation.VERTICAL, false, true,
+               true);
+
+      final ChartPanel jPanelChart = new ChartPanel(chart);
+      jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+      final XYPlot plot = (XYPlot) chart.getPlot();
+      final XYItemRenderer ren = plot.getRenderer();
+      for (i = 0; i < m_Dataset.getSeriesCount() - 1; i++) {
+         if (i % 2 != 0) {
+            ren.setSeriesPaint(i, Color.red);
+         }
+         else {
+            ren.setSeriesPaint(i, Color.green);
+         }
+      }
+      ren.setSeriesPaint(i, Color.BLACK);
+      plot.getRangeAxis().setAutoRange(false);
+      plot.getRangeAxis().setLowerBound(m_dMin);
+      addOutputChart("GRAPH", Sextante.getText("Line_of_sight"), jPanelChart);
+
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/los/LOSAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPolygon.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPolygon.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPolygon.java	(revision 369)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+VisibilityPolygon.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import com.vividsolutions.jts.geom.Polygon;
+
+/**
+ * A Polygon with added visibility value Visibility may be VISIBLE, HIDDEN or UNDEFINED
+ *
+ */
+public class VisibilityPolygon {
+   private Polygon m_polygon;
+   private final int     m_visibility;
+
+
+   public VisibilityPolygon(final Polygon poly,
+                            final int visibility) {
+      m_polygon = poly;
+      m_visibility = visibility;
+   }
+
+
+   public int visibility() {
+      return m_visibility;
+   }
+
+
+   public Polygon polygon() {
+      return m_polygon;
+   }
+
+
+   public void union(final VisibilityPolygon other) {
+      m_polygon = (Polygon) m_polygon.union(other.m_polygon);
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPolygon.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/RangeOfSight.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/RangeOfSight.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/RangeOfSight.java	(revision 369)
@@ -0,0 +1,195 @@
+/*******************************************************************************
+RangeOfSight.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import java.util.LinkedList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.LineSegment;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class RangeOfSight {
+
+   public static final double VISIBLE   = 255.0;
+   public static final double HIDDEN    = 0.0;
+   public static final double UNDEFINED = -1.0;
+
+   private final IRasterLayer       m_dem;
+   private final double             m_objectHeights;
+
+
+   public RangeOfSight(final IRasterLayer dem,
+                       final double objectHeights) {
+      m_dem = dem;
+      m_objectHeights = objectHeights;
+   }
+
+
+   public LinkedList<GridCell> Calculate(final GridCell sourceCell,
+                                         final GridCell targetCell,
+                                         boolean skipNoData) {
+      double dx, dy;
+      double ix, iy;
+      double dMaxSlope = Double.MAX_VALUE;
+
+      final LinkedList<GridCell> ros = new LinkedList<GridCell>();
+      // Source cell always sees itself
+      ros.add(new GridCell(sourceCell.getX(), sourceCell.getY(), VISIBLE));
+
+      dx = targetCell.getX() - sourceCell.getX();
+      dy = targetCell.getY() - sourceCell.getY();
+
+      double d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      if (d == 0) {
+         return ros;
+      }
+
+      final double dist = Math.sqrt(dx * dx + dy * dy);
+
+      dx /= d;
+      dy /= d;
+
+      d = dist / d;
+
+      // Align sampled point to the center of the cell
+      ix = sourceCell.getX() + 0.5;
+      iy = sourceCell.getY() + 0.5;
+      // Source cell should always have value
+      if (m_dem.isNoDataValue(sourceCell.getValue())) {
+         return ros;
+      }
+
+      double id = 0.0;
+      while (id < dist) {
+         id += d;
+
+         ix += dx;
+         iy += dy;
+
+         final GridCell currCell = new GridCell((int) ix, (int) iy, m_dem.getCellValueAsDouble((int) ix, (int) iy));
+
+         // If cell has no value mark it as one
+         if (m_dem.isNoDataValue(currCell.getValue())) {
+            if (!skipNoData) {
+               ros.add(new GridCell(currCell.getX(), currCell.getY(), m_dem.getNoDataValue()));
+            }
+            continue;
+         }
+
+         // Slope between source and current cell (with added height)
+         final double heightedSlope = (currCell.getValue() + m_objectHeights - sourceCell.getValue()) / id;
+
+         // First cell is always visible to source. It's slope is the maximum slope
+         // for the source to see other cells
+         if (dMaxSlope == Double.MAX_VALUE) {
+            ros.add(new GridCell(currCell.getX(), currCell.getY(), VISIBLE));
+         }
+         else if (heightedSlope <= dMaxSlope) {
+            // If slope below maximum visible slope than cell is hidden
+            ros.add(new GridCell(currCell.getX(), currCell.getY(), HIDDEN));
+         }
+         else {
+            // If slope is above maximum visible slope than cell is visible
+            // and its slope  is now the maximum visible slope
+            ros.add(new GridCell(currCell.getX(), currCell.getY(), VISIBLE));
+         }
+
+         // Actual slope between source and current cell (no added height)
+         // Update maximum visible slope
+         final double realSlope = (currCell.getValue() - sourceCell.getValue()) / id;
+         if (dMaxSlope == Double.MAX_VALUE || realSlope > dMaxSlope) {
+            dMaxSlope = realSlope;
+         }
+      }
+
+      return ros;
+   }
+
+
+   public LinkedList<Coordinate> Calculate(final Coordinate source,
+                                           final Coordinate target) {
+
+      double maxSlope = Double.MAX_VALUE;
+
+      final LinkedList<Coordinate> ros = new LinkedList<Coordinate>();
+
+      // Source point always sees itself
+      ros.add(new Coordinate(source.x, source.y, VISIBLE));
+
+      // Source cell should always have value
+      if (m_dem.isNoDataValue(source.z)) {
+         return ros;
+      }
+
+      final LineSegment los = new LineSegment(source, target);
+      final double rosAngle = los.angle();
+      final double losCosAngle = Math.cos(rosAngle);
+      final double losSinAngle = Math.sin(rosAngle);
+      final double losDistance = los.getLength();
+
+      final int xCellCount = (int) ((target.x - source.x) / m_dem.getLayerCellSize());
+      final int yCellCount = (int) ((target.y - source.y) / m_dem.getLayerCellSize());
+
+      final int maxCellCount = Math.max(Math.abs(xCellCount), Math.abs(yCellCount));
+      if (maxCellCount == 0) {
+         return ros;
+      }
+
+      final double cellDistance = losDistance / maxCellCount;
+
+      double currDistance = 0.0;
+      while (currDistance < losDistance) {
+         currDistance += cellDistance;
+
+         final Coordinate currLOSPoint = new Coordinate(source.x + currDistance * losCosAngle, source.y + currDistance * losSinAngle);
+         currLOSPoint.z = m_dem.getValueAt(currLOSPoint.x, currLOSPoint.y);
+
+         // Skip no data points
+         if (m_dem.isNoDataValue(currLOSPoint.z)) {
+            continue;
+         }
+
+         // Slope between source and current point
+         final double slope = (currLOSPoint.z - source.z) / currDistance;
+
+         // First point is always visible to source. It's slope is the maximum slope
+         // for the source to see other cells
+         if (maxSlope == Double.MAX_VALUE) {
+            maxSlope = slope;
+            ros.add(new Coordinate(currLOSPoint.x, currLOSPoint.y, VISIBLE));
+         }
+         else if (slope <= maxSlope) {
+            // If slope below maximum visible slope than cell is hidden
+            ros.add(new Coordinate(currLOSPoint.x, currLOSPoint.y, HIDDEN));
+         }
+         else {
+            // If slope is above maximum visible slope than cell is visible
+            // and its slope  is now the maximum visible slope
+            maxSlope = slope;
+            ros.add(new Coordinate(currLOSPoint.x, currLOSPoint.y, VISIBLE));
+         }
+      }
+
+      return ros;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/RangeOfSight.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/ApproximatedViewshedAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/ApproximatedViewshedAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/ApproximatedViewshedAlgorithm.java	(revision 369)
@@ -0,0 +1,626 @@
+/*******************************************************************************
+ApproximatedViewshedAlgorithm.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.CoordinateArrays;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineSegment;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+/**
+ * Aproximated Viewshed algorithm. Computes visibility region of a watcher using similarity thresholds and interpolations to
+ * reduce the number of computed line-of-sights. Based on the paper "Approximating the visible region of a point on a terrain' by
+ * B. Ben-Moshe, P. Carmi, and M.J. Katz (http://cg.scs.carleton.ca/~paz/papers/radar5-1-04.pdf)
+ * 
+ */
+public class ApproximatedViewshedAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM              = "DEM";
+   public static final String POINT            = "POINT";
+   public static final String HEIGHT           = "HEIGHT";
+   public static final String HEIGHTOBS        = "HEIGHTOBS";
+   public static final String RADIUS           = "RADIUS";
+   public static final String THRESHOLD        = "THRESHOLD";
+   public static final String RESULT           = "RESULT";
+   public static final String VISIBLE_FIELD    = "Visible";
+
+   private IRasterLayer       m_DEM            = null;
+   private IVectorLayer       m_visibilityLayer;
+   private double             m_watcherHeight, m_objectsHeight;
+   double                     m_threshold;
+   private int                m_searchRadius;
+   private double             m_worldSearchRadius;
+   private Coordinate         m_watcherPoint;
+   private GeometryFactory    m_geoFactory;
+
+   // Angles of interpolated cross sections.
+   // Goes from 0.0 (nothing done) to 2*Math.PI (all done)
+   private double             m_finishedAngles = 0.0;
+   private AtomicInteger      m_taskCount;
+
+   private ExecutorService    m_executor;
+   private double             m_minAllowedAngle;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Approximated_Viewshed"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+
+      try {
+         // The DEM
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+
+         // Watcher location
+         m_Parameters.addPoint(POINT, Sextante.getText("Coordinates_of_emitter-receiver"));
+
+         // Height of watcher
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_emitter-receiver"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Height of watched objects
+         m_Parameters.addNumericalValue(HEIGHTOBS, Sextante.getText("Height_of_mobile_receiver-emitter"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Viewing radius
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Viewing radius
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Approximated_viewshed_threshold"), 0.1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Resulting view shed
+         addOutputVectorLayer(RESULT, Sextante.getText("Viewshed_output"), IVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      boolean result = false;
+      try {
+         m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+         // Height of watcher and watched objects
+         m_watcherHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+         m_objectsHeight = m_Parameters.getParameterValueAsDouble(HEIGHTOBS);
+
+         m_threshold = m_Parameters.getParameterValueAsDouble(THRESHOLD);
+
+         m_worldSearchRadius = m_Parameters.getParameterValueAsDouble(RADIUS);
+         m_searchRadius = (int) (m_worldSearchRadius / m_DEM.getLayerCellSize());
+
+         final Point2D watcherPoint = m_Parameters.getParameterValueAsPoint(POINT);
+         m_watcherPoint = new Coordinate(watcherPoint.getX(), watcherPoint.getY());
+
+         // The output raster has the extent of the search radius
+         m_AnalysisExtent = new AnalysisExtent(m_DEM);
+
+         // Set the DEM grid extent to be processed in no search radius is given it is the
+         // whole grid extent - that is the entire DEM
+         if (m_searchRadius > 0) {
+            final double outputXMin = Math.max(m_watcherPoint.x - m_worldSearchRadius, m_AnalysisExtent.getXMin());
+            final double outputXMax = Math.min(m_watcherPoint.x + m_worldSearchRadius, m_AnalysisExtent.getXMax());
+            final double outputYMin = Math.max(m_watcherPoint.y - m_worldSearchRadius, m_AnalysisExtent.getYMin());
+            final double outputYMax = Math.min(m_watcherPoint.y + m_worldSearchRadius, m_AnalysisExtent.getYMax());
+            m_AnalysisExtent.setXRange(outputXMin, outputXMax, true);
+            m_AnalysisExtent.setYRange(outputYMin, outputYMax, true);
+         }
+
+         m_DEM.setWindowExtent(m_AnalysisExtent);
+
+         m_visibilityLayer = getNewVectorLayer(RESULT, Sextante.getText("Viewshed_output"), IVectorLayer.SHAPE_TYPE_POLYGON,
+                  new Class[] { Integer.class }, new String[] { VISIBLE_FIELD });
+
+         m_geoFactory = new GeometryFactory();
+
+         // Perform the visibility calculation
+         result = calculateVisibility();
+
+         result &= !m_Task.isCanceled();
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+      finally {
+         ClearData();
+      }
+
+      return result;
+   }
+
+
+   private void ClearData() {
+      m_DEM = null;
+      m_visibilityLayer = null;
+      m_watcherPoint = null;
+      m_geoFactory = null;
+      m_taskCount = null;
+      m_executor = null;
+   }
+
+
+   private boolean calculateVisibility() {
+
+      try {
+         m_watcherPoint.z = m_DEM.getValueAt(m_watcherPoint.x, m_watcherPoint.y);
+         if (m_DEM.isNoDataValue(m_watcherPoint.z)) {
+            return false;
+         }
+
+         m_minAllowedAngle = new LineSegment(0.0, 0.0, m_worldSearchRadius, m_DEM.getLayerCellSize()).angle();
+
+         // Set elevation and height of watcher
+         m_watcherPoint.z += m_watcherHeight;
+
+         final int STARTING_SLICES = 10;
+         final double alpha = 2 * Math.PI / STARTING_SLICES;
+
+         m_taskCount = new AtomicInteger(0);
+         m_executor = Executors.newFixedThreadPool(java.lang.Runtime.getRuntime().availableProcessors());
+
+         // Add cross section of starting angle size to the working queue
+         for (int sliceIndex = 0; sliceIndex < STARTING_SLICES; sliceIndex++) {
+            final double angle1 = sliceIndex * alpha;
+            final double angle2 = (sliceIndex + 1) * alpha;
+
+            final VisibilityCrossSection crossSection = new VisibilityCrossSection(CreateROS(angle1), CreateROS(angle2), angle1,
+                     angle2);
+            m_taskCount.getAndIncrement();
+            m_executor.execute(new CrossSectionWorker(crossSection));
+         }
+
+         // Wait for completion
+         while ((m_taskCount.get() > 0) && !m_Task.isCanceled()) {
+            synchronized (m_taskCount) {
+               m_taskCount.wait(10);
+            }
+         }
+
+         // Stop the thread pool
+         m_executor.shutdownNow();
+         return true;
+
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+         return false;
+      }
+   }
+
+
+   /**
+    * Create a range of sight - a list of coordinates and their visibility from the watcher.
+    * 
+    * @param angle -
+    *                the angle from the horizon of the range-of-sight
+    * @return - calculated ROS from {@link m_watcherPoint} at angle {@link angle} of distance {@link m_worldSearchRadius}
+    */
+   private List<Coordinate> CreateROS(final double angle) {
+      final Coordinate edgePoint = new Coordinate(m_watcherPoint.x + m_worldSearchRadius * Math.cos(angle), m_watcherPoint.y
+                                                                                                            + m_worldSearchRadius
+                                                                                                            * Math.sin(angle));
+
+      return new RangeOfSight(m_DEM, m_objectsHeight).Calculate(m_watcherPoint, edgePoint);
+   }
+
+
+   /**
+    * Add visibility polygons extrapolated from a slice defined by two range of sights The calculation is based on triangulating
+    * the slice and assigning each triangle the visibility of its closest ROS segment visibility
+    * 
+    * @param firstSliceROS
+    *                First range of sight of extrapolated slice
+    * @param secondSliceROS
+    *                Second range of sight of extrapolated slice
+    * @param mVisibilityLayer
+    *                Polygon layer to add the extrapolated visibility areas
+    */
+   private void extrapolateSliceVisibility(final List<Coordinate> firstSliceROS,
+                                           final List<Coordinate> secondSliceROS) {
+
+      /**
+       * The Idea: consider two range of sights and the area slice between them If we represent the ROS as alternating visibility
+       * segments we wish to divide the slice between them so areas closer to each segment will have its visibility. We therefore
+       * break the range-of-sights to equal length segments and consider each pair of same length: 0. On of the segments is
+       * missing. This may happen when the range-of-sights are of different lengths (due to no-data values). In that case, just
+       * add a triangle made of the existing segment and the last point of the missing segment. 1. If both segments have the same
+       * visibility assign to the whole area between them the same visibility. 2. Otherwise, divide the area to four parts by the
+       * two diagonals. The upper and lower parts will be assigned the visibility of the upper and lower segments respectively.
+       * The left and right parts will be assigned the visibility assigned to previous right and next left parts respectively. 3.
+       * In case of a check board pattern, i.e. (V+NV, NV+V...) instead of cutting be the diagonals we will cut in the middle.
+       * 
+       */
+
+      final EqualLengthVisibilitySegmentQueue visibilitySegmentQueue = new EqualLengthVisibilitySegmentQueue(firstSliceROS,
+               secondSliceROS, m_DEM.getLayerCellSize());
+
+      // The right side polygon of the previous segments area. If not null than it is needed
+      // to be set as the current left part visibility
+      VisibilityPolygon previousRightSidePolygon = null;
+
+      // Upper and lower parts of a split segment area.
+      // We store them so they could be aggregated with the following areas
+      VisibilityPolygon previousUpperPart = null, previousLowerPart = null;
+      VisibilitySegment previousSegment1 = null, previousSegment2 = null;
+      Coordinate previousDiagonalIntersection = null;
+
+      // aggregatedVisiblityPolygon is a union of previous polygons with the same visibility.
+      // We aggregate them as much as we can in order to lower the number of polygons in the
+      // output.
+      VisibilityPolygon aggregatedVisiblityPolygon = null;
+
+      // Go over all segment pairs
+      while (!visibilitySegmentQueue.isEmpty()) {
+         final VisibilityPair pair = visibilitySegmentQueue.poll();
+         final VisibilitySegment segment1 = pair.getFirstSegment();
+         final VisibilitySegment segment2 = pair.getSecondSegment();
+
+         // Case 0: one of the segments is null. This happens when the range-of-sights have
+         // different overall lengths due to no-data values. In that case, add triangle of
+         // the existing segment and the last point of the missing ROS
+         if ((segment1 == null) || (segment2 == null)) {
+
+            final int triangleVisibility = segment1 == null ? segment2.getVisibility() : segment1.getVisibility();
+
+            final VisibilityPolygon triangle = segment1 == null ? CreatePolygon(triangleVisibility, previousSegment1.p1,
+                     segment2.p1, segment2.p0, previousSegment1.p1) : CreatePolygon(triangleVisibility, previousSegment2.p1,
+                     segment1.p1, segment1.p0, previousSegment2.p1);
+
+            if (previousRightSidePolygon != null) {
+               triangle.union(previousRightSidePolygon);
+               if (aggregatedVisiblityPolygon.visibility() == triangle.visibility()) {
+                  aggregatedVisiblityPolygon.union(triangle);
+                  if (previousUpperPart.visibility() != aggregatedVisiblityPolygon.visibility()) {
+                     AddFeature(previousUpperPart);
+                  }
+                  else {
+                     AddFeature(previousLowerPart);
+                  }
+               }
+               else {
+                  AddFeature(aggregatedVisiblityPolygon);
+                  if (previousUpperPart.visibility() == triangle.visibility()) {
+                     triangle.union(previousUpperPart);
+                  }
+                  else {
+                     triangle.union(previousLowerPart);
+                  }
+                  aggregatedVisiblityPolygon = triangle;
+               }
+               previousRightSidePolygon = null;
+            }
+            else {
+               if (aggregatedVisiblityPolygon.visibility() == triangle.visibility()) {
+                  aggregatedVisiblityPolygon.union(triangle);
+               }
+               else {
+                  AddFeature(aggregatedVisiblityPolygon);
+                  aggregatedVisiblityPolygon = triangle;
+               }
+            }
+         }
+         else {
+
+            // Case 1: both segments have the same visibility
+            // This is always the first case, as the first points after the watcher are
+            // always visible
+            if (segment1.getVisibility() == segment2.getVisibility()) {
+               final int rectVisibility = segment1.getVisibility();
+
+               // Make a rectangle (or triangle if segments intersect) of the area between
+               final VisibilityPolygon rect = segment1.p0.equals2D(segment2.p0) ? CreatePolygon(rectVisibility, segment1.p0,
+                        segment1.p1, segment2.p1, segment1.p0) : CreatePolygon(rectVisibility, segment1.p0, segment1.p1,
+                        segment2.p1, segment2.p0, segment1.p0);
+
+               if (aggregatedVisiblityPolygon == null) {
+                  aggregatedVisiblityPolygon = rect;
+               }
+               else {
+                  // Set the visibility of the undefined previous right part
+                  if (previousRightSidePolygon != null) {
+                     rect.union(previousRightSidePolygon);
+                     if (rect.visibility() != aggregatedVisiblityPolygon.visibility()) {
+                        AddFeature(aggregatedVisiblityPolygon);
+                        if (previousUpperPart.visibility() == rect.visibility()) {
+                           rect.union(previousUpperPart);
+                        }
+                        else {
+                           rect.union(previousLowerPart);
+                        }
+                        aggregatedVisiblityPolygon = rect;
+                     }
+                     else {
+                        aggregatedVisiblityPolygon.union(rect);
+                        if (previousUpperPart.visibility() != aggregatedVisiblityPolygon.visibility()) {
+                           AddFeature(previousUpperPart);
+                        }
+                        else {
+                           AddFeature(previousLowerPart);
+                        }
+                     }
+
+                     previousRightSidePolygon = null;
+                  }
+                  else {
+                     if (rect.visibility() == aggregatedVisiblityPolygon.visibility()) {
+                        aggregatedVisiblityPolygon.union(rect);
+                     }
+                     else {
+                        AddFeature(aggregatedVisiblityPolygon);
+                        aggregatedVisiblityPolygon = rect;
+                     }
+                  }
+               }
+            }
+            else {
+               // Case 2: segments have different visibility
+               // Intersect the area between them by the diagonals
+               final LineSegment leftDiagonal = new LineSegment(segment1.p0, segment2.p1);
+               final LineSegment rightDiagonal = new LineSegment(segment1.p1, segment2.p0);
+               final Coordinate diagonalIntersection = leftDiagonal.intersection(rightDiagonal);
+
+               VisibilityPolygon upperPart = CreatePolygon(segment1.getVisibility(), segment1.p0, segment1.p1,
+                        diagonalIntersection, segment1.p0);
+               VisibilityPolygon lowerPart = CreatePolygon(segment2.getVisibility(), segment2.p0, segment2.p1,
+                        diagonalIntersection, segment2.p0);
+               final VisibilityPolygon leftPart = CreatePolygon(-1, segment1.p0, diagonalIntersection, segment2.p0, segment1.p0);
+
+               // No problem setting left part visibility as the previous right side
+               // visibility is well defined
+               if (previousRightSidePolygon == null) {
+                  aggregatedVisiblityPolygon.union(leftPart);
+                  if (upperPart.visibility() == aggregatedVisiblityPolygon.visibility()) {
+                     aggregatedVisiblityPolygon.union(upperPart);
+                     upperPart = aggregatedVisiblityPolygon;
+                  }
+                  else {
+                     aggregatedVisiblityPolygon.union(lowerPart);
+                     lowerPart = aggregatedVisiblityPolygon;
+                  }
+               }
+               else {
+                  // Now there is a problem. We need to set the previous right part by the current
+                  // left part, and the current left part by the previous right part. Note that this
+                  // may happen only on two consecutive dissimilar visibility segments. In that case,
+                  // Cut both parts in half and color each half by the color of its closest segment
+                  // using information of the previous two segments partition
+                  final Coordinate middlePoint = new LineSegment(segment1.p0, segment2.p0).midPoint();
+                  final VisibilityPolygon previousRightPart1 = CreatePolygon(previousSegment1.getVisibility(), segment1.p0,
+                           middlePoint, previousDiagonalIntersection, segment1.p0);
+                  final VisibilityPolygon previousRightPart2 = CreatePolygon(previousSegment2.getVisibility(), segment2.p0,
+                           middlePoint, previousDiagonalIntersection, segment2.p0);
+                  final VisibilityPolygon leftPart1 = CreatePolygon(segment1.getVisibility(), segment1.p0, diagonalIntersection,
+                           middlePoint, segment1.p0);
+                  final VisibilityPolygon leftPart2 = CreatePolygon(segment2.getVisibility(), segment2.p0, diagonalIntersection,
+                           middlePoint, segment2.p0);
+
+                  previousUpperPart.union(previousRightPart1);
+                  previousLowerPart.union(previousRightPart2);
+                  upperPart.union(leftPart1);
+                  lowerPart.union(leftPart2);
+
+                  AddFeature(previousUpperPart);
+                  AddFeature(previousLowerPart);
+
+                  aggregatedVisiblityPolygon = upperPart;
+               }
+
+               // Mark the right side for addition on next segment pair when we will know the
+               // visibility of the left part
+               previousRightSidePolygon = CreatePolygon(-1, segment1.p1, diagonalIntersection, segment2.p1, segment1.p1);
+
+               // Update the previous diagonal intersection
+               previousDiagonalIntersection = diagonalIntersection;
+
+               previousUpperPart = upperPart;
+               previousLowerPart = lowerPart;
+            }
+         }
+
+         previousSegment1 = segment1 != null ? segment1 : previousSegment1;
+         previousSegment2 = segment2 != null ? segment2 : previousSegment2;;
+      }
+
+      // Deal with last right side polygon
+      if (previousRightSidePolygon != null) {
+         aggregatedVisiblityPolygon.union(previousRightSidePolygon);
+         if (previousUpperPart.visibility() != aggregatedVisiblityPolygon.visibility()) {
+            AddFeature(previousUpperPart);
+         }
+         else {
+            AddFeature(previousLowerPart);
+         }
+      }
+
+      // Add the aggregated polygon
+      AddFeature(aggregatedVisiblityPolygon);
+   }
+
+
+   /**
+    * Measure the distance between two range of sights based on XOR (symmetric difference) of visibility segments, normalized to
+    * the minimal length of the two range-of-sights. The normalization returns a number between 0.0 (similar) and 1.0 (different).
+    * In case the two range-of-sights have different lengths we stop comparing when the shortest reaches its end.
+    * 
+    * @param firstSliceROS
+    *                first range of sight of a slice
+    * @param secondSliceROS
+    *                second range of sight of a slice
+    * @return distance between
+    * @param firstSliceROS
+    *                and
+    * @param secondSliceROS
+    */
+   private double SliceDistance(final List<Coordinate> firstSliceROS,
+                                final List<Coordinate> secondSliceROS) {
+
+      final EqualLengthVisibilitySegmentQueue visibilitySegmentQueue = new EqualLengthVisibilitySegmentQueue(firstSliceROS,
+               secondSliceROS, m_DEM.getLayerCellSize());
+
+      double difference = 0.0;
+      double totalLength = 0.0;
+
+      while (!visibilitySegmentQueue.isEmpty()) {
+         final VisibilityPair pair = visibilitySegmentQueue.poll();
+         final VisibilitySegment segment1 = pair.getFirstSegment();
+         final VisibilitySegment segment2 = pair.getSecondSegment();
+
+         // If one ROS reached its end stop comparing difference as one has no more data to compare to
+         if ((segment1 == null) || (segment2 == null)) {
+            break;
+         }
+
+         // add segment length to the total length
+         // (the iterator ensures that both segments have the same length)
+         final double segmentLength = segment1.getLength();
+         totalLength += segmentLength;
+
+         // If the two segments have different visibility, sum the length of the differed segments
+         if (segment1.getVisibility() != segment2.getVisibility()) {
+            difference += segmentLength;
+         }
+      }
+
+      return difference / totalLength;
+   }
+
+
+   private void AddFeature(final VisibilityPolygon poly) {
+      synchronized (m_executor) {
+         m_visibilityLayer.addFeature(poly.polygon(), new Object[] { poly.visibility() });
+      }
+   }
+
+
+   private void updateProgress(final double sliceAngle) {
+      synchronized (m_executor) {
+         m_finishedAngles += sliceAngle;
+         setProgress((int) (m_finishedAngles * 180 / Math.PI), 360);
+      }
+   }
+
+
+   /**
+    * Creates a polygon of the given coordinates
+    * 
+    * @param coordinates
+    *                coordinates of the polygon
+    * @return Polygon encompassing the area of the coordinates
+    */
+   private VisibilityPolygon CreatePolygon(final int visiblity,
+                                           Coordinate... coordinates) {
+
+      // In case the polygon is not close, add the first point as the last
+      if (coordinates[0] != coordinates[coordinates.length - 1]) {
+         final List<Coordinate> coordList = new ArrayList<Coordinate>(coordinates.length + 1);
+         for (final Coordinate coord : coordinates) {
+            coordList.add(coord);
+         }
+         coordList.add(coordinates[0]);
+         coordinates = CoordinateArrays.toCoordinateArray(coordList);
+      }
+
+      final Polygon poly = m_geoFactory.createPolygon(m_geoFactory.createLinearRing(coordinates), null);
+
+      return new VisibilityPolygon(poly, visiblity);
+   }
+
+   private class CrossSectionWorker
+            implements
+               Runnable {
+
+      private final VisibilityCrossSection m_crossSection;
+
+
+      public CrossSectionWorker(final VisibilityCrossSection crossSection) {
+         m_crossSection = crossSection;
+      }
+
+
+      //@Override
+      public void run() {
+
+         final double sliceAngle = m_crossSection.getAngle2() - m_crossSection.getAngle1();
+
+         // If distance between ROS is acceptable or cutting the slice angle will make it
+         // below minimal data angle interpolate the visibility of the slice
+         final double crossSectionDistance = SliceDistance(m_crossSection.getRangeOfSight1(), m_crossSection.getRangeOfSight2());
+         if ((sliceAngle < 2 * m_minAllowedAngle) || (sliceAngle / Math.PI * crossSectionDistance < m_threshold)) {
+            extrapolateSliceVisibility(m_crossSection.getRangeOfSight1(), m_crossSection.getRangeOfSight2());
+
+            // Update progress
+            updateProgress(sliceAngle);
+
+            // Decrement the task count. If this was the last task (all others have
+            // finished and there are no more tasks in the queue) notify the main thread
+            // to finish
+            final int previousWorkCount = m_taskCount.getAndDecrement();
+            if (previousWorkCount == 1) {
+               synchronized (m_taskCount) {
+                  m_taskCount.notify();
+               }
+            }
+         }
+         else {
+            // Otherwise, the cross section's angle is too large. Cut it in half to two
+            // cross sections and add them to working queue
+            final double middleSectionAngle = (m_crossSection.getAngle1() + m_crossSection.getAngle2()) / 2.0;
+            final List<Coordinate> middleROS = CreateROS(middleSectionAngle);
+
+            // increment the work counter to reflect that this task has been split in two
+            m_taskCount.getAndIncrement();
+            final VisibilityCrossSection firstHalf = new VisibilityCrossSection(m_crossSection.getRangeOfSight1(), middleROS,
+                     m_crossSection.getAngle1(), middleSectionAngle);
+            m_executor.execute(new CrossSectionWorker(firstHalf));
+            final VisibilityCrossSection secondHalf = new VisibilityCrossSection(middleROS, m_crossSection.getRangeOfSight2(),
+                     middleSectionAngle, m_crossSection.getAngle2());
+            m_executor.execute(new CrossSectionWorker(secondHalf));
+         }
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/ApproximatedViewshedAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPair.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPair.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPair.java	(revision 369)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+VisibilityPair.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+/**
+ * A pair of visibility segments
+ *
+ */
+class VisibilityPair {
+   private final VisibilitySegment m_firstSegment;
+   private final VisibilitySegment m_secondSegment;
+
+
+   public VisibilityPair(final VisibilitySegment firstROSSegment,
+                         final VisibilitySegment secondROSSegment) {
+      m_firstSegment = firstROSSegment;
+      m_secondSegment = secondROSSegment;
+   }
+
+
+   public VisibilitySegment getFirstSegment() {
+      return m_firstSegment;
+   }
+
+
+   public VisibilitySegment getSecondSegment() {
+      return m_secondSegment;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityPair.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityCrossSection.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityCrossSection.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityCrossSection.java	(revision 369)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+VisibilityCrossSection.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+/**
+ * Represent a slice of the Viewshed between two line of sights
+ *
+ */
+public class VisibilityCrossSection {
+
+   private final List<Coordinate> m_rangeOfSight1;
+   private final List<Coordinate> m_rangeOfSight2;
+   private final double           m_angle1;
+   private final double           m_angle2;
+
+
+   public VisibilityCrossSection(final List<Coordinate> rangeOfSight1,
+                                 final List<Coordinate> rangeOfSight2,
+                                 final double angle1,
+                                 final double angle2) {
+
+      m_rangeOfSight1 = rangeOfSight1;
+      m_rangeOfSight2 = rangeOfSight2;
+      m_angle1 = angle1;
+      m_angle2 = angle2;
+   }
+
+
+   public List<Coordinate> getRangeOfSight1() {
+      return m_rangeOfSight1;
+   }
+
+
+   public List<Coordinate> getRangeOfSight2() {
+      return m_rangeOfSight2;
+   }
+
+
+   public double getAngle1() {
+      return m_angle1;
+   }
+
+
+   public double getAngle2() {
+      return m_angle2;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilityCrossSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/EqualLengthSegmentVisibilityQueue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/EqualLengthSegmentVisibilityQueue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/EqualLengthSegmentVisibilityQueue.java	(revision 369)
@@ -0,0 +1,196 @@
+/*******************************************************************************
+EqualLengthVisibilitySegmentQueue.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+
+/**
+ * EqualLengthVisibilitySegmentQueue acts as a queue which holds two line of sights of a cross section. Upon requesting the next
+ * segments, the queue breaks the two LOSs to equal length segments such that each LOS segment has a uniform visibility. This
+ * class is used therefore to compare the XOR difference between LOSs and interpolate thier cross section visibility polygons.
+ *
+ */
+class EqualLengthVisibilitySegmentQueue
+         extends
+            LinkedList<VisibilityPair> {
+   private static final long        serialVersionUID = 728269644204953666L;
+   private final Deque<VisibilitySegment> m_firstROS;
+   private final Deque<VisibilitySegment> m_secondROS;
+   private final double                   m_cellSize;
+
+
+   public EqualLengthVisibilitySegmentQueue(final List<Coordinate> firstROS,
+                                            final List<Coordinate> secondROS,
+                                            final double cellSize) {
+      m_cellSize = cellSize;
+
+      // Convert range of sights from grid cells to visibility segments
+      m_firstROS = new VisibilitySegmentQueue(firstROS);
+      m_secondROS = new VisibilitySegmentQueue(secondROS);
+   }
+
+
+   @Override
+   public boolean isEmpty() {
+      // Empty if both LOSs are empty
+      return m_firstROS.isEmpty() && m_secondROS.isEmpty();
+   }
+
+
+   @Override
+   public VisibilityPair poll() {
+      // Get the two next LOSs segments. If they are of different length break them to same
+      // length and insert back the leftover part
+
+      final VisibilitySegment firstROSSegment = m_firstROS.poll();
+      final VisibilitySegment secondROSSegment = m_secondROS.poll();
+
+      // If the range-of-sights have different overall length (due to no-data values,
+      // for example) returned the missing segment as null
+      if (firstROSSegment == null || secondROSSegment == null) {
+         return new VisibilityPair(firstROSSegment, secondROSSegment);
+      }
+
+      // Lengths of segments
+      final double firstSegmentLength = firstROSSegment.getLength();
+      final double secondSegmentLength = secondROSSegment.getLength();
+
+      final double segmentComparison = firstSegmentLength - secondSegmentLength;
+
+      // Case 1: the two segments are of the same length or they are the last segments
+      if (Math.abs(segmentComparison) < m_cellSize || (m_firstROS.isEmpty() && m_secondROS.isEmpty())) {
+         return new VisibilityPair(firstROSSegment, secondROSSegment);
+      }
+
+      // Case 2: segments are of different length
+      VisibilitySegment longSegment;
+      double lengthRatio;
+      Deque<VisibilitySegment> longSegmentQueue;
+      boolean isFirstROSShorter;
+
+      // Find shorter segment
+      if (segmentComparison < 0) {
+         isFirstROSShorter = true;
+         lengthRatio = firstSegmentLength / secondSegmentLength;
+         longSegment = secondROSSegment;
+         longSegmentQueue = m_secondROS;
+      }
+      else {
+         isFirstROSShorter = false;
+         lengthRatio = secondSegmentLength / firstSegmentLength;
+         longSegment = firstROSSegment;
+         longSegmentQueue = m_firstROS;
+      }
+
+      // Divide the longer segment to two parts, the first being the same length as the
+      // shorter segment
+      final Coordinate dividingPoint = longSegment.pointAlong(lengthRatio);
+      final VisibilitySegment longSegmentFirstPart = new VisibilitySegment(longSegment.p0, dividingPoint, longSegment.getVisibility());
+      final VisibilitySegment longSegmentSecondPart = new VisibilitySegment(dividingPoint, longSegment.p1, longSegment.getVisibility());
+
+      // Add to the longer segment iterator the part of the segment not covered
+      // by the shorter segment to be processed on next iteration
+      longSegmentQueue.push(longSegmentSecondPart);
+
+      // Return the ROS pair of equal lengths
+      if (isFirstROSShorter) {
+         return new VisibilityPair(firstROSSegment, longSegmentFirstPart);
+      }
+      else {
+         return new VisibilityPair(longSegmentFirstPart, secondROSSegment);
+      }
+   }
+
+   private class VisibilitySegmentQueue
+            extends
+               LinkedList<VisibilitySegment> {
+      private static final long        serialVersionUID = 6999971040518772075L;
+      private final Iterator<Coordinate>     m_inputPoints;
+      private final Deque<VisibilitySegment> m_addedSegments  = new LinkedList<VisibilitySegment>();
+      private Coordinate               m_startPoint;
+
+
+      public VisibilitySegmentQueue(final List<Coordinate> input) {
+         m_inputPoints = input.iterator();
+         m_startPoint = m_inputPoints.next();
+      }
+
+
+      @Override
+      public boolean isEmpty() {
+         // There is a next segment if there is a next point or segments were added
+         return m_addedSegments.isEmpty() && !m_inputPoints.hasNext();
+      }
+
+
+      @Override
+      public int size() {
+         // Unsupported
+         return 0;
+      }
+
+
+      @Override
+      public void push(final VisibilitySegment segment) {
+         m_addedSegments.push(segment);
+      }
+
+
+      @Override
+      public VisibilitySegment poll() {
+
+         // Return added segments if any
+         if (!m_addedSegments.isEmpty()) {
+            final VisibilitySegment segment = m_addedSegments.poll();
+            return segment;
+         }
+
+         if (!m_inputPoints.hasNext()) {
+            return null;
+         }
+
+         // Find the next point with visibility different from the last point
+         // We assume there is a next point (at least one), as isEmpty returned false
+         // and the ROS filtered no data cells
+         Coordinate nextPoint;
+         do {
+            nextPoint = m_inputPoints.next();
+         }
+         while (m_inputPoints.hasNext() && nextPoint.z == m_startPoint.z);
+
+         // Construct segment between start and end points
+         final Coordinate[] lineSegmentCoords = new Coordinate[2];
+         lineSegmentCoords[0] = m_startPoint;
+         lineSegmentCoords[1] = nextPoint;
+
+         final int segmentVisibility = (int) m_startPoint.z;
+
+         // Update last cell to point to the start of the next segment
+         m_startPoint = nextPoint;
+
+         return new VisibilitySegment(lineSegmentCoords[0], lineSegmentCoords[1], segmentVisibility);
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/EqualLengthSegmentVisibilityQueue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/R2ViewshedAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/R2ViewshedAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/R2ViewshedAlgorithm.java	(revision 369)
@@ -0,0 +1,200 @@
+/*******************************************************************************
+R2ViewshedAlgorithm.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.List;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class R2ViewshedAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM       = "DEM";
+   public static final String POINT     = "POINT";
+   public static final String HEIGHT    = "HEIGHT";
+   public static final String HEIGHTOBS = "HEIGHTOBS";
+   public static final String RADIUS    = "RADIUS";
+   public static final String RESULT    = "RESULT";
+
+   private int                m_xCellCount, m_yCellCount;
+   private IRasterLayer       m_DEM     = null;
+   private IRasterLayer       m_visibilityRaster;
+   private GridCell           m_watcherCellPoint;
+   private double             m_watcherHeight, m_objectsHeight;
+   private int                m_searchRadius;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("R2_Viewshed"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setUserCanDefineAnalysisExtent(false); // Output defined by problem !
+
+      try {
+         // The DEM
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+
+         // Watcher location
+         m_Parameters.addPoint(POINT, Sextante.getText("Coordinates_of_emitter-receiver"));
+
+         // Height of watcher
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_emitter-receiver"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Height of watched objects
+         m_Parameters.addNumericalValue(HEIGHTOBS, Sextante.getText("Height_of_mobile_receiver-emitter"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Viewing radius
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+
+         // Resulting view shed
+         addOutputRasterLayer(RESULT, Sextante.getText("Viewshed_output"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+
+      // Height of watcher and watched objects
+      m_watcherHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+      m_objectsHeight = m_Parameters.getParameterValueAsDouble(HEIGHTOBS);
+
+      // Search radius is the number of cells in each direction to consider
+      final double worldSearchRadius = m_Parameters.getParameterValueAsDouble(RADIUS);
+      m_searchRadius = (int) (worldSearchRadius / m_DEM.getLayerCellSize());
+
+      // Position of watcher
+      final Point2D watcherPoint = m_Parameters.getParameterValueAsPoint(POINT);
+
+      // The output raster has the extent of the search radius
+      m_AnalysisExtent = new AnalysisExtent(m_DEM);
+
+      if (m_searchRadius > 0) {
+         final double outputXMin = Math.max(watcherPoint.getX() - worldSearchRadius, m_AnalysisExtent.getXMin());
+         final double outputXMax = Math.min(watcherPoint.getX() + worldSearchRadius, m_AnalysisExtent.getXMax());
+         final double outputYMin = Math.max(watcherPoint.getY() - worldSearchRadius, m_AnalysisExtent.getYMin());
+         final double outputYMax = Math.min(watcherPoint.getY() + worldSearchRadius, m_AnalysisExtent.getYMax());
+         m_AnalysisExtent.setXRange(outputXMin, outputXMax, true);
+         m_AnalysisExtent.setYRange(outputYMin, outputYMax, true);
+         m_AnalysisExtent.enlargeOneCell();// TODO: unnecessary ?
+      }
+      m_DEM.setWindowExtent(m_AnalysisExtent);
+
+      m_visibilityRaster = getNewRasterLayer(RESULT, Sextante.getText("Viewshed_output"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      m_xCellCount = m_DEM.getNX();
+      m_yCellCount = m_DEM.getNY();
+
+      // Cell coordinate of watcher
+      m_watcherCellPoint = m_DEM.getWindowGridExtent().getGridCoordsFromWorldCoords(watcherPoint);
+
+      // Perform the visibility calculation
+      calculateVisibility(m_watcherCellPoint.getX(), m_watcherCellPoint.getY());
+
+      return !m_Task.isCanceled();
+   }
+
+
+   private void calculateVisibility(final int x_Pos,
+                                    final int y_Pos) {
+
+      int iXMin, iYMin;
+      int iXMax, iYMax;
+
+      final double watcherZValue = m_DEM.getCellValueAsDouble(x_Pos, y_Pos);
+      if (m_DEM.isNoDataValue(watcherZValue)) {
+         return;
+      }
+
+      // Set elevation and height of watcher
+      m_watcherCellPoint.setValue(watcherZValue + m_watcherHeight);
+
+      final RangeOfSight rangeOfSight = new RangeOfSight(m_DEM, m_objectsHeight);
+
+      // Gather the grid area to check
+      if (m_searchRadius > 0) {
+         iXMin = Math.max(0, x_Pos - m_searchRadius);
+         iYMin = Math.max(0, y_Pos - m_searchRadius);
+         iXMax = Math.min(m_xCellCount, x_Pos + m_searchRadius);
+         iYMax = Math.min(m_xCellCount, y_Pos + m_searchRadius);
+      }
+      else {
+         iXMin = 0;
+         iXMax = m_xCellCount;
+         iYMin = 0;
+         iYMax = m_yCellCount;
+      }
+
+      // Prepare list of the cells at the edges
+      final List<GridCell> edgeCells = new ArrayList<GridCell>();
+      for (int xIndex = iXMin; xIndex < iXMax; xIndex++) {
+         edgeCells.add(new GridCell(xIndex, iYMin, 0));
+      }
+      for (int yIndex = iYMin + 1; yIndex < iYMax; yIndex++) {
+         edgeCells.add(new GridCell(iXMax - 1, yIndex, 0));
+      }
+      for (int xIndex = iXMax - 2; xIndex >= iXMin; xIndex--) {
+         edgeCells.add(new GridCell(xIndex, iYMax - 1, 0));
+      }
+      for (int yIndex = iYMax - 2; yIndex >= iYMin + 1; yIndex--) {
+         edgeCells.add(new GridCell(iXMin, yIndex, 0));
+      }
+
+      // Draw a line of sight from watcher to each of the edge cells
+      int cellIndex = 0;
+      for (final GridCell edgeCell : edgeCells) {
+         // Update progress
+         setProgress(cellIndex++, edgeCells.size());
+         final List<GridCell> ros = rangeOfSight.Calculate(m_watcherCellPoint, edgeCell, false);
+
+         // Update output raster with visibility data from the range of sight
+         for (final GridCell visibilityCell : ros) {
+            if (Math.pow(visibilityCell.getX() - m_watcherCellPoint.getX(), 2)
+                + Math.pow(visibilityCell.getY() - m_watcherCellPoint.getY(), 2) > Math.pow(m_searchRadius, 2)) {
+               m_visibilityRaster.setCellValue(visibilityCell.getX(), visibilityCell.getY(), m_visibilityRaster.getNoDataValue());
+            }
+            else {
+               m_visibilityRaster.setCellValue(visibilityCell.getX(), visibilityCell.getY(), visibilityCell.getValue());
+            }
+         }
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/R2ViewshedAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilitySegment.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilitySegment.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilitySegment.java	(revision 369)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+VisibilitySegment.java
+Copyright (C) Aviad Segev, 2010
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.lighting.viewshed;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.LineSegment;
+
+/**
+ * A Line segment with added visibility value Visibility may be VISIBLE or HIDDEN
+ *
+ */
+class VisibilitySegment
+         extends
+            LineSegment {
+   private static final long serialVersionUID = -1834372981852774886L;
+   private final int               m_visibility;
+
+
+   public VisibilitySegment(final Coordinate startPoint,
+                            final Coordinate endPoint,
+                            final int visibility) {
+      p0 = startPoint;
+      p1 = endPoint;
+      m_visibility = visibility;
+   }
+
+
+   public int getVisibility() {
+      return m_visibility;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/viewshed/VisibilitySegment.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visualExposure/VisualExposureAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visualExposure/VisualExposureAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visualExposure/VisualExposureAlgorithm.java	(revision 369)
@@ -0,0 +1,234 @@
+package es.unex.sextante.lighting.visualExposure;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class VisualExposureAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM        = "DEM";
+   public static final String FEATURES   = "FEATURES";
+   public static final String WEIGHTS    = "WEIGHTS";
+   public static final String METHOD     = "METHOD";
+   public static final String RADIUS     = "RADIUS";
+   public static final String RESULT     = "RESULT";
+
+   private int                m_iNX, m_iNY;
+   private int                m_iMethod;
+   private int                m_iRadius;
+   private int                m_iRadius2;
+
+   private IRasterLayer       m_Exposure;
+   private IRasterLayer       m_DEM      = null;
+   private IRasterLayer       m_Features = null;
+   private IRasterLayer       m_Weights  = null;
+
+
+   @Override
+   public boolean processAlgorithm() {
+
+      int x, y;
+      double dValue;
+
+      try {
+         m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+         m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+         m_Weights = m_Parameters.getParameterValueAsRasterLayer(WEIGHTS);
+         m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+         m_Exposure = getNewRasterLayer(RESULT, Sextante.getText("Exposure"), IRasterLayer.RASTER_DATA_TYPE_INT);
+
+         //GridExtent extent = m_Exposure.getGridExtent();
+
+         m_DEM.setWindowExtent(getAnalysisExtent());
+         m_Weights.setWindowExtent(getAnalysisExtent());
+         m_Features.setWindowExtent(getAnalysisExtent());
+         m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+         m_iRadius = (int) Math.ceil(m_Parameters.getParameterValueAsDouble("RADIUS") / m_DEM.getWindowCellSize());
+         m_iRadius2 = (int) Math.ceil(Math.pow(m_Parameters.getParameterValueAsDouble("RADIUS"), 2.0)
+                                      / Math.pow(m_DEM.getWindowCellSize(), 2.0));
+
+         m_Exposure.assign(0.0);
+
+         m_iNX = m_DEM.getNX();
+         m_iNY = m_DEM.getNY();
+
+         for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+            for (x = 0; x < m_iNX; x++) {
+               dValue = m_Features.getCellValueAsDouble(x, y);
+               if (!m_Features.isNoDataValue(dValue) && (dValue != 0)) {
+                  if (m_iMethod == 0) {
+                     Irradiate(x, y);
+                  }
+                  else {
+                     Collect(x, y);
+                  }
+               }
+            }
+
+         }
+
+         m_Exposure.setNoDataValue(0.0);
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Irradiate"), Sextante.getText("Colect_values") };
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setName(Sextante.getText("Visual_exposure"));
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Elements"), true);
+         m_Parameters.addInputRasterLayer(WEIGHTS, Sextante.getText("Weight"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), 1000,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Visual_exposure"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void Irradiate(final int x,
+                          final int y) {
+
+      final int i, j;
+      int x2, y2;
+      int dx, dy;
+      int iXMin, iXMax, iYMin, iYMax;
+      double dz, z, z2;
+      final double dWeight = m_Weights.getCellValueAsDouble(x, y);
+
+      z = m_DEM.getCellValueAsDouble(x, y) + m_Features.getCellValueAsDouble(x, y);
+
+      iXMin = Math.max(0, x - m_iRadius);
+      iXMax = Math.min(m_iNX, x + m_iRadius) + 1;
+      iYMin = Math.max(0, y - m_iRadius);
+      iYMax = Math.max(m_iNY, y + m_iRadius) + 1;
+
+      for (y2 = iYMin; y2 < iYMax; y2++) {
+         for (x2 = iXMin; x2 < iXMax; x2++) {
+            dx = x - x2;
+            dy = y - y2;
+            if ((dx * dx + dy * dy) < m_iRadius2) {
+               z2 = m_DEM.getCellValueAsDouble(x2, y2);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  dz = z - z2;
+                  if (tracePoint(x2, y2, dx, dy, dz)) {
+                     m_Exposure.addToCellValue(x2, y2, dWeight);
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void Collect(final int x,
+                        final int y) {
+
+      final int i, j;
+      int x2, y2;
+      int dx, dy;
+      int iXMin, iXMax, iYMin, iYMax;
+      double dz, z, z2;
+
+      z = m_DEM.getCellValueAsDouble(x, y) + m_Features.getCellValueAsDouble(x, y);
+
+      iXMin = Math.max(0, x - m_iRadius);
+      iXMax = Math.min(m_iNX, x + m_iRadius) + 1;
+      iYMin = Math.max(0, y - m_iRadius);
+      iYMax = Math.max(m_iNY, y + m_iRadius) + 1;
+
+      for (y2 = iYMin; y2 < iYMax; y2++) {
+         for (x2 = iXMin; x2 < iXMax; x2++) {
+            dx = x - x2;
+            dy = y - y2;
+            if ((dx * dx + dy * dy) < m_iRadius2) {
+               z2 = m_DEM.getCellValueAsDouble(x2, y2);
+               if (!m_DEM.isNoDataValue(z2)) {
+                  dz = z - z2;
+                  if (tracePoint(x2, y2, dx, dy, dz)) {
+                     m_Exposure.addToCellValue(x, y, m_Weights.getCellValueAsDouble(x2, y2));
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   boolean tracePoint(int x,
+                      int y,
+                      double dx,
+                      double dy,
+                      double dz) {
+
+      double ix, iy, iz, id, d, dist, zmax;
+
+      d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      zmax = m_DEM.getMaxValue();
+
+      if (d > 0) {
+         dist = Math.sqrt(dx * dx + dy * dy);
+
+         dx /= d;
+         dy /= d;
+         dz /= d;
+
+         d = dist / d;
+
+         id = 0.0;
+         ix = x + 0.5;
+         iy = y + 0.5;
+         iz = m_DEM.getCellValueAsDouble(x, y);
+
+         while (id < dist) {
+            id += d;
+
+            ix += dx;
+            iy += dy;
+            iz += dz;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            if (!m_DEM.getWindowGridExtent().containsCell(x, y)) {
+               return true;
+            }
+            else if (iz < m_DEM.getCellValueAsDouble(x, y)) {
+               return false;
+            }
+            else if (iz > zmax) {
+               return true;
+            }
+         }
+      }
+
+      return (true);
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visualExposure/VisualExposureAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/horizonBlockage/HorizonBlockageAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/horizonBlockage/HorizonBlockageAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/horizonBlockage/HorizonBlockageAlgorithm.java	(revision 369)
@@ -0,0 +1,275 @@
+package es.unex.sextante.lighting.horizonBlockage;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class HorizonBlockageAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DEM        = "DEM";
+   public static final String POINT      = "POINT";
+   public static final String HEIGHT     = "HEIGHT";
+   public static final String RADIUS     = "RADIUS";
+
+   public static final String RESULT     = "RESULT";
+   public static final String GRAPHSLOPE = "GRAPHSLOPE";
+   public static final String GRAPHDIST  = "GRAPHDIST";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_DEM      = null;
+   private GridCell           m_Point;
+   private double             m_dHeight;
+   private int                m_iRadius;
+   private IVectorLayer       m_Horizon;
+   private HorizonData[]      m_HorizonData;
+   private double             m_dLineLength;
+
+
+   @Override
+   public boolean processAlgorithm() {
+
+      try {
+
+         m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+         final Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+         m_dHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+
+         final AnalysisExtent gridExtent = new AnalysisExtent(m_DEM);
+         m_DEM.setFullExtent();
+         m_Horizon = getNewVectorLayer(RESULT, Sextante.getText("Horizon"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+                  new Class[] { Integer.class }, new String[] { "ID" });
+
+         m_iRadius = (int) (m_Parameters.getParameterValueAsInt(RADIUS) / gridExtent.getCellSize());
+
+         if (m_iRadius <= 0) {
+            m_iRadius = Integer.MAX_VALUE;
+         }
+
+         m_iNX = m_DEM.getNX();
+         m_iNY = m_DEM.getNY();
+
+         m_Point = gridExtent.getGridCoordsFromWorldCoords(pt);
+
+         m_dLineLength = Math.sqrt(m_iNX * m_iNX + m_iNY * m_iNY);
+
+         calculateHorizon();
+         createResults();
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Horizon_blockage"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addPoint(POINT, Sextante.getText("Coordinates_of_emitter-receiver"));
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_emitter-receiver"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Horizon"), OutputVectorLayer.SHAPE_TYPE_LINE);
+         addOutputChart(GRAPHSLOPE, Sextante.getText("Angle"));
+         addOutputChart(GRAPHDIST, Sextante.getText("Distance"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateHorizon() {
+
+      m_HorizonData = new HorizonData[360];
+
+      for (int i = 0; i < 360; i++) {
+         final GridCell cell = getCellAtAngle(Math.toRadians(i));
+         m_HorizonData[i] = calculateHorizonData(cell);
+      }
+
+   }
+
+
+   private GridCell getCellAtAngle(final double dAngle) {
+
+      final int x = (int) (m_Point.getX() + m_dLineLength * Math.sin(dAngle));
+      final int y = (int) (m_Point.getY() + m_dLineLength * Math.cos(dAngle));
+
+      return new GridCell(x, y, 0);
+
+   }
+
+
+   private HorizonData calculateHorizonData(final GridCell cell) {
+
+      double dx = cell.getX() - m_Point.getX();
+      double dy = cell.getY() - m_Point.getY();
+      double ix, iy, z, id, d, dist;
+      double dMaxDist = 0;
+      int iMaxX = 0, iMaxY = 0;
+      double dSlope, dMaxSlope = Double.NEGATIVE_INFINITY;
+      int x, y;
+
+      z = m_DEM.getCellValueAsDouble(m_Point.getX(), m_Point.getY()) + m_dHeight;
+
+      d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      if (d > 0) {
+         dist = Math.sqrt(dx * dx + dy * dy);
+
+         dx /= d;
+         dy /= d;
+
+         d = dist / d;
+
+         id = 0.0;
+         ix = m_Point.getX() + 0.5;
+         iy = m_Point.getY() + 0.5;
+
+         while (id < dist) {
+            id += d;
+
+            ix += dx;
+            iy += dy;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            if (!m_DEM.getWindowGridExtent().containsCell(x, y) || (id > m_iRadius)) {
+               break;
+            }
+
+            dSlope = (m_DEM.getCellValueAsDouble(x, y) - z) / id;
+            if (dSlope > dMaxSlope) {
+               dMaxSlope = dSlope;
+               dMaxDist = id;
+               iMaxX = x;
+               iMaxY = y;
+            }
+
+         }
+
+      }
+
+      return new HorizonData(dMaxSlope, dMaxDist, iMaxX, iMaxY);
+
+   }
+
+
+   private void createResults() {
+
+      final boolean bFirstPoint = true;
+      double x, y;
+
+      final XYSeriesCollection datasetSlope = new XYSeriesCollection();
+      final XYSeries serieSlope = new XYSeries(Sextante.getText("Angle"));
+      datasetSlope.addSeries(serieSlope);
+
+      final XYSeriesCollection datasetDist = new XYSeriesCollection();
+      final XYSeries serieDist = new XYSeries(Sextante.getText("Distance"));
+      datasetDist.addSeries(serieDist);
+
+      final ArrayList coordinates = new ArrayList();
+
+      for (int i = 0; i < m_HorizonData.length; i++) {
+         final double dAngle = Math.toDegrees(Math.atan(m_HorizonData[i].dAngle));
+         serieDist.add(i, m_HorizonData[i].dDistance);
+         serieSlope.add(i, dAngle);
+         x = m_HorizonData[i].x;
+         y = m_HorizonData[i].y;
+         if ((x != 0) || (y != 0)) {
+            final Point2D pt = m_DEM.getWindowGridExtent().getWorldCoordsFromGridCoords(new GridCell((int) x, (int) y, 0));
+            x = pt.getX();
+            y = pt.getY();
+            coordinates.add(new Coordinate(x, y));
+         }
+
+      }
+
+      final JFreeChart chartSlope = ChartFactory.createXYLineChart(null, null, null, datasetSlope, PlotOrientation.VERTICAL,
+               false, true, true);
+
+      final ChartPanel jPanelChartSlope = new ChartPanel(chartSlope);
+      jPanelChartSlope.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChartSlope.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChartSlope.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart("GRAPHSLOPE", Sextante.getText("Angle"), jPanelChartSlope);
+
+      final JFreeChart chartDist = ChartFactory.createXYLineChart(null, null, null, datasetDist, PlotOrientation.VERTICAL, false,
+               true, true);
+
+      final ChartPanel jPanelChartDist = new ChartPanel(chartDist);
+      jPanelChartDist.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChartDist.setPreferredSize(new java.awt.Dimension(500, 300));
+      jPanelChartDist.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+      addOutputChart("GRAPHDIST", Sextante.getText("Distance"), jPanelChartDist);
+
+      final Object value[] = new Object[1];
+      value[0] = new Integer(1);
+
+      final Coordinate[] coords = new Coordinate[coordinates.size()];
+      for (int i = 0; i < coords.length; i++) {
+         coords[i] = (Coordinate) coordinates.get(i);
+      }
+      m_Horizon.addFeature(new GeometryFactory().createLineString(coords), value);
+
+   }
+
+   private class HorizonData {
+
+      HorizonData(final double dA,
+                  final double dD,
+                  final int iX,
+                  final int iY) {
+
+         dAngle = dA;
+         dDistance = dD;
+         x = iX;
+         y = iY;
+
+      }
+
+      public int    x, y;
+      public double dAngle    = 0;
+      public double dDistance = 0;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/horizonBlockage/HorizonBlockageAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visibility/VisibilityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visibility/VisibilityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visibility/VisibilityAlgorithm.java	(revision 369)
@@ -0,0 +1,250 @@
+package es.unex.sextante.lighting.visibility;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class VisibilityAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  DEM           = "DEM";
+   public static final String  POINT         = "POINT";
+   public static final String  METHOD        = "METHOD";
+   public static final String  HEIGHT        = "HEIGHT";
+   public static final String  HEIGHTOBS     = "HEIGHTOBS";
+   public static final String  RADIUS        = "RADIUS";
+   public static final String  RESULT        = "RESULT";
+
+   private static final double DEG_90_IN_RAD = Math.toRadians(90);
+
+   private int                 m_iNX, m_iNY;
+   private IRasterLayer        m_DEM         = null;
+   private IRasterLayer        m_Visibility;
+   private GridCell            m_Point;
+   private double              m_dHeight, m_dHeightObs;
+   private int                 m_iMethod;
+   private int                 m_iRadius, m_iRadius2;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iDataType;
+
+      m_iMethod = m_Parameters.getParameterValueAsInt("METHOD");
+      if (m_iMethod == 0) {
+         iDataType = IRasterLayer.RASTER_DATA_TYPE_INT;
+      }
+      else {
+         iDataType = IRasterLayer.RASTER_DATA_TYPE_FLOAT;
+      }
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      m_dHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+      m_dHeightObs = m_Parameters.getParameterValueAsDouble(HEIGHTOBS);
+
+      m_DEM.setWindowExtent(getAnalysisExtent());
+      m_Visibility = getNewRasterLayer(RESULT, Sextante.getText("Visibility"), iDataType);
+
+      m_iRadius = (int) (m_Parameters.getParameterValueAsInt(RADIUS) / m_DEM.getWindowCellSize());
+      m_iRadius2 = m_iRadius * m_iRadius;
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      m_Point = m_DEM.getWindowGridExtent().getGridCoordsFromWorldCoords(pt);
+
+      calculateVisibility(m_Point.getX(), m_Point.getY());
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Visibility"), Sextante.getText("Lighting"), Sextante.getText("Distance"),
+               Sextante.getText("Height") };
+
+      setName(Sextante.getText("Visibility"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addPoint(POINT, Sextante.getText("Coordinates_of_emitter-receiver"));
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_emitter-receiver"), 10,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(HEIGHTOBS, Sextante.getText("Height_of_mobile_receiver-emitter"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(RADIUS, Sextante.getText("Radius"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Visibility"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void calculateVisibility(final int x_Pos,
+                                    final int y_Pos) {
+
+      int x, y;
+      int dx, dy;
+      int iXMin, iYMin;
+      int iXMax, iYMax;
+      int iDist;
+      double z;
+      double z_Pos, aziDTM, decDTM, aziSrc, decSrc, d, dz;
+      final double Exaggeration = 1.0;
+
+      z_Pos = m_DEM.getCellValueAsDouble(x_Pos, y_Pos);
+      if (m_DEM.isNoDataValue(z_Pos)) {
+         return;
+      }
+
+      z_Pos += m_dHeight;
+
+      if (m_iRadius > 0) {
+         iXMin = Math.max(0, x_Pos - m_iRadius);
+         iYMin = Math.max(0, y_Pos - m_iRadius);
+         iXMax = Math.min(m_iNX, x_Pos + m_iRadius);
+         iYMax = Math.min(m_iNY, y_Pos + m_iRadius);
+      }
+      else {
+         iXMin = 0;
+         iXMax = m_iNX;
+         iYMin = 0;
+         iYMax = m_iNY;
+      }
+
+      for (y = iYMin; (y < iYMax) && setProgress(y, m_iNY); y++) {
+         for (x = iXMin; x < iXMax; x++) {
+            dx = x_Pos - x;
+            dy = y_Pos - y;
+            iDist = dx * dx + dy * dy;
+            if ((iDist < m_iRadius2) || (m_iRadius2 <= 0)) {
+               z = m_DEM.getCellValueAsDouble(x, y) + m_dHeightObs;
+               if (m_DEM.isNoDataValue(z)) {
+                  m_Visibility.setNoData(x, y);
+               }
+               else {
+                  dz = z_Pos - z;
+                  if (tracePoint(x, y, dx, dy, dz)) {
+                     switch (m_iMethod) {
+                        case 0: // Visibility
+                           m_Visibility.setCellValue(x, y, 1);
+                           break;
+                        case 1: // Shade
+                           decDTM = m_DEM.getSlope(x, y);
+                           aziDTM = m_DEM.getAspect(x, y);
+                           decDTM = DEG_90_IN_RAD - Math.atan(Exaggeration * Math.tan(decDTM));
+
+                           decSrc = Math.atan2(dz, Math.sqrt(dx * dx + dy * dy));
+                           aziSrc = Math.atan2(dx, dy);
+
+                           d = Math.acos(Math.sin(decDTM) * Math.sin(decSrc) + Math.cos(decDTM) * Math.cos(decSrc)
+                                         * Math.cos(aziDTM - aziSrc));
+
+                           m_Visibility.setCellValue(x, y, d < DEG_90_IN_RAD ? d : DEG_90_IN_RAD);
+                           break;
+                        case 2: // Distance
+                           m_Visibility.setCellValue(x, y, m_DEM.getWindowCellSize() * Math.sqrt(dx * dx + dy * dy));
+                           break;
+                        case 3: // Size
+                           if ((d = m_DEM.getWindowCellSize() * Math.sqrt(dx * dx + dy * dy)) > 0.0) {
+                              m_Visibility.setCellValue(x, y, Math.atan2(m_dHeight, d));
+                           }
+                           else {
+                              m_Visibility.setNoData(x, y);
+                           }
+                           break;
+                     }
+                  }
+
+                  else {
+                     switch (m_iMethod) {
+                        case 0: // Visibility
+                           m_Visibility.setCellValue(x, y, 0);
+                           break;
+                        case 1: // Shade
+                           m_Visibility.setCellValue(x, y, DEG_90_IN_RAD);
+                           break;
+                        case 2: // Distance
+                        case 3: // Size
+                           m_Visibility.setNoData(x, y);
+                           break;
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   boolean tracePoint(int x,
+                      int y,
+                      double dx,
+                      double dy,
+                      double dz) {
+
+      double ix, iy, iz, id, d, dist, zmax;
+
+      d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      zmax = m_DEM.getMaxValue();
+
+      if (d > 0) {
+         dist = Math.sqrt(dx * dx + dy * dy);
+
+         dx /= d;
+         dy /= d;
+         dz /= d;
+
+         d = dist / d;
+
+         id = 0.0;
+         ix = x + 0.5;
+         iy = y + 0.5;
+         iz = m_DEM.getCellValueAsDouble(x, y);
+
+         while (id < dist) {
+            id += d;
+
+            ix += dx;
+            iy += dy;
+            iz += dz;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            if (!m_DEM.getWindowGridExtent().containsCell(x, y)) {
+               return true;
+            }
+            else if (iz < m_DEM.getCellValueAsDouble(x, y)) {
+               return false;
+            }
+            else if (iz > zmax) {
+               return true;
+            }
+         }
+      }
+
+      return (true);
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/visibility/VisibilityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationAlgorithm.java	(revision 369)
@@ -0,0 +1,418 @@
+package es.unex.sextante.lighting.solarRadiation;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class SolarRadiationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  DEM           = "DEM";
+   public static final String  SOLARCONST    = "SOLARCONST";
+   public static final String  METHOD        = "METHOD";
+   public static final String  TRANSMITTANCE = "TRANSMITTANCE";
+   public static final String  PRESSURE      = "PRESSURE";
+   public static final String  HOURSTEP      = "HOURSTEP";
+   public static final String  DAILYSTEP     = "DAILYSTEP";
+   public static final String  WATER         = "WATER";
+   public static final String  DUST          = "DUST";
+   public static final String  LATITUDE      = "LATITUDE";
+   public static final String  INITMONTH     = "INITMONTH";
+   public static final String  INITDAY       = "INITDAY";
+   public static final String  ENDMONTH      = "ENDMONTH";
+   public static final String  ENDDAY        = "ENDDAY";
+   public static final String  RADIATION     = "RADIATION";
+   public static final String  TIME          = "TIME";
+
+   private static final double DEG_90_IN_RAD = Math.toRadians(90);
+
+   int                         m_iNX, m_iNY;
+   int                         m_iMethod;
+   double                      m_SolarConstant;
+   double                      m_Transmittance;
+   double                      m_Water;
+   double                      m_Dust;
+   double                      m_Pressure;
+   double                      m_dAzimuth, m_dHeight;
+   double                      m_dRDIRN, m_dRDIFN;
+   IRasterLayer                m_Radiation, m_RadiationDaily;
+   IRasterLayer                m_Duration, m_DurationDaily;
+   IRasterLayer                m_Sum;
+   IRasterLayer                m_DEM         = null;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Global_atmospheric_transmittance"),
+               Sextante.getText("Calculate_components_separately") };
+      final String[] sMonths = { Sextante.getText("January"), Sextante.getText("February"), Sextante.getText("March"),
+               Sextante.getText("April"), Sextante.getText("May"), Sextante.getText("June"), Sextante.getText("July"),
+               Sextante.getText("August"), Sextante.getText("September"), Sextante.getText("October"),
+               Sextante.getText("November"), Sextante.getText("December") };
+      String[] sDays;
+
+      int i;
+
+      sDays = new String[31];
+      for (i = 1; i < 32; i++) {
+         sDays[i - 1] = Integer.toString(i);
+      }
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setName(Sextante.getText("Solar_radiation"));
+
+      try {
+
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addNumericalValue(SOLARCONST, Sextante.getText("Solar_constant_[W-m\u00b2]"), 1367,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(TRANSMITTANCE, Sextante.getText("Global_transmittance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 70.0, 0.0, 100.0);
+         m_Parameters.addNumericalValue(PRESSURE, Sextante.getText("Atmospheric_pressure_[mb]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1013.0, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(WATER, Sextante.getText("Atmospheric_water_content_[cm]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.68, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(DUST, Sextante.getText("Dust_[ppm]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100.0, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(LATITUDE, Sextante.getText("Latitude"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 41.0, -90.0, 90.0);
+         m_Parameters.addNumericalValue(HOURSTEP, Sextante.getText("Interval_for_daily_insolation_[h]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.0, 0.001, 12.0);
+         m_Parameters.addNumericalValue(DAILYSTEP, Sextante.getText("Interval_for_global_insolation_[days]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.0, 1, 100);
+         m_Parameters.addSelection(INITMONTH, Sextante.getText("Starting_month"), sMonths);
+         m_Parameters.addSelection(INITDAY, Sextante.getText("Starting_day"), sDays);
+         m_Parameters.addSelection(ENDMONTH, Sextante.getText("Ending_month"), sMonths);
+         m_Parameters.addSelection(ENDDAY, Sextante.getText("Ending_day"), sDays);
+         addOutputRasterLayer(RADIATION, Sextante.getText("Solar_radiation"));
+         addOutputRasterLayer(TIME, Sextante.getText("Insolation_time"));
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int Month2Day[] = { 0, 31, 49, 80, 109, 140, 170, 201, 232, 272, 303, 333 };
+      int Day_Step, Day_Start, Day_Stop;
+      double Latitude;
+      double Hour_Step, Hour_Start, Hour_Stop;
+
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_SolarConstant = m_Parameters.getParameterValueAsDouble(SOLARCONST) / 1000.0;
+      m_Transmittance = m_Parameters.getParameterValueAsDouble(TRANSMITTANCE) / 100.0;
+      m_Pressure = m_Parameters.getParameterValueAsDouble(PRESSURE);
+      m_Water = m_Parameters.getParameterValueAsDouble(WATER);
+      m_Dust = m_Parameters.getParameterValueAsDouble(DUST);
+
+      Latitude = Math.toRadians(m_Parameters.getParameterValueAsDouble(LATITUDE));
+      Day_Step = m_Parameters.getParameterValueAsInt(DAILYSTEP);
+      Hour_Step = m_Parameters.getParameterValueAsDouble(HOURSTEP);
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_Radiation = getNewRasterLayer(RADIATION, Sextante.getText("Solar_radiation"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      m_Duration = getNewRasterLayer(TIME, Sextante.getText("Insolation_time"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+      final AnalysisExtent extent = m_Radiation.getWindowGridExtent();
+      m_RadiationDaily = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      m_DurationDaily = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_FLOAT, extent);
+      m_DEM.setWindowExtent(extent);
+
+      m_iNX = m_DEM.getNX();
+      m_iNY = m_DEM.getNY();
+
+      Hour_Start = 0;
+      Hour_Stop = 24;
+      Day_Start = m_Parameters.getParameterValueAsInt(INITDAY) + Month2Day[m_Parameters.getParameterValueAsInt(INITMONTH)];
+      Day_Stop = m_Parameters.getParameterValueAsInt(ENDDAY) + Month2Day[m_Parameters.getParameterValueAsInt(ENDMONTH)];
+
+      executeSumOfDays(Latitude, Hour_Step, Hour_Start, Hour_Stop, Day_Step, Day_Start, Day_Stop);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void executeSumOfDays(final double Latitude_RAD,
+                                 final double Hour_Step,
+                                 final double Hour_Start,
+                                 final double Hour_Stop,
+                                 int Day_Step,
+                                 final int Day_Start,
+                                 final int Day_Stop) {
+
+      int Day, nDays;
+
+      nDays = Day_Stop - Day_Start;
+
+      if ((Day_Step < 1) || (Day_Step > nDays)) {
+         Day_Step = 1;
+      }
+
+      for (Day = Day_Start; (Day < Day_Stop) && !m_Task.isCanceled(); Day += Day_Step) {
+
+         setProgressText(Sextante.getText("Calculating_day") + Integer.toString(Day - Day_Start + 1) + Sextante.getText("de")
+                         + Integer.toString(nDays));
+
+         getDailySum(Latitude_RAD, Hour_Step, Hour_Start, Hour_Stop, Day);
+
+         m_RadiationDaily.multiply(Day_Step);
+         m_Radiation.add(m_RadiationDaily);
+
+         m_DurationDaily.multiply(Day_Step);
+         m_Duration.add(m_DurationDaily);
+
+      }
+
+      if ((Day_Step = Day_Stop - Day) > 0) {
+
+         getDailySum(Latitude_RAD, Hour_Step, Hour_Start, Hour_Stop, Day);
+
+         m_RadiationDaily.multiply(Day_Step);
+         m_Radiation.add(m_RadiationDaily);
+
+         m_DurationDaily.multiply(Day_Step);
+         m_Duration.add(m_DurationDaily);
+
+      }
+   }
+
+
+   private void getDailySum(final double Latitude_RAD,
+                            final double Hour_Step,
+                            double Hour_Start,
+                            final double Hour_Stop,
+                            int Day) {
+
+      int x, y;
+      double time, Solar_Angle, d;
+
+      Day %= 366;
+
+      if (Day < 0) {
+         Day += 366;
+      }
+
+      Hour_Start += Hour_Step / 2.0;
+
+      m_RadiationDaily.assign(0.0);
+      m_DurationDaily.assign(0.0);
+
+      for (time = Hour_Start; (time < Hour_Stop) && setProgress((int) (time - Hour_Start), (int) (Hour_Stop - Hour_Start)); time += Hour_Step) {
+         if (getSolarPosition(Day, time, Latitude_RAD, 0.0, false)) {
+            rayTrace();
+            for (y = 0; y < m_iNY; y++) {
+               for (x = 0; x < m_iNX; x++) {
+                  Solar_Angle = m_RadiationDaily.getCellValueAsDouble(x, y);
+                  if (!m_RadiationDaily.isNoDataValue(Solar_Angle)) {
+                     if (Solar_Angle < DEG_90_IN_RAD) {
+                        getSolarCorrection(DEG_90_IN_RAD - m_dHeight, m_DEM.getCellValueAsDouble(x, y));
+                        d = m_SolarConstant * Hour_Step * m_dRDIRN * Math.cos(Solar_Angle);
+                        m_RadiationDaily.addToCellValue(x, y, d);
+                        m_DurationDaily.addToCellValue(x, y, Hour_Step);
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+
+   void getSolarCorrection(final double ZenithAngle,
+                           final double Elevation) {
+
+      final double AM[] = // AM    Optical air mass in 1 degree increments for zenith angles >=60 [after LIST, 1968; p. 422]
+      { 2.00, 2.06, 2.12, 2.19, 2.27, 2.36, 2.45, 2.55, 2.65, 2.77, 2.90, 3.05, 3.21, 3.39, 3.59, 3.82, 4.07, 4.37, 4.72, 5.12,
+               5.60, 6.18, 6.88, 7.77, 8.90, 10.39, 12.44, 15.36, 19.79, 26.96, 26.96, 26.96 };
+
+      final double Pressure_0 = 1013.0; // Standard atmospheric pressure = 1013 mb
+
+      int i;
+      double z, AMASS, AMASS2, AW, TW, TD, TDC;
+
+      z = Math.toDegrees(ZenithAngle);
+
+      if (z <= 60.0) {
+         AMASS = 1.0 / Math.cos(ZenithAngle);
+      }
+      else {
+         z -= 60.0;
+         i = (int) z;
+         AMASS = AM[i] + (z - i) * (AM[i + 1] - AM[i]);
+      }
+
+      z = m_Pressure / Math.pow(10.0, Elevation * 5.4667E-05); // P     Barometric pressure in mb
+      AMASS2 = AMASS * z / Pressure_0;
+
+      switch (m_iMethod) {
+         case 0:
+         default:
+            m_dRDIRN = Math.pow(m_Transmittance, AMASS2);
+            m_dRDIFN = 0.271 - 0.294 * m_dRDIRN;
+            break;
+
+         case 1:
+            AW = 1.0 - 0.077 * Math.pow(m_Water * AMASS2, 0.3); // AW    Accounts for absorption by water vapour
+            TW = Math.pow(0.975, m_Water * AMASS); // TW    Accounts for scattering by water vapour
+            TD = Math.pow(0.950, m_Water * m_Dust / 100.0); // TD    Accounts for scattering by dust
+            TDC = Math.pow(0.900, AMASS2) + 0.026 * (AMASS2 - 1.0); // TDC   Accounts for scattering by a dust free atmosphere
+
+            m_dRDIRN = AW * TW * TD * TDC;
+            m_dRDIFN = 0.5 * (AW - m_dRDIRN);
+            break;
+      }
+
+   }
+
+
+   //////////////////////////////////////////////////////////	/
+   //															 //
+   //						Solar Position						 //
+   //															 //
+   //////////////////////////////////////////////////////////	/
+
+   //	---------------------------------------------------------
+   private boolean getSolarPosition(int Day,
+                                    final double Time,
+                                    final double LAT,
+                                    final double LON,
+                                    final boolean bDegree) {
+
+      final int Day2Month[] = { 0, 31, 49, 80, 109, 140, 170, 201, 232, 272, 303, 333, 366 };
+
+      final double ECLIPTIC_OBL = Math.toRadians(23.43999); // obliquity of ecliptic
+
+      int i;
+
+      double JD, T, M, L, X, Y, Z, R, UTime, DEC, RA, theta, tau, Month, Year = 2000;
+
+      for (Month = 1, i = 0; i <= 12; i++) {
+         if (Day < Day2Month[i]) {
+            Month = i;
+            Day -= Day2Month[i - 1];
+            break;
+         }
+      }
+
+      if ((Month < 1) || (Month > 12)) {
+         Month = 1;
+      }
+
+      if (Month <= 2) {
+         Month += 12;
+         Year -= 1;
+      }
+
+      UTime = Time - LON * 12.0 / Math.PI;
+
+      //-----------------------------------------------------
+      // 1. Julian Date...
+
+      JD = (int) (365.25 * Year) + (int) (30.6001 * (Month + 1)) - 15 + 1720996.5 + Day + UTime / 24.0;
+      T = (JD - 2451545.0) / 36525.0; // number of Julian centuries since 2000/01/01 at 12 UT (JD = 2451545.0)
+
+      //-----------------------------------------------------
+      // 2. Solar Coordinates (according to: Jean Meeus: Astronomical Algorithms), accuracy of 0.01 degree
+
+      M = Math.toRadians(357.52910 + 35999.05030 * T - 0.0001559 * T * T - 0.00000048 * T * T * T); // mean anomaly
+      L = Math.toRadians((280.46645 + 36000.76983 * T + 0.0003032 * T * T) // mean longitude
+                         + ((1.914600 - 0.004817 * T - 0.000014 * T * T) * Math.sin(M) + (0.019993 - 0.000101 * T)
+                            * Math.sin(2 * M) + 0.000290 * Math.sin(3 * M) // true longitude
+                         ));
+
+      //-----------------------------------------------------
+      // 3. convert ecliptic longitude to right ascension RA and declination delta
+
+      X = Math.cos(L);
+      Y = Math.cos(ECLIPTIC_OBL) * Math.sin(L);
+      Z = Math.sin(ECLIPTIC_OBL) * Math.sin(L);
+      R = Math.sqrt(1.0 - Z * Z);
+
+      DEC = Math.atan2(Z, R);
+      RA = 2 * Math.atan2(Y, (X + R));
+
+      //-----------------------------------------------------
+      // 4. compute sidereal time (degree) at Greenwich local sidereal time at longitude (�E)
+
+      theta = LON + Math.toRadians(280.46061837 + 360.98564736629 * (JD - 2451545.0) + T * T * (0.000387933 - T / 38710000.0));
+
+      //-----------------------------------------------------
+      // 5. compute local hour angle (degree)
+
+      tau = theta - RA;
+
+      //-----------------------------------------------------
+      // 6. convert (tau, delta) to horizon coordinates (h, az) of the observer
+
+      m_dHeight = Math.asin(Math.sin(LAT) * Math.sin(DEC) + Math.cos(LAT) * Math.cos(DEC) * Math.cos(tau));
+      m_dAzimuth = Math.atan2(-Math.sin(tau) * Math.cos(DEC), Math.cos(LAT) * Math.sin(DEC) - Math.sin(LAT) * Math.cos(DEC)
+                                                              * Math.cos(tau));
+
+      if (bDegree) {
+         m_dHeight = Math.toDegrees(m_dHeight);
+         m_dAzimuth = Math.toDegrees(m_dAzimuth);
+      }
+
+      return (m_dHeight >= 0.0);
+   }
+
+
+   private void getShading() {
+
+      int iNX, iNY;
+      int x, y;
+      double dSlope;
+      double dAspect;
+      double dShading;
+      double dSinDec, dCosDec;
+
+      iNX = m_DEM.getNX();
+      iNY = m_DEM.getNY();
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            dSlope = m_DEM.getSlope(x, y);
+            dAspect = m_DEM.getAspect(x, y);
+            if (!m_DEM.isNoDataValue(dSlope) && !m_DEM.isNoDataValue(dAspect)) {
+               dSinDec = Math.sin(m_dHeight);
+               dCosDec = Math.cos(m_dHeight);
+               dSlope = Math.tan(dSlope);
+               dShading = DEG_90_IN_RAD - Math.atan(dSlope);
+               dShading = Math.acos(Math.sin(dShading) * dSinDec + Math.cos(dShading) * dCosDec * Math.cos(dAspect - m_dAzimuth));
+
+               if (dShading > DEG_90_IN_RAD) {
+                  dShading = DEG_90_IN_RAD;
+               }
+
+               m_RadiationDaily.setCellValue(x, y, dShading);
+            }
+            else {
+               m_RadiationDaily.setNoData(x, y);
+            }
+         }
+      }
+
+   }
+
+
+   private void rayTrace() {
+
+      getShading();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationBuildingsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationBuildingsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationBuildingsAlgorithm.java	(revision 369)
@@ -0,0 +1,513 @@
+
+
+package es.unex.sextante.lighting.solarRadiation;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+
+public class SolarRadiationBuildingsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  DEM           = "DEM";
+   public static final String  BUILDINGS     = "BUILDING";
+   public static final String  SOLARCONST    = "SOLARCONST";
+   public static final String  METHOD        = "METHOD";
+   public static final String  TRANSMITTANCE = "TRANSMITTANCE";
+   public static final String  PRESSURE      = "PRESSURE";
+   public static final String  HOURSTEP      = "HOURSTEP";
+   public static final String  DAILYSTEP     = "DAILYSTEP";
+   public static final String  WATER         = "WATER";
+   public static final String  DUST          = "DUST";
+   public static final String  LATITUDE      = "LATITUDE";
+   public static final String  INITMONTH     = "INITMONTH";
+   public static final String  INITDAY       = "INITDAY";
+   public static final String  ENDMONTH      = "ENDMONTH";
+   public static final String  ENDDAY        = "ENDDAY";
+   public static final String  RADIATION     = "RADIATION";
+   public static final String  TIME          = "TIME";
+   public static final String  OUTPUT        = "OUTPUT";
+
+   private static final double DEG_90_IN_RAD = Math.toRadians(90);
+   private static final String FIELD_NAME    = "HEIGHT";
+   private static final double SHADED        = -1;
+
+   int                         m_iNX, m_iNY;
+   int                         m_iMethod;
+   double                      m_SolarConstant;
+   double                      m_Transmittance;
+   double                      m_Water;
+   double                      m_Dust;
+   double                      m_Pressure;
+   double                      m_dAzimuth, m_dHeight;
+   double                      m_dRDIRN, m_dRDIFN;
+   double                      m_dRadiation, m_dRadiationDaily;
+   double                      m_dDuration, m_dDurationDaily;
+   IRasterLayer                m_DEM         = null;
+   private Coordinate[]        m_Coords;
+   private IVectorLayer        m_Output;
+   private double              m_dBuildingHeight;
+   private IRasterLayer        m_ModifiedDEM;
+   private IVectorLayer        m_Buildings;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Global_atmospheric_transmittance"),
+               Sextante.getText("Calculate_components_separately") };
+      final String[] sMonths = { Sextante.getText("January"), Sextante.getText("February"), Sextante.getText("March"),
+               Sextante.getText("April"), Sextante.getText("May"), Sextante.getText("June"), Sextante.getText("July"),
+               Sextante.getText("August"), Sextante.getText("September"), Sextante.getText("October"),
+               Sextante.getText("November"), Sextante.getText("December") };
+      String[] sDays;
+
+      int i;
+
+      sDays = new String[31];
+      for (i = 1; i < 32; i++) {
+         sDays[i - 1] = Integer.toString(i);
+      }
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+      setName(Sextante.getText("Solar_radiation_buildings"));
+
+      try {
+
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addInputVectorLayer(BUILDINGS, Sextante.getText("Buildings"), IVectorLayer.SHAPE_TYPE_POLYGON, true);
+         m_Parameters.addNumericalValue(SOLARCONST, Sextante.getText("Solar_constant_[W-m\u00b2]"), 1367,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(TRANSMITTANCE, Sextante.getText("Global_transmittance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 70.0, 0.0, 100.0);
+         m_Parameters.addNumericalValue(PRESSURE, Sextante.getText("Atmospheric_pressure_[mb]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1013.0, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(WATER, Sextante.getText("Atmospheric_water_content_[cm]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.68, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(DUST, Sextante.getText("Dust_[ppm]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100.0, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(LATITUDE, Sextante.getText("Latitude"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 41.0, -90.0, 90.0);
+         m_Parameters.addNumericalValue(HOURSTEP, Sextante.getText("Interval_for_daily_insolation_[h]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.0, 0.001, 12.0);
+         m_Parameters.addNumericalValue(DAILYSTEP, Sextante.getText("Interval_for_global_insolation_[days]"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.0, 1, 100);
+         m_Parameters.addSelection(INITMONTH, Sextante.getText("Starting_month"), sMonths);
+         m_Parameters.addSelection(INITDAY, Sextante.getText("Starting_day"), sDays);
+         m_Parameters.addSelection(ENDMONTH, Sextante.getText("Ending_month"), sMonths);
+         m_Parameters.addSelection(ENDDAY, Sextante.getText("Ending_day"), sDays);
+         addOutputVectorLayer(OUTPUT, Sextante.getText("Result"));
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int Month2Day[] = { 0, 31, 49, 80, 109, 140, 170, 201, 232, 272, 303, 333 };
+      int Day_Step, Day_Start, Day_Stop;
+      double Latitude;
+      double Hour_Step, Hour_Start, Hour_Stop;
+
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_SolarConstant = m_Parameters.getParameterValueAsDouble(SOLARCONST) / 1000.0;
+      m_Transmittance = m_Parameters.getParameterValueAsDouble(TRANSMITTANCE) / 100.0;
+      m_Pressure = m_Parameters.getParameterValueAsDouble(PRESSURE);
+      m_Water = m_Parameters.getParameterValueAsDouble(WATER);
+      m_Dust = m_Parameters.getParameterValueAsDouble(DUST);
+      m_Buildings = m_Parameters.getParameterValueAsVectorLayer(BUILDINGS);
+
+      Latitude = Math.toRadians(m_Parameters.getParameterValueAsDouble(LATITUDE));
+      Day_Step = m_Parameters.getParameterValueAsInt(DAILYSTEP);
+      Hour_Step = m_Parameters.getParameterValueAsDouble(HOURSTEP);
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      m_DEM.setFullExtent();
+
+      m_Coords = new Coordinate[2];
+      m_Output = getNewVectorLayer(OUTPUT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, new Class[] { Double.class,
+               Double.class }, new String[] { "RAD", "TIME" });
+
+      Hour_Start = 0;
+      Hour_Stop = 24;
+      Day_Start = m_Parameters.getParameterValueAsInt(INITDAY) + Month2Day[m_Parameters.getParameterValueAsInt(INITMONTH)];
+      Day_Stop = m_Parameters.getParameterValueAsInt(ENDDAY) + Month2Day[m_Parameters.getParameterValueAsInt(ENDMONTH)];
+
+      modifyDEM();
+
+      final IFeatureIterator iter = m_Buildings.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geometry = feature.getGeometry();
+         for (int i = 0; i < geometry.getNumGeometries(); i++) {
+            final Geometry subgeom = geometry.getGeometryN(i);
+            final Coordinate[] coords = subgeom.getCoordinates();
+            for (int j = 0; j < coords.length - 1; j++) {
+               m_Coords[0] = coords[j];
+               m_Coords[1] = coords[j + 1];
+               if (m_Coords[0].equals2D(m_Coords[1])) {
+                  continue;
+               }
+               final String sBuildingHeight = feature.getRecord().getValue(m_Buildings.getFieldIndexByName(FIELD_NAME)).toString();
+               try {
+                  m_dBuildingHeight = Double.parseDouble(sBuildingHeight);
+               }
+               catch (final NumberFormatException e) {
+                  m_dBuildingHeight = 0;
+               }
+               executeSumOfDays(Latitude, Hour_Step, Hour_Start, Hour_Stop, Day_Step, Day_Start, Day_Stop);
+               createFacet();
+            }
+         }
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void modifyDEM() {
+
+      try {
+         m_ModifiedDEM = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_DOUBLE, m_DEM.getWindowGridExtent());
+         m_ModifiedDEM.assign(m_DEM);
+         final IFeatureIterator iter = m_Buildings.iterator();
+         while (iter.hasNext()) {
+            IFeature feature;
+            try {
+               feature = iter.next();
+               final Geometry geometry = feature.getGeometry();
+               modifyDEMWithPolygon(geometry);
+            }
+            catch (final IteratorException e) {
+            }
+         }
+         iter.close();
+      }
+      catch (final UnsupportedOutputChannelException e) {
+      }
+
+   }
+
+
+   private void modifyDEMWithPolygon(final Geometry geometry) {
+      // TODO Auto-generated method stub
+
+   }
+
+
+   private void createFacet() {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final LineString line = gf.createLineString(m_Coords);
+      m_Output.addFeature(line, new Object[] { new Double(m_dRadiation), new Double(m_dDuration) });
+
+   }
+
+
+   private void executeSumOfDays(final double Latitude_RAD,
+                                 final double Hour_Step,
+                                 final double Hour_Start,
+                                 final double Hour_Stop,
+                                 int Day_Step,
+                                 final int Day_Start,
+                                 final int Day_Stop) {
+
+      int Day, nDays;
+
+      nDays = Day_Stop - Day_Start;
+
+      m_dRadiation = m_dDuration = 0;
+
+      if ((Day_Step < 1) || (Day_Step > nDays)) {
+         Day_Step = 1;
+      }
+
+      for (Day = Day_Start; (Day < Day_Stop) && !m_Task.isCanceled(); Day += Day_Step) {
+
+         setProgressText(Sextante.getText("Calculating_day") + Integer.toString(Day - Day_Start + 1) + Sextante.getText("de")
+                         + Integer.toString(nDays));
+
+         getDailySum(Latitude_RAD, Hour_Step, Hour_Start, Hour_Stop, Day);
+
+         m_dRadiationDaily *= Day_Step;
+         m_dRadiation += m_dRadiationDaily;
+
+         m_dDurationDaily *= Day_Step;
+         m_dDuration += m_dDurationDaily;
+
+      }
+
+      if ((Day_Step = Day_Stop - Day) > 0) {
+
+         getDailySum(Latitude_RAD, Hour_Step, Hour_Start, Hour_Stop, Day);
+
+         m_dRadiationDaily *= Day_Step;
+         m_dRadiation += m_dRadiationDaily;
+
+         m_dDurationDaily *= Day_Step;
+         m_dDuration += m_dDurationDaily;
+
+      }
+   }
+
+
+   private void getDailySum(final double Latitude_RAD,
+                            final double Hour_Step,
+                            double Hour_Start,
+                            final double Hour_Stop,
+                            int Day) {
+
+      double time, Solar_Angle, d;
+
+      Day %= 366;
+
+      if (Day < 0) {
+         Day += 366;
+      }
+
+      final Coordinate midPoint = new Coordinate((m_Coords[0].x + m_Coords[1].x) / 2., (m_Coords[0].y + m_Coords[1].y) / 2.);
+
+      Hour_Start += Hour_Step / 2.0;
+
+      m_dRadiationDaily = 0.0;
+      m_dDurationDaily = 0.0;
+
+      for (time = Hour_Start; (time < Hour_Stop) && setProgress((int) (time - Hour_Start), (int) (Hour_Stop - Hour_Start)); time += Hour_Step) {
+         if (getSolarPosition(Day, time, Latitude_RAD, 0.0, false)) {
+            Solar_Angle = rayTrace(midPoint);
+            if ((Solar_Angle < DEG_90_IN_RAD) && (Solar_Angle != SHADED)) {
+               getSolarCorrection(DEG_90_IN_RAD - m_dHeight, m_DEM.getValueAt(midPoint.x, midPoint.y));
+               d = m_SolarConstant * Hour_Step * m_dRDIRN * Math.cos(Solar_Angle);
+               m_dRadiationDaily += d;
+               m_dDurationDaily += Hour_Step;
+            }
+         }
+      }
+   }
+
+
+   void getSolarCorrection(final double ZenithAngle,
+                           final double Elevation) {
+
+      final double AM[] = // AM    Optical air mass in 1 degree increments for zenith angles >=60 [after LIST, 1968; p. 422]
+      { 2.00, 2.06, 2.12, 2.19, 2.27, 2.36, 2.45, 2.55, 2.65, 2.77, 2.90, 3.05, 3.21, 3.39, 3.59, 3.82, 4.07, 4.37, 4.72, 5.12,
+               5.60, 6.18, 6.88, 7.77, 8.90, 10.39, 12.44, 15.36, 19.79, 26.96, 26.96, 26.96 };
+
+      final double Pressure_0 = 1013.0; // Standard atmospheric pressure = 1013 mb
+
+      int i;
+      double z, AMASS, AMASS2, AW, TW, TD, TDC;
+
+      z = Math.toDegrees(ZenithAngle);
+
+      if (z <= 60.0) {
+         AMASS = 1.0 / Math.cos(ZenithAngle);
+      }
+      else {
+         z -= 60.0;
+         i = (int) z;
+         AMASS = AM[i] + (z - i) * (AM[i + 1] - AM[i]);
+      }
+
+      z = m_Pressure / Math.pow(10.0, Elevation * 5.4667E-05); // P     Barometric pressure in mb
+      AMASS2 = AMASS * z / Pressure_0;
+
+      switch (m_iMethod) {
+         case 0:
+         default:
+            m_dRDIRN = Math.pow(m_Transmittance, AMASS2);
+            m_dRDIFN = 0.271 - 0.294 * m_dRDIRN;
+            break;
+
+         case 1:
+            AW = 1.0 - 0.077 * Math.pow(m_Water * AMASS2, 0.3); // AW    Accounts for absorption by water vapour
+            TW = Math.pow(0.975, m_Water * AMASS); // TW    Accounts for scattering by water vapour
+            TD = Math.pow(0.950, m_Water * m_Dust / 100.0); // TD    Accounts for scattering by dust
+            TDC = Math.pow(0.900, AMASS2) + 0.026 * (AMASS2 - 1.0); // TDC   Accounts for scattering by a dust free atmosphere
+
+            m_dRDIRN = AW * TW * TD * TDC;
+            m_dRDIFN = 0.5 * (AW - m_dRDIRN);
+            break;
+      }
+
+   }
+
+
+   //////////////////////////////////////////////////////////   /
+   //                                                                                                                    //
+   //                                           Solar Position                                           //
+   //                                                                                                                    //
+   //////////////////////////////////////////////////////////   /
+
+   //   ---------------------------------------------------------
+   private boolean getSolarPosition(int Day,
+                                    final double Time,
+                                    final double LAT,
+                                    final double LON,
+                                    final boolean bDegree) {
+
+      final int Day2Month[] = { 0, 31, 49, 80, 109, 140, 170, 201, 232, 272, 303, 333, 366 };
+
+      final double ECLIPTIC_OBL = Math.toRadians(23.43999); // obliquity of ecliptic
+
+      int i;
+
+      double JD, T, M, L, X, Y, Z, R, UTime, DEC, RA, theta, tau, Month, Year = 2000;
+
+      for (Month = 1, i = 0; i <= 12; i++) {
+         if (Day < Day2Month[i]) {
+            Month = i;
+            Day -= Day2Month[i - 1];
+            break;
+         }
+      }
+
+      if ((Month < 1) || (Month > 12)) {
+         Month = 1;
+      }
+
+      if (Month <= 2) {
+         Month += 12;
+         Year -= 1;
+      }
+
+      UTime = Time - LON * 12.0 / Math.PI;
+
+      //-----------------------------------------------------
+      // 1. Julian Date...
+
+      JD = (int) (365.25 * Year) + (int) (30.6001 * (Month + 1)) - 15 + 1720996.5 + Day + UTime / 24.0;
+      T = (JD - 2451545.0) / 36525.0; // number of Julian centuries since 2000/01/01 at 12 UT (JD = 2451545.0)
+
+      //-----------------------------------------------------
+      // 2. Solar Coordinates (according to: Jean Meeus: Astronomical Algorithms), accuracy of 0.01 degree
+
+      M = Math.toRadians(357.52910 + 35999.05030 * T - 0.0001559 * T * T - 0.00000048 * T * T * T); // mean anomaly
+      L = Math.toRadians((280.46645 + 36000.76983 * T + 0.0003032 * T * T) // mean longitude
+                         + ((1.914600 - 0.004817 * T - 0.000014 * T * T) * Math.sin(M) + (0.019993 - 0.000101 * T)
+                            * Math.sin(2 * M) + 0.000290 * Math.sin(3 * M) // true longitude
+                         ));
+
+      //-----------------------------------------------------
+      // 3. convert ecliptic longitude to right ascension RA and declination delta
+
+      X = Math.cos(L);
+      Y = Math.cos(ECLIPTIC_OBL) * Math.sin(L);
+      Z = Math.sin(ECLIPTIC_OBL) * Math.sin(L);
+      R = Math.sqrt(1.0 - Z * Z);
+
+      DEC = Math.atan2(Z, R);
+      RA = 2 * Math.atan2(Y, (X + R));
+
+      //-----------------------------------------------------
+      // 4. compute sidereal time (degree) at Greenwich local sidereal time at longitude (�E)
+
+      theta = LON + Math.toRadians(280.46061837 + 360.98564736629 * (JD - 2451545.0) + T * T * (0.000387933 - T / 38710000.0));
+
+      //-----------------------------------------------------
+      // 5. compute local hour angle (degree)
+
+      tau = theta - RA;
+
+      //-----------------------------------------------------
+      // 6. convert (tau, delta) to horizon coordinates (h, az) of the observer
+
+      m_dHeight = Math.asin(Math.sin(LAT) * Math.sin(DEC) + Math.cos(LAT) * Math.cos(DEC) * Math.cos(tau));
+      m_dAzimuth = Math.atan2(-Math.sin(tau) * Math.cos(DEC), Math.cos(LAT) * Math.sin(DEC) - Math.sin(LAT) * Math.cos(DEC)
+                                                              * Math.cos(tau));
+
+      if (bDegree) {
+         m_dHeight = Math.toDegrees(m_dHeight);
+         m_dAzimuth = Math.toDegrees(m_dAzimuth);
+      }
+
+      return (m_dHeight >= 0.0);
+   }
+
+
+   private double rayTrace(final Coordinate midPoint) {
+
+      //final double dSlope = DEG_90_IN_RAD;
+      final double dDifX = m_Coords[1].x - m_Coords[0].x;
+      final double dDifY = m_Coords[1].y - m_Coords[0].y;
+      final double dAspect = Math.atan2(dDifX, dDifY);
+      final double dElevation = m_DEM.getValueAt(midPoint.x, midPoint.y) + m_dBuildingHeight / 2.;
+
+      double dx, dy, d = 0;
+      final AnalysisExtent ext = m_DEM.getWindowGridExtent();
+
+      dx = Math.abs(Math.sin(m_dAzimuth));
+      dy = Math.abs(Math.cos(m_dAzimuth));
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= ext.getCellSize();
+            dy /= dx;
+            dx = ext.getCellSize();
+         }
+         else {
+            dy /= ext.getCellSize();
+            dx /= dy;
+            dy = ext.getCellSize();
+         }
+
+         final double dDeltaD = Math.sqrt(dx * dx + dy * dy);
+
+         dx = dx * Math.signum(dDifX);
+         dy = dy * Math.signum(dDifY);
+
+         double x = midPoint.x;
+         double y = midPoint.y;
+
+         for (d = 0.0;; d += dDeltaD, x += dx, y += dy) {
+            if (ext.contains(x, y)) {
+               final double dElevation2 = m_DEM.getValueAt(x, y);
+               final double dAngle = Math.atan2(dElevation2 - dElevation, d);
+               if (dAngle > m_dHeight) {
+                  return SHADED;
+               }
+            }
+            else {
+               final double dSinDec = Math.sin(m_dHeight);
+               final double dCosDec = Math.cos(m_dHeight);
+               /*dSlope = Math.tan(dSlope);
+               dShading = DEG_90_IN_RAD - Math.atan(dSlope);*/
+               double dShading = 0;
+               dShading = Math.acos(Math.sin(dShading) * dSinDec + Math.cos(dShading) * dCosDec * Math.cos(dAspect - m_dAzimuth));
+               if (dShading > DEG_90_IN_RAD) {
+                  dShading = DEG_90_IN_RAD;
+               }
+               return dShading;
+            }
+         }
+      }
+
+      return -1;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/solarRadiation/SolarRadiationBuildingsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/fresnelLos/FresnelLOSAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/fresnelLos/FresnelLOSAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/fresnelLos/FresnelLOSAlgorithm.java	(revision 369)
@@ -0,0 +1,202 @@
+package es.unex.sextante.lighting.fresnelLos;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+public class FresnelLOSAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String       DEM       = "DEM";
+   public static final String       POINT     = "POINT";
+   public static final String       POINT2    = "POINT2";
+   public static final String       HEIGHT    = "HEIGHT";
+   public static final String       HEIGHT2   = "HEIGHT2";
+   public static final String       GRAPH     = "GRAPH";
+   public static final String       LAMBDA    = "LAMBDA";
+
+   private IRasterLayer             m_DEM     = null;
+   private GridCell                 m_Point, m_Point2;
+   private double                   m_dHeight, m_dHeight2;
+   private final XYSeriesCollection m_Dataset = new XYSeriesCollection();
+   private double                   m_dFrequency;
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DEM = m_Parameters.getParameterValueAsRasterLayer(DEM);
+      final Point2D pt = m_Parameters.getParameterValueAsPoint(POINT);
+      final Point2D pt2 = m_Parameters.getParameterValueAsPoint(POINT2);
+      m_dHeight = m_Parameters.getParameterValueAsDouble(HEIGHT);
+      m_dHeight2 = m_Parameters.getParameterValueAsDouble(HEIGHT2);
+      m_dFrequency = m_Parameters.getParameterValueAsDouble(LAMBDA);
+
+      final AnalysisExtent ge = new AnalysisExtent(m_DEM);
+      m_Point = ge.getGridCoordsFromWorldCoords(pt);
+      m_Point2 = ge.getGridCoordsFromWorldCoords(pt2);
+
+      final double x = ge.getXMin() + m_Point.getX() * ge.getCellSize();
+      final double y = ge.getYMax() - m_Point.getY() * ge.getCellSize();
+      final double x2 = ge.getXMin() + m_Point2.getX() * ge.getCellSize();
+      final double y2 = ge.getYMax() - m_Point2.getY() * ge.getCellSize();
+
+      ge.setXRange(x, x2, true);
+      ge.setYRange(y, y2, true);
+      ge.enlargeOneCell();
+
+      m_Point = ge.getGridCoordsFromWorldCoords(pt);
+      m_Point2 = ge.getGridCoordsFromWorldCoords(pt2);
+
+      m_DEM.setWindowExtent(ge);
+
+      calculateLOS(m_Point.getX(), m_Point.getY(), m_Point2.getX(), m_Point2.getY());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      try {
+         m_Parameters.addInputRasterLayer(DEM, Sextante.getText("Elevation"), true);
+         m_Parameters.addPoint(POINT, Sextante.getText("point") + " 1");
+         m_Parameters.addPoint(POINT2, Sextante.getText("point") + " 2");
+         m_Parameters.addNumericalValue(HEIGHT, Sextante.getText("Height_of_point") + " 1", 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(HEIGHT2, Sextante.getText("Height_of_point") + " 2", 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(LAMBDA, Sextante.getText("Wavelength"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, 0, Double.MAX_VALUE);
+
+         addOutputChart(GRAPH, Sextante.getText("Line_of_sight"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      setName(Sextante.getText("RF_Line_of_sight"));
+      setGroup(Sextante.getText("Visibility_and_lighting"));
+
+   }
+
+
+   private void calculateLOS(int x,
+                             int y,
+                             final int x2,
+                             final int y2) {
+
+      double dx, dy;
+      double ix, iy, id, d, dist, z;
+      double dHeight, dHeight2;
+      double dAngle;
+      final XYSeries serie = new XYSeries("serie");
+      final XYSeries fresnelSerie = new XYSeries("fresnel");
+      final XYSeries straightlineSerie = new XYSeries("straightline");
+
+      m_Dataset.addSeries(serie);
+      m_Dataset.addSeries(straightlineSerie);
+      m_Dataset.addSeries(fresnelSerie);
+
+      dx = x2 - x;
+      dy = y2 - y;
+
+      d = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy);
+
+      if (d > 0) {
+         dist = Math.sqrt(dx * dx + dy * dy);
+
+         dx /= d;
+         dy /= d;
+
+         d = dist / d;
+
+         id = 0.0;
+         ix = x + 0.5;
+         iy = y + 0.5;
+         dHeight = m_DEM.getCellValueAsDouble(x, y);
+         dHeight2 = m_DEM.getCellValueAsDouble(x2, y2);
+
+         if (m_DEM.isNoDataValue(dHeight) || m_DEM.isNoDataValue(dHeight2)) {
+            return;
+         }
+
+         dHeight += m_dHeight;
+         dHeight2 += m_dHeight2;
+         dAngle = Math.atan2(dHeight2 - dHeight, dist * m_DEM.getWindowCellSize());
+
+         straightlineSerie.add(0, dHeight);
+         straightlineSerie.add(dist * m_DEM.getWindowCellSize(), dHeight2);
+         fresnelSerie.add(0, dHeight);
+
+         while (id < dist) {
+            id += d;
+
+            ix += dx;
+            iy += dy;
+
+            x = (int) ix;
+            y = (int) iy;
+
+            z = m_DEM.getCellValueAsDouble(x, y);
+            if (!m_DEM.isNoDataValue(z)) {
+               serie.add(id * m_DEM.getWindowCellSize(), z);
+               final double dDist = id * m_DEM.getWindowCellSize() / Math.cos(dAngle);
+               final double dDist2 = (dist - id) * m_DEM.getWindowCellSize() / Math.cos(dAngle);
+               final Point2D pt = getFresnelZone(dDist, dDist2, dAngle, dHeight);
+               if (!Double.isNaN(pt.getX()) && !Double.isNaN(pt.getY())) {
+                  fresnelSerie.add(pt.getX(), pt.getY());
+               }
+            }
+         }
+         fresnelSerie.add(dist * m_DEM.getWindowCellSize(), dHeight2);
+
+         final JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, m_Dataset, PlotOrientation.VERTICAL, false,
+                  true, true);
+
+         final ChartPanel jPanelChart = new ChartPanel(chart);
+         jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+         jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+         addOutputChart("GRAPH", Sextante.getText("Line_of_sight"), jPanelChart);
+      }
+
+   }
+
+
+   private Point2D getFresnelZone(final double dDist,
+                                  final double dDist2,
+                                  final double dAngle,
+                                  final double dHeight) {
+
+      final double dRadius = Math.sqrt(m_dFrequency * (dDist * dDist2) / (dDist + dDist2));
+      double y = dHeight + dDist * Math.sin(dAngle);
+      double x = dDist * Math.cos(dAngle);
+
+      x += (dRadius * Math.sin(dAngle));
+      y -= (dRadius * Math.cos(dAngle));
+
+      System.out.println(dRadius);
+
+
+      return new Point2D.Double(x, y);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/lighting/fresnelLos/FresnelLOSAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridBasicStats/GridBasicStatsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridBasicStats/GridBasicStatsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridBasicStats/GridBasicStatsAlgorithm.java	(revision 369)
@@ -0,0 +1,121 @@
+package es.unex.sextante.gridTools.gridBasicStats;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+
+public class GridBasicStatsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT             = "INPUT";
+   public static final String STATS             = "STATS";
+   public static final String MEAN              = "MEAN";
+   public static final String MEAN_SQUARED      = "MEAN_SQUARED";
+   public static final String MIN               = "MIN";
+   public static final String MAX               = "MAX";
+   public static final String VARIANCE          = "VARIANCE";
+   public static final String SUM               = "SUM";
+   public static final String COEF_OF_VARIATION = "COEF_OF_VARIATION";
+   public static final String VALID_CELLS       = "VALID_CELLS";
+   public static final String NO_DATA_CELLS     = "NO_DATA_CELLS";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Basic_statistics"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputText(STATS, Sextante.getText("Statistics"));
+         addOutputNumericalValue(MEAN, Sextante.getText("Mean_value"));
+         addOutputNumericalValue(MEAN_SQUARED, Sextante.getText("Mean_squared_value"));
+         addOutputNumericalValue(MIN, Sextante.getText("Minimum_value"));
+         addOutputNumericalValue(MAX, Sextante.getText("Maximum_value"));
+         addOutputNumericalValue(VARIANCE, Sextante.getText("Variance"));
+         addOutputNumericalValue(SUM, Sextante.getText("Total_sum"));
+         addOutputNumericalValue(COEF_OF_VARIATION, Sextante.getText("Coefficient_of_variation"));
+         addOutputNumericalValue(VALID_CELLS, Sextante.getText("Valid_data_cells"));
+         addOutputNumericalValue(NO_DATA_CELLS, Sextante.getText("No_data_cells"));
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iNoDataCells = 0;
+      double dValue;
+      IRasterLayer input;
+      final SimpleStats stats = new SimpleStats();
+
+      input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      input.setFullExtent();
+      iNX = input.getNX();
+      iNY = input.getNY();
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = input.getCellValueAsDouble(x, y);
+            if (!input.isNoDataValue(dValue)) {
+               stats.addValue(dValue);
+            }
+            else {
+               iNoDataCells++;
+            }
+         }
+
+      }
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      final DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Statistics"));
+      doc.addHeader(Sextante.getText("Basic_statistics"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Mean_value") + ": " + df.format(stats.getMean()));
+      doc.addListElement(Sextante.getText("Mean_squared_value") + ": " + df.format(stats.getRMS()));
+      doc.addListElement(Sextante.getText("Minimum_value") + ": " + df.format(stats.getMin()));
+      doc.addListElement(Sextante.getText("Maximum_value") + ": " + df.format(stats.getMax()));
+      doc.addListElement(Sextante.getText("Variance") + ": " + df.format(stats.getVariance()));
+      doc.addListElement(Sextante.getText("Total_sum") + ": " + df.format(stats.getSum()));
+      doc.addListElement(Sextante.getText("Coefficient_of_variation") + ": " + df.format(stats.getCoeffOfVar()));
+      doc.addListElement(Sextante.getText("Valid_data_cells") + ": " + Integer.toString(stats.getCount()));
+      doc.addListElement(Sextante.getText("No_data_cells") + ": " + Integer.toString((iNX * iNY) - stats.getCount()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(STATS, Sextante.getText("Statistics") + "[" + input.getName() + "]", doc.getHTMLCode());
+
+      addOutputNumericalValue(MEAN, stats.getMean());
+      addOutputNumericalValue(MEAN_SQUARED, stats.getRMS());
+      addOutputNumericalValue(MIN, stats.getMin());
+      addOutputNumericalValue(MAX, stats.getMax());
+      addOutputNumericalValue(VARIANCE, stats.getVariance());
+      addOutputNumericalValue(SUM, stats.getSum());
+      addOutputNumericalValue(COEF_OF_VARIATION, stats.getCoeffOfVar());
+      addOutputNumericalValue(VALID_CELLS, stats.getCount());
+      addOutputNumericalValue(NO_DATA_CELLS, (iNX * iNY) - stats.getCount());
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridBasicStats/GridBasicStatsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/sortRaster/SortRasterAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/sortRaster/SortRasterAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/sortRaster/SortRasterAlgorithm.java	(revision 369)
@@ -0,0 +1,94 @@
+package es.unex.sextante.gridTools.sortRaster;
+
+import java.util.Arrays;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class SortRasterAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT  = "INPUT";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Sort"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Sorted_raster_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCells;
+      GridCell cell;
+
+      final IRasterLayer layer = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      layer.setFullExtent();
+      final GridCell[] cells = getSortedArrayOfCells(layer);
+      final AnalysisExtent gridExtent = new AnalysisExtent(layer);
+      final IRasterLayer sorted = getNewRasterLayer(RESULT, layer.getName() + Sextante.getText("[sorted]"),
+               IRasterLayer.RASTER_DATA_TYPE_INT, gridExtent);
+
+      iCells = layer.getNX() * layer.getNY();
+
+      for (i = 0; (i < iCells) && setProgress(i, iCells); i++) {
+         cell = cells[i];
+         if (!layer.isNoDataValue(cell.getValue())) {
+            sorted.setCellValue(cell.getX(), cell.getY(), i);
+         }
+         else {
+            sorted.setNoData(cell.getX(), cell.getY());
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   public GridCell[] getSortedArrayOfCells(final IRasterLayer layer) {
+
+      int i;
+      int iX, iY;
+      final int iNX = layer.getNX();
+      final int iCells = layer.getNX() * layer.getNY();
+      GridCell[] cells;
+      GridCell cell;
+
+      cells = new GridCell[iCells];
+
+      for (i = 0; i < iCells; i++) {
+         iX = i % iNX;
+         iY = i / iNX;
+         cell = new GridCell(iX, iY, layer.getCellValueAsDouble(iX, iY));
+         cells[i] = cell;
+      }
+
+      Arrays.sort(cells);
+
+      return cells;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/sortRaster/SortRasterAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipBBoxGrid/clipBBoxGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipBBoxGrid/clipBBoxGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipBBoxGrid/clipBBoxGridAlgorithm.java	(revision 369)
@@ -0,0 +1,173 @@
+package es.unex.sextante.gridTools.clipBBoxGrid;
+
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+public class clipBBoxGridAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT    = "INPUT";
+   public static final String POLYGONS = "POLYGONS";
+   public static final String RESULT   = "RESULT";
+
+   private AnalysisExtent     m_Extent;
+   private int                m_iMinX, m_iMinY;
+   private IRasterLayer       m_Output;
+   private IRasterLayer       m_Raster;
+   private IVectorLayer       m_Polygons;
+   private int                m_iNX;
+   private int                m_iNY;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Clip_grid_with_bbox_of_polygons"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer_to_clip"), true);
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Clipped_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Raster = m_Parameters.getParameterValueAsRasterLayer("INPUT");
+      m_Polygons = m_Parameters.getParameterValueAsVectorLayer("POLYGONS");
+
+      clip();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void clip() throws UnsupportedOutputChannelException, IteratorException {
+
+      int i;
+      m_Extent = getAdjustedGridExtent();
+
+      if (m_Extent != null) {
+         m_Raster.setWindowExtent(m_Extent);
+         m_Output = getNewRasterLayer(RESULT, Sextante.getText("Result"), m_Raster.getDataType(), m_Extent,
+                  m_Raster.getBandsCount());
+         m_Output.setNoDataValue(m_Raster.getNoDataValue());
+         m_Output.assignNoData();
+
+         m_iNX = m_Extent.getNX();
+         m_iNY = m_Extent.getNY();
+
+         i = 0;
+         final IFeatureIterator iter = m_Polygons.iterator();
+         final int iShapeCount = m_Polygons.getShapesCount();
+         while (iter.hasNext() && setProgress(i, iShapeCount)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            doPolygon(geom);
+            if (m_Task.isCanceled()) {
+               return;
+            }
+            i++;
+         }
+         iter.close();
+
+      }
+
+   }
+
+
+   private void doPolygon(final Geometry geom) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part);
+      }
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom) {
+
+      int x, y, xStart, xStop;
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = xStart; x <= xStop; x++) {
+            for (int i = 0; i < m_Raster.getBandsCount(); i++) {
+               m_Output.setCellValue(x, y, i, m_Raster.getCellValueAsDouble(x, y, i));
+            }
+
+         }
+      }
+
+   }
+
+
+   private AnalysisExtent getAdjustedGridExtent() {
+
+      double iMaxX, iMaxY;
+      double dMinX, dMinY;
+      double dMinX2, dMinY2, dMaxX2, dMaxY2;
+      double dCellSize;
+      final AnalysisExtent ge = new AnalysisExtent();
+
+      final Rectangle2D rect = m_Polygons.getFullExtent();
+      dMinX = m_Raster.getLayerGridExtent().getXMin();
+      dMinY = m_Raster.getLayerGridExtent().getYMin();
+      dCellSize = m_Raster.getLayerGridExtent().getCellSize();
+
+      m_iMinX = (int) Math.floor((rect.getMinX() - dMinX) / dCellSize);
+      iMaxX = Math.ceil((rect.getMaxX() - dMinX) / dCellSize);
+      m_iMinY = (int) Math.floor((rect.getMinY() - dMinY) / dCellSize);
+      iMaxY = Math.ceil((rect.getMaxY() - dMinY) / dCellSize);
+
+      dMinX2 = dMinX + m_iMinX * dCellSize;
+      dMinY2 = dMinY + m_iMinY * dCellSize;
+      dMaxX2 = dMinX + iMaxX * dCellSize;
+      dMaxY2 = dMinY + iMaxY * dCellSize;
+
+      ge.setCellSize(dCellSize);
+      ge.setXRange(dMinX2, dMaxX2, true);
+      ge.setYRange(dMinY2, dMaxY2, true);
+
+      return ge;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipBBoxGrid/clipBBoxGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeNoDataValue/ChangeNoDataValueAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeNoDataValue/ChangeNoDataValueAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeNoDataValue/ChangeNoDataValueAlgorithm.java	(revision 369)
@@ -0,0 +1,58 @@
+
+
+package es.unex.sextante.gridTools.changeNoDataValue;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class ChangeNoDataValueAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String  RESULT        = "RESULT";
+   public static final String  INPUT         = "INPUT";
+   private static final String NO_DATA_VALUE = "NO_DATA_VALUE";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("ChangeNoDataValue"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Input_layer"), true);
+         m_Parameters.addNumericalValue(NO_DATA_VALUE, Sextante.getText("NoDataValue"), -99999.,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IRasterLayer layer = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final double dNoData = m_Parameters.getParameterValueAsDouble(NO_DATA_VALUE);
+
+      layer.setFullExtent();
+      final IRasterLayer result = getNewRasterLayer(RESULT, layer.getName(), layer.getDataType(), layer.getLayerGridExtent());
+      result.assign(layer);
+      result.setNoDataValue(dNoData);
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeNoDataValue/ChangeNoDataValueAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/combineMasks/CombineMasksAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/combineMasks/CombineMasksAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/combineMasks/CombineMasksAlgorithm.java	(revision 369)
@@ -0,0 +1,87 @@
+
+
+package es.unex.sextante.gridTools.combineMasks;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class CombineMasksAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYERS = "LAYERS";
+   public static final String RESULT = "RESULT";
+
+   protected double           m_dValue;
+   protected double           m_dValue2;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("CombineMasks"));
+      setGroup(Sextante.getText("Calculus_tools_for_raster_layer"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(LAYERS, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"), 1);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      final ArrayList list = (ArrayList) m_Parameters.getParameterValueAsObject(LAYERS);
+      final IRasterLayer[] grids = new IRasterLayer[list.size()];
+      for (int i = 0; i < grids.length; i++) {
+         grids[i] = (IRasterLayer) list.get(i);
+         grids[i].setWindowExtent(m_AnalysisExtent);
+      }
+
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, this.getName(), IRasterLayer.RASTER_DATA_TYPE_DOUBLE,
+               m_AnalysisExtent);
+
+      result.setNoDataValue(0.0);
+      result.assignNoData();
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            int i;
+            for (i = 0; i < grids.length; i++) {
+               final double dValue = grids[i].getCellValueAsDouble(x, y);
+               if (!grids[i].isNoDataValue(dValue)) {
+                  result.setCellValue(x, y, 1);
+                  break;
+               }
+            }
+            if (!(i < grids.length)) {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/combineMasks/CombineMasksAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGapsNN/CloseGapsNNAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGapsNN/CloseGapsNNAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGapsNN/CloseGapsNNAlgorithm.java	(revision 369)
@@ -0,0 +1,146 @@
+
+
+package es.unex.sextante.gridTools.closeGapsNN;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class CloseGapsNNAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   NO_DATA = -1;
+
+   public static final String LAYER   = "LAYER";
+   public static final String RESULT  = "RESULT";
+
+   int                        m_iNX, m_iNY;
+   IRasterLayer               m_Window;
+   IRasterLayer               m_Result;
+   IRasterLayer               m_Filled;
+   ArrayList                  m_CentralPoints, m_AdjPoints;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Void_filling_[nearest_neighbour]"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Filled_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+
+      m_CentralPoints = new ArrayList();
+      m_AdjPoints = new ArrayList();
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_Window.setFullExtent();
+      m_Result = getNewRasterLayer(RESULT, m_Window.getName() + Sextante.getText("[filled]"), m_Window.getDataType(),
+               m_Window.getWindowGridExtent());
+      m_Filled = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_INT, m_Window.getWindowGridExtent());
+
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      m_Filled.setNoDataValue(NO_DATA);
+      m_Filled.assignNoData();
+
+      m_Result.setNoDataValue(NO_DATA);
+      m_Result.assignNoData();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(dValue)) {
+               m_CentralPoints.add(new GridCell(x, y, dValue));
+               m_Filled.setCellValue(x, y, 0.0);
+               m_Result.setCellValue(x, y, dValue);
+            }
+         }
+      }
+
+      closeGaps();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void closeGaps() {
+
+      int i, j;
+      int iPt;
+      int x, y, x2, y2;
+      double dValue;
+      double dAccCost;
+      double dPrevAccCost;
+      GridCell cell;
+
+      final double dDist[][] = new double[3][3];
+
+      for (i = -1; i < 2; i++) {
+         for (j = -1; j < 2; j++) {
+            dDist[i + 1][j + 1] = Math.sqrt(i * i + j * j);
+         }
+      }
+
+      while ((m_CentralPoints.size() != 0) && !m_Task.isCanceled()) {
+         for (iPt = 0; iPt < m_CentralPoints.size(); iPt++) {
+            cell = (GridCell) m_CentralPoints.get(iPt);
+            x = cell.getX();
+            y = cell.getY();
+            dValue = cell.getValue();
+            for (i = -1; i < 2; i++) {
+               for (j = -1; j < 2; j++) {
+                  x2 = x + i;
+                  y2 = y + j;
+                  if (m_Window.isInWindow(x2, y2)) {
+                     dAccCost = m_Filled.getCellValueAsDouble(x, y);
+                     dAccCost += dDist[i + 1][j + 1];
+                     dPrevAccCost = m_Filled.getCellValueAsDouble(x2, y2);
+                     if (m_Filled.isNoDataValue(dPrevAccCost) || (dPrevAccCost > dAccCost)) {
+                        m_Filled.setCellValue(x2, y2, dAccCost);
+                        m_Result.setCellValue(x2, y2, dValue);
+                        m_AdjPoints.add(new GridCell(x2, y2, dValue));
+                     }
+                  }
+               }
+            }
+         }
+
+         m_CentralPoints = m_AdjPoints;
+         m_AdjPoints = new ArrayList();
+
+         if (m_Task.isCanceled()) {
+            return;
+         }
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGapsNN/CloseGapsNNAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridCompletion/GridCompletionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridCompletion/GridCompletionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridCompletion/GridCompletionAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.gridTools.gridCompletion;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GridCompletionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT      = "INPUT";
+   public static final String ADDITIONAL = "ADDITIONAL";
+   public static final String METHOD     = "METHOD";
+   public static final String RESULT     = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Nearest_neighbour"), Sextante.getText("Bilinear"),
+               Sextante.getText("Inverse_distance"), Sextante.getText("Cubic_spline"), Sextante.getText("B-spline") };
+
+      setName(Sextante.getText("Complete_grid"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Base_layer"), true);
+         m_Parameters.addInputRasterLayer(ADDITIONAL, Sextante.getText("Additional_layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Interpolation_method"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Filled_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iMethod;
+      int iNX, iNY;
+      double dValue = 0;
+      IRasterLayer window, window2;
+
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      window2 = m_Parameters.getParameterValueAsRasterLayer(ADDITIONAL);
+      final IRasterLayer result = getNewRasterLayer(RESULT, window.getName() + Sextante.getText("[completed]"),
+               window.getDataType());
+
+      window.setWindowExtent(result.getWindowGridExtent());
+      window.setInterpolationMethod(iMethod);
+      window2.setWindowExtent(result.getWindowGridExtent());
+      window.setInterpolationMethod(iMethod);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = window.getCellValueAsDouble(x, y);
+            if (window.isNoDataValue(dValue)) {
+               dValue = window2.getCellValueAsDouble(x, y);
+               if (window2.isNoDataValue(dValue)) {
+                  result.setNoData(x, y);
+               }
+               else {
+                  result.setCellValue(x, y, dValue);
+               }
+            }
+            else {
+               result.setCellValue(x, y, dValue);
+            }
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridCompletion/GridCompletionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/density/DensityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/density/DensityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/density/DensityAlgorithm.java	(revision 369)
@@ -0,0 +1,155 @@
+package es.unex.sextante.gridTools.density;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class DensityAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER    = "LAYER";
+   public static final String FIELD    = "FIELD";
+   public static final String DISTANCE = "DISTANCE";
+   public static final String DENSITY  = "DENSITY";
+
+   private int                m_iField;
+   private IVectorLayer       m_Layer;
+   private IRasterLayer       m_Result;
+   private AnalysisExtent         m_Extent;
+   private int                m_iDistance;
+   private boolean            m_bIsValidCell[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Density"));
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Vector_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "LAYER");
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Search_radius"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(DENSITY, Sextante.getText("Density"));
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iShapeCount;
+      double dValue;
+      double dXMin, dYMin;
+      double dXMax, dYMax;
+      double dDistance;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      dDistance = m_Parameters.getParameterValueAsDouble(DISTANCE);
+
+      m_Result = getNewRasterLayer(DENSITY, m_Layer.getName() + Sextante.getText("[density]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Result.assign(0.0);
+
+      m_Extent = m_Result.getWindowGridExtent();
+
+      m_iDistance = (int) Math.floor(dDistance / m_Extent.getCellSize());
+
+      dXMin = m_Extent.getXMin() - dDistance;
+      dYMin = m_Extent.getYMin() - dDistance;
+      dXMax = m_Extent.getXMax() + dDistance;
+      dYMax = m_Extent.getYMax() + dDistance;
+
+      m_bIsValidCell = new boolean[2 * m_iDistance + 1][2 * m_iDistance + 1];
+
+      for (y = -m_iDistance; y < m_iDistance + 1; y++) {
+         for (x = -m_iDistance; x < m_iDistance + 1; x++) {
+            final double dDist = Math.sqrt(x * x + y * y);
+            if (dDist < m_iDistance) {
+               m_bIsValidCell[x + m_iDistance][y + m_iDistance] = true;
+            }
+            else {
+               m_bIsValidCell[x + m_iDistance][y + m_iDistance] = false;
+            }
+         }
+      }
+
+      i = 0;
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+         }
+         catch (final Exception e) {
+            dValue = 1.0;
+         }
+
+         if ((coord.x > dXMin) && (coord.x < dXMax) && (coord.y > dYMin) && (coord.y < dYMax)) {
+            doPoint(coord, dValue);
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void doPoint(final Coordinate coord,
+                        final double dValue) {
+
+      int x, y;
+      int iX, iY;
+      GridCell cell;
+
+      cell = m_Extent.getGridCoordsFromWorldCoords(coord.x, coord.y);
+      iX = cell.getX();
+      iY = cell.getY();
+
+      for (y = -m_iDistance; y < m_iDistance + 1; y++) {
+         for (x = -m_iDistance; x < m_iDistance + 1; x++) {
+            if (m_bIsValidCell[x + m_iDistance][y + m_iDistance]) {
+               m_Result.addToCellValue(iX + x, iY + y, dValue);
+            }
+         }
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/density/DensityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/cropToValidData/CropToValidDataAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/cropToValidData/CropToValidDataAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/cropToValidData/CropToValidDataAlgorithm.java	(revision 369)
@@ -0,0 +1,129 @@
+package es.unex.sextante.gridTools.cropToValidData;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CropToValidDataAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String INPUT  = "INPUT";
+
+   private IRasterLayer       m_Window;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Crop_to_valid_data_cells"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer_to_crop"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Cropped_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      m_Window.setFullExtent();
+
+      final AnalysisExtent extent = getAdjustedGridExtent(m_Window);
+
+
+      m_Window.setWindowExtent(extent);
+      final IRasterLayer output = this.getNewRasterLayer(RESULT, m_Window.getName() + Sextante.getText("[cropped]"),
+               m_Window.getDataType(), extent);
+      output.setNoDataValue(m_Window.getNoDataValue());
+
+      iNX = extent.getNX();
+      iNY = extent.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            output.setCellValue(x, y, m_Window.getCellValueAsDouble(x, y));
+         }
+      }
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private AnalysisExtent getAdjustedGridExtent(final IRasterLayer input) {
+
+      int x, y;
+      int iNX, iNY;
+      double iMaxX, iMaxY;
+      double iMinX, iMinY;
+      double dMinX, dMaxY;
+      double dMinX2, dMinY2, dMaxX2, dMaxY2;
+      double dCellSize;
+      double dValue;
+      final AnalysisExtent ge = new AnalysisExtent();
+
+      dMinX = input.getWindowGridExtent().getXMin();
+      dMaxY = input.getWindowGridExtent().getYMax();
+      dCellSize = input.getWindowGridExtent().getCellSize();
+
+      iNX = input.getWindowGridExtent().getNX();
+      iNY = input.getWindowGridExtent().getNY();
+
+      iMinX = iNX;
+      iMinY = iNY;
+      iMaxX = 0;
+      iMaxY = 0;
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(dValue)) {
+               if (x < iMinX) {
+                  iMinX = x;
+               }
+               if (x > iMaxX) {
+                  iMaxX = x;
+               }
+               if (y < iMinY) {
+                  iMinY = y;
+               }
+               if (y > iMaxY) {
+                  iMaxY = y;
+               }
+            }
+         }
+      }
+
+      //      if ((iMinX == 0) && (iMinY == 0) && (iMaxX == iNX - 1) && (iMaxY == iNY - 1)) {
+      //         return null;
+      //      }
+
+      dMinX2 = dMinX + iMinX * dCellSize;
+      dMinY2 = dMaxY - iMaxY * dCellSize;
+      dMaxX2 = dMinX + iMaxX * dCellSize;
+      dMaxY2 = dMaxY - iMinY * dCellSize;
+
+      ge.setCellSize(dCellSize);
+      ge.setXRange(dMinX2, dMaxX2, true);
+      ge.setYRange(dMinY2, dMaxY2, true);
+
+      return ge;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/cropToValidData/CropToValidDataAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGaps/CloseGapsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGaps/CloseGapsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGaps/CloseGapsAlgorithm.java	(revision 369)
@@ -0,0 +1,237 @@
+package es.unex.sextante.gridTools.closeGaps;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+
+public class CloseGapsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT        = "INPUT";
+   public static final String THRESHOLD    = "THRESHOLD";
+   public static final String RESULT       = "RESULT";
+
+   private final int          m_iOffsetX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final int          m_iOffsetY[] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private double             m_dDistToNeighbour[];
+   private IRasterLayer       m_Window;
+   private IRasterLayer       m_Result;
+   private IRasterLayer       m_TensionKeep, m_TensionTemp;
+   private int                m_iNX, m_iNY;
+   double                     m_dThreshold;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Void_filling"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(THRESHOLD, Sextante.getText("Tension_threshold"), 0.1,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Filled_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_dDistToNeighbour = new double[8];
+      for (int i = 0; i < m_dDistToNeighbour.length; i++) {
+         m_dDistToNeighbour[i] = ((i % 2 != 0) ? Math.sqrt(2.0) : 1.0);
+      }
+
+      m_dThreshold = m_Parameters.getParameterValueAsDouble(THRESHOLD);
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_Window.setFullExtent();
+      m_Result = getNewRasterLayer(RESULT, m_Window.getName() + Sextante.getText("[filled]"), m_Window.getDataType(),
+               m_Window.getWindowGridExtent());
+      m_TensionTemp = getTempRasterLayer(m_Window.getDataType(), m_Window.getWindowGridExtent());
+      m_TensionKeep = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Window.getWindowGridExtent());
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      tensionMain();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void tensionMain() {
+
+      int iStep, iStart, n;
+      double max;
+
+      n = m_iNX > m_iNY ? m_iNX : m_iNY;
+      iStep = 0;
+      do {
+         iStep++;
+      }
+      while (Math.pow(2.0, iStep + 1) < n);
+      iStart = (int) Math.pow(2.0, iStep);
+
+      m_Result.assignNoData();
+
+      for (iStep = iStart; iStep >= 1; iStep /= 2) {
+         tensionInit(iStep);
+         do {
+            max = tensionStep(iStep);
+         }
+         while (max > m_dThreshold);
+         if (m_Task.isCanceled()) {
+            return;
+         }
+      }
+
+   }
+
+
+   private void tensionInit(final int iStep) {
+
+      int x, y, i, ix, iy, nx, ny, nz;
+      double z, z2;
+
+      m_TensionTemp.assignNoData();
+      m_TensionKeep.assign(0.0);
+
+      for (y = 0; y < m_iNY; y += iStep) {
+         ny = y + iStep < m_iNY ? y + iStep : m_iNY;
+         for (x = 0; x < m_iNX; x += iStep) {
+            z = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(z)) {
+               m_TensionTemp.setCellValue(x, y, z);
+               m_TensionKeep.setCellValue(x, y, 1.0);
+            }
+            else {
+               nx = x + iStep < m_iNX ? x + iStep : m_iNX;
+               nz = 0;
+               z = 0.0;
+               for (iy = y; iy < ny; iy++) {
+                  for (ix = x; ix < nx; ix++) {
+                     z2 = m_Window.getCellValueAsDouble(ix, iy);
+                     if (!m_Window.isNoDataValue(z2)) {
+                        z += z2;
+                        nz++;
+                     }
+                  }
+               }
+               if (nz > 0) {
+                  m_TensionTemp.setCellValue(x, y, z / nz);
+                  m_TensionKeep.setCellValue(x, y, 1.0);
+               }
+            }
+         }
+      }
+
+      for (y = 0; y < m_iNY; y += iStep) {
+         for (x = 0; x < m_iNX; x += iStep) {
+            if (m_TensionKeep.getCellValueAsByte(x, y) == 0.0) {
+               z = m_Result.getCellValueAsDouble(x, y);
+               if (!m_Result.isNoDataValue(z)) {
+                  m_TensionTemp.setCellValue(x, y, z);
+               }
+               else {
+                  nz = 0;
+                  z = 0.0;
+                  for (i = 0; i < 8; i++) {
+                     ix = x + iStep * m_iOffsetX[i];
+                     iy = y + iStep * m_iOffsetY[i];
+                     z2 = m_Result.getCellValueAsDouble(ix, iy);
+                     if (!m_Result.isNoDataValue(z2)) {
+                        z += z2;
+                        nz++;
+                     }
+                  }
+
+                  if (nz > 0.0) {
+                     m_TensionTemp.setCellValue(x, y, z / nz);
+                  }
+                  else {
+                     m_TensionTemp.setCellValue(x, y, m_Window.getCellValueAsDouble(x, y));
+                  }
+               }
+            }
+         }
+      }
+
+      m_Result.assign(m_TensionTemp);
+
+   }
+
+
+   private double tensionStep(final int iStep) {
+
+      int x, y;
+      double d, dMax;
+      dMax = 0.0;
+
+      for (y = 0; y < m_iNY; y += iStep) {
+         for (x = 0; x < m_iNX; x += iStep) {
+            if (m_TensionKeep.getCellValueAsByte(x, y) == 0.0) {
+               d = tensionChange(x, y, iStep);
+               m_TensionTemp.setCellValue(x, y, d);
+               d = Math.abs(d - m_Result.getCellValueAsDouble(x, y));
+               if (d > dMax) {
+                  dMax = d;
+               }
+            }
+         }
+      }
+
+      for (y = 0; y < m_iNY; y += iStep) {
+         for (x = 0; x < m_iNX; x += iStep) {
+            if (m_TensionKeep.getCellValueAsByte(x, y) == 0.0) {
+               m_Result.setCellValue(x, y, m_TensionTemp.getCellValueAsDouble(x, y));
+            }
+         }
+      }
+
+      return (dMax);
+   }
+
+
+   private double tensionChange(final int x,
+                                final int y,
+                                final int iStep) {
+
+      int i, ix, iy;
+      double n, d, dz, z;
+
+      for (i = 0, d = 0.0, n = 0.0; i < 8; i++) {
+         ix = x + iStep * m_iOffsetX[i];
+         iy = y + iStep * m_iOffsetY[i];
+         z = m_Result.getCellValueAsDouble(ix, iy);
+         if (!m_Result.isNoDataValue(z)) {
+            dz = 1.0 / m_dDistToNeighbour[i];
+            d += dz * z;
+            n += dz;
+         }
+      }
+
+      if (n > 0.0) {
+         d /= n;
+         return d;
+      }
+
+      return m_Result.getCellValueAsDouble(x, y);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/closeGaps/CloseGapsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/kernelDensity/KernelDensityAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/kernelDensity/KernelDensityAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/kernelDensity/KernelDensityAlgorithm.java	(revision 369)
@@ -0,0 +1,155 @@
+package es.unex.sextante.gridTools.kernelDensity;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class KernelDensityAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String DENSITY  = "DENSITY";
+   public static final String DISTANCE = "DISTANCE";
+   public static final String FIELD    = "FIELD";
+   public static final String LAYER    = "LAYER";
+
+   private int                m_iField;
+   private IVectorLayer       m_Layer;
+   private IRasterLayer       m_Result;
+   private AnalysisExtent         m_Extent;
+   private int                m_iDistance;
+   private double             m_dWeight[][];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Density__kernel"));
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Vector_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Search_radius"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(DENSITY, Sextante.getText("Density"));
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iShapeCount;
+      double dValue;
+      double dXMin, dYMin;
+      double dXMax, dYMax;
+      double dDistance;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      dDistance = m_Parameters.getParameterValueAsDouble(DISTANCE);
+
+      m_Result = getNewRasterLayer(DENSITY, m_Layer.getName() + Sextante.getText("[density]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Result.assign(0.0);
+
+      m_Extent = m_Result.getWindowGridExtent();
+
+      m_iDistance = (int) Math.floor(dDistance / m_Extent.getCellSize());
+
+      dXMin = m_Extent.getXMin() - dDistance;
+      dYMin = m_Extent.getYMin() - dDistance;
+      dXMax = m_Extent.getXMax() + dDistance;
+      dYMax = m_Extent.getYMax() + dDistance;
+
+      m_dWeight = new double[2 * m_iDistance + 1][2 * m_iDistance + 1];
+
+      for (y = -m_iDistance; y < m_iDistance + 1; y++) {
+         for (x = -m_iDistance; x < m_iDistance + 1; x++) {
+            final double dDist = Math.sqrt(x * x + y * y);
+            if (dDist < m_iDistance) {
+               m_dWeight[x + m_iDistance][y + m_iDistance] = Math.pow(1 - (dDist * dDist) / (m_iDistance * m_iDistance), 2);
+            }
+            else {
+               m_dWeight[x + m_iDistance][y + m_iDistance] = 0;
+            }
+         }
+      }
+
+      i = 0;
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate coord = geom.getCoordinate();
+
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+         }
+         catch (final Exception e) {
+            dValue = 1.0;
+         }
+
+         if ((coord.x > dXMin) && (coord.x < dXMax) && (coord.y > dYMin) && (coord.y < dYMax)) {
+            doPoint(coord, dValue);
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void doPoint(final Coordinate coord,
+                        final double dValue) {
+
+      int x, y;
+      int iX, iY;
+      GridCell cell;
+
+      cell = m_Extent.getGridCoordsFromWorldCoords(coord.x, coord.y);
+      iX = cell.getX();
+      iY = cell.getY();
+
+      for (y = -m_iDistance; y < m_iDistance + 1; y++) {
+         for (x = -m_iDistance; x < m_iDistance + 1; x++) {
+            if (m_dWeight[x + m_iDistance][y + m_iDistance] != 0) {
+               m_Result.addToCellValue(iX + x, iY + y, dValue * m_dWeight[x + m_iDistance][y + m_iDistance]);
+            }
+         }
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/kernelDensity/KernelDensityAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/correlation/CorrelationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/correlation/CorrelationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/correlation/CorrelationAlgorithm.java	(revision 369)
@@ -0,0 +1,106 @@
+package es.unex.sextante.gridTools.correlation;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.additionalResults.CorrelationGraphCreator;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+
+public class CorrelationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String REGRESSION_DATA = "REGRESSION_DATA";
+   public static final String REGRESSION      = "REGRESSION";
+   public static final String METHOD          = "METHOD";
+   public static final String GRID2           = "GRID2";
+   public static final String GRID            = "GRID";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Best_fit"), "y = a + b * x", "y = a + b / x", "y = a / (b - x)",
+               "y = a * x^b", "y = a e^(b * x)", "y = a + b * ln(x)" };
+
+      setName(Sextante.getText("Correlation_between_layers"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Layer_1"), true);
+         m_Parameters.addInputRasterLayer(GRID2, Sextante.getText("Layer_2"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Function_type"), sMethod);
+         addOutputChart(REGRESSION, Sextante.getText("Regression"));
+         addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dCellValue, dCellValue2;
+      IRasterLayer window, window2;
+      final Regression regression = new Regression();
+
+      window = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      window2 = m_Parameters.getParameterValueAsRasterLayer(GRID2);
+      final int iType = m_Parameters.getParameterValueAsInt(METHOD);
+
+      window.setFullExtent();
+      window2.setWindowExtent(window.getWindowGridExtent());
+      if ((window2.getDataType() == IRasterLayer.RASTER_DATA_TYPE_INT)
+          || (window2.getDataType() == IRasterLayer.RASTER_DATA_TYPE_SHORT)) {
+         window2.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      }
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dCellValue = window.getCellValueAsDouble(x, y);
+            dCellValue2 = window2.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dCellValue) && !window2.isNoDataValue(dCellValue2)) {
+               regression.addValue(dCellValue, dCellValue2);
+            }
+         }
+
+      }
+
+      regression.calculate(iType);
+      final CorrelationGraphCreator panel = new CorrelationGraphCreator(regression);
+
+      addOutputChart(REGRESSION, Sextante.getText("Regression"), panel.getChartPanel());
+
+      final DecimalFormat df = new DecimalFormat("####.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Regression"));
+      doc.addHeader(Sextante.getText("Regression"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(regression.getExpression());
+      doc.addListElement("R2 = " + df.format(regression.getR2()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"), doc.getHTMLCode());
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/correlation/CorrelationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeDataType/ChangeDataTypeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeDataType/ChangeDataTypeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeDataType/ChangeDataTypeAlgorithm.java	(revision 369)
@@ -0,0 +1,98 @@
+package es.unex.sextante.gridTools.changeDataType;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ChangeDataTypeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT  = "INPUT";
+   public static final String TYPE   = "TYPE";
+   public static final String RESULT = "RESULT";
+
+   public static final int    BYTE   = 0;
+   public static final int    SHORT  = 0;
+   public static final int    INT    = 0;
+   public static final int    FLOAT  = 0;
+   public static final int    DOUBLE = 0;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sTypes[] = { "Byte", "Short", "Int", "Float", "Double" };
+      setName(Sextante.getText("Change_data_type"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addSelection(TYPE, Sextante.getText("Data_type"), sTypes);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      int iType, iRasterType;
+      double dValue;
+      IRasterLayer input;
+
+      input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      iType = m_Parameters.getParameterValueAsInt(TYPE);
+
+      switch (iType) {
+         case 0:
+            iRasterType = IRasterLayer.RASTER_DATA_TYPE_BYTE;
+            break;
+         case 1:
+            iRasterType = IRasterLayer.RASTER_DATA_TYPE_SHORT;
+            break;
+         case 2:
+            iRasterType = IRasterLayer.RASTER_DATA_TYPE_INT;
+            break;
+         case 3:
+            iRasterType = IRasterLayer.RASTER_DATA_TYPE_FLOAT;
+            break;
+         case 4:
+         default:
+            iRasterType = IRasterLayer.RASTER_DATA_TYPE_DOUBLE;
+            break;
+      }
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("Result"), iRasterType);
+
+      input.setWindowExtent(m_AnalysisExtent);
+
+      iNX = result.getWindowGridExtent().getNX();
+      iNY = result.getWindowGridExtent().getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = input.getCellValueAsDouble(x, y);
+            if (!input.isNoDataValue(dValue)) {
+               result.setCellValue(x, y, dValue);
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/changeDataType/ChangeDataTypeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/locateExtremeValues/LocateExtremeValuesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/locateExtremeValues/LocateExtremeValuesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/locateExtremeValues/LocateExtremeValuesAlgorithm.java	(revision 369)
@@ -0,0 +1,235 @@
+
+
+package es.unex.sextante.gridTools.locateExtremeValues;
+
+import java.awt.geom.Point2D;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class LocateExtremeValuesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT             = "RESULT";
+   public static final String GRID               = "GRID";
+   public static final String POLYGONS           = "POLYGONS";
+   public static final String EXTREME_VALUE_TYPE = "EXTREME_VALUE_TYPE";
+
+   private int                m_iNX, m_iNY;
+   private IVectorLayer       m_Layer;
+   private AnalysisExtent     m_Extent;
+   private IRasterLayer       m_Window;
+   private Coordinate         m_Coordinate;
+   private double             m_dExtremeValue;
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Locate_max_values"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Grid"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Max_values"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+      int iShapeCount;
+      final GeometryFactory gf = new GeometryFactory();
+
+      m_Coordinate = new Coordinate();
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(POLYGONS);
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(GRID);
+
+      final String[] sNames = { m_Window.getName() };
+      final Class[] types = { Double.class };
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_POINT, types, sNames);
+
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iShapeCount = m_Layer.getShapesCount();
+
+      m_Window.setFullExtent();
+      m_Extent = m_Window.getWindowGridExtent();
+      final Coordinate[] coords = new Coordinate[5];
+      coords[0] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+      coords[1] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMax());
+      coords[2] = new Coordinate(m_Extent.getYMax(), m_Extent.getYMax());
+      coords[3] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMin());
+      coords[4] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+
+      final LinearRing ring = gf.createLinearRing(coords);
+      final Polygon extent = gf.createPolygon(ring, null);
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+      final IFeatureIterator iter = m_Layer.iterator();
+      i = 0;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         if (geom.intersects(extent)) {
+            m_dExtremeValue = Double.NEGATIVE_INFINITY;
+            doPolygon(geom);
+            final Point pt = gf.createPoint(new Coordinate(m_Coordinate.x, m_Coordinate.y));
+            m_Output.addFeature(pt, new Object[] { new Double(m_dExtremeValue) });
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void doPolygon(final Geometry geom) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part);
+      }
+
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int x, y, ix, xStart, xStop, iPoint;
+      double yPos;
+      double dValue;
+      Coordinate pLeft, pRight, pa, pb;
+      final Coordinate p = new Coordinate();
+      bCrossing = new boolean[m_iNX];
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (y = 0, yPos = m_Extent.getYMax(); y < m_iNY; y++, yPos -= m_Extent.getCellSize()) {
+         if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+            Arrays.fill(bCrossing, false);
+            pLeft = new Coordinate(m_Extent.getXMin() - 1.0, yPos);
+            pRight = new Coordinate(m_Extent.getXMax() + 1.0, yPos);
+
+            pb = points[points.length - 1];
+
+            for (iPoint = 0; iPoint < points.length; iPoint++) {
+               pa = pb;
+               pb = points[iPoint];
+
+               if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                  getCrossing(p, pa, pb, pLeft, pRight);
+
+                  ix = (int) ((p.x - m_Extent.getXMin()) / m_Extent.getCellSize() + 1.0);
+
+                  if (ix < 0) {
+                     ix = 0;
+                  }
+                  else if (ix >= m_iNX) {
+                     ix = m_iNX - 1;
+                  }
+
+                  bCrossing[ix] = !bCrossing[ix];
+               }
+            }
+
+            for (x = xStart, bFill = false; x <= xStop; x++) {
+               if (bCrossing[x]) {
+                  bFill = !bFill;
+               }
+               if (bFill) {
+                  dValue = m_Window.getCellValueAsDouble(x, y);
+                  if (!m_Window.isNoDataValue(dValue)) {
+                     if (dValue > m_dExtremeValue) {
+                        m_dExtremeValue = dValue;
+                        final Point2D coord = m_Extent.getWorldCoordsFromGridCoords(x, y);
+                        m_Coordinate.x = coord.getX();
+                        m_Coordinate.y = coord.getY();
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/locateExtremeValues/LocateExtremeValuesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/thresholdBuffer/ThresholdBufferAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/thresholdBuffer/ThresholdBufferAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/thresholdBuffer/ThresholdBufferAlgorithm.java	(revision 369)
@@ -0,0 +1,174 @@
+package es.unex.sextante.gridTools.thresholdBuffer;
+
+import java.awt.Point;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class ThresholdBufferAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   BUFFER                                = 1;
+   private static final int   FEATURE                               = 2;
+   private final static int   m_iOffsetX[]                          = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int   m_iOffsetY[]                          = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   public static final String FEATURES                              = "FEATURES";
+   public static final String VALUES                                = "VALUES";
+   public static final String THRESHOLD                             = "THRESHOLD";
+   public static final String METHOD                                = "METHOD";
+   public static final String GLOBAL_THRESHOLD                      = "GLOBAL_THRESHOLD";
+   public static final String BUFFER_LAYER                          = "BUFFER_LAYER";
+
+   public static final int    THRESHOLD_TYPE_ABSOLUTE               = 0;
+   public static final int    THRESHOLD_TYPE_RELATIVE_TO_CELL_VALUE = 0;
+
+   int                        m_iNX, m_iNY;
+   int                        m_iThresholdType;
+   double                     m_dThreshold;
+   boolean                    m_bThresholdGridDefined;
+   IRasterLayer               m_Features, m_Threshold, m_Values;
+   IRasterLayer               m_Buffer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Absolute"), Sextante.getText("Relative_to_cell_value") };
+
+      setName(Sextante.getText("Threshold_buffer"));
+      setGroup(Sextante.getText("Buffers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(FEATURES, Sextante.getText("Layer"), true);
+         m_Parameters.addInputRasterLayer(VALUES, Sextante.getText("Threshold_parameter"), true);
+         m_Parameters.addInputRasterLayer(THRESHOLD, Sextante.getText("Threshold_values"), false);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Threshold"), sMethod);
+         m_Parameters.addNumericalValue(GLOBAL_THRESHOLD, Sextante.getText("global_threshold"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+         addOutputRasterLayer(BUFFER_LAYER, Sextante.getText("Buffer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+
+      m_iThresholdType = m_Parameters.getParameterValueAsInt(METHOD);
+      m_dThreshold = m_Parameters.getParameterValueAsDouble(GLOBAL_THRESHOLD);
+      m_Features = m_Parameters.getParameterValueAsRasterLayer(FEATURES);
+      m_Values = m_Parameters.getParameterValueAsRasterLayer(VALUES);
+      m_Threshold = m_Parameters.getParameterValueAsRasterLayer(THRESHOLD);
+
+      m_Buffer = getNewRasterLayer(BUFFER_LAYER, Sextante.getText("Buffer") + "[" + m_Features.getName() + "]",
+               IRasterLayer.RASTER_DATA_TYPE_BYTE);
+
+      m_Features.setWindowExtent(m_Buffer.getWindowGridExtent());
+      m_Features.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+      m_Values.setWindowExtent(m_Buffer.getWindowGridExtent());
+      if (m_Threshold != null) {
+         m_Threshold.setWindowExtent(m_Buffer.getWindowGridExtent());
+         m_bThresholdGridDefined = true;
+      }
+      else {
+         m_bThresholdGridDefined = false;
+      }
+
+      m_Buffer.assign(0.0);
+
+      m_iNX = m_Features.getNX();
+      m_iNY = m_Features.getNY();
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Features.getCellValueAsDouble(x, y);
+            if ((dValue != 0) && !m_Features.isNoDataValue(dValue)) {
+               bufferPoint(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void bufferPoint(int x,
+                            int y) {
+
+      int x2, y2;
+      int iValue;
+      int iPt;
+      int n;
+      double dBaseValue;
+      double dThreshold;
+      double dValue;
+      final ArrayList centralPoints = new ArrayList();
+      final ArrayList adjPoints = new ArrayList();
+      Point point;
+
+      dBaseValue = m_Values.getCellValueAsDouble(x, y);
+
+      if (m_bThresholdGridDefined) {
+         dThreshold = m_Threshold.getCellValueAsDouble(x, y);
+      }
+      else {
+         dThreshold = m_dThreshold;
+      }
+
+      centralPoints.add(new Point(x, y));
+      m_Buffer.setCellValue(x, y, FEATURE);
+
+      while (centralPoints.size() != 0) {
+         for (iPt = 0; iPt < centralPoints.size(); iPt++) {
+            point = (Point) centralPoints.get(iPt);
+            x = point.x;
+            y = point.y;
+            dValue = m_Values.getCellValueAsDouble(x, y);
+            if (!m_Values.isNoDataValue(dValue)) {
+               for (n = 0; n < 8; n++) {
+                  x2 = x + m_iOffsetX[n];
+                  y2 = y + m_iOffsetY[n];
+                  dValue = m_Values.getCellValueAsDouble(x2, y2);
+                  if (!m_Values.isNoDataValue(dValue)) {
+                     iValue = m_Buffer.getCellValueAsInt(x2, y2);
+                     if (iValue == 0) {
+                        if (m_iThresholdType == ThresholdBufferAlgorithm.THRESHOLD_TYPE_RELATIVE_TO_CELL_VALUE) {
+                           dValue = Math.abs(dValue - dBaseValue);
+                        }
+                        if (dValue < dThreshold) {
+                           m_Buffer.setCellValue(x2, y2, BUFFER);
+                           adjPoints.add(new Point(x2, y2));
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         centralPoints.clear();
+         for (iPt = 0; iPt < adjPoints.size(); iPt++) {
+            point = (Point) adjPoints.get(iPt);
+            centralPoints.add(new Point(point.x, point.y));
+         }
+         adjPoints.clear();
+
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/thresholdBuffer/ThresholdBufferAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/aggregate/AggregateAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/aggregate/AggregateAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/aggregate/AggregateAlgorithm.java	(revision 369)
@@ -0,0 +1,168 @@
+package es.unex.sextante.gridTools.aggregate;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class AggregateAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String GRID   = "GRID";
+   public static final String METHOD = "METHOD";
+   public static final String SIZE   = "SIZE";
+   public static final String RESULT = "RESULT";
+
+   public static final int    SUM    = 0;
+   public static final int    MAX    = 1;
+   public static final int    MIN    = 2;
+   public static final int    MODE   = 3;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Sum"), Sextante.getText("Maximum"), Sextante.getText("Minimum"),
+               Sextante.getText("Moda") };
+
+      setName(Sextante.getText("Aggregate"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("M\u00e9todo"), sMethod);
+         m_Parameters.addNumericalValue(SIZE, Sextante.getText("Aggregation_factor"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 2, 2, Integer.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Aggregated_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int x2, y2;
+      int i, j;
+      int iNX, iNY;
+      int iSize;
+      int iMethod;
+      double dMin, dMax;
+      double dSum;
+      double dValue;
+      double dCellSize;
+      Integer count;
+      Double value;
+      final HashMap map = new HashMap();
+      AnalysisExtent resultExtent;
+      IRasterLayer window;
+
+      iSize = m_Parameters.getParameterValueAsInt(SIZE);
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      window = m_Parameters.getParameterValueAsRasterLayer(GRID);
+
+      window.setFullExtent();
+      final AnalysisExtent ge = window.getLayerGridExtent();
+
+      iNX = (int) Math.floor((window.getNX() / iSize));
+      iNY = (int) Math.floor((window.getNY() / iSize));
+      dCellSize = window.getLayerCellSize() * iSize;
+
+      resultExtent = new AnalysisExtent();
+      resultExtent.setCellSize(dCellSize);
+      resultExtent.setXRange(ge.getXMin(), ge.getXMin() + iNX * dCellSize, true);
+      resultExtent.setYRange(ge.getYMin(), ge.getYMin() + iNY * dCellSize, true);
+
+
+      final String sName = window.getName() + Sextante.getText("[aggregated]");
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, sName, window.getDataType(), resultExtent);
+
+      for (y = 0, y2 = 0; (y2 < iNY) && setProgress(y, iNY); y += iSize, y2++) {
+         for (x = 0, x2 = 0; x2 < iNX; x += iSize, x2++) {
+            dMax = dMin = window.getCellValueAsDouble(x, y);
+            dSum = 0;
+            for (i = 0; i < iSize; i++) {
+               for (j = 0; j < iSize; j++) {
+                  dValue = window.getCellValueAsDouble(x + i, y + j);
+                  if (!window.isNoDataValue(dValue)) {
+                     if (dValue > dMax) {
+                        dMax = dValue;
+                     }
+                     if (dValue < dMin) {
+                        dMin = dValue;
+                     }
+                     dSum += dValue;
+                     value = new Double(dValue);
+                     count = (Integer) map.get(new Double(dValue));
+                     if (count != null) {
+                        count = new Integer(count.intValue() + 1);
+                     }
+                     else {
+                        count = new Integer(1);
+                     }
+                     map.put(new Double(dValue), count);
+
+                  }
+               }
+            }
+
+
+            int iCount;
+            int iMaxCount = 0;
+            double dMode = window.getNoDataValue();
+
+            final Set set = map.keySet();
+            final Iterator iter = set.iterator();
+
+            while (iter.hasNext()) {
+               value = (Double) iter.next();
+               dValue = value.doubleValue();
+               count = (Integer) map.get(value);
+               if (count == null) {
+                  count = new Integer(1);
+               }
+               iCount = count.intValue();
+               if (iCount > iMaxCount) {
+                  dMode = dValue;
+                  iMaxCount = iCount;
+               }
+               map.put(value, new Integer(iCount + 1));
+            }
+            switch (iMethod) {
+               case SUM:
+                  result.setCellValue(x2, y2, dSum);
+                  break;
+               case MIN:
+                  result.setCellValue(x2, y2, dMin);
+                  break;
+               case MAX:
+                  result.setCellValue(x2, y2, dMax);
+                  break;
+               case MODE:
+                  result.setCellValue(x, y, dMode);
+               default:
+                  break;
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/aggregate/AggregateAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/mergeGrids/MergeGridsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/mergeGrids/MergeGridsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/mergeGrids/MergeGridsAlgorithm.java	(revision 369)
@@ -0,0 +1,117 @@
+package es.unex.sextante.gridTools.mergeGrids;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class MergeGridsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METHOD = "METHOD";
+   public static final String INPUT  = "INPUT";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+
+      final String[] sMethod = { Sextante.getText("Nearest_neighbour"), Sextante.getText("Bilinear"),
+               Sextante.getText("Inverse_distance"), Sextante.getText("Cubic_spline"), Sextante.getText("B-spline") };
+
+      setName(Sextante.getText("Merge_grids"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Interpolation_method"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Merged_grids"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iMethod;
+      int iNX, iNY;
+      double dValue, dValueSum;
+      double dValidValues;
+      IRasterLayer[] window;
+
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      final ArrayList input = m_Parameters.getParameterValueAsArrayList(INPUT);
+
+      if (input.size() == 0) {
+         return false;
+      }
+
+      boolean bAddWarning = false;
+      int iBands = ((IRasterLayer) input.get(0)).getBandsCount();
+      for (i = 0; i < input.size(); i++) {
+         final IRasterLayer layer = ((IRasterLayer) input.get(i));
+         if (layer.getBandsCount() != iBands) {
+            iBands = Math.max(layer.getBandsCount(), iBands);
+            bAddWarning = true;
+         }
+      }
+
+      if (bAddWarning) {
+         Sextante.addWarningToLog(Sextante.getText("Layers_to_be_merged_have_different_number_of_bands"));
+      }
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("Merged_grids"),
+               ((IRasterLayer) input.get(0)).getDataType(), iBands);
+
+      result.assignNoData();
+
+      window = new IRasterLayer[input.size()];
+      for (i = 0; i < input.size(); i++) {
+         window[i] = ((IRasterLayer) input.get(i));
+         window[i].setWindowExtent(result.getWindowGridExtent());
+         window[i].setInterpolationMethod(iMethod);
+      }
+
+      iNX = window[0].getNX();
+      iNY = window[0].getNY();
+
+      for (int iBand = 0; iBand < iBands; iBand++) {
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               dValueSum = 0;
+               dValidValues = 0;
+               for (i = 0; i < window.length; i++) {
+                  dValue = window[i].getCellValueAsDouble(x, y, iBand);
+                  if (!window[i].isNoDataValue(dValue)) {
+                     dValidValues++;
+                     dValueSum += dValue;
+                  }
+               }
+               if (dValidValues == 0.0) {
+                  result.setNoData(x, y);
+               }
+               else {
+                  result.setCellValue(x, y, iBand, dValueSum / dValidValues);
+               }
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/mergeGrids/MergeGridsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gradientLines/GradientLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gradientLines/GradientLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gradientLines/GradientLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,124 @@
+package es.unex.sextante.gridTools.gradientLines;
+
+import java.awt.geom.Point2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class GradientLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LINES = "LINES";
+   public static final String MAX   = "MAX";
+   public static final String MIN   = "MIN";
+   public static final String SKIP  = "SKIP";
+   public static final String INPUT = "INPUT";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Input;
+   private IVectorLayer       m_Lines;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Gradient_lines"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addNumericalValue(MIN, Sextante.getText("Minimum_size"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1.0, 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(MAX, Sextante.getText("Maximum_size"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10., 0.0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(SKIP, Sextante.getText("Interval"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  1, 0.0, Integer.MAX_VALUE);
+         addOutputVectorLayer(LINES, Sextante.getText("Gradient_lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iSkip;
+      double dSlope, dAspect;
+      double dMinSize;
+      double dMaxSize;
+      double dRange;
+      double dMin = Double.MAX_VALUE;
+      double dMax = Double.NEGATIVE_INFINITY;
+      final Object[] values = new Object[2];
+      final String sFields[] = { Sextante.getText("Slope"), Sextante.getText("Aspect") };
+      final Class[] types = { Double.class, Double.class };
+
+      m_Input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      m_Input.setFullExtent();
+
+      iSkip = m_Parameters.getParameterValueAsInt(SKIP);
+      dMinSize = m_Parameters.getParameterValueAsDouble(MIN);
+      dMaxSize = m_Parameters.getParameterValueAsDouble(MAX);
+      dRange = dMaxSize - dMinSize;
+      m_Lines = getNewVectorLayer(LINES, m_Input.getName() + Sextante.getText("[gradient]"), IVectorLayer.SHAPE_TYPE_LINE, types,
+               sFields);
+
+      m_iNX = m_Input.getNX();
+      m_iNY = m_Input.getNY();
+
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y += iSkip) {
+         for (x = 0; x < m_iNX; x += iSkip) {
+            dSlope = m_Input.getSlope(x, y);
+            if (!m_Input.isNoDataValue(dSlope)) {
+               dMin = Math.min(dSlope, dMin);
+               dMax = Math.max(dSlope, dMax);
+            }
+         }
+      }
+
+      if (dMin < dMax) {
+         dRange = dRange / (dMax - dMin);
+      }
+      final GeometryFactory gf = new GeometryFactory();
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y += iSkip) {
+         for (x = 0; x < m_iNX; x += iSkip) {
+            dSlope = m_Input.getSlope(x, y);
+            dAspect = m_Input.getAspect(x, y);
+            if (!m_Input.isNoDataValue(dSlope) && !m_Input.isNoDataValue(dAspect)) {
+               values[0] = new Double(dSlope);
+               values[1] = new Double(dAspect);
+               dSlope = dMin + dRange * (dSlope - dMin);
+               final Coordinate coords[] = new Coordinate[2];
+               final Point2D pt = m_Input.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+               coords[0] = new Coordinate(pt.getX(), pt.getY());
+               final double dX = pt.getX() + Math.sin(dAspect) * dSlope;
+               final double dY = pt.getY() + Math.cos(dAspect) * dSlope;
+               coords[1] = new Coordinate(dX, dY);
+               final Geometry line = gf.createLineString(coords);
+               m_Lines.addFeature(line, values);
+            }
+
+         }
+      }
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gradientLines/GradientLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/rasterBuffer/RasterBufferAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/rasterBuffer/RasterBufferAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/rasterBuffer/RasterBufferAlgorithm.java	(revision 369)
@@ -0,0 +1,127 @@
+package es.unex.sextante.gridTools.rasterBuffer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class RasterBufferAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   BUFFER                            = 1;
+   private static final int   FEATURE                           = 2;
+
+   public static final String INPUT                             = "INPUT";
+   public static final String METHOD                            = "METHOD";
+   public static final String DIST                              = "DIST";
+   public static final String BUFFER_LAYER                      = "BUFFER_LAYER";
+
+   public static final int    FIXED_DISTANCE                    = 0;
+   public static final int    USE_CELL_VALUE_AS_BUFFER_DISTANCE = 0;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Fixed_distance"), Sextante.getText("Use_cell_value_as_distance") };
+
+      setName(Sextante.getText("Raster_buffer"));
+      setGroup(Sextante.getText("Buffers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(DIST, Sextante.getText("Distance"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  100, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(BUFFER_LAYER, Sextante.getText("Buffer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int x, y;
+      int x2, y2;
+      int iNX, iNY;
+      int iBufFixedDist;
+      int iBufferType;
+      int iBufDist;
+      double dBufDist;
+      double dDist = 0;
+      double dValue = 0;
+      IRasterLayer layer;
+
+      iBufferType = m_Parameters.getParameterValueAsInt(METHOD);
+      layer = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      final IRasterLayer result = getNewRasterLayer(BUFFER_LAYER, Sextante.getText("Buffer") + "[" + layer.getName() + "]",
+               IRasterLayer.RASTER_DATA_TYPE_BYTE);
+
+      layer.setWindowExtent(result.getWindowGridExtent());
+
+      dBufDist = m_Parameters.getParameterValueAsDouble("DIST") / layer.getWindowCellSize();
+      iBufFixedDist = (int) (dBufDist + 2.0);
+
+      result.assign(0.0);
+
+      iNX = layer.getNX();
+      iNY = layer.getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = layer.getCellValueAsDouble(x, y);
+            if ((dValue != 0) && !layer.isNoDataValue(dValue)) {
+               if (iBufferType == 1) {
+                  dBufDist = dValue / layer.getWindowCellSize();
+                  iBufDist = (int) (dBufDist + 2.0);
+               }
+               else {
+                  iBufDist = iBufFixedDist;
+               }
+               for (i = -iBufDist; i < iBufDist + 1; i++) {
+                  for (j = -iBufDist; j < iBufDist + 1; j++) {
+                     x2 = Math.max(Math.min(iNX - 1, x + i), 0);
+                     y2 = Math.max(Math.min(iNY - 1, y + j), 0);
+                     dDist = getDist(x, y, x2, y2);
+                     if (dDist < dBufDist) {
+                        dValue = layer.getCellValueAsDouble(x2, y2);
+                        if ((dValue != 0) && !layer.isNoDataValue(dValue)) {
+                           result.setCellValue(x2, y2, FEATURE);
+                        }
+                        else {
+                           result.setCellValue(x2, y2, BUFFER);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+      }
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private double getDist(final int x1,
+                          final int y1,
+                          final int x2,
+                          final int y2) {
+
+      return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/rasterBuffer/RasterBufferAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/histogram/HistogramAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/histogram/HistogramAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/histogram/HistogramAlgorithm.java	(revision 369)
@@ -0,0 +1,129 @@
+package es.unex.sextante.gridTools.histogram;
+
+import java.util.ArrayList;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.statistics.HistogramDataset;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class HistogramAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final int   CLASS_COUNT = 100;
+
+   public static final String GRID        = "GRID";
+   public static final String GRAPH       = "GRAPH";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int i;
+      int A;
+      int iNX, iNY;
+      double z;
+      double dMin = 0, dMax = 0;
+      double Count[];
+
+      Count = new double[CLASS_COUNT + 1];
+
+      final IRasterLayer input = m_Parameters.getParameterValueAsRasterLayer(GRID);
+      input.setFullExtent();
+
+      iNX = input.getNX();
+      iNY = input.getNY();
+
+      A = 0;
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            z = input.getCellValueAsDouble(x, y);
+            if (!input.isNoDataValue(z)) {
+               if (A <= 0) {
+                  dMin = dMax = z;
+               }
+               else {
+                  if (dMin > z) {
+                     dMin = z;
+                  }
+                  else if (dMax < z) {
+                     dMax = z;
+                  }
+               }
+               A++;
+            }
+         }
+      }
+
+      final double dInterval = (dMax - dMin) / CLASS_COUNT;
+      if ((A > 0) && (dMin < dMax)) {
+         for (y = 0; y < iNY; y++) {
+            for (x = 0; x < iNX; x++) {
+               z = input.getCellValueAsDouble(x, y);
+               if (!input.isNoDataValue(z)) {
+                  i = (int) ((z - dMin) / dInterval);
+                  Count[Math.min(i, CLASS_COUNT)]++;
+               }
+            }
+         }
+
+         final ArrayList list = new ArrayList();
+         for (i = 0; i < Count.length; i++) {
+            final int iCount = (int) (10000 * Count[i] / A);
+            for (int j = 0; j < iCount; j++) {
+               list.add(new Double(dMin + dInterval * i));
+            }
+         }
+
+         final double countForHistogram[] = new double[list.size()];
+         for (int j = 0; j < list.size(); j++) {
+            countForHistogram[j] = ((Double) list.get(j)).doubleValue();
+         }
+
+         final HistogramDataset dataset = new HistogramDataset();
+         dataset.addSeries(input.getName(), countForHistogram, 100);
+
+         final JFreeChart chart = ChartFactory.createHistogram("", null, null, dataset, PlotOrientation.VERTICAL, true, false,
+                  false);
+
+         final ChartPanel jPanelChart = new ChartPanel(chart);
+         jPanelChart.setMouseZoomable(true, true);
+         jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+         jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+         jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+         addOutputChart(GRAPH, Sextante.getText("Histogram") + "[" + input.getName() + "]", jPanelChart);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Histogram"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputRasterLayer(GRID, Sextante.getText("Raster_layer"), true);
+         addOutputChart(GRAPH, Sextante.getText("Histogram"), null);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/histogram/HistogramAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridsFromTableAndGrid/GridsFromTableAndGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridsFromTableAndGrid/GridsFromTableAndGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridsFromTableAndGrid/GridsFromTableAndGridAlgorithm.java	(revision 369)
@@ -0,0 +1,176 @@
+
+
+package es.unex.sextante.gridTools.gridsFromTableAndGrid;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+
+public class GridsFromTableAndGridAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private double             NO_DATA;
+
+   public static final String INPUT  = "INPUT";
+   public static final String TABLE  = "TABLE";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Grids_from_table_and_classified_grid"));
+      setGroup(Sextante.getText("Raster_categories_analysis"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Look-up_table"), true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), TABLE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int x, y;
+      int iNX, iNY;
+      int iMax = 0;
+      int iClass;
+      int[] ValidFields;
+      int iValidFields = 0;
+      Object[] record;
+      double[][] Values;
+      IRasterLayer[] grids;
+      IRasterLayer grid;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      grid = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final ITable table = m_Parameters.getParameterValueAsTable(TABLE);
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      IRecordsetIterator iter = table.iterator();
+      iMax = Integer.MIN_VALUE;
+      while (iter.hasNext()) {
+         record = iter.next().getValues();
+         try {
+            iClass = new Integer(record[iField].toString()).intValue();
+            if (iClass > iMax) {
+               iMax = iClass;
+            }
+         }
+         catch (final NumberFormatException e) {
+            Sextante.addErrorToLog(e);
+            return false;
+         }
+      }
+
+      for (i = 0; i < table.getFieldCount(); i++) {
+         if ((table.getFieldType(i) == Double.class) || (table.getFieldType(i) == Integer.class)
+             || (table.getFieldType(i) == Float.class) || (table.getFieldType(i) == Byte.class)
+             || ((table.getFieldType(i) == Long.class) && (i != iField))) {
+            iValidFields++;
+         }
+      }
+
+      ValidFields = new int[iValidFields];
+      iValidFields = 0;
+
+      for (i = 0; i < table.getFieldCount(); i++) {
+         if ((table.getFieldType(i) == Double.class) || (table.getFieldType(i) == Integer.class)
+             || (table.getFieldType(i) == Float.class) || (table.getFieldType(i) == Byte.class)
+             || ((table.getFieldType(i) == Long.class) && (i != iField))) {
+            ValidFields[iValidFields] = i;
+            iValidFields++;
+         }
+      }
+
+      if (iValidFields != 0) {
+
+         Values = new double[iMax + 1][iValidFields];
+
+         iter = table.iterator();
+         while (iter.hasNext()) {
+            record = iter.next().getValues();
+            iClass = new Integer(record[iField].toString()).intValue();
+            for (j = 0; j < iValidFields; j++) {
+               try {
+                  Values[iClass][j] = new Double(record[ValidFields[j]].toString()).doubleValue();
+               }
+               catch (final Exception e) {
+                  Values[iClass][j] = NO_DATA;
+               }
+
+            }
+         }
+
+         grids = new IRasterLayer[iValidFields];
+         for (i = 0; i < iValidFields; i++) {
+            grids[i] = getNewRasterLayer(RESULT + Integer.toString(i), "[" + table.getFieldName(ValidFields[i]) + "]",
+                     IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+            grids[i].setNoDataValue(NO_DATA);
+         }
+
+         grid.setWindowExtent(grids[0].getWindowGridExtent());
+         grid.setInterpolationMethod(IRasterLayer.INTERPOLATION_NearestNeighbour);
+
+         iNX = grid.getNX();
+         iNY = grid.getNY();
+
+         for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+            for (x = 0; x < iNX; x++) {
+               iClass = grid.getCellValueAsInt(x, y);
+               if ((iClass > 0) && (iClass < iMax + 1)) {
+                  for (i = 0; i < iValidFields; i++) {
+                     grids[i].setCellValue(x, y, Values[iClass][i]);
+                  }
+               }
+            }
+         }
+         return !m_Task.isCanceled();
+      }
+      else {
+         throw new GeoAlgorithmExecutionException("No valid fields in table");
+      }
+
+   }
+
+
+   @Override
+   public boolean isSuitableForModelling() {
+
+      return false;
+
+   }
+
+
+   @Override
+   public boolean generatesLayers() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridsFromTableAndGrid/GridsFromTableAndGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipGrid/ClipGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipGrid/ClipGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipGrid/ClipGridAlgorithm.java	(revision 369)
@@ -0,0 +1,246 @@
+package es.unex.sextante.gridTools.clipGrid;
+
+import java.awt.geom.Rectangle2D;
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+
+public class ClipGridAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT    = "INPUT";
+   public static final String POLYGONS = "POLYGONS";
+   public static final String RESULT   = "RESULT";
+
+   private AnalysisExtent     m_Extent;
+   private int                m_iMinX, m_iMinY;
+   private IRasterLayer       m_Output;
+   private IRasterLayer       m_Raster;
+   private IVectorLayer       m_Polygons;
+   private int                m_iNX;
+   private int                m_iNY;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Crop_grid_with_polygon_layer"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer_to_crop"), true);
+         m_Parameters.addInputVectorLayer(POLYGONS, Sextante.getText("Polygons"), AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+                  true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Cropped_layer"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Raster = m_Parameters.getParameterValueAsRasterLayer("INPUT");
+      m_Polygons = m_Parameters.getParameterValueAsVectorLayer("POLYGONS");
+
+      clip();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void clip() throws UnsupportedOutputChannelException, IteratorException {
+
+      int i;
+      m_Extent = getAdjustedGridExtent();
+
+      if (m_Extent != null) {
+         m_Raster.setWindowExtent(m_Extent);
+         m_Output = getNewRasterLayer(RESULT, Sextante.getText("Result"), m_Raster.getDataType(), m_Extent,
+                  m_Raster.getBandsCount());
+         m_Output.setNoDataValue(m_Raster.getNoDataValue());
+         m_Output.assignNoData();
+
+         m_iNX = m_Extent.getNX();
+         m_iNY = m_Extent.getNY();
+
+         i = 1;
+         final IFeatureIterator iter = m_Polygons.iterator();
+         final int iShapeCount = m_Polygons.getShapesCount();
+         while (iter.hasNext() && !m_Task.isCanceled()) {
+            setProgressText(Integer.toString(i) + "/" + Integer.toString(iShapeCount));
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            doPolygon(geom);
+            if (m_Task.isCanceled()) {
+               return;
+            }
+            i++;
+         }
+         iter.close();
+
+      }
+
+   }
+
+
+   private void doPolygon(final Geometry geom) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doPolygonPart(part);
+      }
+
+   }
+
+
+   private void doPolygonPart(final Geometry geom) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int x, y, ix, xStart, xStop, iPoint;
+      double yPos;
+      Coordinate pLeft, pRight, pa, pb;
+      final Coordinate p = new Coordinate();
+      bCrossing = new boolean[m_iNX];
+      final int iBands = m_Raster.getBandsCount();
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (y = 0, yPos = m_Extent.getYMax(); (y < m_iNY) && setProgress(y, m_iNY); y++, yPos -= m_Extent.getCellSize()) {
+         if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+            Arrays.fill(bCrossing, false);
+            pLeft = new Coordinate(m_Extent.getXMin() - 1.0, yPos);
+            pRight = new Coordinate(m_Extent.getXMax() + 1.0, yPos);
+
+            pb = points[points.length - 1];
+
+            for (iPoint = 0; iPoint < points.length; iPoint++) {
+               pa = pb;
+               pb = points[iPoint];
+
+               if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                  getCrossing(p, pa, pb, pLeft, pRight);
+
+                  ix = (int) ((p.x - m_Extent.getXMin()) / m_Extent.getCellSize() + 1.0);
+
+                  if (ix < 0) {
+                     ix = 0;
+                  }
+                  else if (ix >= m_iNX) {
+                     ix = m_iNX - 1;
+                  }
+
+                  bCrossing[ix] = !bCrossing[ix];
+               }
+            }
+
+            for (x = xStart, bFill = false; x <= xStop; x++) {
+               if (bCrossing[x]) {
+                  bFill = !bFill;
+               }
+               if (bFill) {
+                  for (int i = 0; i < iBands; i++) {
+                     final double dValue = m_Raster.getCellValueAsDouble(x, y, i);
+                     m_Output.setCellValue(x, y, i, dValue);
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+   }
+
+
+   private AnalysisExtent getAdjustedGridExtent() {
+
+      double iMaxX, iMaxY;
+      double dMinX, dMinY;
+      double dMinX2, dMinY2, dMaxX2, dMaxY2;
+      double dCellSize;
+      final AnalysisExtent ge = new AnalysisExtent();
+
+      final Rectangle2D rect = m_Polygons.getFullExtent();
+      dMinX = m_Raster.getLayerGridExtent().getXMin();
+      dMinY = m_Raster.getLayerGridExtent().getYMin();
+      dCellSize = m_Raster.getLayerGridExtent().getCellSize();
+
+      m_iMinX = (int) Math.floor((rect.getMinX() - dMinX) / dCellSize);
+      iMaxX = Math.ceil((rect.getMaxX() - dMinX) / dCellSize);
+      m_iMinY = (int) Math.floor((rect.getMinY() - dMinY) / dCellSize);
+      iMaxY = Math.ceil((rect.getMaxY() - dMinY) / dCellSize);
+
+      dMinX2 = dMinX + m_iMinX * dCellSize;
+      dMinY2 = dMinY + m_iMinY * dCellSize;
+      dMaxX2 = dMinX + iMaxX * dCellSize;
+      dMaxY2 = dMinY + iMaxY * dCellSize;
+
+      ge.setCellSize(dCellSize);
+      ge.setXRange(dMinX2, dMaxX2, true);
+      ge.setYRange(dMinY2, dMaxY2, true);
+
+      return ge;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/clipGrid/ClipGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/invertNoData/InvertNoDataAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/invertNoData/InvertNoDataAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/invertNoData/InvertNoDataAlgorithm.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.gridTools.invertNoData;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class InvertNoDataAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String INPUT  = "INPUT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Invert_mask"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Inverted_mask"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      IRasterLayer input;
+
+      input = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+
+      final IRasterLayer result = getNewRasterLayer(RESULT, Sextante.getText("Inverted_mask"), IRasterLayer.RASTER_DATA_TYPE_BYTE);
+
+
+      result.setNoDataValue(0.0);
+
+      input.setWindowExtent(result.getWindowGridExtent());
+
+      iNX = result.getWindowGridExtent().getNX();
+      iNY = result.getWindowGridExtent().getNY();
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = input.getCellValueAsDouble(x, y);
+            if (input.isNoDataValue(dValue)) {
+               result.setCellValue(x, y, 1.0);
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/invertNoData/InvertNoDataAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/bboxGrid/bboxGridAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/bboxGrid/bboxGridAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/bboxGrid/bboxGridAlgorithm.java	(revision 369)
@@ -0,0 +1,79 @@
+package es.unex.sextante.gridTools.bboxGrid;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+/**
+ * Creates a polygon layer with the extension of input grid
+ * 
+ * @author Nacho Varela
+ */
+public class bboxGridAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT  = "INPUT";
+   public static final String RESULT = "RESULT";
+
+   private IRasterLayer       m_Raster;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_grid_bounding_box"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("INPUT_LAYER"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("bbox"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Raster = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final AnalysisExtent ext = m_Raster.getLayerGridExtent();
+
+      final String[] sNames = { "ID" };
+      final Class[] types = { Integer.class };
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_POLYGON, types,
+               sNames);
+
+      final Coordinate[] coords = new Coordinate[5];
+      coords[0] = new Coordinate(ext.getXMin(), ext.getYMin());
+      coords[1] = new Coordinate(ext.getXMin(), ext.getYMax());
+      coords[2] = new Coordinate(ext.getXMax(), ext.getYMax());
+      coords[3] = new Coordinate(ext.getXMax(), ext.getYMin());
+      coords[4] = new Coordinate(ext.getXMin(), ext.getYMin());
+
+      LinearRing result;
+      Geometry polygon;
+      final GeometryFactory gf = new GeometryFactory();
+      result = gf.createLinearRing(coords);
+      polygon = gf.createPolygon(result, null);
+
+      output.addFeature(polygon, new Object[] { new Integer(0) });
+
+      return !m_Task.isCanceled();
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/bboxGrid/bboxGridAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridOrientation/GridOrientationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridOrientation/GridOrientationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridOrientation/GridOrientationAlgorithm.java	(revision 369)
@@ -0,0 +1,151 @@
+package es.unex.sextante.gridTools.gridOrientation;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class GridOrientationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METHOD            = "METHOD";
+   public static final String INPUT             = "INPUT";
+   public static final String RESULT            = "RESULT";
+
+   private int                m_iNX, m_iNY;
+   private IRasterLayer       m_Window;
+   private IRasterLayer       m_Result;
+
+   public static final int    MIRROR_HORIZONTAL = 0;
+   public static final int    MIRROR_VERTICAL   = 1;
+   public static final int    INVERT            = 2;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String[] sMethod = { Sextante.getText("Mirror_horizontally"), Sextante.getText("Mirror_vertically"),
+               Sextante.getText("Invert") };
+
+      setName(Sextante.getText("Mirror-flip"));
+      setGroup(Sextante.getText("Basic_tools_for_raster_layers"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("M\u00e9todo"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int iMethod;
+      final String[] sMethod = { Sextante.getText("[mirrored]"), Sextante.getText("[mirrored]"), Sextante.getText("[Inverted]") };
+
+      iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      final AnalysisExtent gridExtent = new AnalysisExtent(m_Window);
+      m_Window.setWindowExtent(gridExtent);
+      m_Result = getNewRasterLayer(RESULT, m_Window.getName() + sMethod[iMethod], m_Window.getDataType(), gridExtent);
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      switch (iMethod) {
+         case 0:
+            mirrorHorizontally();
+            break;
+         case 1:
+            mirrorVertically();
+            break;
+         case 2:
+            invert();
+            break;
+         default:
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void mirrorHorizontally() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            m_Result.setCellValue(m_iNX - x - 1, y, m_Window.getCellValueAsDouble(x, y));
+         }
+      }
+
+   }
+
+
+   private void mirrorVertically() {
+
+      int x, y;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            m_Result.setCellValue(x, m_iNY - y - 1, m_Window.getCellValueAsDouble(x, y));
+         }
+         setProgress(y, m_iNY);
+      }
+
+   }
+
+
+   private void invert() {
+
+      int x, y;
+      double dMin = 0, dMax = 0;
+      double z;
+      int A = 0;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_Window.getCellValueAsFloat(x, y);
+            if (!m_Window.isNoDataValue(z)) {
+               if (A <= 0) {
+                  dMin = dMax = z;
+               }
+               else {
+                  if (dMin > z) {
+                     dMin = z;
+                  }
+                  else if (dMax < z) {
+                     dMax = z;
+                  }
+               }
+               A++;
+            }
+         }
+         setProgress(y, m_iNY);
+      }
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            z = m_Window.getCellValueAsFloat(x, y);
+            if (m_Window.isNoDataValue(z)) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               m_Result.setCellValue(x, y, dMax - z + dMin);
+            }
+         }
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/gridTools/gridOrientation/GridOrientationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocate/LocateAllocateAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocate/LocateAllocateAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocate/LocateAllocateAlgorithm.java	(revision 369)
@@ -0,0 +1,619 @@
+package es.unex.sextante.locate.locateAllocate;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class LocateAllocateAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final int    EUCLIDEAN             = 0;
+
+   public static final int    MINSUM                = 0;
+   public static final int    CONSTRAINEDMINSUM     = 1;
+   public static final int    MINSTDDEV             = 2;
+   public static final int    MINIMAX               = 3;
+   public static final int    MAXCOV                = 4;
+   public static final int    MAXSUM                = 5;
+   public static final int    MINCOV                = 6;
+
+   public static final String MAXDIST               = "MAXDIST";
+   public static final String METHOD                = "METHOD";
+   public static final String NEWLOCATIONS          = "NEWLOCATIONS";
+   public static final String CANDIDATES            = "CANDIDATES";
+   public static final String OFFER                 = "OFFER";
+   public static final String FIELDDEMAND           = "FIELDDEMAND";
+   public static final String DEMAND                = "DEMAND";
+   public static final String DIST                  = "DIST";
+   public static final String SPIDER                = "SPIDER";
+   public static final String RESULT                = "RESULT";
+   public static final String MEAN_DIST             = "MEAN_DIST";
+   public static final String MEAN_SQUARED_DISTANCE = "MEAN_SQUARED_DISTANCE";
+   public static final String MIN_DISTANCE          = "MIN_DISTANCE";
+   public static final String MAX_DISTANCE          = "MAX_DISTANCE";
+   public static final String VARIANCE              = "VARIANCE";
+   public static final String SUM_OF_DISTANCES      = "SUM_OF_DISTANCES";
+   public static final String COEFF_OF_VARIATION    = "COEFF_OF_VARIATION";
+   public static final String OBJ_FUNCTION_VALUE    = "OBJ_FUNCTION_VALUE";
+
+   private static final int   ITERATIONS            = 100;
+
+   private ArrayList          m_Demand;
+   private ArrayList          m_Candidates;
+   private ArrayList          m_Offer;
+   private double             m_dDist[][];
+   private double             m_dMaxDist;
+   private double             m_dObjective;
+   private double             m_dBestObjective;
+   private int                m_iDistMethod;
+   private int                m_iNewLocations;
+   private int[]              m_iSolution;
+   private int[]              m_iBestSolution;
+   private int                m_iOffer;
+   private int                m_iTotalOffer;
+   private int                m_iMethod;
+   private int                m_iDemandField;
+   private IVectorLayer       m_DemandLayer;
+   private IVectorLayer       m_OfferLayer;
+   private IVectorLayer       m_CandidatesLayer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sDistOptions[] = { Sextante.getText("Euclidean"), Sextante.getText("Manhattan") };
+      final String sMethod[] = { Sextante.getText("Minimum_sum"), Sextante.getText("Minimum_sum_with_restrictions"),
+               Sextante.getText("Minimum_standard_deviation"), Sextante.getText("Minimize_maximum_distance"),
+               Sextante.getText("Maximum_coverage"), Sextante.getText("Maximum_sum"), Sextante.getText("Minimum_coverage") };
+
+      setName(Sextante.getText("Location-allocation"));
+      setGroup(Sextante.getText("Location-allocation"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+      try {
+         m_Parameters.addInputVectorLayer(DEMAND, Sextante.getText("Demand_points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELDDEMAND, Sextante.getText("Field"), DEMAND);
+         m_Parameters.addInputVectorLayer(OFFER, Sextante.getText("Preexistent_resources"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, false);
+         m_Parameters.addInputVectorLayer(CANDIDATES, Sextante.getText("Candidate_points"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addSelection(DIST, Sextante.getText("Type_of_distance"), sDistOptions);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(NEWLOCATIONS, Sextante.getText("Number_of_resources_to_allocate"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 1, 0, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(MAXDIST, Sextante.getText("Maximum_distance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(SPIDER, Sextante.getText("Connections"), OutputVectorLayer.SHAPE_TYPE_LINE);
+         addOutputVectorLayer(NEWLOCATIONS, Sextante.getText("Selected_points"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputText(RESULT, Sextante.getText("Statistics"));
+         addOutputNumericalValue(MEAN_DIST, Sextante.getText("Mean_distance"));
+         addOutputNumericalValue(MEAN_SQUARED_DISTANCE, Sextante.getText("Mean_squared_distance"));
+         addOutputNumericalValue(MIN_DISTANCE, Sextante.getText("Min_distance"));
+         addOutputNumericalValue(MAX_DISTANCE, Sextante.getText("Maximum_distance"));
+         addOutputNumericalValue(VARIANCE, Sextante.getText("Variance"));
+         addOutputNumericalValue(SUM_OF_DISTANCES, Sextante.getText("Sum_of_distances"));
+         addOutputNumericalValue(COEFF_OF_VARIATION, Sextante.getText("Coefficient_of_variation"));
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_iDistMethod = m_Parameters.getParameterValueAsInt(DIST);
+      m_DemandLayer = m_Parameters.getParameterValueAsVectorLayer(DEMAND);
+      m_iDemandField = m_Parameters.getParameterValueAsInt(FIELDDEMAND);
+      m_OfferLayer = m_Parameters.getParameterValueAsVectorLayer(OFFER);
+      m_CandidatesLayer = m_Parameters.getParameterValueAsVectorLayer(CANDIDATES);
+      m_iNewLocations = m_Parameters.getParameterValueAsInt(NEWLOCATIONS);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_dMaxDist = m_Parameters.getParameterValueAsDouble(MAXDIST);
+
+      if (m_iNewLocations == 0) {
+         return false;
+      }
+
+      extractPoints();
+      calculateDistanceMatrix();
+
+      m_dBestObjective = Double.MAX_VALUE;
+      for (int i = 0; (i < ITERATIONS) && setProgress(i, ITERATIONS); i++) {
+         setProgressText(Sextante.getText("Iteration") + " " + Integer.toString(i) + "/" + Integer.toString(ITERATIONS));
+         runTeitzBart();
+         if (m_dObjective < m_dBestObjective) {
+            m_dBestObjective = m_dObjective;
+            m_iBestSolution = m_iSolution;
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         if (m_iBestSolution != null) {
+            createResults();
+         }
+         return true;
+      }
+
+   }
+
+
+   private void extractPoints() throws GeoAlgorithmExecutionException {
+
+      double dWeight;
+
+      m_Demand = new ArrayList();
+      m_Offer = new ArrayList();
+      m_Candidates = new ArrayList();
+
+      IFeatureIterator iter = m_DemandLayer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         try {
+            dWeight = Double.parseDouble(feature.getRecord().getValue(m_iDemandField).toString());
+         }
+         catch (final Exception e) {
+            dWeight = 1;
+         }
+         m_Demand.add(new DemandPoint(coord.x, coord.y, dWeight));
+      }
+      iter.close();
+
+      iter = m_CandidatesLayer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         m_Candidates.add(coord);
+      }
+      iter.close();
+
+      if (m_OfferLayer != null) {
+         iter = m_OfferLayer.iterator();
+         while (iter.hasNext()) {
+            final IFeature feature = iter.next();
+            final Coordinate coord = feature.getGeometry().getCoordinate();
+            m_Offer.add(coord);
+         }
+         iter.close();
+      }
+
+      if ((m_Candidates.size() < m_iNewLocations) || (m_Demand.size() == 0)) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Invalid_or_insufficient_data"));
+      }
+
+   }
+
+
+   private void calculateDistanceMatrix() {
+
+      m_iOffer = m_Offer.size();
+      m_iTotalOffer = m_Offer.size() + m_Candidates.size();
+      final int iDemand = m_Demand.size();
+      double x1, y1, x2, y2;
+      DemandPoint dpt;
+      Coordinate pt;
+
+      m_dDist = new double[iDemand][m_iTotalOffer];
+
+      for (int i = 0; i < m_iTotalOffer; i++) {
+         if (i < m_iOffer) {
+            pt = (Coordinate) m_Offer.get(i);
+         }
+         else {
+            pt = (Coordinate) m_Candidates.get(i - m_iOffer);
+         }
+         x1 = pt.x;
+         y1 = pt.y;
+         for (int j = 0; j < iDemand; j++) {
+            dpt = (DemandPoint) m_Demand.get(j);
+            x2 = dpt.x;
+            y2 = dpt.y;
+            if (m_iDistMethod == EUCLIDEAN) {
+               m_dDist[j][i] = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
+            }
+            else {
+               m_dDist[j][i] = Math.abs((x2 - x1) + (y2 - y1));
+            }
+         }
+
+      }
+
+   }
+
+
+   private void runTeitzBart() {
+
+      int i, j;
+      int iAlternative = 0;
+      int iOldValue;
+      int iValueToChange = 0;
+      int iRandCount, iCount;
+      double dMin;
+      boolean bHasImproved;
+      boolean bIsSelected;
+      m_iSolution = new int[m_iNewLocations];
+
+      for (i = 0; i < m_iSolution.length; i++) {
+         m_iSolution[i] = i;
+      }
+
+      do {
+         bHasImproved = false;
+         dMin = getObjectiveFunctionValue();
+         iCount = 0;
+         iRandCount = (int) Math.floor(Math.random() * (m_Candidates.size() - m_iSolution.length));
+         for (i = 0; i < m_Candidates.size(); i++) {
+            bIsSelected = false;
+            for (j = 0; j < m_iSolution.length; j++) {
+               if (m_iSolution[j] == i) {
+                  bIsSelected = true;
+                  break;
+               }
+            }
+            if (!bIsSelected) {
+               if (iRandCount == iCount) {
+                  iAlternative = i;
+                  break;
+               }
+               else {
+                  iCount++;
+               }
+            }
+         }
+         for (i = 0; i < m_iSolution.length; i++) {
+            iOldValue = m_iSolution[i];
+            m_iSolution[i] = iAlternative;
+            m_dObjective = getObjectiveFunctionValue();
+            if (m_dObjective < dMin) {
+               bHasImproved = true;
+               dMin = m_dObjective;
+               iValueToChange = i;
+            }
+            m_iSolution[i] = iOldValue;
+         }
+         if (bHasImproved) {
+            m_iSolution[iValueToChange] = iAlternative;
+         }
+      }
+      while (bHasImproved);
+
+   }
+
+
+   private double getObjectiveFunctionValue() {
+
+      switch (m_iMethod) {
+         case MINSUM:
+         default:
+            return getObjectiveFunctionValueMinSum();
+         case CONSTRAINEDMINSUM:
+            return getObjectiveFunctionValueConstrainedMinSum();
+         case MINSTDDEV:
+            return getObjectiveFunctionValueMinStdDev();
+         case MAXSUM:
+            return -getObjectiveFunctionValueMinSum();
+         case MAXCOV:
+            return getObjectiveFunctionValueMaxCov();
+         case MINCOV:
+            return -getObjectiveFunctionValueMaxCov();
+         case MINIMAX:
+            return getObjectiveFunctionValueMinMaxDistance();
+      }
+
+   }
+
+
+   private double getObjectiveFunctionValueMinStdDev() {
+
+      int i, j;
+      int iPt;
+      double dMin;
+      double dSum = 0;
+      double dVar = 0;
+
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         //TODO dpt = (DemandPoint) m_Demand.get(i); �NO CONSIDERAMOS PESOS????
+
+         dSum += dMin;
+         dVar += dMin * dMin;
+
+      }
+
+      dSum /= m_Demand.size();
+      dVar = dVar / m_Demand.size() - dSum * dSum;
+
+      return dVar;
+
+   }
+
+
+   private double getObjectiveFunctionValueConstrainedMinSum() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dMin;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         if (dMin < m_dMaxDist) {
+            dpt = (DemandPoint) m_Demand.get(i);
+            dValue += (dMin * dpt.weight);
+         }
+         else {
+            dValue = Double.POSITIVE_INFINITY;
+         }
+
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMaxCov() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dDemand;;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dpt = (DemandPoint) m_Demand.get(i);
+         dDemand = dpt.weight;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < m_dMaxDist) {
+               dDemand = 0;
+               break;
+            }
+         }
+         if (dDemand != 0) {
+            for (j = 0; j < m_iSolution.length; j++) {
+               iPt = m_iSolution[j];
+               if (m_dDist[i][iPt + m_iOffer] < m_dMaxDist) {
+                  dDemand = 0;
+                  break;
+               }
+            }
+         }
+
+         dValue += dDemand;
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMinSum() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dMin;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         dpt = (DemandPoint) m_Demand.get(i);
+         dValue += (dMin * dpt.weight);
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMinMaxDistance() {
+
+      int i, j;
+      int iPt;
+      double dMin, dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         if (dMax < dMin) {
+            dMax = dMin;
+         }
+      }
+
+      return dMax;
+
+   }
+
+
+   private void createResults() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iPt;
+      int iID = 1;
+      double dMin;
+      double dDist;
+      DemandPoint dpt;
+      Coordinate pt = null;
+      LineString line;
+      final Coordinate coords[] = new Coordinate[2];
+      final Object values[] = new Object[8];
+      String sOfferName = null;
+      final String[] sNames = { Sextante.getText("ID"), Sextante.getText("Demand_point"), Sextante.getText("X_demand"),
+               Sextante.getText("Y_demand"), Sextante.getText("Resource"), Sextante.getText("X_resource"),
+               Sextante.getText("Y_resource"), Sextante.getText("Distance") };
+      final Class[] types = { Integer.class, String.class, Double.class, Double.class, String.class, Double.class, Double.class,
+               Double.class };
+      final SimpleStats stats = new SimpleStats();
+      final IVectorLayer spiderWebLayer = getNewVectorLayer(SPIDER, Sextante.getText("Conexions"), IVectorLayer.SHAPE_TYPE_LINE,
+               types, sNames);
+      final IVectorLayer newPoints = getNewVectorLayer(NEWLOCATIONS, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_POINT,
+               new Class[] { Integer.class }, new String[] { "ID" });
+      final GeometryFactory gf = new GeometryFactory();
+      for (i = 0; i < m_Demand.size(); i++) {
+         dpt = (DemandPoint) m_Demand.get(i);
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+               pt = (Coordinate) m_Offer.get(j);
+               sOfferName = Sextante.getText("Preexistent") + Integer.toString(j);
+            }
+         }
+         for (j = 0; j < m_iBestSolution.length; j++) {
+            iPt = m_iBestSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+               pt = (Coordinate) m_Candidates.get(iPt);
+               sOfferName = Sextante.getText("Candidate") + Integer.toString(iPt);
+            }
+         }
+
+         stats.addValue(dMin);
+         coords[0] = pt;
+         coords[1] = new Coordinate(dpt.x, dpt.y);
+         line = gf.createLineString(coords);
+         values[0] = new Integer(iID++);
+         values[1] = Integer.toString(i);
+         values[2] = new Double(dpt.x);
+         values[3] = new Double(dpt.y);
+         values[4] = sOfferName;
+         values[5] = new Double(pt.x);
+         values[6] = new Double(pt.y);
+         dDist = Math.sqrt(Math.pow(pt.x - dpt.x, 2) + Math.pow(pt.y - dpt.y, 2));
+         values[7] = new Double(dDist);
+         spiderWebLayer.addFeature(line, values);
+
+      }
+
+      for (j = 0; j < m_iBestSolution.length; j++) {
+         iPt = m_iBestSolution[j];
+         final Coordinate solutionPt = (Coordinate) m_Candidates.get(iPt);
+         newPoints.addFeature(gf.createPoint(solutionPt), new Object[] { new Integer(j + 1) });
+      }
+
+
+      final DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Result"));
+      doc.addHeader(Sextante.getText("Statistics_of_global_solution"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Objective_function") + ": " + df.format(Math.abs(m_dObjective)));
+      doc.addListElement(Sextante.getText("Mean_distance") + ": " + df.format(stats.getMean()));
+      doc.addListElement(Sextante.getText("Mean_squared_distance") + ": " + df.format(stats.getRMS()));
+      doc.addListElement(Sextante.getText("Min_distance") + ": " + df.format(stats.getMin()));
+      doc.addListElement(Sextante.getText("Maximum_distance") + ": " + df.format(stats.getMax()));
+      doc.addListElement(Sextante.getText("Variance") + ": " + df.format(stats.getVariance()));
+      doc.addListElement(Sextante.getText("Sum_of_distances") + ": " + df.format(stats.getSum()));
+      doc.addListElement(Sextante.getText("Coefficient_of_variation") + ": " + df.format(stats.getCoeffOfVar()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(RESULT, Sextante.getText("Statistics"), doc.getHTMLCode());
+
+      addOutputNumericalValue(OBJ_FUNCTION_VALUE, m_dObjective);
+      addOutputNumericalValue(MEAN_DIST, stats.getMean());
+      addOutputNumericalValue(MEAN_SQUARED_DISTANCE, stats.getRMS());
+      addOutputNumericalValue(MIN_DISTANCE, stats.getMin());
+      addOutputNumericalValue(MAX_DISTANCE, stats.getMax());
+      addOutputNumericalValue(VARIANCE, stats.getVariance());
+      addOutputNumericalValue(SUM_OF_DISTANCES, stats.getSum());
+      addOutputNumericalValue(COEFF_OF_VARIATION, stats.getMean());
+
+   }
+
+   private class DemandPoint {
+
+      public double x;
+      public double y;
+      public double weight;
+
+
+      DemandPoint(final double dX,
+                  final double dY,
+                  final double dWeight) {
+
+         x = dX;
+         y = dY;
+         weight = dWeight;
+
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocate/LocateAllocateAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocateB/LocateAllocateBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocateB/LocateAllocateBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocateB/LocateAllocateBAlgorithm.java	(revision 369)
@@ -0,0 +1,608 @@
+package es.unex.sextante.locate.locateAllocateB;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class LocateAllocateBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final int    EUCLIDEAN                        = 0;
+
+   public static final int    MINSUM                           = 0;
+   public static final int    CONSTRAINEDMINSUM                = 1;
+   public static final int    MINSTDDEV                        = 2;
+   public static final int    MINIMAX                          = 3;
+   public static final int    MAXCOV                           = 4;
+   public static final int    MAXSUM                           = 5;
+   public static final int    MINCOV                           = 6;
+
+   public static final String MAXDIST                          = "MAXDIST";
+   public static final String METHOD                           = "METHOD";
+   public static final String NEWLOCATIONS                     = "NEWLOCATIONS";
+   public static final String CANDIDATES                       = "CANDIDATES";
+   public static final String OFFER                            = "OFFER";
+   public static final String FIELDDEMAND                      = "FIELDDEMAND";
+   public static final String DEMAND                           = "DEMAND";
+   public static final String DEMAND_OFFER_DISTANCE_TABLE      = "DEMAND_OFFER_DISTANCE_TABLE";
+   public static final String DEMAND_CANDIDATES_DISTANCE_TABLE = "DEMAND_CANDIDATES_DISTANCE_TABLE";
+   public static final String SPIDER                           = "SPIDER";
+   public static final String RESULT                           = "RESULT";
+
+   private static final int   ITERATIONS                       = 100;
+
+   private ArrayList          m_Demand;
+   private ArrayList          m_Candidates;
+   private ArrayList          m_Offer;
+   private double             m_dDist[][];
+   private double             m_dMaxDist;
+   private double             m_dObjective;
+   private double             m_dBestObjective;
+   private int                m_iNewLocations;
+   private int[]              m_iSolution;
+   private int[]              m_iBestSolution;
+   private int                m_iOffer;
+   private int                m_iTotalOffer;
+   private int                m_iMethod;
+   private int                m_iDemandField;
+   private IVectorLayer       m_DemandLayer;
+   private IVectorLayer       m_OfferLayer;
+   private IVectorLayer       m_CandidatesLayer;
+   private ITable             m_DemandOfferDistanceTable;
+   private ITable             m_DemandCandidatesDistanceTable;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Minimum_sum"), Sextante.getText("Minimum_sum_with_restrictions"),
+               Sextante.getText("Minimum_standard_deviation"), Sextante.getText("Minimize_maximum_distance"),
+               Sextante.getText("Maximum_coverage"), Sextante.getText("Maximum_sum"), Sextante.getText("Minimum_coverage") };
+
+      setName(Sextante.getText("Location-allocation_table_distance"));
+      setGroup(Sextante.getText("Location-allocation"));
+      setUserCanDefineAnalysisExtent(false);
+      setIsDeterminatedProcess(false);
+      try {
+         m_Parameters.addInputVectorLayer(DEMAND, Sextante.getText("Demand_points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELDDEMAND, Sextante.getText("Field"), DEMAND);
+         m_Parameters.addInputVectorLayer(OFFER, Sextante.getText("Preexistent_resources"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, false);
+         m_Parameters.addInputVectorLayer(CANDIDATES, Sextante.getText("Candidate_points"),
+                  AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addInputTable(DEMAND_OFFER_DISTANCE_TABLE, Sextante.getText("Demand_offer_distance_table"), true);
+         m_Parameters.addInputTable(DEMAND_CANDIDATES_DISTANCE_TABLE, Sextante.getText("Demand_candidates_distance_table"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Method"), sMethod);
+         m_Parameters.addNumericalValue(NEWLOCATIONS, Sextante.getText("Number_of_resources_to_allocate"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 1, 1, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(MAXDIST, Sextante.getText("Maximum_distance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(SPIDER, Sextante.getText("Connections"), OutputVectorLayer.SHAPE_TYPE_LINE);
+         addOutputText(RESULT, Sextante.getText("Statistics"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_DemandCandidatesDistanceTable = m_Parameters.getParameterValueAsTable(DEMAND_CANDIDATES_DISTANCE_TABLE);
+      m_DemandOfferDistanceTable = m_Parameters.getParameterValueAsTable(DEMAND_OFFER_DISTANCE_TABLE);
+      m_DemandLayer = m_Parameters.getParameterValueAsVectorLayer(DEMAND);
+      m_iDemandField = m_Parameters.getParameterValueAsInt(FIELDDEMAND);
+      m_OfferLayer = m_Parameters.getParameterValueAsVectorLayer(OFFER);
+      m_CandidatesLayer = m_Parameters.getParameterValueAsVectorLayer(CANDIDATES);
+      m_iNewLocations = m_Parameters.getParameterValueAsInt(NEWLOCATIONS);
+      m_iMethod = m_Parameters.getParameterValueAsInt(METHOD);
+      m_dMaxDist = m_Parameters.getParameterValueAsDouble(MAXDIST);
+
+      if (m_iNewLocations == 0) {
+         return false;
+      }
+
+      extractPoints();
+      calculateDistanceMatrix();
+
+      m_dBestObjective = Double.MAX_VALUE;
+      for (int i = 0; (i < ITERATIONS) && setProgress(i, ITERATIONS); i++) {
+         setProgressText(Sextante.getText("Iteration") + " " + Integer.toString(i) + "/" + Integer.toString(ITERATIONS));
+         runTeitzBart();
+         if (m_dObjective < m_dBestObjective) {
+            m_dBestObjective = m_dObjective;
+            m_iBestSolution = m_iSolution;
+         }
+      }
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         if (m_iBestSolution != null) {
+            createResults();
+         }
+         return true;
+      }
+
+   }
+
+
+   private void extractPoints() throws GeoAlgorithmExecutionException {
+
+      double dWeight;
+
+      m_Demand = new ArrayList();
+      m_Offer = new ArrayList();
+      m_Candidates = new ArrayList();
+
+      IFeatureIterator iter = m_DemandLayer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         try {
+            dWeight = Double.parseDouble(feature.getRecord().getValue(m_iDemandField).toString());
+         }
+         catch (final Exception e) {
+            dWeight = 1;
+         }
+         m_Demand.add(new DemandPoint(coord.x, coord.y, dWeight));
+      }
+      iter.close();
+
+      iter = m_CandidatesLayer.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Coordinate coord = feature.getGeometry().getCoordinate();
+         m_Candidates.add(coord);
+      }
+      iter.close();
+
+      if (m_OfferLayer != null) {
+         iter = m_OfferLayer.iterator();
+         while (iter.hasNext()) {
+            final IFeature feature = iter.next();
+            final Coordinate coord = feature.getGeometry().getCoordinate();
+            m_Offer.add(coord);
+         }
+         iter.close();
+      }
+
+      if ((m_Candidates.size() < m_iNewLocations) || (m_Demand.size() == 0)) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Invalid_or_insufficient_data"));
+      }
+
+   }
+
+
+   private void calculateDistanceMatrix() throws GeoAlgorithmExecutionException {
+
+      m_iOffer = m_Offer.size();
+      m_iTotalOffer = m_Offer.size() + m_Candidates.size();
+
+      m_dDist = new double[m_Demand.size()][m_iTotalOffer];
+
+      IRecordsetIterator iter = m_DemandOfferDistanceTable.iterator();
+      int iDemand = 0;
+      while (iter.hasNext()) {
+         final IRecord record = iter.next();
+         for (int j = 0; j < m_iOffer; j++) {
+            final String sValue = record.getValue(j).toString();
+            try {
+               m_dDist[iDemand][j] = Double.parseDouble(sValue);
+            }
+            catch (final Exception e) {
+               throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_data_in_table"));
+            }
+            iDemand++;
+         }
+      }
+      iter.close();
+
+      iter = m_DemandCandidatesDistanceTable.iterator();
+      iDemand = 0;
+      while (iter.hasNext()) {
+         final IRecord record = iter.next();
+         for (int j = 0; j < m_Candidates.size(); j++) {
+            final String sValue = record.getValue(j).toString();
+            try {
+               m_dDist[iDemand][j + m_iOffer] = Double.parseDouble(sValue);
+            }
+            catch (final Exception e) {
+               throw new GeoAlgorithmExecutionException(Sextante.getText("Wrong_data_in_table"));
+            }
+            iDemand++;
+         }
+      }
+      iter.close();
+
+   }
+
+
+   private void runTeitzBart() {
+
+      int i, j;
+      int iAlternative = 0;
+      int iOldValue;
+      int iValueToChange = 0;
+      int iRandCount, iCount;
+      double dMin;
+      boolean bHasImproved;
+      boolean bIsSelected;
+      m_iSolution = new int[m_iNewLocations];
+
+      for (i = 0; i < m_iSolution.length; i++) {
+         m_iSolution[i] = i;
+      }
+
+      do {
+         bHasImproved = false;
+         dMin = getObjectiveFunctionValue();
+         iCount = 0;
+         iRandCount = (int) Math.floor(Math.random() * (m_Candidates.size() - m_iSolution.length));
+         for (i = 0; i < m_Candidates.size(); i++) {
+            bIsSelected = false;
+            for (j = 0; j < m_iSolution.length; j++) {
+               if (m_iSolution[j] == i) {
+                  bIsSelected = true;
+                  break;
+               }
+            }
+            if (!bIsSelected) {
+               if (iRandCount == iCount) {
+                  iAlternative = i;
+                  break;
+               }
+               else {
+                  iCount++;
+               }
+            }
+         }
+         for (i = 0; i < m_iSolution.length; i++) {
+            iOldValue = m_iSolution[i];
+            m_iSolution[i] = iAlternative;
+            m_dObjective = getObjectiveFunctionValue();
+            if (m_dObjective < dMin) {
+               bHasImproved = true;
+               dMin = m_dObjective;
+               iValueToChange = i;
+            }
+            m_iSolution[i] = iOldValue;
+         }
+         if (bHasImproved) {
+            m_iSolution[iValueToChange] = iAlternative;
+         }
+      }
+      while (bHasImproved);
+
+   }
+
+
+   private double getObjectiveFunctionValue() {
+
+      switch (m_iMethod) {
+         case MINSUM:
+         default:
+            return getObjectiveFunctionValueMinSum();
+         case CONSTRAINEDMINSUM:
+            return getObjectiveFunctionValueConstrainedMinSum();
+         case MINSTDDEV:
+            return getObjectiveFunctionValueMinStdDev();
+         case MAXSUM:
+            return -getObjectiveFunctionValueMinSum();
+         case MAXCOV:
+            return getObjectiveFunctionValueMaxCov();
+         case MINCOV:
+            return -getObjectiveFunctionValueMaxCov();
+         case MINIMAX:
+            return getObjectiveFunctionValueMinMaxDistance();
+      }
+
+   }
+
+
+   private double getObjectiveFunctionValueMinStdDev() {
+
+      int i, j;
+      int iPt;
+      double dMin;
+      double dSum = 0;
+      double dVar = 0;
+
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         //TODO dpt = (DemandPoint) m_Demand.get(i); �NO CONSIDERAMOS PESOS????
+
+         dSum += dMin;
+         dVar += dMin * dMin;
+
+      }
+
+      dSum /= m_Demand.size();
+      dVar = dVar / m_Demand.size() - dSum * dSum;
+
+      return dVar;
+
+   }
+
+
+   private double getObjectiveFunctionValueConstrainedMinSum() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dMin;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         if (dMin < m_dMaxDist) {
+            dpt = (DemandPoint) m_Demand.get(i);
+            dValue += (dMin * dpt.weight);
+         }
+         else {
+            dValue = Double.POSITIVE_INFINITY;
+         }
+
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMaxCov() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dDemand;;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dpt = (DemandPoint) m_Demand.get(i);
+         dDemand = dpt.weight;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < m_dMaxDist) {
+               dDemand = 0;
+               break;
+            }
+         }
+         if (dDemand != 0) {
+            for (j = 0; j < m_iSolution.length; j++) {
+               iPt = m_iSolution[j];
+               if (m_dDist[i][iPt + m_iOffer] < m_dMaxDist) {
+                  dDemand = 0;
+                  break;
+               }
+            }
+         }
+
+         dValue += dDemand;
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMinSum() {
+
+      int i, j;
+      int iPt;
+      double dValue = 0;
+      double dMin;
+      DemandPoint dpt;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         dpt = (DemandPoint) m_Demand.get(i);
+         dValue += (dMin * dpt.weight);
+      }
+
+      return dValue;
+
+   }
+
+
+   private double getObjectiveFunctionValueMinMaxDistance() {
+
+      int i, j;
+      int iPt;
+      double dMin, dMax = Double.NEGATIVE_INFINITY;
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+            }
+         }
+         for (j = 0; j < m_iSolution.length; j++) {
+            iPt = m_iSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+            }
+         }
+         if (dMax < dMin) {
+            dMax = dMin;
+         }
+      }
+
+      return dMax;
+
+   }
+
+
+   private void createResults() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iPt;
+      int iID = 1;
+      double dMin;
+      double dDist;
+      DemandPoint dpt;
+      Coordinate pt = null;
+      LineString line;
+      final Coordinate coords[] = new Coordinate[2];
+      final Object values[] = new Object[8];
+      String sOfferName = null;
+      final String[] sNames = { Sextante.getText("ID"), Sextante.getText("Demand_point"), Sextante.getText("X_demand"),
+               Sextante.getText("Y_demand"), Sextante.getText("Resource"), Sextante.getText("X_resource"),
+               Sextante.getText("Y_resource"), Sextante.getText("Distance") };
+      final Class[] types = { Integer.class, String.class, Double.class, Double.class, String.class, Double.class, Double.class,
+               Double.class };
+      final SimpleStats stats = new SimpleStats();
+      final IVectorLayer spiderWebLayer = getNewVectorLayer(SPIDER, Sextante.getText("Conexions"), IVectorLayer.SHAPE_TYPE_LINE,
+               types, sNames);
+      final IVectorLayer newPointsLayer = getNewVectorLayer(RESULT, Sextante.getText("Selected_points"),
+               IVectorLayer.SHAPE_TYPE_POINT, new Class[] { Integer.class }, new String[] { "ID" });
+
+      final GeometryFactory gf = new GeometryFactory();
+
+      for (i = 0; i < m_iBestSolution.length; i++) {
+         iPt = m_iBestSolution[i];
+         pt = (Coordinate) m_Candidates.get(iPt);
+         newPointsLayer.addFeature(gf.createPoint(pt), new Object[] { new Integer(i) });
+      }
+
+
+      for (i = 0; i < m_Demand.size(); i++) {
+         dpt = (DemandPoint) m_Demand.get(i);
+         dMin = Double.MAX_VALUE;
+         for (j = 0; j < m_iOffer; j++) {
+            if (m_dDist[i][j] < dMin) {
+               dMin = m_dDist[i][j];
+               pt = (Coordinate) m_Offer.get(j);
+               sOfferName = Sextante.getText("Preexistent") + Integer.toString(j);
+            }
+         }
+         for (j = 0; j < m_iBestSolution.length; j++) {
+            iPt = m_iBestSolution[j];
+            if (m_dDist[i][iPt + m_iOffer] < dMin) {
+               dMin = m_dDist[i][iPt + m_iOffer];
+               pt = (Coordinate) m_Candidates.get(iPt);
+               sOfferName = Sextante.getText("Candidate") + Integer.toString(iPt);
+            }
+         }
+
+         stats.addValue(dMin);
+         coords[0] = pt;
+         coords[1] = new Coordinate(dpt.x, dpt.y);
+         line = gf.createLineString(coords);
+         values[0] = new Integer(iID++);
+         values[1] = Integer.toString(i);
+         values[2] = new Double(dpt.x);
+         values[3] = new Double(dpt.y);
+         values[4] = sOfferName;
+         values[5] = new Double(pt.x);
+         values[6] = new Double(pt.y);
+         dDist = Math.sqrt(Math.pow(pt.x - dpt.x, 2) + Math.pow(pt.y - dpt.y, 2));
+         values[7] = new Double(dDist);
+         spiderWebLayer.addFeature(line, values);
+
+      }
+
+      final DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Result"));
+      doc.addHeader(Sextante.getText("Statistics_of_global_solution"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(Sextante.getText("Objective_function") + ": " + df.format(Math.abs(m_dObjective)));
+      doc.addListElement(Sextante.getText("Mean_distance") + ": " + df.format(stats.getMean()));
+      doc.addListElement(Sextante.getText("Mean_squared_distance") + ": " + df.format(stats.getRMS()));
+      doc.addListElement(Sextante.getText("Min_distance") + ": " + df.format(stats.getMin()));
+      doc.addListElement(Sextante.getText("Maximum_distance") + ": " + df.format(stats.getMax()));
+      doc.addListElement(Sextante.getText("Variance") + ": " + df.format(stats.getVariance()));
+      doc.addListElement(Sextante.getText("Sum_of_distances") + ": " + df.format(stats.getSum()));
+      doc.addListElement(Sextante.getText("Coefficient_of_variation") + ": " + df.format(stats.getCoeffOfVar()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(RESULT, Sextante.getText("Statistics"), doc.getHTMLCode());
+
+   }
+
+   private class DemandPoint {
+
+      public double x;
+      public double y;
+      public double weight;
+
+
+      DemandPoint(final double dX,
+                  final double dY,
+                  final double dWeight) {
+
+         x = dX;
+         y = dY;
+         weight = dWeight;
+
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/locate/locateAllocateB/LocateAllocateBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pca/PCAAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pca/PCAAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pca/PCAAlgorithm.java	(revision 369)
@@ -0,0 +1,232 @@
+
+
+package es.unex.sextante.statisticalMethods.pca;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import Jama.EigenvalueDecomposition;
+import Jama.Matrix;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+
+public class PCAAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String NBANDS = "NBANDS";
+   public static final String INPUT  = "INPUT";
+
+   private static double      NODATA = -9999999.;
+
+   private ArrayList          m_RasterLayers;
+   private IRasterLayer[]     m_Windows;
+   private int                m_iBands[];
+   private int                m_iNX, m_iNY;
+   private double             m_dMean[];
+   private int                m_iNumBands;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Statistical_methods"));
+      setName(Sextante.getText("Principal_Components_Analysis"));
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Input_bands"), AdditionalInfoMultipleInput.DATA_TYPE_BAND, true);
+         m_Parameters.addNumericalValue(NBANDS, Sextante.getText("Bands_number"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 1, 1, Integer.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Principal_Components_Analysis"),
+                  OutputRasterLayer.NUMBER_OF_BANDS_UNDEFINED);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int x, y;
+      int iBand;
+      int iInputBand;
+      double dValue;
+      double dPCValue;
+
+      m_RasterLayers = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_iNumBands = m_Parameters.getParameterValueAsInt(NBANDS);
+
+      if ((m_RasterLayers.size() == 0) || (m_iNumBands > m_RasterLayers.size())) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Error_not_enough_bands_selected"));
+      }
+
+      m_iNX = getAnalysisExtent().getNX();
+      m_iNY = getAnalysisExtent().getNY();
+
+      final double coVar[][] = getCovarMatrix();
+      final Matrix coVarMatrix = new Matrix(coVar);
+      final EigenvalueDecomposition eigenvalueDecomp = new EigenvalueDecomposition(coVarMatrix);
+      final Matrix eigenvectors = eigenvalueDecomp.getV();
+      final double[] eigenvalues = eigenvalueDecomp.getRealEigenvalues();
+      final ValueAndOrder[] vao = new ValueAndOrder[eigenvalues.length];
+      for (i = 0; i < eigenvalues.length; i++) {
+         vao[i] = new ValueAndOrder(eigenvalues[i], i);
+      }
+
+      Arrays.sort(vao);
+      final IRasterLayer pca = getNewRasterLayer(RESULT, Sextante.getText("Principal_Components_Analysis"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, m_iNumBands);
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            for (iBand = 0; (iBand < m_iNumBands) && setProgress(iBand, m_iNumBands); iBand++) {
+               dPCValue = 0;
+               for (iInputBand = 0; iInputBand < m_RasterLayers.size(); iInputBand++) {
+                  dValue = m_Windows[iInputBand].getCellValueAsDouble(x, y, m_iBands[iInputBand]);
+                  dPCValue += (eigenvectors.get(iInputBand, vao[iBand].getOrder()) * dValue);
+               }
+               pca.setCellValue(x, y, iBand, dPCValue);
+            }
+         }
+      }
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private double[][] getCovarMatrix() {
+
+      int i, j;
+
+      final double dCovar[][] = new double[m_RasterLayers.size()][m_RasterLayers.size()];
+      m_dMean = new double[m_RasterLayers.size()];
+
+      m_Windows = new IRasterLayer[m_RasterLayers.size()];
+      m_iBands = new int[m_RasterLayers.size()];
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) m_RasterLayers.get(i);
+         m_Windows[i] = rab.getRasterLayer();
+         m_Windows[i].setWindowExtent(this.getAnalysisExtent());
+         m_Windows[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+         m_dMean[i] = m_Windows[i].getMeanValue();
+         m_iBands[i] = rab.getBand();
+      }
+
+
+      final int iTotal = (int) (m_RasterLayers.size() * m_RasterLayers.size() / 2.);
+      int iCount = 0;
+      for (i = 0; (i < m_RasterLayers.size() - 1) && setProgress(iCount, iTotal); i++) {
+         dCovar[i][i] = 1.0;
+         iCount++;
+         for (j = i + 1; j < m_RasterLayers.size(); j++) {
+            dCovar[i][j] = dCovar[j][i] = getCovar(i, j);
+            iCount++;
+         }
+      }
+
+
+      return dCovar;
+
+   }
+
+
+   private double getCovar(final int i,
+                           final int j) {
+
+      int x, y;
+      int iValues = 0;
+      double dValuei, dValuej;
+      double dSum = 0;
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValuei = m_Windows[i].getCellValueAsDouble(x, y, m_iBands[i]);
+            dValuej = m_Windows[j].getCellValueAsDouble(x, y, m_iBands[j]);
+            if (!m_Windows[i].isNoDataValue(dValuei) && !m_Windows[j].isNoDataValue(dValuej)) {
+               dSum += (dValuei - m_dMean[i]) * (dValuej - m_dMean[j]);
+               iValues++;
+            }
+         }
+         if (iValues > 1) {
+            return dSum / (iValues - 1);
+         }
+         else {
+            return NODATA;
+         }
+      }
+
+      return NODATA;
+
+   }
+
+   private class ValueAndOrder
+            implements
+               Comparable {
+
+      private final int    m_iOrder;
+      private final double m_dValue;
+
+
+      public ValueAndOrder(final double dValue,
+                           final int iOrder) {
+
+         m_dValue = dValue;
+         m_iOrder = iOrder;
+
+      }
+
+
+      public int getOrder() {
+
+         return m_iOrder;
+
+      }
+
+
+      public double getValue() {
+
+         return m_dValue;
+
+      }
+
+
+      public int compareTo(final Object vao) throws ClassCastException {
+
+         if (!(vao instanceof ValueAndOrder)) {
+            throw new ClassCastException();
+         }
+
+         final double dValue = ((ValueAndOrder) vao).getValue();
+         final double dDif = this.m_dValue - dValue;
+
+         if (dDif > 0.0) {
+            return 1;
+         }
+         else if (dDif < 0.0) {
+            return -1;
+         }
+         else {
+            return 0;
+         }
+
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pca/PCAAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfBinomial/PDFBinomialAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfBinomial/PDFBinomialAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfBinomial/PDFBinomialAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.statisticalMethods.pdfBinomial;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+public class PDFBinomialAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT       = "INPUT";
+   public static final String P           = "P";
+   public static final String N           = "N";
+   public static final String CDF         = "CDF";
+   public static final String PROBABILITY = "PROBABILITY";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Bernouilli_probability_distribution"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Raster_layer"), true);
+         m_Parameters.addNumericalValue(P, Sextante.getText("Success_probability"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0.5, 0, 1);
+         m_Parameters.addNumericalValue(N, Sextante.getText("Number_of_trials"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 10, 1, Integer.MAX_VALUE);
+         m_Parameters.addBoolean(CDF, Sextante.getText("Accumulated_probability"), false);
+         addOutputRasterLayer(PROBABILITY, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iN;
+      int iNX, iNY;
+      double dValue;
+      double dProb;
+      boolean bCDF;
+
+      final IRasterLayer layer = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      bCDF = m_Parameters.getParameterValueAsBoolean(CDF);
+      dProb = m_Parameters.getParameterValueAsDouble(P);
+      iN = m_Parameters.getParameterValueAsInt(N);
+      layer.setFullExtent();
+      final AnalysisExtent gridExtent = new AnalysisExtent(layer);
+      final IRasterLayer result = getNewRasterLayer(PROBABILITY, Sextante.getText("Probability__binomial"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, gridExtent);
+
+      iNX = layer.getNX();
+      iNY = layer.getNY();
+
+      for (y = 0; y < iNY && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = layer.getCellValueAsDouble(x, y);
+            if (!layer.isNoDataValue(dValue)) {
+               if (bCDF) {
+                  result.setCellValue(x, y, PDF.binomialCDF(dProb, iN, (int) dValue));
+               }
+               else {
+                  result.setCellValue(x, y, PDF.binomial(dProb, iN, (int) dValue));
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfBinomial/PDFBinomialAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/multipleRegression/MultipleRegressionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/multipleRegression/MultipleRegressionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/multipleRegression/MultipleRegressionAlgorithm.java	(revision 369)
@@ -0,0 +1,272 @@
+package es.unex.sextante.statisticalMethods.multipleRegression;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.regression.MultipleRegression;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class MultipleRegressionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT           = "INPUT";
+   public static final String FIELD           = "FIELD";
+   public static final String POINTS          = "POINTS";
+   public static final String RESULT          = "RESULT";
+   public static final String RESIDUALS       = "RESIDUALS";
+   public static final String REGRESSION_INFO = "REGRESSION_INFO";
+
+   private int                m_iField;
+   private IVectorLayer       m_Residuals;
+   private IRasterLayer       m_Windows[];
+   private IRasterLayer       m_Result;
+   private MultipleRegression m_Regression;
+   private ArrayList          m_RasterLayers;
+   private IVectorLayer       m_Points;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Statistical_methods"));
+      this.setName(Sextante.getText("Multiple_regression"));
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), POINTS);
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Predictors"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+         addOutputVectorLayer(RESIDUALS, Sextante.getText("Residuals"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputText(REGRESSION_INFO, Sextante.getText("Regression_values"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+
+      final String sFieldNames[] = { Sextante.getText("Real_value"), Sextante.getText("Estimated_value"),
+               Sextante.getText("Diference") };
+      final Class types[] = { Double.class, Double.class, Double.class };
+
+      m_RasterLayers = m_Parameters.getParameterValueAsArrayList(INPUT);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+
+      if ((m_RasterLayers.size() == 0) || (m_Points.getShapesCount() < 3)) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Invalid_input_data"));
+      }
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Multiple_regression"), IRasterLayer.RASTER_DATA_TYPE_FLOAT);
+
+      m_Windows = new IRasterLayer[m_RasterLayers.size()];
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         m_Windows[i] = (IRasterLayer) m_RasterLayers.get(i);
+         m_Windows[i].setWindowExtent(m_Result.getWindowGridExtent());
+         m_Windows[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+      }
+
+      m_Residuals = getNewVectorLayer(RESIDUALS, Sextante.getText("Residuals"), IVectorLayer.SHAPE_TYPE_POINT, types, sFieldNames);
+
+      calculateRegression();
+      if (!m_Task.isCanceled()) {
+         calculateResultingGrid();
+         calculateResiduals();
+         createAdditionalInfo();
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void calculateResiduals() throws IteratorException {
+
+      double dValue;
+      double dGridValue;
+      final Object value[] = new Object[3];
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+      GridCell cell;
+
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate pt = geom.getCoordinate();
+         dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+         cell = extent.getGridCoordsFromWorldCoords(pt.x, pt.y);
+         dGridValue = m_Result.getCellValueAsDouble(cell.getX(), cell.getY());
+         if (!m_Result.isNoDataValue(dGridValue)) {
+            value[1] = new Double(dValue);
+            value[0] = new Double(dGridValue);
+            value[2] = new Double(dGridValue - dValue);
+            m_Residuals.addFeature(geom, value);
+         }
+      }
+      iter.close();
+
+   }
+
+
+   private void calculateResultingGrid() {
+
+      int i;
+      int x, y;
+      int iNX, iNY;
+      double z;
+      double dValue;
+      boolean bNoDataValue;
+
+      iNX = m_Windows[0].getNX();
+      iNY = m_Windows[0].getNY();
+
+      setProgressText(Sextante.getText("Calculating_regression"));
+
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            bNoDataValue = false;
+            z = m_Regression.getConstant();
+            for (i = 0; i < m_Windows.length; i++) {
+               dValue = m_Windows[i].getCellValueAsDouble(x, y);
+               if (m_Windows[i].isNoDataValue(dValue)) {
+                  m_Result.setNoData(x, y);
+                  bNoDataValue = true;
+                  break;
+               }
+               else {
+                  z += dValue * m_Regression.getCoeff(i);
+               }
+            }
+            if (!bNoDataValue) {
+               m_Result.setCellValue(x, y, z);
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateRegression() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      int iCount;
+      double dValuePt;
+      final double dValueGrid[] = new double[m_Windows.length];
+      boolean bNoDataValue;
+
+      m_Regression = new MultipleRegression(m_Windows.length);
+
+      i = 0;
+      iCount = m_Points.getShapesCount();
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate pt = geom.getCoordinate();
+         bNoDataValue = false;
+         for (j = 0; j < m_Windows.length; j++) {
+            dValueGrid[j] = m_Windows[j].getValueAt(pt.x, pt.y);
+            if (m_Windows[j].isNoDataValue(dValueGrid[j])) {
+               bNoDataValue = true;
+               break;
+            }
+         }
+         if (!bNoDataValue) {
+            try {
+               dValuePt = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+               m_Regression.addValue(dValueGrid, dValuePt);
+            }
+            catch (final NumberFormatException e) {}
+         }
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return;
+      }
+      else {
+         boolean bResult = m_Regression.calculate();
+         if (!bResult) {
+            throw new GeoAlgorithmExecutionException(Sextante.getText("Could_not_calculate_regression"));
+         }
+      }
+   }
+
+
+   private void createAdditionalInfo() {
+
+      int i, j;
+      IRasterLayer layer;
+
+      final DecimalFormat df = new DecimalFormat("##.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Multiple_regression"));
+      doc.addHeader(Sextante.getText("Multiple_regression"), 2);
+      doc.startUnorderedList();
+
+      final StringBuffer sb = new StringBuffer(" Y = " + Double.toString(m_Regression.getConstant()));
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+
+         if (((j = m_Regression.getOrdered(i)) >= 0) && (j < m_RasterLayers.size())) {
+            layer = (IRasterLayer) m_RasterLayers.get(j);
+            sb.append(" + " + Double.toString(m_Regression.getCoeff(j)) + " * [" + layer.getName() + "]");
+         }
+      }
+      doc.addListElement(sb.toString());
+      doc.closeUnorderedList();
+
+      doc.startUnorderedList();
+      doc.addHeader(Sextante.getText("Correlation"), 2);
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         if (((j = m_Regression.getOrdered(i)) >= 0) && (j < m_RasterLayers.size())) {
+            layer = (IRasterLayer) m_RasterLayers.get(j);
+            doc.addListElement(Integer.toString(i + 1) + ": R2 = " + df.format(100.0 * m_Regression.getR2(j)) + "["
+                               + df.format(100.0 * m_Regression.getR2Change(j)) + "] -> " + layer.getName());
+         }
+      }
+
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(REGRESSION_INFO, Sextante.getText("Regression_values"), doc.getHTMLCode());
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/multipleRegression/MultipleRegressionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/covarianceMatrix/CovarianceMatrixAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/covarianceMatrix/CovarianceMatrixAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/covarianceMatrix/CovarianceMatrixAlgorithm.java	(revision 369)
@@ -0,0 +1,133 @@
+package es.unex.sextante.statisticalMethods.covarianceMatrix;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+
+public class CovarianceMatrixAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String COVARIANCES = "COVARIANCES";
+   public static final String INPUT       = "INPUT";
+
+   private static double      NODATA      = -9999999.;
+
+   private ArrayList          m_RasterLayers;
+   private IRasterLayer[]     m_Windows;
+   private int                m_iNX, m_iNY;
+   private double             m_dMean[];
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Statistical_methods"));
+      setName(Sextante.getText("Covariance_matrix"));
+
+      try {
+         m_Parameters.addMultipleInput(INPUT, Sextante.getText("Input_layers"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER,
+                  true);
+         addOutputTable(COVARIANCES, Sextante.getText("Covariance_matrix"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+
+      m_RasterLayers = m_Parameters.getParameterValueAsArrayList(INPUT);
+
+      if (m_RasterLayers.size() == 0) {
+         return false;
+      }
+
+      final Object[] values = new Object[m_RasterLayers.size()];
+      final String sFields[] = new String[m_RasterLayers.size()];
+      final Class iTypes[] = new Class[m_RasterLayers.size()];
+      final String sTableName = "Matriz de covarianzas";
+      final double dCovar[][] = new double[m_RasterLayers.size()][m_RasterLayers.size()];
+      m_dMean = new double[m_RasterLayers.size()];
+      this.adjustOutputExtent();
+
+      m_Windows = new IRasterLayer[m_RasterLayers.size()];
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         m_Windows[i] = (IRasterLayer) m_RasterLayers.get(i);
+         m_Windows[i].setWindowExtent(this.getAnalysisExtent());
+         m_Windows[i].setInterpolationMethod(IRasterLayer.INTERPOLATION_BSpline);
+         sFields[i] = m_Windows[i].getName();
+         iTypes[i] = Double.class;
+         m_dMean[i] = m_Windows[i].getMeanValue();
+      }
+
+      final ITable table = getNewTable(COVARIANCES, sTableName, iTypes, sFields);
+
+      m_iNX = getAnalysisExtent().getNX();
+      m_iNY = getAnalysisExtent().getNY();
+
+      final int iTotal = (int) (m_RasterLayers.size() * m_RasterLayers.size() / 2.);
+      int iCount = 0;
+      for (i = 0; (i < m_RasterLayers.size() - 1) && setProgress(iCount, iTotal); i++) {
+         dCovar[i][i] = 1.0;
+         iCount++;
+         for (j = i + 1; j < m_RasterLayers.size(); j++) {
+            dCovar[i][j] = dCovar[j][i] = getCovar(i, j);
+            iCount++;
+         }
+      }
+
+      for (i = 0; i < m_RasterLayers.size(); i++) {
+         for (j = 0; j < m_RasterLayers.size(); j++) {
+            values[j] = new Double(dCovar[i][j]);
+         }
+         table.addRecord(values);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private double getCovar(final int i,
+                           final int j) {
+
+      int x, y;
+      int iValues = 0;
+      double dValuei, dValuej;
+      double dSum = 0;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValuei = m_Windows[i].getCellValueAsDouble(x, y);
+            dValuej = m_Windows[j].getCellValueAsDouble(x, y);
+            if (!m_Windows[i].isNoDataValue(dValuei) && !m_Windows[j].isNoDataValue(dValuej)) {
+               dSum += (dValuei - m_dMean[i]) * (dValuej - m_dMean[j]);
+               iValues++;
+            }
+         }
+         if (iValues > 1) {
+            return dSum / (iValues - 1);
+         }
+         else {
+            return NODATA;
+         }
+      }
+
+      return NODATA;
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/covarianceMatrix/CovarianceMatrixAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfExponential/PDFExponentialAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfExponential/PDFExponentialAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfExponential/PDFExponentialAlgorithm.java	(revision 369)
@@ -0,0 +1,87 @@
+package es.unex.sextante.statisticalMethods.pdfExponential;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+public class PDFExponentialAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT       = "INPUT";
+   public static final String CDF         = "CDF";
+   public static final String MEAN        = "MEAN";
+   public static final String STDDEV      = "STDDEV";
+   public static final String PROBABILITY = "PROBABILITY";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Exponential_probability_distribution"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Raster_layer"), true);
+         m_Parameters.addNumericalValue(MEAN, Sextante.getText("Mean"), 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         m_Parameters.addBoolean(CDF, Sextante.getText("Accumulated_probability"), false);
+         addOutputRasterLayer(PROBABILITY, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      double dMean, dStdDev;
+      boolean bCDF;
+
+      final IRasterLayer window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      bCDF = m_Parameters.getParameterValueAsBoolean(CDF);
+      dMean = m_Parameters.getParameterValueAsDouble(MEAN);
+      dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+      window.setFullExtent();
+      final AnalysisExtent gridExtent = new AnalysisExtent(window);
+      final IRasterLayer result = getNewRasterLayer(PROBABILITY, Sextante.getText("Probability__exponential"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, gridExtent);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; y < iNY && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = window.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dValue)) {
+               if (bCDF) {
+                  result.setCellValue(x, y, PDF.exponentialCDF(dMean, dStdDev, dValue));
+               }
+               else {
+                  result.setCellValue(x, y, PDF.exponential(dMean, dStdDev, dValue));
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfExponential/PDFExponentialAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfStudent/PDFStudentAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfStudent/PDFStudentAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfStudent/PDFStudentAlgorithm.java	(revision 369)
@@ -0,0 +1,84 @@
+package es.unex.sextante.statisticalMethods.pdfStudent;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+public class PDFStudentAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT       = "INPUT";
+   public static final String CDF         = "CDF";
+   public static final String DEGREES     = "DEGREES";
+   public static final String PROBABILITY = "PROBABILITY";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Student's_t_probability_distribution"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Raster_layer"), true);
+         m_Parameters.addNumericalValue(DEGREES, Sextante.getText("Degrees_of_freedom"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 2, 1, Integer.MAX_VALUE);
+         m_Parameters.addBoolean(CDF, Sextante.getText("Accumulated_probability"), false);
+         addOutputRasterLayer(PROBABILITY, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      int iDegrees;
+      boolean bCDF;
+
+      final IRasterLayer window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      bCDF = m_Parameters.getParameterValueAsBoolean(CDF);
+      iDegrees = m_Parameters.getParameterValueAsInt(DEGREES);
+      window.setFullExtent();
+      final AnalysisExtent gridExtent = new AnalysisExtent(window);
+      final IRasterLayer result = getNewRasterLayer(PROBABILITY, Sextante.getText("Probabilidty__Student's_t"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, gridExtent);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; y < iNY && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = window.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dValue)) {
+               if (bCDF) {
+                  result.setCellValue(x, y, PDF.studentT(dValue, iDegrees));
+               }
+               else {
+                  result.setCellValue(x, y, PDF.studentT(dValue, iDegrees));
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfStudent/PDFStudentAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/regression/RegressionAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/regression/RegressionAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/regression/RegressionAlgorithm.java	(revision 369)
@@ -0,0 +1,215 @@
+package es.unex.sextante.statisticalMethods.regression;
+
+import java.text.DecimalFormat;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class RegressionAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METHOD          = "METHOD";
+   public static final String RESIDUALS       = "RESIDUALS";
+   public static final String RESULT          = "RESULT";
+   public static final String FIELD           = "FIELD";
+   public static final String POINTS          = "POINTS";
+   public static final String RASTER          = "RASTER";
+   public static final String REGRESSION_DATA = "REGRESSION_DATA";
+
+   private int                m_iField;
+   private IVectorLayer       m_Residuals;
+   private IRasterLayer       m_Window;
+   private IRasterLayer       m_Result;
+   Regression                 m_Regression;
+   private IVectorLayer       m_Points;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { "y = a + b * x", "y = a + b / x", "y = a / (b - x)", "y = a * x^b", "y = a e^(b * x)",
+               "y = a + b * ln(x)" };
+
+      this.setName(Sextante.getText("Regression"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(POINTS, Sextante.getText("Points"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "POINTS");
+         m_Parameters.addInputRasterLayer(RASTER, Sextante.getText("Raster_layer"), true);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Equation"), sMethod);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+         addOutputVectorLayer(RESIDUALS, Sextante.getText("Residuals"), OutputVectorLayer.SHAPE_TYPE_POINT);
+         addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final String sFieldNames[] = { Sextante.getText("Real_value"), Sextante.getText("Predictor_value"),
+               Sextante.getText("Estimated_value"), Sextante.getText("Diference"), Sextante.getText("Variance") };
+      final Class types[] = { Double.class, Double.class, Double.class, Double.class, Double.class };
+
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+      m_Points = m_Parameters.getParameterValueAsVectorLayer(POINTS);
+
+      if (m_Points.getShapesCount() == 0) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Invalid_input_data"));
+      }
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(RASTER);
+
+      m_Result = getNewRasterLayer(RESULT, Sextante.getText("Regression"), IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+      m_Window.setWindowExtent(extent);
+
+      m_Residuals = getNewVectorLayer(RESIDUALS, Sextante.getText("Residuals"), IVectorLayer.SHAPE_TYPE_POINT, types, sFieldNames);
+
+      calculateRegression();
+      calculateResultingGrid();
+      calculateResiduals();
+      addRegressionInfo();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void addRegressionInfo() {
+
+      final DecimalFormat df = new DecimalFormat("####.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Regression"));
+      doc.addHeader(Sextante.getText("Regression"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(m_Regression.getExpression());
+      doc.addListElement("R2 = " + df.format(m_Regression.getR2()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"), doc.getHTMLCode());
+
+   }
+
+
+   private void calculateResiduals() throws IteratorException {
+
+      double dValue;
+      double dGridValue;
+      final Object value[] = new Object[5];
+      final AnalysisExtent extent = m_Result.getWindowGridExtent();
+      GridCell cell;
+      final double v = 100. / m_Regression.getYVar();
+
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate pt = geom.getCoordinate();
+         dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+         cell = extent.getGridCoordsFromWorldCoords(pt.x, pt.y);
+         dGridValue = m_Result.getCellValueAsDouble(cell.getX(), cell.getY());
+         if (!m_Result.isNoDataValue(dGridValue)) {
+            value[0] = new Double(dValue);
+            value[1] = new Double(dValue = m_Window.getValueAt(pt.x, pt.y));
+            value[2] = new Double(dValue = m_Regression.getY(dValue));
+            value[3] = new Double(dValue = dValue - ((Double) value[0]).doubleValue());
+            value[4] = new Double(dValue * v);
+            m_Residuals.addFeature(geom, value);
+         }
+      }
+      iter.close();
+
+   }
+
+
+   private void calculateResultingGrid() {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      for (y = 0; y < iNY; y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (m_Window.isNoDataValue(dValue)) {
+               m_Result.setNoData(x, y);
+            }
+            else {
+               m_Result.setCellValue(x, y, m_Regression.getY(dValue));
+            }
+         }
+      }
+
+   }
+
+
+   private void calculateRegression() throws GeoAlgorithmExecutionException {
+
+      double dValue, dGridValue;
+      m_Regression = new Regression();
+      int iType = 1;
+
+      try {
+         iType = m_Parameters.getParameterValueAsInt(METHOD) + 1;
+      }
+      catch (final Exception e) {}
+
+      final IFeatureIterator iter = m_Points.iterator();
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         final Coordinate pt = geom.getCoordinate();
+         dGridValue = m_Window.getValueAt(pt.x, pt.y);
+         if (!m_Window.isNoDataValue(dGridValue)) {
+            try {
+               dValue = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+               m_Regression.addValue(dGridValue, dValue);
+            }
+            catch (final NumberFormatException e) {}
+         }
+      }
+      iter.close();
+      boolean bReturn = m_Regression.calculate(iType);
+      if (!bReturn) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Could_not_calculate_regression"));
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/regression/RegressionAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfChiSquared/PDFChiSquaredAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfChiSquared/PDFChiSquaredAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfChiSquared/PDFChiSquaredAlgorithm.java	(revision 369)
@@ -0,0 +1,78 @@
+package es.unex.sextante.statisticalMethods.pdfChiSquared;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+public class PDFChiSquaredAlgorithm
+         extends
+            GeoAlgorithm {
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Chi_squared_probability_distribution"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer("INPUT", Sextante.getText("Raster_layer"), true);
+         m_Parameters.addNumericalValue("DEGREES", Sextante.getText("Degrees_of_freedom"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 2, 0, Integer.MAX_VALUE);
+         m_Parameters.addBoolean("CDF", Sextante.getText("Accumulated_probability"), false);
+         addOutputRasterLayer("PROBABILITY", Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      int iDegrees;
+      boolean bCDF;
+
+      final IRasterLayer window = m_Parameters.getParameterValueAsRasterLayer("INPUT");
+      bCDF = m_Parameters.getParameterValueAsBoolean("CDF");
+      iDegrees = m_Parameters.getParameterValueAsInt("DEGREES");
+      window.setFullExtent();
+      final AnalysisExtent gridExtent = new AnalysisExtent(window);
+      final IRasterLayer result = getNewRasterLayer("PROBABILITY", Sextante.getText("Probability__chi_squared"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, gridExtent);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; y < iNY && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = window.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dValue)) {
+               if (bCDF) {
+                  result.setCellValue(x, y, PDF.chiSquareCDF(dValue, iDegrees));
+               }
+               else {
+                  result.setCellValue(x, y, PDF.chiSquare(dValue, iDegrees));
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfChiSquared/PDFChiSquaredAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfNormal/PDFNormalAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfNormal/PDFNormalAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfNormal/PDFNormalAlgorithm.java	(revision 369)
@@ -0,0 +1,87 @@
+package es.unex.sextante.statisticalMethods.pdfNormal;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.math.pdf.PDF;
+
+public class PDFNormalAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT       = "INPUT";
+   public static final String CDF         = "CDF";
+   public static final String MEAN        = "MEAN";
+   public static final String STDDEV      = "STDDEV";
+   public static final String PROBABILITY = "PROBABILITY";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Normal_probability_distribution"));
+      setGroup(Sextante.getText("Statistical_methods"));
+      this.setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(INPUT, Sextante.getText("Raster_layer"), true);
+         m_Parameters.addNumericalValue(MEAN, Sextante.getText("Mean"), 0, AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(STDDEV, Sextante.getText("Standard_deviation"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         m_Parameters.addBoolean(CDF, Sextante.getText("Accumulated_probability"), false);
+         addOutputRasterLayer(PROBABILITY, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+      double dValue;
+      double dMean, dStdDev;
+      boolean bCDF;
+
+      final IRasterLayer window = m_Parameters.getParameterValueAsRasterLayer(INPUT);
+      bCDF = m_Parameters.getParameterValueAsBoolean(CDF);
+      dMean = m_Parameters.getParameterValueAsDouble(MEAN);
+      dStdDev = m_Parameters.getParameterValueAsDouble(STDDEV);
+      window.setFullExtent();
+      final AnalysisExtent gridExtent = new AnalysisExtent(window);
+      final IRasterLayer result = getNewRasterLayer(PROBABILITY, Sextante.getText("Probability__normal"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE, gridExtent);
+
+      iNX = window.getNX();
+      iNY = window.getNY();
+
+      for (y = 0; y < iNY && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            dValue = window.getCellValueAsDouble(x, y);
+            if (!window.isNoDataValue(dValue)) {
+               if (bCDF) {
+                  result.setCellValue(x, y, PDF.normalCDF(dMean, dStdDev, dValue));
+               }
+               else {
+                  result.setCellValue(x, y, PDF.normal(dMean, dStdDev, dValue));
+               }
+            }
+            else {
+               result.setNoData(x, y);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/statisticalMethods/pdfNormal/PDFNormalAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/interpolationBase/BaseInterpolationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/interpolationBase/BaseInterpolationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/interpolationBase/BaseInterpolationAlgorithm.java	(revision 369)
@@ -0,0 +1,212 @@
+
+
+package es.unex.sextante.rasterize.interpolationBase;
+
+import java.awt.geom.Point2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.closestpts.NearestNeighbourFinder;
+import es.unex.sextante.closestpts.PtAndDistance;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public abstract class BaseInterpolationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   protected double                 NO_DATA;
+
+   public static final String       LAYER  = "LAYER";
+   public static final String       DIST   = "DIST";
+   public static final String       FIELD  = "FIELD";
+   public static final String       RESULT = "RESULT";
+
+   protected double                 m_dDistance;
+   protected int                    m_iField;
+   protected NearestNeighbourFinder m_SearchEngine;
+   protected PtAndDistance[]        m_NearestPoints;
+
+   protected IVectorLayer           m_Layer;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Point_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         m_Parameters.addNumericalValue(DIST, Sextante.getText("Search_radius"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      setValues();
+
+      m_SearchEngine = new NearestNeighbourFinder(m_Layer, m_iField, m_Task);
+      final IRasterLayer result = getNewRasterLayer(RESULT, m_Layer.getName() + Sextante.getText("[interpolated]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      setProgressText(Sextante.getText("Interpolating"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            result.setCellValue(x, y, getValueAt(x, y));
+         }
+      }
+
+      createCrossValidationTable();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected void createCrossValidationTable() throws UnsupportedOutputChannelException {
+
+      int i;
+      int iPoints;
+      double x, y, z;
+      double dValue;
+      final Object[] values = new Object[5];
+      final String sFields[] = { "X", "Y", Sextante.getText("Real_value"), Sextante.getText("Estimated_value"),
+               Sextante.getText("Diference") };
+      final Class types[] = { Double.class, Double.class, Double.class, Double.class, Double.class };
+      final String sTableName = Sextante.getText("Cross_validation_[") + m_Layer.getName() + "]";
+      final ITable table = getNewTable("CROSSVALIDATION", sTableName, types, sFields);
+
+      try {
+         setProgressText(Sextante.getText("Creating_cross_validation"));
+         iPoints = m_Layer.getShapesCount();
+         final IFeatureIterator iter = m_Layer.iterator();
+         i = 0;
+         while (iter.hasNext() && setProgress(i, iPoints)) {
+            final IFeature feature = iter.next();
+            final Geometry geom = feature.getGeometry();
+            final Coordinate coord = geom.getCoordinate();
+            x = coord.x;
+            y = coord.y;
+            values[0] = new Double(x);
+            values[1] = new Double(y);
+            try {
+               z = Double.parseDouble(feature.getRecord().getValue(m_iField).toString());
+            }
+            catch (final NumberFormatException e) {
+               z = 0;
+            }
+            values[2] = new Double(z);
+            dValue = getValueAt(x, y);
+            if (dValue != NO_DATA) {
+               values[3] = new Double(dValue);
+               values[4] = new Double(dValue - z);
+               table.addRecord(values);
+            }
+            i++;
+         }
+         iter.close();
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return;
+      }
+
+   }
+
+
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_dDistance = m_Parameters.getParameterValueAsDouble(DIST);
+      if (m_dDistance == 0) {
+         m_dDistance = Double.MAX_VALUE;
+      }
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+   }
+
+
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      m_NearestPoints = m_SearchEngine.getClosestPoints(pt.getX(), pt.getY(), m_dDistance);
+
+      final double dValue = interpolate(pt.getX(), pt.getY());
+
+      return dValue;
+
+   }
+
+
+   protected double getValueAt(final double x,
+                               final double y) {
+
+      try {
+         final PtAndDistance[] nearestPoints = m_SearchEngine.getClosestPoints(x, y, m_dDistance);
+
+         m_NearestPoints = new PtAndDistance[nearestPoints.length - 1];
+         int iIndex = 0;
+         for (final PtAndDistance element : nearestPoints) {
+            try {
+               if (element.getDist() != 0) {
+                  m_NearestPoints[iIndex] = element;
+                  iIndex++;
+               }
+            }
+            catch (final Exception e) {
+            }
+         }
+         return interpolate(x, y);
+      }
+      catch (final Exception e) {
+         return NO_DATA;
+      }
+
+   }
+
+
+   protected abstract double interpolate(double x,
+                                         double y);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/interpolationBase/BaseInterpolationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/idw/IDWAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/idw/IDWAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/idw/IDWAlgorithm.java	(revision 369)
@@ -0,0 +1,96 @@
+package es.unex.sextante.rasterize.idw;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterize.interpolationBase.BaseInterpolationAlgorithm;
+
+public class IDWAlgorithm
+         extends
+            BaseInterpolationAlgorithm {
+
+   public static final String POWER           = "POWER";
+   public static final String CROSSVALIDATION = "CROSSVALIDATION";
+
+   private double             m_dPower;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setName(Sextante.getText("Inverse_Distance_Weighting__IDW"));
+
+      try {
+         m_Parameters.addNumericalValue(POWER, Sextante.getText("Exponent"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  2, 0, Double.MAX_VALUE);
+         addOutputTable(CROSSVALIDATION, Sextante.getText("Cross_validation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+
+      m_dPower = m_Parameters.getParameterValueAsDouble(POWER);
+
+   }
+
+
+   @Override
+   protected double interpolate(final double x,
+                                final double y) {
+
+      int i;
+      int iPts = 0;
+      Point3D pt;
+      double d;
+      double dDistSum = 0, dZSum = 0;
+
+      try {
+         if (m_NearestPoints.length != 0) {
+            final int iSize = m_NearestPoints.length;
+            for (i = 0; i < iSize; i++) {
+               if (m_NearestPoints[i] != null) {
+                  iPts++;
+                  pt = m_NearestPoints[i].getPt();
+                  d = m_NearestPoints[i].getDist();
+
+                  if (d <= 0.0) {
+                     return pt.getZ();
+                  }
+
+                  d = Math.pow(d, -m_dPower);
+
+                  dZSum += d * pt.getZ();
+                  dDistSum += d;
+               }
+            }
+
+            if (iPts > 0) {
+               return dZSum / dDistSum;
+            }
+            else {
+               return NO_DATA;
+            }
+         }
+         else {
+            return NO_DATA;
+         }
+      }
+      catch (final Exception e) {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/idw/IDWAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/universalKriging/UniversalKrigingAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/universalKriging/UniversalKrigingAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/universalKriging/UniversalKrigingAlgorithm.java	(revision 369)
@@ -0,0 +1,286 @@
+package es.unex.sextante.rasterize.universalKriging;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import Jama.Matrix;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.closestpts.PtAndDistance;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+import es.unex.sextante.rasterize.interpolationBase.BaseInterpolationAlgorithm;
+
+
+public class UniversalKrigingAlgorithm
+         extends
+            BaseInterpolationAlgorithm {
+
+   public static final String GRIDS           = "GRIDS";
+   public static final String MINPOINTS       = "MINPOINTS";
+   public static final String MAXPOINTS       = "MAXPOINTS";
+   public static final String MODEL           = "MODEL";
+   public static final String NUGGET          = "NUGGET";
+   public static final String SILL            = "SILL";
+   public static final String RANGE           = "RANGE";
+   public static final String CROSSVALIDATION = "CROSSVALIDATION";
+   public static final String VARIANCE        = "VARIANCE";
+
+   private double             m_dNugget;
+   private double             m_dScale;
+   private double             m_dRange;
+   private double             m_dGammas[];
+   private int                m_iMinPoints;
+   private int                m_iMaxPoints;
+   private int                m_iModel;
+   private boolean            m_bCreateVarianceLayer;
+   private double             m_dWeights[][];
+   private Matrix             m_Matrix;
+   private IRasterLayer       m_Variance;
+   private IRasterLayer[]     m_Grids;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setName(Sextante.getText("Universal_Kriging"));
+
+      final String sModels[] = { Sextante.getText("Spherical"), Sextante.getText("Exponential"), Sextante.getText("Gaussian") };
+
+      try {
+         m_Parameters.addMultipleInput(GRIDS, Sextante.getText("Predictors"), AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+         m_Parameters.addNumericalValue(MINPOINTS, Sextante.getText("Minimum_number_of_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 4, 1, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(MAXPOINTS, Sextante.getText("Maximum_number_of_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 25, 1, Integer.MAX_VALUE);
+         m_Parameters.addSelection(MODEL, Sextante.getText("Model"), sModels);
+         m_Parameters.addNumericalValue(NUGGET, "Nugget", AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 0, 0,
+                  Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(SILL, "Sill", AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10, 0,
+                  Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(RANGE, Sextante.getText("Range"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  100, 0, Double.MAX_VALUE);
+         addOutputTable(CROSSVALIDATION, Sextante.getText("Cross_validation"));
+         addOutputRasterLayer(VARIANCE, Sextante.getText("Variances"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+
+      m_iMaxPoints = m_Parameters.getParameterValueAsInt(MAXPOINTS);
+      m_iMinPoints = m_Parameters.getParameterValueAsInt(MINPOINTS);
+      m_iModel = m_Parameters.getParameterValueAsInt(MODEL);
+      m_dNugget = m_Parameters.getParameterValueAsDouble(NUGGET);
+      m_dScale = m_Parameters.getParameterValueAsDouble(SILL) - m_dNugget;
+      m_dRange = m_Parameters.getParameterValueAsDouble(RANGE);
+      m_bCreateVarianceLayer = true;//m_Parameters.getParameterValueAsBoolean("VARIANCE");
+      final ArrayList grids = m_Parameters.getParameterValueAsArrayList(GRIDS);
+      final int n = m_iMaxPoints + 1 + grids.size();
+      m_dWeights = new double[n][n];
+      m_Matrix = new Matrix(m_dWeights);
+      m_dGammas = new double[n];
+
+      m_Grids = new IRasterLayer[grids.size()];
+      for (int i = 0; i < grids.size(); i++) {
+         m_Grids[i] = (IRasterLayer) grids.get(i);
+         m_Grids[i].setWindowExtent(m_AnalysisExtent);
+      }
+
+      if (m_bCreateVarianceLayer) {
+         m_Variance = getNewRasterLayer(VARIANCE, m_Layer.getName() + "[var]", IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      }
+
+   }
+
+
+   @Override
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      final PtAndDistance[] nearestPoints = m_SearchEngine.getClosestPoints(pt.getX(), pt.getY(), m_dDistance);
+
+      Arrays.sort(nearestPoints);
+
+      final int n = Math.min(nearestPoints.length, m_iMaxPoints);
+      m_NearestPoints = new PtAndDistance[n];
+      System.arraycopy(nearestPoints, 0, m_NearestPoints, 0, n);
+
+      final double dValue = interpolate(pt.getX(), pt.getY());
+
+      return dValue;
+
+   }
+
+
+   @Override
+   protected double getValueAt(final double x,
+                               final double y) {
+
+      try {
+         final PtAndDistance[] nearestPoints = m_SearchEngine.getClosestPoints(x, y, m_dDistance);
+         Arrays.sort(nearestPoints);
+         final int n = Math.min(nearestPoints.length, m_iMaxPoints) - 1;
+         m_NearestPoints = new PtAndDistance[n];
+         System.arraycopy(nearestPoints, 1, m_NearestPoints, 0, n);
+
+         return interpolate(x, y);
+      }
+      catch (final Exception e) {
+         return NO_DATA;
+      }
+
+   }
+
+
+   @Override
+   protected double interpolate(final double x,
+                                final double y) {
+
+      int i, j, nPoints;
+      final int nGrids = m_Grids.length;
+      double dLambda, dValue, dVariance;
+      Point3D pt;
+
+      if ((nPoints = getWeights(x, y)) >= m_iMinPoints) {
+         for (i = 0; i < nPoints; i++) {
+            /*pt =  m_NearestPoints[i].getPt();
+            dx = pt.getX() - x;
+            dy = pt.getY() - y;*/
+            m_dGammas[i] = getWeight(m_NearestPoints[i].getDist());
+         }
+
+         m_dGammas[nPoints] = 1.0;
+
+         for (i = 0, j = nPoints + 1; i < nGrids; i++, j++) {
+            m_dGammas[j] = m_Grids[i].getValueAt(x, y);
+         }
+
+         for (i = 0, dValue = 0.0, dVariance = 0.0; i < nPoints; i++) {
+
+            pt = m_NearestPoints[i].getPt();
+
+            for (j = 0, dLambda = 0.0; j <= nPoints + nGrids; j++) {
+               dLambda += m_dWeights[i][j] * m_dGammas[j];
+            }
+
+            dValue += dLambda * pt.getZ();
+
+            if (m_bCreateVarianceLayer) {
+               dVariance += dLambda * m_dGammas[i];
+            }
+         }
+
+         if (m_bCreateVarianceLayer) {
+            final GridCell cell = m_AnalysisExtent.getGridCoordsFromWorldCoords(x, y);
+            m_Variance.setCellValue(cell.getX(), cell.getY(), dVariance);
+         }
+
+         return dValue;
+      }
+
+      if (m_bCreateVarianceLayer) {
+         final GridCell cell = m_AnalysisExtent.getGridCoordsFromWorldCoords(x, y);
+         m_Variance.setNoData(cell.getX(), cell.getY());
+      }
+
+      return NO_DATA;
+   }
+
+
+   private double getWeight(double d) {
+
+      if (d == 0.0) {
+         d = 0.0001;
+      }
+
+      switch (m_iModel) {
+         case 0: // Spherical Model
+            if (d >= m_dRange) {
+               d = m_dNugget + m_dScale;
+            }
+            else {
+               d = m_dNugget + m_dScale * (3 * d / (2 * m_dRange) - d * d * d / (2 * m_dRange * m_dRange * m_dRange));
+            }
+            break;
+
+         case 1: // Exponential Model
+            d = m_dNugget + m_dScale * (1 - Math.exp(-3 * d / m_dRange));
+            break;
+
+         case 2: // Gaussian Model
+            d = 1 - Math.exp(-3 * d / (m_dRange * m_dRange));
+            d = m_dNugget + m_dScale * d * d;
+            break;
+      }
+
+      return (d);
+   }
+
+
+   private int getWeights(final double x,
+                          final double y) {
+
+      int i, j, n, iGrid;
+      final int nGrids = m_Grids.length;
+      double dx, dy;
+      Point3D pt, pt2;
+
+      m_dWeights = m_Matrix.getArray();
+
+      if ((n = Math.min(m_NearestPoints.length, m_iMaxPoints)) >= m_iMinPoints) {
+
+         for (i = 0; i < n; i++) {
+            pt = m_NearestPoints[i].getPt();
+            m_dWeights[i][i] = 0.0;
+            m_dWeights[i][n] = m_dWeights[n][i] = 1.0;
+            for (j = i + 1; j < n; j++) {
+               pt2 = m_NearestPoints[j].getPt();
+               dx = pt.getX() - pt2.getX();
+               dy = pt.getY() - pt2.getY();
+               m_dWeights[i][j] = m_dWeights[j][i] = getWeight(Math.sqrt(dx * dx + dy * dy));
+            }
+            //pt = (Point3D) m_ClosestPoints.get(i);
+            for (iGrid = 0, j = n + 1; iGrid < nGrids; iGrid++, j++) {
+               m_dWeights[i][j] = m_dWeights[j][i] = m_Grids[iGrid].getValueAt(pt.getX(), pt.getY());
+            }
+         }
+
+         for (i = n; i <= n + nGrids; i++) {
+            for (j = n; j <= n + nGrids; j++) {
+               m_dWeights[i][j] = 0.0;
+            }
+         }
+
+         final Matrix subMatrix = m_Matrix.getMatrix(0, n, 0, n);
+
+         try {
+            final Matrix inverse = subMatrix.inverse();
+            m_Matrix.setMatrix(0, n, 0, n, inverse);
+         }
+         catch (final RuntimeException e) {
+            return 0;
+         }
+
+      }
+
+      return n;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/universalKriging/UniversalKrigingAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/euclideanDistance/EuclideanDistanceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/euclideanDistance/EuclideanDistanceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/euclideanDistance/EuclideanDistanceAlgorithm.java	(revision 369)
@@ -0,0 +1,84 @@
+package es.unex.sextante.rasterize.euclideanDistance;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rTree.SextanteRTree;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class EuclideanDistanceAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   protected IVectorLayer     m_Layer;
+
+   private SextanteRTree      m_SearchEngine;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setName(Sextante.getText("Euclidean_distance"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Point_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      m_SearchEngine = new SextanteRTree(m_Layer, 0, m_Task);
+      final IRasterLayer result = getNewRasterLayer(RESULT, m_Layer.getName() + "[" + Sextante.getText("Euclidean_distance")
+                                                            + "]", IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      setProgressText(Sextante.getText("Interpolating"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            result.setCellValue(x, y, getValueAt(x, y));
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      final Point3D closestPt = m_SearchEngine.getClosestPoint(pt.getX(), pt.getY());
+      final Point2D closestPt2D = new Point2D.Double(closestPt.getX(), closestPt.getY());
+      return closestPt2D.distance(pt);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/euclideanDistance/EuclideanDistanceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/linearDecrease/LinearDecreaseAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/linearDecrease/LinearDecreaseAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/linearDecrease/LinearDecreaseAlgorithm.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.rasterize.linearDecrease;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterize.interpolationBase.BaseInterpolationAlgorithm;
+
+public class LinearDecreaseAlgorithm
+         extends
+            BaseInterpolationAlgorithm {
+
+   public static final String CROSSVALIDATION = "CROSSVALIDATION";
+   public static final String POWER           = "POWER";
+
+   private double             m_dPower;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setName(Sextante.getText("Linear_decrease"));
+
+      try {
+         m_Parameters.addNumericalValue(POWER, Sextante.getText("Exponent"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  2, 0, Double.MAX_VALUE);
+         addOutputTable(CROSSVALIDATION, Sextante.getText("Cross_validation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+
+      m_dPower = m_Parameters.getParameterValueAsDouble(POWER);
+
+   }
+
+
+   @Override
+   protected double interpolate(final double x,
+                                final double y) {
+
+      int i;
+      Point3D pt;
+      double d;
+      double dDistSum = 0, dZSum = 0;
+      int iPts = 0;
+      if (m_NearestPoints.length != 0) {
+         final int iSize = m_NearestPoints.length;
+         for (i = 0; i < iSize; i++) {
+            if (m_NearestPoints[i] != null) {
+               iPts++;
+               pt = m_NearestPoints[i].getPt();
+               d = m_NearestPoints[i].getDist();
+
+               if (d <= 0.0) {
+                  return pt.getZ();
+               }
+
+               d = 1 - Math.pow(d / m_dDistance, m_dPower);
+
+               dZSum += d * pt.getZ();
+               dDistSum += d;
+            }
+         }
+         if (iPts > 0) {
+            return dZSum / dDistSum;
+         }
+         else {
+            return NO_DATA;
+         }
+      }
+      else {
+         return NO_DATA;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/linearDecrease/LinearDecreaseAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayer/RasterizeVectorLayerAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayer/RasterizeVectorLayerAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayer/RasterizeVectorLayerAlgorithm.java	(revision 369)
@@ -0,0 +1,355 @@
+
+
+package es.unex.sextante.rasterize.rasterizeVectorLayer;
+
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class RasterizeVectorLayerAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private double             NO_DATA;
+
+   public static final String LAYER  = "LAYER";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+   private int                m_iField;
+   private int                m_iNX, m_iNY;
+   private IVectorLayer       m_Layer;
+   private IRasterLayer       m_Result;
+   private AnalysisExtent     m_Extent;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Rasterize_vector_layer"));
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Vector_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iShape = 1;
+      int iType;
+      int iShapeCount;
+      double dValue;
+
+      NO_DATA = m_OutputFactory.getDefaultNoDataValue();
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      m_iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      m_Result = getNewRasterLayer(RESULT, m_Layer.getName() + Sextante.getText("[rasterizedo]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Result.setNoDataValue(NO_DATA);
+      m_Result.assignNoData();
+
+      m_Extent = m_Result.getWindowGridExtent();
+
+      m_iNX = m_Extent.getNX();
+      m_iNY = m_Extent.getNY();
+
+      final Coordinate[] coords = new Coordinate[5];
+      coords[0] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+      coords[1] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMax());
+      coords[2] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMax());
+      coords[3] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMin());
+      coords[4] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+      final GeometryFactory gf = new GeometryFactory();
+      final LinearRing ring = gf.createLinearRing(coords);
+      final Polygon extent = gf.createPolygon(ring, null);
+
+      i = 0;
+      iType = m_Layer.getShapeType();
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final IRecord record = feature.getRecord();
+         try {
+            dValue = Double.parseDouble(record.getValue(m_iField).toString());
+            iShape++;
+         }
+         catch (final Exception e) {
+            dValue = iShape;
+            iShape++;
+         }
+
+         final Geometry geometry = feature.getGeometry();
+
+         if (geometry.intersects(extent)) {
+            switch (iType) {
+               case IVectorLayer.SHAPE_TYPE_POINT:
+                  doPoint(geometry, dValue);
+                  break;
+               case IVectorLayer.SHAPE_TYPE_LINE:
+                  doLine(geometry, dValue);
+                  break;
+               case IVectorLayer.SHAPE_TYPE_POLYGON:
+                  doPolygon(geometry, dValue);
+                  break;
+            }
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void doPolygon(final Geometry geom,
+                          final double dValue) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Polygon poly = (Polygon) geom.getGeometryN(i);
+         LinearRing lr = gf.createLinearRing(poly.getExteriorRing().getCoordinates());
+         Polygon part = gf.createPolygon(lr, null);
+         doPolygonPart(part, dValue, false);
+         for (int j = 0; j < poly.getNumInteriorRing(); j++) {
+            lr = gf.createLinearRing(poly.getInteriorRingN(j).getCoordinates());
+            part = gf.createPolygon(lr, null);
+            doPolygonPart(part, dValue, true);
+         }
+      }
+
+   }
+
+
+   private void doPolygonPart(final Polygon geom,
+                              final double dValue,
+                              final boolean bIsHole) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int x, y, ix, xStart, xStop, iPoint;
+      double yPos;;
+      Coordinate pLeft, pRight, pa, pb;
+      final Coordinate p = new Coordinate();
+      bCrossing = new boolean[m_iNX];
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (y = 0, yPos = m_Extent.getYMax(); y < m_iNY; y++, yPos -= m_Extent.getCellSize()) {
+         if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+            Arrays.fill(bCrossing, false);
+            pLeft = new Coordinate(m_Extent.getXMin() - 1.0, yPos);
+            pRight = new Coordinate(m_Extent.getXMax() + 1.0, yPos);
+
+            pb = points[points.length - 1];
+
+            for (iPoint = 0; iPoint < points.length; iPoint++) {
+               pa = pb;
+               pb = points[iPoint];
+
+               if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                  getCrossing(p, pa, pb, pLeft, pRight);
+
+                  ix = (int) ((p.x - m_Extent.getXMin()) / m_Extent.getCellSize() + 1.0);
+
+                  if (ix < 0) {
+                     ix = 0;
+                  }
+                  else if (ix >= m_iNX) {
+                     ix = m_iNX - 1;
+                  }
+
+                  bCrossing[ix] = !bCrossing[ix];
+               }
+            }
+
+            for (x = xStart, bFill = false; x <= xStop; x++) {
+               if (bCrossing[x]) {
+                  bFill = !bFill;
+               }
+               if (bFill) {
+                  final double dPrevValue = m_Result.getCellValueAsDouble(x, y);
+                  if (bIsHole) {
+                     if (dPrevValue == dValue) {
+                        m_Result.setNoData(x, y);
+                     }
+                  }
+                  else {
+                     if (dPrevValue == NO_DATA) {
+                        m_Result.setCellValue(x, y, dValue);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void doLine(final Geometry geom,
+                       final double dValue) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doLineString(part, dValue);
+      }
+
+   }
+
+
+   private void doLineString(final Geometry geom,
+                             final double dValue) {
+
+      int i;
+      double x, y, x2, y2;
+      final Coordinate[] coords = geom.getCoordinates();
+      for (i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         writeSegment(x, y, x2, y2, dValue);
+      }
+
+   }
+
+
+   private void writeSegment(double x,
+                             double y,
+                             final double x2,
+                             final double y2,
+                             final double dValue) {
+
+      double dx, dy, d, n;
+      GridCell cell;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_Result.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_Result.getWindowCellSize();
+         }
+         else {
+            dy /= m_Result.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_Result.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            if (m_Extent.contains(x, y)) {
+               cell = m_Extent.getGridCoordsFromWorldCoords(x, y);
+               //System.out.println(cell.getX() + " " + cell.getY());
+               m_Result.setCellValue(cell.getX(), cell.getY(), dValue);
+            }
+         }
+      }
+
+   }
+
+
+   private void doPoint(final Geometry geometry,
+                        final double dValue) {
+
+      final Coordinate coord = geometry.getCoordinate();
+      final GridCell cell = m_Extent.getGridCoordsFromWorldCoords(coord.x, coord.y);
+      m_Result.setCellValue(cell.getX(), cell.getY(), dValue);
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayer/RasterizeVectorLayerAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/directionToClosestPoint/DirectionToClosestPointAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/directionToClosestPoint/DirectionToClosestPointAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/directionToClosestPoint/DirectionToClosestPointAlgorithm.java	(revision 369)
@@ -0,0 +1,106 @@
+package es.unex.sextante.rasterize.directionToClosestPoint;
+
+import java.awt.geom.Point2D;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rTree.SextanteRTree;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+public class DirectionToClosestPointAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   protected IVectorLayer     m_Layer;
+
+   private SextanteRTree      m_SearchEngine;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setUserCanDefineAnalysisExtent(true);
+      setGroup(Sextante.getText("Cost_distances_and_routes"));
+      setName(Sextante.getText("Direction_to_closest_point"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Point_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+                  true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      int iNX, iNY;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      m_SearchEngine = new SextanteRTree(m_Layer, 0, m_Task);
+      final IRasterLayer result = getNewRasterLayer(RESULT, m_Layer.getName() + "["
+                                                            + Sextante.getText("Direction_to_closest_point") + "]",
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+
+      iNX = m_AnalysisExtent.getNX();
+      iNY = m_AnalysisExtent.getNY();
+
+      setProgressText(Sextante.getText("Calculating"));
+      for (y = 0; (y < iNY) && setProgress(y, iNY); y++) {
+         for (x = 0; x < iNX; x++) {
+            result.setCellValue(x, y, getValueAt(x, y));
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      final Point3D closestPt = m_SearchEngine.getClosestPoint(pt.getX(), pt.getY());
+      final Point2D closestPt2D = new Point2D.Double(closestPt.getX(), closestPt.getY());
+      final Double y0 = closestPt2D.getY();
+      final Double y1 = pt.getY();
+      final Double x0 = closestPt2D.getX();
+      final Double x1 = pt.getX();
+      Double angle;
+      if (((y1 - y0) >= 0) & ((x1 - x0) >= 0)) {
+         angle = Math.atan((y1 - y0) / (x1 - x0));
+      }
+      else {
+         if (((y1 - y0) >= 0) & ((x1 - x0) < 0)) {
+            angle = Math.atan((y1 - y0) / (x1 - x0)) + Math.PI;
+         }
+         else {
+            if (((y1 - y0) < 0) & ((x1 - x0) < 0)) {
+               angle = Math.atan((y1 - y0) / (x1 - x0)) + Math.PI;
+            }
+            else {
+               angle = Math.atan((y1 - y0) / (x1 - x0)) + 2 * Math.PI;
+            }
+         }
+      }
+      return angle;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/directionToClosestPoint/DirectionToClosestPointAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/kriging/KrigingAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/kriging/KrigingAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/kriging/KrigingAlgorithm.java	(revision 369)
@@ -0,0 +1,259 @@
+package es.unex.sextante.rasterize.kriging;
+
+import java.awt.geom.Point2D;
+import java.util.Arrays;
+
+import Jama.Matrix;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.closestpts.Point3D;
+import es.unex.sextante.closestpts.PtAndDistance;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+import es.unex.sextante.rasterize.interpolationBase.BaseInterpolationAlgorithm;
+
+public class KrigingAlgorithm
+         extends
+            BaseInterpolationAlgorithm {
+
+   public static final String SILL            = "SILL";
+   public static final String RANGE           = "RANGE";
+   public static final String NUGGET          = "NUGGET";
+   public static final String MODEL           = "MODEL";
+   public static final String MINPOINTS       = "MINPOINTS";
+   public static final String MAXPOINTS       = "MAXPOINTS";
+   public static final String VARIANCE        = "VARIANCE";
+   public static final String CROSSVALIDATION = "CROSSVALIDATION";
+
+   private double             m_dNugget;
+   private double             m_dScale;
+   private double             m_dRange;
+   private double             m_dGammas[];
+   private int                m_iMinPoints;
+   private int                m_iMaxPoints;
+   private int                m_iModel;
+   private boolean            m_bCreateVarianceLayer;
+   private double             m_dWeights[][];
+   private Matrix             m_Matrix;
+   private IRasterLayer       m_Variance;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      super.defineCharacteristics();
+
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setName(Sextante.getText("Kriging"));
+
+      final String sModels[] = { Sextante.getText("Spherical"), Sextante.getText("Exponential"), Sextante.getText("Gaussian") };
+
+      try {
+         m_Parameters.addNumericalValue(MINPOINTS, Sextante.getText("Mino_number_of_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 4, 1, Integer.MAX_VALUE);
+         m_Parameters.addNumericalValue(MAXPOINTS, Sextante.getText("Max_number_of_points"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, 25, 1, Integer.MAX_VALUE);
+         m_Parameters.addSelection(MODEL, Sextante.getText("Model"), sModels);
+         m_Parameters.addNumericalValue(NUGGET, Sextante.getText("Nugget"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  0, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(SILL, Sextante.getText("Sill"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 10,
+                  0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(RANGE, Sextante.getText("Range"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE,
+                  100, 0, Double.MAX_VALUE);
+         addOutputTable(CROSSVALIDATION, Sextante.getText("Cross_validation"));
+         addOutputRasterLayer("VARIANCE", Sextante.getText("Variances"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   protected void setValues() throws GeoAlgorithmExecutionException {
+
+      super.setValues();
+
+      m_iMaxPoints = m_Parameters.getParameterValueAsInt(MAXPOINTS);
+      m_iMinPoints = m_Parameters.getParameterValueAsInt(MINPOINTS);
+      m_iModel = m_Parameters.getParameterValueAsInt(MODEL);
+      m_dNugget = m_Parameters.getParameterValueAsDouble(NUGGET);
+      m_dScale = m_Parameters.getParameterValueAsDouble(SILL) - m_dNugget;
+      m_dRange = m_Parameters.getParameterValueAsDouble(RANGE);
+      m_bCreateVarianceLayer = true; //m_Parameters.getParameterValueAsBoolean("VARIANCE");
+      m_dWeights = new double[m_iMaxPoints + 1][m_iMaxPoints + 1];
+      m_Matrix = new Matrix(m_dWeights);
+      m_dGammas = new double[m_iMaxPoints + 1];
+      if (m_bCreateVarianceLayer) {
+         m_Variance = getNewRasterLayer(VARIANCE, m_Layer.getName() + Sextante.getText("[variances]"),
+                  IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      }
+
+
+   }
+
+
+   @Override
+   protected double getValueAt(final int x,
+                               final int y) {
+
+      final Point2D pt = m_AnalysisExtent.getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+      final PtAndDistance[] nearestPoints = m_SearchEngine.getClosestPoints(pt.getX(), pt.getY(), m_dDistance);
+
+      Arrays.sort(nearestPoints);
+
+      final int n = Math.min(nearestPoints.length, m_iMaxPoints);
+      m_NearestPoints = new PtAndDistance[n];
+      System.arraycopy(nearestPoints, 0, m_NearestPoints, 0, n);
+
+      final double dValue = interpolate(pt.getX(), pt.getY());
+
+      return dValue;
+
+   }
+
+
+   @Override
+   protected double getValueAt(final double x,
+                               final double y) {
+
+      try {
+         final PtAndDistance[] nearestPoints = m_SearchEngine.getClosestPoints(x, y, m_dDistance);
+         Arrays.sort(nearestPoints);
+         final int n = Math.min(nearestPoints.length, m_iMaxPoints) - 1;
+         m_NearestPoints = new PtAndDistance[n];
+         System.arraycopy(nearestPoints, 1, m_NearestPoints, 0, n);
+
+         return interpolate(x, y);
+      }
+      catch (final Exception e) {
+         return NO_DATA;
+      }
+
+   }
+
+
+   @Override
+   protected double interpolate(final double x,
+                                final double y) {
+
+      int i, j, nPoints;
+      double dLambda, dValue, dVariance;
+      Point3D pt;
+
+      if ((nPoints = getWeights(x, y)) >= m_iMinPoints) {
+         for (i = 0; i < nPoints; i++) {
+            m_dGammas[i] = getWeight(m_NearestPoints[i].getDist());
+         }
+
+         m_dGammas[nPoints] = 1.0;
+
+         for (i = 0, dValue = 0.0, dVariance = 0.0; i < nPoints; i++) {
+            pt = m_NearestPoints[i].getPt();
+            for (j = 0, dLambda = 0.0; j <= nPoints; j++) {
+               dLambda += m_dWeights[i][j] * m_dGammas[j];
+            }
+
+            dValue += dLambda * pt.getZ();
+
+            if (m_bCreateVarianceLayer) {
+               dVariance += dLambda * m_dGammas[i];
+            }
+         }
+
+         if (m_bCreateVarianceLayer) {
+            final GridCell cell = m_AnalysisExtent.getGridCoordsFromWorldCoords(x, y);
+            m_Variance.setCellValue(cell.getX(), cell.getY(), dVariance);
+         }
+
+         return dValue;
+      }
+
+      if (m_bCreateVarianceLayer) {
+         final GridCell cell = m_AnalysisExtent.getGridCoordsFromWorldCoords(x, y);
+         m_Variance.setNoData(cell.getX(), cell.getY());
+      }
+
+      return NO_DATA;
+   }
+
+
+   private double getWeight(double d) {
+
+      if (d == 0.0) {
+         d = 0.0001;
+      }
+
+      switch (m_iModel) {
+         case 0: // Spherical Model
+            if (d >= m_dRange) {
+               d = m_dNugget + m_dScale;
+            }
+            else {
+               d = m_dNugget + m_dScale * (3 * d / (2 * m_dRange) - d * d * d / (2 * m_dRange * m_dRange * m_dRange));
+            }
+            break;
+
+         case 1: // Exponential Model
+            d = m_dNugget + m_dScale * (1 - Math.exp(-3 * d / m_dRange));
+            break;
+
+         case 2: // Gaussian Model
+            d = 1 - Math.exp(-3 * d / (m_dRange * m_dRange));
+            d = m_dNugget + m_dScale * d * d;
+            break;
+      }
+
+      return (d);
+   }
+
+
+   private int getWeights(final double x,
+                          final double y) {
+
+      int i, j, n;
+      double dx, dy;
+      Point3D pt, pt2;
+
+      m_dWeights = m_Matrix.getArray();
+
+      if ((n = Math.min(m_NearestPoints.length, m_iMaxPoints)) >= m_iMinPoints) {
+         //n = Math.min(n, m_iMaxPoints);
+         for (i = 0; i < n; i++) {
+            pt = m_NearestPoints[i].getPt();
+            m_dWeights[i][i] = 0.0;
+            m_dWeights[i][n] = m_dWeights[n][i] = 1.0;
+            for (j = i + 1; j < n; j++) {
+               pt2 = m_NearestPoints[j].getPt();
+               dx = pt.getX() - pt2.getX();
+               dy = pt.getY() - pt2.getY();
+               m_dWeights[i][j] = m_dWeights[j][i] = getWeight(Math.sqrt(dx * dx + dy * dy));
+            }
+         }
+
+         m_dWeights[n][n] = 0.0;
+
+         final Matrix subMatrix = m_Matrix.getMatrix(0, n, 0, n);
+
+         try {
+            final Matrix inverse = subMatrix.inverse();
+            m_Matrix.setMatrix(0, n, 0, n, inverse);
+         }
+         catch (final RuntimeException e) {
+            return 0;
+         }
+
+         //m_dWeights = inverse.getArray();
+
+      }
+
+      return n;
+
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/kriging/KrigingAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayerForMask/RasterizeVectorLayerForMaskAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayerForMask/RasterizeVectorLayerForMaskAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayerForMask/RasterizeVectorLayerForMaskAlgorithm.java	(revision 369)
@@ -0,0 +1,334 @@
+
+
+package es.unex.sextante.rasterize.rasterizeVectorLayerForMask;
+
+import java.util.Arrays;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+public class RasterizeVectorLayerForMaskAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private double             NO_DATA;
+
+   public static final String LAYER  = "LAYER";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+   private int                m_iNX, m_iNY;
+   private IVectorLayer       m_Layer;
+   private IRasterLayer       m_Result;
+   private AnalysisExtent     m_Extent;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Rasterize_vector_layer_for_mask"));
+      setGroup(Sextante.getText("Rasterization_and_interpolation"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Vector_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         addOutputRasterLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iType;
+      int iShapeCount;
+
+      NO_DATA = 0;
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+
+      m_Result = getNewRasterLayer(RESULT, m_Layer.getName() + Sextante.getText("[rasterizedo]"),
+               IRasterLayer.RASTER_DATA_TYPE_DOUBLE);
+      m_Result.setNoDataValue(NO_DATA);
+      m_Result.assignNoData();
+
+      m_Extent = m_Result.getWindowGridExtent();
+
+      m_iNX = m_Extent.getNX();
+      m_iNY = m_Extent.getNY();
+
+      final Coordinate[] coords = new Coordinate[5];
+      coords[0] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+      coords[1] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMax());
+      coords[2] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMax());
+      coords[3] = new Coordinate(m_Extent.getXMax(), m_Extent.getYMin());
+      coords[4] = new Coordinate(m_Extent.getXMin(), m_Extent.getYMin());
+      final GeometryFactory gf = new GeometryFactory();
+      final LinearRing ring = gf.createLinearRing(coords);
+      final Polygon extent = gf.createPolygon(ring, null);
+
+      i = 0;
+      iType = m_Layer.getShapeType();
+      iShapeCount = m_Layer.getShapesCount();
+      final IFeatureIterator iter = m_Layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final IRecord record = feature.getRecord();
+
+         final Geometry geometry = feature.getGeometry();
+
+         if (geometry.intersects(extent)) {
+            switch (iType) {
+               case IVectorLayer.SHAPE_TYPE_POINT:
+                  doPoint(geometry, 1);
+                  break;
+               case IVectorLayer.SHAPE_TYPE_LINE:
+                  doLine(geometry, 1);
+                  break;
+               case IVectorLayer.SHAPE_TYPE_POLYGON:
+                  doPolygon(geometry, 1);
+                  break;
+            }
+         }
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+
+   }
+
+
+   private void doPolygon(final Geometry geom,
+                          final double dValue) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Polygon poly = (Polygon) geom.getGeometryN(i);
+         LinearRing lr = gf.createLinearRing(poly.getExteriorRing().getCoordinates());
+         Polygon part = gf.createPolygon(lr, null);
+         doPolygonPart(part, dValue, false);
+         for (int j = 0; j < poly.getNumInteriorRing(); j++) {
+            lr = gf.createLinearRing(poly.getInteriorRingN(j).getCoordinates());
+            part = gf.createPolygon(lr, null);
+            doPolygonPart(part, dValue, true);
+         }
+      }
+
+   }
+
+
+   private void doPolygonPart(final Polygon geom,
+                              final double dValue,
+                              final boolean bIsHole) {
+
+      boolean bFill;
+      boolean bCrossing[];
+      int x, y, ix, xStart, xStop, iPoint;
+      double yPos;;
+      Coordinate pLeft, pRight, pa, pb;
+      final Coordinate p = new Coordinate();
+      bCrossing = new boolean[m_iNX];
+
+      final Envelope extent = geom.getEnvelopeInternal();
+
+      xStart = (int) ((extent.getMinX() - m_Extent.getXMin()) / m_Extent.getCellSize()) - 1;
+      if (xStart < 0) {
+         xStart = 0;
+      }
+
+      xStop = (int) ((extent.getMaxX() - m_Extent.getXMin()) / m_Extent.getCellSize()) + 1;
+      if (xStop >= m_iNX) {
+         xStop = m_iNX - 1;
+      }
+
+      final Coordinate[] points = geom.getCoordinates();
+
+      for (y = 0, yPos = m_Extent.getYMax(); y < m_iNY; y++, yPos -= m_Extent.getCellSize()) {
+         if ((yPos >= extent.getMinY()) && (yPos <= extent.getMaxY())) {
+            Arrays.fill(bCrossing, false);
+            pLeft = new Coordinate(m_Extent.getXMin() - 1.0, yPos);
+            pRight = new Coordinate(m_Extent.getXMax() + 1.0, yPos);
+
+            pb = points[points.length - 1];
+
+            for (iPoint = 0; iPoint < points.length; iPoint++) {
+               pa = pb;
+               pb = points[iPoint];
+
+               if ((((pa.y <= yPos) && (yPos < pb.y)) || ((pa.y > yPos) && (yPos >= pb.y)))) {
+                  getCrossing(p, pa, pb, pLeft, pRight);
+
+                  ix = (int) ((p.x - m_Extent.getXMin()) / m_Extent.getCellSize() + 1.0);
+
+                  if (ix < 0) {
+                     ix = 0;
+                  }
+                  else if (ix >= m_iNX) {
+                     ix = m_iNX - 1;
+                  }
+
+                  bCrossing[ix] = !bCrossing[ix];
+               }
+            }
+
+            for (x = xStart, bFill = false; x <= xStop; x++) {
+               if (bCrossing[x]) {
+                  bFill = !bFill;
+               }
+               if (bFill) {
+                  final double dPrevValue = m_Result.getCellValueAsDouble(x, y);
+                  if (bIsHole) {
+                     if (dPrevValue == dValue) {
+                        m_Result.setNoData(x, y);
+                     }
+                  }
+                  else {
+                     if (dPrevValue == NO_DATA) {
+                        m_Result.setCellValue(x, y, dValue);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void doLine(final Geometry geom,
+                       final double dValue) {
+
+      for (int i = 0; i < geom.getNumGeometries(); i++) {
+         final Geometry part = geom.getGeometryN(i);
+         doLineString(part, dValue);
+      }
+
+   }
+
+
+   private void doLineString(final Geometry geom,
+                             final double dValue) {
+
+      int i;
+      double x, y, x2, y2;
+      final Coordinate[] coords = geom.getCoordinates();
+      for (i = 0; i < coords.length - 1; i++) {
+         x = coords[i].x;
+         y = coords[i].y;
+         x2 = coords[i + 1].x;
+         y2 = coords[i + 1].y;
+         writeSegment(x, y, x2, y2, dValue);
+      }
+
+   }
+
+
+   private void writeSegment(double x,
+                             double y,
+                             final double x2,
+                             final double y2,
+                             final double dValue) {
+
+      double dx, dy, d, n;
+      GridCell cell;
+
+      dx = Math.abs(x2 - x);
+      dy = Math.abs(y2 - y);
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+         if (dx > dy) {
+            dx /= m_Result.getWindowCellSize();
+            n = dx;
+            dy /= dx;
+            dx = m_Result.getWindowCellSize();
+         }
+         else {
+            dy /= m_Result.getWindowCellSize();
+            n = dy;
+            dx /= dy;
+            dy = m_Result.getWindowCellSize();
+         }
+
+         if (x2 < x) {
+            dx = -dx;
+         }
+
+         if (y2 < y) {
+            dy = -dy;
+         }
+
+         for (d = 0.0; d <= n; d++, x += dx, y += dy) {
+            if (m_Extent.contains(x, y)) {
+               cell = m_Extent.getGridCoordsFromWorldCoords(x, y);
+               //System.out.println(cell.getX() + " " + cell.getY());
+               m_Result.setCellValue(cell.getX(), cell.getY(), dValue);
+            }
+         }
+      }
+
+   }
+
+
+   private void doPoint(final Geometry geometry,
+                        final double dValue) {
+
+      final Coordinate coord = geometry.getCoordinate();
+      final GridCell cell = m_Extent.getGridCoordsFromWorldCoords(coord.x, coord.y);
+      m_Result.setCellValue(cell.getX(), cell.getY(), dValue);
+
+   }
+
+
+   private boolean getCrossing(final Coordinate crossing,
+                               final Coordinate a1,
+                               final Coordinate a2,
+                               final Coordinate b1,
+                               final Coordinate b2) {
+
+      double lambda, div, a_dx, a_dy, b_dx, b_dy;
+
+      a_dx = a2.x - a1.x;
+      a_dy = a2.y - a1.y;
+
+      b_dx = b2.x - b1.x;
+      b_dy = b2.y - b1.y;
+
+      if ((div = a_dx * b_dy - b_dx * a_dy) != 0.0) {
+         lambda = ((b1.x - a1.x) * b_dy - b_dx * (b1.y - a1.y)) / div;
+
+         crossing.x = a1.x + lambda * a_dx;
+         crossing.y = a1.y + lambda * a_dy;
+
+         return true;
+
+      }
+
+      return false;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/rasterize/rasterizeVectorLayerForMask/RasterizeVectorLayerForMaskAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorAlgorithm.java	(revision 369)
@@ -0,0 +1,103 @@
+
+
+package es.unex.sextante.nonSpatial.calculator;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+
+
+public class CalculatorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String FORMULA = "FORMULA";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Calculator"));
+      setGroup(Sextante.getText("nonSpatial"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutputNumericalValue(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final String sFormula = m_Parameters.getParameterValueAsString(FORMULA);
+
+      final JEP jep = new JEP();
+
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         Sextante.addErrorToLog(jep.getErrorInfo());
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Syntax_error"));
+      }
+
+      addOutputNumericalValue(RESULT, jep.getValue());
+
+      return true;
+
+   }
+
+
+   @Override
+   public boolean preprocessForModeller(final Object obj) throws GeoAlgorithmExecutionException {
+
+      final ModelAlgorithm model = (ModelAlgorithm) obj;
+
+      try {
+         String sFormula = m_Parameters.getParameterValueAsString(FORMULA);
+         final HashMap inputs = model.getInputs();
+         final Set set = inputs.keySet();
+         final Iterator iter = set.iterator();
+         while (iter.hasNext()) {
+            final Object key = iter.next();
+            final Object input = inputs.get(key);
+            if (input instanceof Double) {
+               if (sFormula.contains((String) key)) {
+                  sFormula = sFormula.replace(key.toString(), input.toString());
+               }
+            }
+            if (input instanceof ModelElementNumericalValue) {
+               if (sFormula.contains(((String) key).toLowerCase())) {
+                  return false;
+               }
+            }
+         }
+         m_Parameters.getParameter(FORMULA).setParameterValue(sFormula);
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("Syntax_error"));
+      }
+
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorKeysPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorKeysPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorKeysPanel.java	(revision 369)
@@ -0,0 +1,186 @@
+package es.unex.sextante.nonSpatial.calculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+
+public class CalculatorKeysPanel
+         extends
+            JPanel {
+
+   private JTextArea m_TextExpression = null;
+   private JButton   jButtonMinus;
+   private JButton   jButtonDivide;
+   private JButton   jButton2;
+   private JButton   jButtonDot;
+   private JButton   jButtonBrackets;
+   private JButton   jButton0;
+   private JButton   jButton9;
+   private JButton   jButton8;
+   private JButton   jButton7;
+   private JButton   jButton6;
+   private JButton   jButton5;
+   private JButton   jButton4;
+   private JButton   jButton3;
+   private JButton   jButton1;
+   private JButton   jButtonMultiply;
+   private JButton   jButtonPlus;
+
+
+   public CalculatorKeysPanel(final JTextArea textExpression) {
+
+      super();
+
+      m_TextExpression = textExpression;
+
+      initialize();
+
+   }
+
+
+   private void initialize() {
+
+      final ActionListener listener = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            addText(evt.getSource());
+         }
+      };
+
+      final ActionListener listenerBrackets = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            m_TextExpression.insert(" ()", m_TextExpression.getCaretPosition());
+            m_TextExpression.setCaretPosition(m_TextExpression.getCaretPosition() - 1);
+         }
+      };
+
+      final TableLayout thisLayout = new TableLayout(
+               new double[][] {
+                        { TableLayoutConstants.FILL, 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL },
+                        { TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(284, 239));
+      {
+         jButtonPlus = new JButton();
+         this.add(jButtonPlus, "0, 0");
+         jButtonPlus.setText("+");
+         jButtonPlus.addActionListener(listener);
+      }
+      {
+         jButtonMinus = new JButton();
+         this.add(jButtonMinus, "0, 1");
+         jButtonMinus.setText("-");
+         jButtonMinus.addActionListener(listener);
+      }
+      {
+         jButtonMultiply = new JButton();
+         this.add(jButtonMultiply, "0, 2");
+         jButtonMultiply.setText("*");
+         jButtonMultiply.addActionListener(listener);
+      }
+      {
+         jButtonDivide = new JButton();
+         this.add(jButtonDivide, "0, 3");
+         jButtonDivide.setText("/");
+         jButtonDivide.addActionListener(listener);
+      }
+      {
+         jButton1 = new JButton();
+         this.add(jButton1, "2, 2");
+         jButton1.setText("1");
+         jButton1.addActionListener(listener);
+      }
+      {
+         jButton2 = new JButton();
+         this.add(jButton2, "3, 2");
+         jButton2.setText("2");
+         jButton2.addActionListener(listener);
+      }
+      {
+         jButton3 = new JButton();
+         this.add(jButton3, "4, 2");
+         jButton3.setText("3");
+         jButton3.addActionListener(listener);
+      }
+      {
+         jButton4 = new JButton();
+         this.add(jButton4, "2, 1");
+         jButton4.setText("4");
+         jButton4.addActionListener(listener);
+      }
+      {
+         jButton5 = new JButton();
+         this.add(jButton5, "3, 1");
+         jButton5.setText("5");
+         jButton5.addActionListener(listener);
+      }
+      {
+         jButton6 = new JButton();
+         this.add(jButton6, "4, 1");
+         jButton6.setText("6");
+         jButton6.addActionListener(listener);
+      }
+      {
+         jButton7 = new JButton();
+         this.add(jButton7, "2, 0");
+         jButton7.setText("7");
+         jButton7.addActionListener(listener);
+      }
+      {
+         jButton8 = new JButton();
+         this.add(jButton8, "3, 0");
+         jButton8.setText("8");
+         jButton8.addActionListener(listener);
+      }
+      {
+         jButton9 = new JButton();
+         this.add(jButton9, "4, 0");
+         jButton9.setText("9");
+         jButton9.addActionListener(listener);
+      }
+      {
+         jButton0 = new JButton();
+         this.add(jButton0, "2, 3");
+         jButton0.setText("0");
+         jButton0.addActionListener(listener);
+      }
+      {
+         jButtonDot = new JButton();
+         this.add(jButtonDot, "4, 3");
+         jButtonDot.setText(".");
+         jButtonDot.addActionListener(listener);
+      }
+      {
+         jButtonBrackets = new JButton();
+         this.add(jButtonBrackets, "3, 3");
+         jButtonBrackets.setText("( )");
+         jButtonBrackets.addActionListener(listenerBrackets);
+      }
+   }
+
+
+   private void addText(final Object source) {
+
+      if (source instanceof JButton) {
+         String s = ((JButton) source).getText();
+         try {
+            final int i = Integer.parseInt(s);
+         }
+         catch (final NumberFormatException e) {
+            s = " " + s + " ";
+         }
+         m_TextExpression.insert(s, m_TextExpression.getCaretPosition());
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorKeysPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,262 @@
+package es.unex.sextante.nonSpatial.calculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+public class CalculatorModelerParametersPanel
+         extends
+            GeoAlgorithmModelerParametersPanel {
+
+
+   private JTextArea           jTextExpression;
+   private JScrollPane         jScrollPane;
+   private JTree               jTree;
+   private JScrollPane         jScrollPane1;
+   private CalculatorKeysPanel m_KeysPanel;
+   private HashMap             m_Constants;
+
+
+   public CalculatorModelerParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 50.0, 5.0,
+                        10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            jTextExpression = new JTextArea();
+            jScrollPane.setViewportView(jTextExpression);
+            jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+            jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            try {
+               final Parameter param = m_Algorithm.getParameters().getParameter(CalculatorAlgorithm.FORMULA);
+               final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(param));
+               if (oad != null) {
+                  final String sFormula = (String) oad.getObject();
+                  jTextExpression.setText(sFormula);
+               }
+            }
+            catch (final Exception e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jScrollPane1 = new JScrollPane();
+         this.add(jScrollPane1, "1, 1, 2, 3");
+         {
+            jTree = new JTree();
+            jScrollPane1.setViewportView(jTree);
+            jScrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+            jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+            final MouseListener ml = new MouseAdapter() {
+               @Override
+               public void mousePressed(MouseEvent e) {
+                  int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+                  TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+                  if ((iRow != -1) && (e.getClickCount() == 2)) {
+                     insertTextFromTree(path);
+                  }
+               }
+            };
+            jTree.addMouseListener(ml);
+            try {
+               populateTree();
+            }
+            catch (final Exception e) {
+               e.printStackTrace();
+            }
+         }
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i;
+      final int j;
+
+      jTree.setModel(null);
+
+      //numerical values
+      final ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Numerical_values"));
+      DefaultMutableTreeNode child;
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         final String s = " " + sOperators[i] + " ";
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final String s = (String) iter.next();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         String s = (String) ((ObjectAndDescription) node.getUserObject()).getObject();
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public boolean assignParameters(final HashMap map) {
+
+      final ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+
+      final JEP jep = new JEP();
+
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      for (int i = 0; i < values.length; i++) {
+         if (jTextExpression.getText().contains(values[i].getObject().toString())) {
+            jep.addVariable(values[i].getObject().toString(), 0);
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+
+      jep.parseExpression(jTextExpression.getText());
+
+      if (jep.hasError()) {
+         return false;
+      }
+
+
+      final String sFormulaKey = getInnerParameterKey();
+      map.put(CalculatorAlgorithm.FORMULA, sFormulaKey);
+      m_DataObjects.put(sFormulaKey, new ObjectAndDescription("String", jTextExpression.getText()));
+
+      final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+      final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+      final String sName = CalculatorAlgorithm.RESULT + this.m_sAlgorithmName;
+      try {
+         final Output out = ooset.getOutput(CalculatorAlgorithm.RESULT);
+         final Output outToAdd = out.getClass().newInstance();
+         outToAdd.setName(sName);
+         outToAdd.setDescription(sName); //TODO!!!!!!!!!!!!!!!
+         oosetGlobal.add(outToAdd);
+      }
+      catch (final Exception e) {}
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/nonSpatial/calculator/CalculatorModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorize/VectorizeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorize/VectorizeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorize/VectorizeAlgorithm.java	(revision 369)
@@ -0,0 +1,592 @@
+//package es.unex.sextante.vectorize.vectorize;
+//
+//import java.awt.geom.Point2D;
+//import java.util.ArrayList;
+//
+//import com.vividsolutions.jts.geom.Coordinate;
+//import com.vividsolutions.jts.geom.Geometry;
+//import com.vividsolutions.jts.geom.GeometryFactory;
+//import com.vividsolutions.jts.geom.LinearRing;
+//import com.vividsolutions.jts.geom.Polygon;
+//
+//import es.unex.sextante.core.AnalysisExtent;
+//import es.unex.sextante.core.GeoAlgorithm;
+//import es.unex.sextante.core.Sextante;
+//import es.unex.sextante.dataObjects.IRasterLayer;
+//import es.unex.sextante.dataObjects.IVectorLayer;
+//import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+//import es.unex.sextante.exceptions.RepeatedParameterNameException;
+//import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+//import es.unex.sextante.outputs.OutputVectorLayer;
+//
+//public class VectorizeAlgorithm
+//         extends
+//            GeoAlgorithm {
+//
+//   public static final String    LAYER  = "LAYER";
+//   public static final String    RESULT = "RESULT";
+//
+//   private IRasterLayer          m_Input;
+//   private IRasterLayer          m_Edge;
+//   private IVectorLayer          m_Polygons;
+//   private int                   m_iNX, m_iNY;
+//   private char[][]              m_Lock;
+//   private ArrayList<Coordinate> m_Coords;
+//   private ArrayList<Geometry>   m_Polyg;
+//
+//   private static final int      m_IX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+//   private static final int      m_IY[] = { -1, -1, 0, 1, 1, 1, 0, -1 };
+//
+//
+//   @Override
+//   public void defineCharacteristics() {
+//
+//      setName(Sextante.getText("Vectorize_raster_layer__polygons"));
+//      setGroup(Sextante.getText("Vectorization"));
+//      setUserCanDefineAnalysisExtent(true);
+//
+//      try {
+//         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+//         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+//      }
+//      catch (final RepeatedParameterNameException e) {
+//         Sextante.addErrorToLog(e);
+//      }
+//
+//   }
+//
+//
+//   @Override
+//   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+//
+//      final String sFields[] = new String[2];
+//      final Class types[] = { Integer.class, Double.class };
+//
+//      m_Input = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+//      m_Input.setWindowExtent(m_AnalysisExtent);
+//
+//      sFields[0] = "ID";
+//      sFields[1] = m_Input.getName();
+//
+//      m_Polygons = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_POLYGON, types, sFields);
+//
+//      createPolygons();
+//
+//      return !m_Task.isCanceled();
+//
+//   }
+//
+//
+//   private void createPolygons() throws UnsupportedOutputChannelException {
+//
+//      int x, y, ID;
+//      double dValue;
+//
+//      m_iNX = m_Input.getNX();
+//      m_iNY = m_Input.getNY();
+//
+//      m_Coords = new ArrayList<Coordinate>();
+//      m_Polyg = new ArrayList<Geometry>();
+//
+//      m_Lock = new char[m_iNY][m_iNX];
+//
+//      final AnalysisExtent ge = new AnalysisExtent();
+//      final AnalysisExtent wge = m_Input.getWindowGridExtent();
+//      ge.setCellSize(wge.getCellSize() * .5);
+//      ge.setXRange(wge.getXMin() - wge.getCellSize() * .5, wge.getXMax() + wge.getCellSize() * .5, true);
+//      ge.setYRange(wge.getYMin() - wge.getCellSize() * .5, wge.getYMax() + wge.getCellSize() * .5, true);
+//      m_Edge = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, ge);
+//
+//      //m_Area = new char[m_iNY + 1][m_iNX + 1];
+//
+//      for (y = 0, ID = 1; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+//         for (x = 0; x < m_iNX; x++) {
+//            dValue = m_Input.getCellValueAsDouble(x, y);
+//            if (!m_Input.isNoDataValue(dValue) && (m_Lock[y][x] == 0)) {
+//               Get_Class(dValue);
+//               final Object values[] = new Object[2];
+//               values[0] = new Integer(ID++);
+//               values[1] = new Double(dValue);
+//               final GeometryFactory gf = new GeometryFactory();
+//               m_Polygons.addFeature(gf.createMultiPolygon(m_Polyg.toArray(new Polygon[0])), values);
+//            }
+//         }
+//      }
+//
+//   }
+//
+//
+//   private void Get_Class(final double dClassValue) {
+//
+//      int x, y, i, ix, iy, n, nEdgeCells;
+//
+//      m_Polyg.clear();
+//
+//      for (y = 0, nEdgeCells = 0; (y < m_iNY) && !this.m_Task.isCanceled(); y++) {
+//         for (x = 0; x < m_iNX; x++) {
+//            double dValue = m_Input.getCellValueAsDouble(x, y);
+//            if ((m_Lock[y][x] == 0) && (dValue == dClassValue)) {
+//               m_Lock[y][x] = 1;
+//               for (i = 0, n = 0; i < 8; i += 2) {
+//                  ix = Get_xTo(i, x);
+//                  iy = Get_yTo(i, y);
+//                  dValue = m_Input.getCellValueAsDouble(ix, iy);
+//                  if (dValue != dClassValue) {
+//                     ix = Get_xTo(i, 1 + 2 * x);
+//                     iy = Get_yTo(i, 1 + 2 * y);
+//                     m_Edge.setCellValue(ix, iy, i + 2);
+//
+//                     ix = Get_xTo(i - 1, 1 + 2 * x);
+//                     iy = Get_yTo(i - 1, 1 + 2 * y);
+//                     m_Edge.setCellValue(ix, iy, m_Edge.getCellValueAsInt(ix, iy) != 0 ? -1 : i + 2);
+//
+//                     n++;
+//                  }
+//               }
+//
+//               if (n == 4) {
+//                  Get_Square(1 + 2 * x, 1 + 2 * y);
+//               }
+//               else {
+//                  nEdgeCells++;
+//               }
+//            }
+//         }
+//      }
+//
+//      if (nEdgeCells > 0) {
+//         Get_Polygons();
+//      }
+//
+//   }
+//
+//
+//   private void Get_Square(final int x,
+//                           final int y) {
+//
+//      int i, ix, iy;
+//      final double dCellSize = m_Edge.getWindowCellSize() * .5;
+//
+//      for (i = 0; i < 8; i++) {
+//         ix = Get_xTo(i, x);
+//         iy = Get_yTo(i, y);
+//
+//         m_Edge.setCellValue(ix, iy, m_Edge.getCellValueAsInt(ix, iy) > 0 ? 0 : (i > 1 ? i - 1 : i + 7));
+//
+//         if (i % 2 != 0) {
+//            Point2D pt;
+//            pt = m_Edge.getWindowGridExtent().getWorldCoordsFromGridCoords(ix, iy);
+//            m_Coords.add(new Coordinate(pt.getX() + dCellSize, pt.getY() - dCellSize));
+//         }
+//      }
+//   }
+//
+//
+//   private void Get_Polygons() {
+//
+//      for (int y = 0; (y < m_Edge.getNY()) && !m_Task.isCanceled(); y++) {
+//         for (int x = 0; x < m_Edge.getNX(); x++) {
+//            if (m_Edge.getCellValueAsInt(x, y) > 0) {
+//               m_Coords.clear();
+//               Get_Polygon(x, y);
+//               final Coordinate coord = m_Coords.get(0);
+//               m_Coords.add(new Coordinate(coord.x, coord.y));
+//               final Coordinate[] coords = m_Coords.toArray(new Coordinate[0]);
+//               final GeometryFactory gf = new GeometryFactory();
+//               try {
+//                  final LinearRing ring = gf.createLinearRing(coords);
+//                  m_Polyg.add(gf.createPolygon(ring, null));
+//               }
+//               catch (final Exception e) {
+//                  // might reach this if we try to create a polygon with less than 3 coords.
+//                  // we just ignore it
+//               }
+//            }
+//         }
+//      }
+//
+//   }
+//
+//
+//   private void Get_Polygon(int x,
+//                            int y) {
+//
+//      int i, iLast = -1;
+//      final double dCellSize = m_Edge.getWindowCellSize() * .5;
+//
+//      while ((i = m_Edge.getCellValueAsInt(x, y)) != 0) {
+//         if (i < 0) {
+//            i = iLast + 2;
+//            m_Edge.setCellValue(x, y, (iLast == 2 ? 8 : iLast - 2));
+//         }
+//         else {
+//            m_Edge.setCellValue(x, y, 0);
+//         }
+//
+//         if (i != iLast) {
+//            final Point2D pt = m_Edge.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+//            iLast = i;
+//            m_Coords.add(new Coordinate(pt.getX() + dCellSize, pt.getY() - dCellSize));
+//         }
+//
+//         x = Get_xTo(i, x);
+//         y = Get_yTo(i, y);
+//      }
+//   }
+//
+//
+//   private int Get_xTo(int Direction,
+//                       final int x) {
+//
+//      Direction %= 8;
+//
+//      if (Direction < 0) {
+//         Direction += 8;
+//      }
+//
+//      return (x + m_IX[Direction]);
+//
+//   }
+//
+//
+//   private int Get_yTo(int Direction,
+//                       final int x) {
+//
+//      Direction %= 8;
+//
+//      if (Direction < 0) {
+//         Direction += 8;
+//      }
+//
+//      return (x + m_IY[Direction]);
+//
+//   }
+//
+//
+//}
+
+package es.unex.sextante.vectorize.vectorize;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class VectorizeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   private IRasterLayer       m_Window;
+   private IVectorLayer       m_Polygons;
+   private int                m_iNX, m_iNY;
+   private int[][]            m_Lock;
+   private char[][]           m_Area;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Vectorize_raster_layer__polygons"));
+      setGroup(Sextante.getText("Vectorization"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final String sFields[] = new String[2];
+      final Class types[] = { Integer.class, Double.class };
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      m_Window.setFullExtent();
+
+      sFields[0] = "ID";
+      sFields[1] = m_Window.getName();
+
+      m_Polygons = getNewVectorLayer(RESULT, Sextante.getText("Resultado"), IVectorLayer.SHAPE_TYPE_POLYGON, types, sFields);
+
+      createPolygons();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createPolygons() {
+
+      int x, y, ID;
+      double dValue;
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      m_Lock = new int[m_iNY][m_iNX];
+      m_Area = new char[m_iNY + 1][m_iNX + 1];
+
+      for (y = 0, ID = 1; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(dValue) && (m_Lock[y][x] == 0)) {
+               Discrete_Lock(x, y, ID);
+               Discrete_Area(x, y, ID);
+               ID++;
+            }
+         }
+      }
+
+   }
+
+
+   private void Discrete_Lock(int x,
+                              int y,
+                              final int ID) {
+
+      final int xTo[] = { 0, 1, 0, -1 }, yTo[] = { 1, 0, -1, 0 };
+
+      final char goDir[] = { 1, 2, 4, 8 };
+
+      boolean isBorder, doRecurse;
+
+      char goTemp = 0;
+
+      char[] goStack = new char[50];
+      int[] xStack = new int[50];
+      int[] yStack = new int[50];
+
+      int i, ix, iy, iStack = 0;
+
+      double dValue, dValue2;
+
+      dValue = m_Window.getCellValueAsDouble(x, y);
+
+      for (iy = 0; iy <= m_iNY; iy++) {
+         for (ix = 0; ix <= m_iNX; ix++) {
+            m_Area[iy][ix] = 0;
+         }
+      }
+
+      do {
+         if (m_Lock[y][x] == 0) {
+
+            if (goStack.length <= iStack) {
+               final char[] cAux = new char[goStack.length + 50];
+               System.arraycopy(goStack, 0, cAux, 0, goStack.length);
+               goStack = cAux;
+               int[] iAux = new int[xStack.length + 50];
+               System.arraycopy(xStack, 0, iAux, 0, xStack.length);
+               xStack = iAux;
+               iAux = new int[yStack.length + 50];
+               System.arraycopy(yStack, 0, iAux, 0, yStack.length);
+               yStack = iAux;
+            }
+
+            goStack[iStack] = 0;
+            m_Lock[y][x] = ID;
+
+            for (i = 0; i < 4; i++) {
+               ix = x + xTo[i];
+               iy = y + yTo[i];
+
+               isBorder = true;
+
+               dValue2 = m_Window.getCellValueAsDouble(ix, iy);
+               if ((ix >= 0) && (ix < m_iNX) && (iy >= 0) && (iy < m_iNY) && (dValue == dValue2)) {
+                  isBorder = false;
+                  if (m_Lock[iy][ix] == 0) {
+                     goStack[iStack] |= goDir[i];
+                  }
+               }
+
+               if (isBorder) {
+                  switch (i) {
+                     case 0:
+                        m_Area[y + 1][x]++;
+                        m_Area[y + 1][x + 1]++;
+                        break;
+
+                     case 1:
+                        m_Area[y][x + 1]++;
+                        m_Area[y + 1][x + 1]++;
+                        break;
+
+                     case 2:
+                        m_Area[y][x]++;
+                        m_Area[y][x + 1]++;
+                        break;
+
+                     case 3:
+                        m_Area[y][x]++;
+                        m_Area[y + 1][x]++;
+                        break;
+                  }
+               }
+            }
+         }
+
+         doRecurse = false;
+
+         for (i = 0; i < 4; i++) {
+            if ((goStack[iStack] & goDir[i]) != 0) {
+               if (doRecurse) {
+                  goTemp |= goDir[i];
+               }
+               else {
+                  goTemp = 0;
+                  doRecurse = true;
+                  xStack[iStack] = x;
+                  yStack[iStack] = y;
+                  x = x + xTo[i];
+                  y = y + yTo[i];
+               }
+            }
+         }
+
+         if (doRecurse) {
+            goStack[iStack++] = goTemp;
+         }
+         else if (iStack > 0) {
+            iStack--;
+            x = xStack[iStack];
+            y = yStack[iStack];
+         }
+      }
+      while (iStack > 0);
+
+   }
+
+
+   private void Discrete_Area(int x,
+                              int y,
+                              final int ID) {
+
+      final int xTo[] = { 0, 1, 0, -1 }, yTo[] = { 1, 0, -1, 0 };
+
+      final int xLock[] = { 0, 0, -1, -1 }, yLock[] = { 0, -1, -1, 0 };
+
+      boolean bContinue, bStart;
+
+      int i, ix, iy, ix1, iy1, dir, iStart;
+
+      final double xMin = m_Window.getWindowGridExtent().getXMin(), yMax = m_Window.getWindowGridExtent().getYMax();
+      final double dCellSize = m_Window.getWindowCellSize();
+      double xFirst = 0, yFirst = 0;
+
+      final ArrayList coordinates = new ArrayList();
+      final Object values[] = new Object[2];
+      values[0] = new Integer(ID);
+      values[1] = new Double(m_Window.getCellValueAsDouble(x, y));
+
+      xFirst = xMin + (x) * dCellSize;
+      yFirst = yMax - (y) * dCellSize;
+      coordinates.add(new Coordinate(xFirst, yFirst));
+
+      iStart = 0;
+      bStart = true;
+
+      do {
+         coordinates.add(new Coordinate(xMin + (x) * dCellSize, yMax - (y) * dCellSize));
+
+         m_Area[y][x] = 0;
+         bContinue = false;
+
+         while (true) {
+            // assure clockwise direction at starting point
+            if (bStart) {
+               for (i = 0; i < 4; i++) {
+                  ix = x + xTo[i];
+                  iy = y + yTo[i];
+
+                  if ((ix >= 0) && (ix <= m_iNX) && (iy >= 0) && (iy <= m_iNY) && (m_Area[iy][ix] > 0)) {
+                     // check, if inside situated cell (according to current direction) is locked
+                     ix1 = x + xLock[i];
+                     iy1 = y + yLock[i];
+
+                     if ((ix1 >= 0) && (ix1 <= m_iNX) && (iy1 >= 0) && (iy1 <= m_iNY) && (m_Lock[iy1][ix1] == ID)) {
+                        x = ix;
+                        y = iy;
+                        iStart = (i + 3) % 4;
+                        bContinue = true;
+                        bStart = false;
+                        break;
+                     }
+                  }
+               }
+            }
+            else {
+               for (i = iStart; i < iStart + 4; i++) {
+                  dir = i % 4;
+                  ix = x + xTo[dir];
+                  iy = y + yTo[dir];
+
+                  if ((ix >= 0) && (ix <= m_iNX) && (iy >= 0) && (iy <= m_iNY) && (m_Area[iy][ix] > 0)) {
+                     if (i < iStart + 3) {
+                        // check, if inside situated cell (according to current direction) is locked
+                        ix1 = x + xLock[dir];
+                        iy1 = y + yLock[dir];
+
+                        if ((ix1 >= 0) && (ix1 <= m_iNX) && (iy1 >= 0) && (iy1 <= m_iNY) && (m_Lock[iy1][ix1] == ID)) {
+                           x = ix;
+                           y = iy;
+                           iStart = (i + 3) % 4;
+                           bContinue = true;
+                           break;
+                        }
+                     }
+                     else {
+                        x = ix;
+                        y = iy;
+                        bContinue = true;
+                        iStart = (i + 3) % 4;
+                        break;
+                     }
+                  }
+               }
+            }
+
+            break;
+         };
+      }
+      while (bContinue);
+
+      coordinates.add(new Coordinate(xFirst, yFirst));
+
+      final Coordinate[] coords = new Coordinate[coordinates.size()];
+      for (i = 0; i < coords.length; i++) {
+         coords[i] = (Coordinate) coordinates.get(i);
+      }
+
+      final GeometryFactory gf = new GeometryFactory();
+
+      if (coords.length > 1) {
+         final LinearRing ring = gf.createLinearRing(coords);
+         final Polygon polyg = gf.createPolygon(ring, null);
+         m_Polygons.addFeature(polyg, values);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorize/VectorizeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeB/VectorizeBAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeB/VectorizeBAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeB/VectorizeBAlgorithm.java	(revision 369)
@@ -0,0 +1,270 @@
+
+
+package es.unex.sextante.vectorize.vectorizeB;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class VectorizeBAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String    LAYER  = "LAYER";
+   public static final String    RESULT = "RESULT";
+
+   private IRasterLayer          m_Input;
+   private IRasterLayer          m_Edge;
+   private IVectorLayer          m_Polygons;
+   private int                   m_iNX, m_iNY;
+   private char[][]              m_Lock;
+   private ArrayList<Coordinate> m_Coords;
+   private ArrayList<Geometry>   m_Polyg;
+
+   private static final int      m_IX[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private static final int      m_IY[] = { -1, -1, 0, 1, 1, 1, 0, -1 };
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Vectorize_raster_layer__polygons") + "(B)");
+      setGroup(Sextante.getText("Vectorization"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final String sFields[] = new String[2];
+      final Class types[] = { Integer.class, Double.class };
+
+      m_Input = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_Input.setWindowExtent(m_AnalysisExtent);
+
+      sFields[0] = "ID";
+      sFields[1] = m_Input.getName();
+
+      m_Polygons = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_POLYGON, types, sFields);
+
+      createPolygons();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createPolygons() throws UnsupportedOutputChannelException {
+
+      int x, y, ID;
+      double dValue;
+
+      m_iNX = m_Input.getNX();
+      m_iNY = m_Input.getNY();
+
+      m_Coords = new ArrayList<Coordinate>();
+      m_Polyg = new ArrayList<Geometry>();
+
+      m_Lock = new char[m_iNY][m_iNX];
+
+      final AnalysisExtent ge = new AnalysisExtent();
+      final AnalysisExtent wge = m_Input.getWindowGridExtent();
+      ge.setCellSize(wge.getCellSize() * .5);
+      ge.setXRange(wge.getXMin() - wge.getCellSize() * .5, wge.getXMax() + wge.getCellSize() * .5, true);
+      ge.setYRange(wge.getYMin() - wge.getCellSize() * .5, wge.getYMax() + wge.getCellSize() * .5, true);
+      m_Edge = getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, ge);
+
+      //m_Area = new char[m_iNY + 1][m_iNX + 1];
+
+      for (y = 0, ID = 1; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Input.getCellValueAsDouble(x, y);
+            if (!m_Input.isNoDataValue(dValue) && (m_Lock[y][x] == 0)) {
+               Get_Class(dValue);
+               final Object values[] = new Object[2];
+               values[0] = new Integer(ID++);
+               values[1] = new Double(dValue);
+               final GeometryFactory gf = new GeometryFactory();
+               m_Polygons.addFeature(gf.createMultiPolygon(m_Polyg.toArray(new Polygon[0])), values);
+            }
+         }
+      }
+
+   }
+
+
+   private void Get_Class(final double dClassValue) {
+
+      int x, y, i, ix, iy, n, nEdgeCells;
+
+      m_Polyg.clear();
+
+      for (y = 0, nEdgeCells = 0; (y < m_iNY) && !this.m_Task.isCanceled(); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            double dValue = m_Input.getCellValueAsDouble(x, y);
+            if ((m_Lock[y][x] == 0) && (dValue == dClassValue)) {
+               m_Lock[y][x] = 1;
+               for (i = 0, n = 0; i < 8; i += 2) {
+                  ix = Get_xTo(i, x);
+                  iy = Get_yTo(i, y);
+                  dValue = m_Input.getCellValueAsDouble(ix, iy);
+                  if (dValue != dClassValue) {
+                     ix = Get_xTo(i, 1 + 2 * x);
+                     iy = Get_yTo(i, 1 + 2 * y);
+                     m_Edge.setCellValue(ix, iy, i + 2);
+
+                     ix = Get_xTo(i - 1, 1 + 2 * x);
+                     iy = Get_yTo(i - 1, 1 + 2 * y);
+                     m_Edge.setCellValue(ix, iy, m_Edge.getCellValueAsInt(ix, iy) != 0 ? -1 : i + 2);
+
+                     n++;
+                  }
+               }
+
+               if (n == 4) {
+                  Get_Square(1 + 2 * x, 1 + 2 * y);
+               }
+               else {
+                  nEdgeCells++;
+               }
+            }
+         }
+      }
+
+      if (nEdgeCells > 0) {
+         Get_Polygons();
+      }
+
+   }
+
+
+   private void Get_Square(final int x,
+                           final int y) {
+
+      int i, ix, iy;
+      final double dCellSize = m_Edge.getWindowCellSize() * .5;
+
+      for (i = 0; i < 8; i++) {
+         ix = Get_xTo(i, x);
+         iy = Get_yTo(i, y);
+
+         m_Edge.setCellValue(ix, iy, m_Edge.getCellValueAsInt(ix, iy) > 0 ? 0 : (i > 1 ? i - 1 : i + 7));
+
+         if (i % 2 != 0) {
+            Point2D pt;
+            pt = m_Edge.getWindowGridExtent().getWorldCoordsFromGridCoords(ix, iy);
+            m_Coords.add(new Coordinate(pt.getX() + dCellSize, pt.getY() - dCellSize));
+         }
+      }
+   }
+
+
+   private void Get_Polygons() {
+
+      for (int y = 0; (y < m_Edge.getNY()) && !m_Task.isCanceled(); y++) {
+         for (int x = 0; x < m_Edge.getNX(); x++) {
+            if (m_Edge.getCellValueAsInt(x, y) > 0) {
+               m_Coords.clear();
+               Get_Polygon(x, y);
+               final Coordinate coord = m_Coords.get(0);
+               m_Coords.add(new Coordinate(coord.x, coord.y));
+               final Coordinate[] coords = m_Coords.toArray(new Coordinate[0]);
+               final GeometryFactory gf = new GeometryFactory();
+               try {
+                  final LinearRing ring = gf.createLinearRing(coords);
+                  m_Polyg.add(gf.createPolygon(ring, null));
+               }
+               catch (final Exception e) {
+                  // might reach this if we try to create a polygon with less than 3 coords.
+                  // we just ignore it
+               }
+            }
+         }
+      }
+
+   }
+
+
+   private void Get_Polygon(int x,
+                            int y) {
+
+      int i, iLast = -1;
+      final double dCellSize = m_Edge.getWindowCellSize() * .5;
+
+      while ((i = m_Edge.getCellValueAsInt(x, y)) != 0) {
+         if (i < 0) {
+            i = iLast + 2;
+
+            m_Edge.setCellValue(x, y, (iLast == 2 ? 8 : iLast - 2));
+         }
+         else {
+            m_Edge.setCellValue(x, y, 0);
+         }
+
+         if (i != iLast) {
+            final Point2D pt = m_Edge.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+            iLast = i;
+            m_Coords.add(new Coordinate(pt.getX() + dCellSize, pt.getY() - dCellSize));
+         }
+
+         x = Get_xTo(i, x);
+         y = Get_yTo(i, y);
+      }
+   }
+
+
+   private int Get_xTo(int Direction,
+                       final int x) {
+
+      Direction %= 8;
+
+      if (Direction < 0) {
+         Direction += 8;
+      }
+
+      return (x + m_IX[Direction]);
+
+   }
+
+
+   private int Get_yTo(int Direction,
+                       final int x) {
+
+      Direction %= 8;
+
+      if (Direction < 0) {
+         Direction += 8;
+      }
+
+      return (x + m_IY[Direction]);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeB/VectorizeBAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/rasterToPoints/RasterToPointsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/rasterToPoints/RasterToPointsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/rasterToPoints/RasterToPointsAlgorithm.java	(revision 369)
@@ -0,0 +1,86 @@
+package es.unex.sextante.vectorize.rasterToPoints;
+
+import java.awt.geom.Point2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class RasterToPointsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LAYER  = "LAYER";
+
+   private IRasterLayer       m_Window;
+   private IVectorLayer       m_Points;
+   private int                m_iNX, m_iNY;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Raster_layer_to_points_layer"));
+      setGroup(Sextante.getText("Vectorization"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+      Point2D pt;
+      Geometry point;
+      final Object[] value = new Object[1];
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+
+      final String sFields[] = new String[] { m_Window.getName() };
+      final Class types[] = { Double.class };
+
+      m_Window.setWindowExtent(m_AnalysisExtent);
+      m_Points = getNewVectorLayer(RESULT, Sextante.getText("Points"), IVectorLayer.SHAPE_TYPE_POINT, types, sFields);
+
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      final GeometryFactory gf = new GeometryFactory();
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (!m_Window.isNoDataValue(dValue)) {
+               pt = m_Window.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+               point = gf.createPoint(new Coordinate(pt.getX(), pt.getY()));
+               value[0] = new Double(dValue);
+               m_Points.addFeature(point, value);
+            }
+         }
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/rasterToPoints/RasterToPointsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/contourLines/ContourLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/contourLines/ContourLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/contourLines/ContourLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,372 @@
+package es.unex.sextante.vectorize.contourLines;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class ContourLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String    LAYER    = "LAYER";
+   public static final String    DISTANCE = "DISTANCE";
+   public static final String    MIN      = "MIN";
+   public static final String    MAX      = "MAX";
+   public static final String    RESULT   = "RESULT";
+
+   private IRasterLayer          m_Window;
+   private IVectorLayer          m_Contour;
+   private char[][]              m_Row;
+   private char[][]              m_Col;
+   private final GeometryFactory m_GF     = new GeometryFactory();
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Contour_lines"));
+      setGroup(Sextante.getText("Vectorization"));
+      setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+         m_Parameters.addNumericalValue(DISTANCE, Sextante.getText("Equidistance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 100, 0, Double.MAX_VALUE);
+         m_Parameters.addNumericalValue(MIN, Sextante.getText("Min_value"), 0,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         m_Parameters.addNumericalValue(MAX, Sextante.getText("Max_value"), 10000.,
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Contour_lines"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() {
+
+      double dMin, dMax;
+      double dDistance;
+      final String sFields[] = new String[2];
+      final Class types[] = { Integer.class, Double.class };
+
+      try {
+
+         m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+         dMin = m_Parameters.getParameterValueAsDouble(MIN);
+         dMax = m_Parameters.getParameterValueAsDouble(MAX);
+         dDistance = m_Parameters.getParameterValueAsDouble(DISTANCE);
+
+         m_Window.setFullExtent();
+
+         if ((dMin <= dMax) && (dDistance > 0)) {
+            if (dMin < m_Window.getMinValue()) {
+               dMin += dDistance * (int) ((m_Window.getMinValue() - dMin) / dDistance);
+            }
+            if (dMax > m_Window.getMaxValue()) {
+               dMax = m_Window.getMaxValue();
+            }
+
+            sFields[0] = "ID";
+            sFields[1] = "Elevation";
+
+            m_Contour = getNewVectorLayer(RESULT, Sextante.getText("Contour_lines"), IVectorLayer.SHAPE_TYPE_LINE, types, sFields);
+
+            createContours(dMin, dMax, dDistance);
+
+            return !m_Task.isCanceled();
+         }
+
+         return false;
+
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return false;
+      }
+
+   }
+
+
+   private void createContours(final double dMin,
+                               final double dMax,
+                               double dDistance) {
+
+      int x, y;
+      int i;
+      int ID;
+      int iNX, iNY;
+      double dZ;
+      double dValue = 0;
+
+      iNX = m_Window.getNX();
+      iNY = m_Window.getNY();
+
+      m_Row = new char[iNY][iNX];
+      m_Col = new char[iNY][iNX];
+
+      if (dDistance <= 0) {
+         dDistance = 1;
+      }
+
+      for (dZ = dMin, ID = 0; (dZ <= dMax) && setProgress((int) (dZ - dMin), (int) (dMax - dMin)); dZ += dDistance) {
+         for (y = 0; y < iNY - 1; y++) {
+            for (x = 0; x < iNX - 1; x++) {
+               dValue = m_Window.getCellValueAsDouble(x, y);
+               if (dValue >= dZ) {
+                  m_Row[y][x] = (char) (m_Window.getCellValueAsDouble(x + 1, y) < dZ ? 1 : 0);
+                  m_Col[y][x] = (char) (m_Window.getCellValueAsDouble(x, y + 1) < dZ ? 1 : 0);
+               }
+               else {
+                  m_Row[y][x] = (char) (m_Window.getCellValueAsDouble(x + 1, y) >= dZ ? 1 : 0);
+                  m_Col[y][x] = (char) (m_Window.getCellValueAsDouble(x, y + 1) >= dZ ? 1 : 0);
+               }
+            }
+         }
+
+         for (y = 0; y < iNY - 1; y++) {
+            for (x = 0; x < iNX - 1; x++) {
+               if (m_Row[y][x] != 0) {
+                  for (i = 0; i < 2; i++) {
+                     findContour(x, y, dZ, true, ID++);
+                  }
+                  m_Row[y][x] = 0;
+               }
+
+               if (m_Col[y][x] != 0) {
+                  for (i = 0; i < 2; i++) {
+                     findContour(x, y, dZ, false, ID++);
+                  }
+                  m_Col[y][x] = 0;
+               }
+            }
+         }
+
+      }
+
+   }
+
+
+   private void findContour(final int x,
+                            final int y,
+                            final double z,
+                            final boolean doRow,
+                            final int ID) {
+
+      boolean doContinue = true;
+      final boolean bIsFirstPoint = true;
+      int zx = doRow ? x + 1 : x;
+      int zy = doRow ? y : y + 1;
+      double d;
+      double xPos, yPos;
+      final double xMin = m_Window.getWindowGridExtent().getXMin();
+      final double yMax = m_Window.getWindowGridExtent().getYMax();
+      Geometry line;
+      final Object values[] = new Object[2];
+      final NextContourInfo info = new NextContourInfo();
+      final ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
+
+      info.x = x;
+      info.y = y;
+      info.iDir = 0;
+      info.doRow = doRow;
+
+      do {
+
+         d = m_Window.getCellValueAsDouble(info.x, info.y);
+         d = (d - z) / (d - m_Window.getCellValueAsDouble(zx, zy));
+
+         xPos = xMin + m_Window.getWindowCellSize() * (info.x + d * (zx - info.x) + 0.5);
+         yPos = yMax - m_Window.getWindowCellSize() * (info.y + d * (zy - info.y) + 0.5);
+
+         coords.add(new Coordinate(xPos, yPos));
+
+         if (!findNextContour(info)) {
+            doContinue = findNextContour(info);
+         }
+
+         info.iDir = (info.iDir + 5) % 8;
+
+         if (info.doRow) {
+            m_Row[info.y][info.x] = 0;
+            zx = info.x + 1;
+            zy = info.y;
+         }
+         else {
+            m_Col[info.y][info.x] = 0;
+            zx = info.x;
+            zy = info.y + 1;
+         }
+
+      }
+      while (doContinue);
+
+      values[0] = new Integer(ID);
+      values[1] = new Double(z);
+
+      final Coordinate[] coordinates = new Coordinate[coords.size()];
+      for (int i = 0; i < coordinates.length; i++) {
+         coordinates[i] = coords.get(i);
+      }
+
+      if (coordinates.length > 1) {
+         line = m_GF.createLineString(coordinates);
+         m_Contour.addFeature(line, values);
+      }
+
+   }
+
+
+   private boolean findNextContour(final NextContourInfo info) {
+
+      boolean doContinue;
+
+      if (info.doRow) {
+         switch (info.iDir) {
+            case 0:
+               if (m_Row[info.y + 1][info.x] != 0) {
+                  info.y++;
+                  info.iDir = 0;
+                  doContinue = true;
+                  break;
+               }
+            case 1:
+               if (m_Col[info.y][info.x + 1] != 0) {
+                  info.x++;
+                  info.iDir = 1;
+                  info.doRow = false;
+                  doContinue = true;
+                  break;
+               }
+            case 2:
+            case 3:
+               if (info.y - 1 >= 0) {
+                  if (m_Col[info.y - 1][info.x + 1] != 0) {
+                     info.x++;
+                     info.y--;
+                     info.doRow = false;
+                     info.iDir = 3;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            case 4:
+               if (info.y - 1 >= 0) {
+                  if (m_Row[info.y - 1][info.x] != 0) {
+                     info.y--;
+                     info.iDir = 4;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            case 5:
+               if (info.y - 1 >= 0) {
+                  if (m_Col[info.y - 1][info.x] != 0) {
+                     info.y--;
+                     info.doRow = false;
+                     info.iDir = 5;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            case 6:
+            case 7:
+               if (m_Col[info.y][info.x] != 0) {
+                  info.doRow = false;
+                  info.iDir = 7;
+                  doContinue = true;
+                  break;
+               }
+            default:
+               info.iDir = 0;
+               doContinue = false;
+         }
+      }
+      else {
+         switch (info.iDir) {
+            case 0:
+            case 1:
+               if (m_Row[info.y + 1][info.x] != 0) {
+                  info.y++;
+                  info.doRow = true;
+                  info.iDir = 1;
+                  doContinue = true;
+                  break;
+               }
+            case 2:
+               if (m_Col[info.y][info.x + 1] != 0) {
+                  info.x++;
+                  info.iDir = 2;
+                  doContinue = true;
+                  break;
+               }
+            case 3:
+               if (m_Row[info.y][info.x] != 0) {
+                  info.doRow = true;
+                  info.iDir = 3;
+                  doContinue = true;
+                  break;
+               }
+            case 4:
+            case 5:
+               if (info.x - 1 >= 0) {
+                  if (m_Row[info.y][info.x - 1] != 0) {
+                     info.x--;
+                     info.doRow = true;
+                     info.iDir = 5;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            case 6:
+               if (info.x - 1 >= 0) {
+                  if (m_Col[info.y][info.x - 1] != 0) {
+                     info.x--;
+                     info.iDir = 6;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            case 7:
+               if (info.x - 1 >= 0) {
+                  if (m_Row[info.y + 1][info.x - 1] != 0) {
+                     info.x--;
+                     info.y++;
+                     info.doRow = true;
+                     info.iDir = 7;
+                     doContinue = true;
+                     break;
+                  }
+               }
+            default:
+               info.iDir = 0;
+               doContinue = false;
+         }
+      }
+
+      return (doContinue);
+   }
+
+   private class NextContourInfo {
+
+      public int     iDir;
+      public int     x;
+      public int     y;
+      public boolean doRow;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/contourLines/ContourLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeLines/VectorizeLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeLines/VectorizeLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeLines/VectorizeLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,206 @@
+package es.unex.sextante.vectorize.vectorizeLines;
+
+import java.awt.Point;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class VectorizeLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private final static int      m_iOffsetX[]      = { 0, 1, 0, -1 };
+   private final static int      m_iOffsetY[]      = { -1, 0, 1, 0 };
+
+   private final static int      m_iOffsetXDiag[]  = { -1, 1, 1, -1 };
+   private final static int      m_iOffsetYDiag[]  = { -1, -1, 1, 1 };
+
+   public static final String    LAYER             = "LAYER";
+   public static final String    RESULT            = "RESULT";
+
+   private IRasterLayer          m_Window;
+   private IRasterLayer          m_Visited;
+   private IVectorLayer          m_Lines;
+   private int                   m_iNX, m_iNY;
+   private int                   m_iLine           = 1;
+   private IRasterLayer          m_Visited2;
+   private final GeometryFactory m_GeometryFactory = new GeometryFactory();
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Vectorize_raster_layer__lines"));
+      setGroup(Sextante.getText("Vectorization"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputRasterLayer(LAYER, Sextante.getText("Input_layer"), true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int x, y;
+      double dValue;
+      final String sFields[] = new String[1];
+      final Class types[] = { Integer.class };
+
+      m_Window = m_Parameters.getParameterValueAsRasterLayer(LAYER);
+      m_Window.setWindowExtent(m_AnalysisExtent);
+
+      m_Visited = this.getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Window.getWindowGridExtent());
+      m_Visited2 = this.getTempRasterLayer(IRasterLayer.RASTER_DATA_TYPE_BYTE, m_Window.getWindowGridExtent());
+
+      m_iNX = m_Window.getNX();
+      m_iNY = m_Window.getNY();
+
+      for (y = 0; y < m_iNY; y++) {
+         for (x = 0; x < m_iNX; x++) {
+            dValue = m_Window.getCellValueAsDouble(x, y);
+            if (m_Window.isNoDataValue(dValue) || (dValue == 0)) {
+               m_Visited.setCellValue(x, y, 0.0);
+            }
+            else {
+               m_Visited.setCellValue(x, y, 1.0);
+            }
+         }
+      }
+
+      sFields[0] = "ID";
+
+      m_Lines = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, types, sFields);
+
+      createLines();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void createLines() {
+
+      int x, y;
+      byte byValue;
+
+      for (y = 0; (y < m_iNY) && setProgress(y, m_iNY); y++) {
+         for (x = 0; x < m_iNX; x++) {
+            byValue = m_Visited.getCellValueAsByte(x, y);
+            if (byValue == 1) {
+               createLine(x, y, m_Visited.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y));
+            }
+         }
+      }
+
+   }
+
+
+   private void createLine(int x,
+                           int y,
+                           Point2D pt2d2) {
+
+      boolean bContinue = false;
+      boolean bIsNotNull = false;
+      Point pt;
+      final Object values[] = new Object[1];
+
+      final ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
+      coordinates.add(new Coordinate(pt2d2.getX(), pt2d2.getY()));
+      pt2d2 = m_Visited.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+      coordinates.add(new Coordinate(pt2d2.getX(), pt2d2.getY()));
+
+      do {
+         m_Visited.setCellValue(x, y, 0);
+         final ArrayList cells = getSurroundingLineCells(x, y);
+         m_Visited2.setCellValue(x, y, cells.size());
+         if (cells.size() == 0) {
+            final Coordinate[] coords = new Coordinate[coordinates.size()];
+            for (int i = 0; i < coords.length; i++) {
+               coords[i] = coordinates.get(i);
+            }
+            final Geometry line = m_GeometryFactory.createLineString(coords);
+            values[0] = new Integer(m_iLine++);
+            m_Lines.addFeature(line, values);
+            bContinue = false;
+         }
+         else if (cells.size() == 1) {
+            pt = (Point) cells.get(0);
+            pt2d2 = m_Visited.getWindowGridExtent().getWorldCoordsFromGridCoords(pt.x, pt.y);
+            coordinates.add(new Coordinate(pt2d2.getX(), pt2d2.getY()));
+            x = pt.x;
+            y = pt.y;
+            bContinue = true;
+            bIsNotNull = true;
+         }
+         else {
+            if (bIsNotNull) {
+               final Coordinate[] coords = new Coordinate[coordinates.size()];
+               for (int i = 0; i < coords.length; i++) {
+                  coords[i] = coordinates.get(i);
+               }
+               final Geometry line = m_GeometryFactory.createLineString(coords);
+               values[0] = new Integer(m_iLine++);
+               m_Lines.addFeature(line, values);
+            }
+            for (int i = 0; i < cells.size(); i++) {
+               pt = (Point) cells.get(i);
+               m_Visited.setCellValue(pt.x, pt.y, 0);
+            }
+            for (int i = 0; i < cells.size(); i++) {
+               pt = (Point) cells.get(i);
+               pt2d2 = m_Visited.getWindowGridExtent().getWorldCoordsFromGridCoords(x, y);
+               createLine(pt.x, pt.y, pt2d2);
+            }
+
+         }
+      }
+      while (bContinue && !m_Task.isCanceled());
+
+   }
+
+
+   private ArrayList getSurroundingLineCells(final int x,
+                                             final int y) {
+
+      int i;
+      final int j;
+      final ArrayList cells = new ArrayList();
+      final boolean bBlocked[] = new boolean[4];
+
+      for (i = 0; i < 4; i++) {
+         if (m_Visited.getCellValueAsByte(x + m_iOffsetX[i], y + m_iOffsetY[i]) == 1) {
+            cells.add(new Point(x + m_iOffsetX[i], y + m_iOffsetY[i]));
+            bBlocked[i] = true;
+            bBlocked[(i + 1) % 4] = true;
+         }
+      }
+
+      for (i = 0; i < 4; i++) {
+         if ((m_Visited.getCellValueAsByte(x + m_iOffsetXDiag[i], y + m_iOffsetYDiag[i]) == 1) && !bBlocked[i]) {
+            cells.add(new Point(x + m_iOffsetXDiag[i], y + m_iOffsetYDiag[i]));
+         }
+      }
+
+      return cells;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorize/vectorizeLines/VectorizeLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableFieldCorrelation/TableFieldCorrelationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableFieldCorrelation/TableFieldCorrelationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableFieldCorrelation/TableFieldCorrelationAlgorithm.java	(revision 369)
@@ -0,0 +1,109 @@
+package es.unex.sextante.tables.tableFieldCorrelation;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.additionalResults.CorrelationGraphCreator;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+
+public class TableFieldCorrelationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String METHOD          = "METHOD";
+   public static final String TABLE           = "TABLE";
+   public static final String FIELD           = "FIELD";
+   public static final String FIELD2          = "FIELD2";
+   public static final String REGRESSION      = "REGRESSION";
+   public static final String REGRESSION_DATA = "REGRESSION_DATA";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField, iField2;
+      long iCount;
+      double dValue, dValue2;
+      final Regression regression = new Regression();
+      ITable table;
+
+      final int iType = m_Parameters.getParameterValueAsInt(METHOD);
+      table = m_Parameters.getParameterValueAsTable(TABLE);
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+      iField2 = m_Parameters.getParameterValueAsInt(FIELD2);
+      i = 0;
+      iCount = table.getRecordCount();
+      final IRecordsetIterator iter = table.iterator();
+      while (iter.hasNext() && setProgress(i, (int) iCount)) {
+         final IRecord record = iter.next();
+         try {
+            dValue = Double.parseDouble(record.getValue(iField).toString());
+            dValue2 = Double.parseDouble(record.getValue(iField2).toString());
+            regression.addValue(dValue, dValue2);
+         }
+         catch (final NumberFormatException e) {}
+         i++;
+      }
+      iter.close();
+
+      regression.calculate(iType);
+      final CorrelationGraphCreator panel = new CorrelationGraphCreator(regression);
+
+      addOutputChart(REGRESSION, Sextante.getText("Regression"), panel.getChartPanel());
+
+      final DecimalFormat df = new DecimalFormat("####.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Regression"));
+      doc.addHeader(Sextante.getText("Regression"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(regression.getExpression());
+      doc.addListElement("R� = " + df.format(regression.getR2()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"), doc.getHTMLCode());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Best_fit"), "y = a + b * x", "y = a + b / x", "y = a / (b - x)",
+               "y = a * x^b", "y = a e^(b * x)", "y = a + b * ln(x)" };
+
+      setName(Sextante.getText("Correlation_between_fields"));
+      setGroup(Sextante.getText("Table_tools"));
+      try {
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Table"), true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), TABLE);
+         m_Parameters.addTableField(FIELD2, Sextante.getText("Field" + "2"), TABLE);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Equation"), sMethod);
+         addOutputChart(REGRESSION, Sextante.getText("Regression"));
+         addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableFieldCorrelation/TableFieldCorrelationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/SWilk.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/SWilk.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/SWilk.java	(revision 369)
@@ -0,0 +1,438 @@
+package es.unex.sextante.tables.normalityTest;
+
+
+/**
+ * Calculates the Shapiro-Wilk W test and its significance level.
+ *
+ * Ported from original FORTRAN 77 code from the journal Applied Statistics published by the Royal Statistical Society and
+ * distributed by Carnegie Mellon University at http://lib.stat.cmu.edu/apstat/.
+ *
+ * To help facilitate debugging and maintenance, this port has been changed as little as feasible from the original FORTRAN 77
+ * code, to allow comparisons with the original. Variable names have been left alone when possible (except for capitalizing
+ * constants), and the logic flow (though translated and indented) is essentially unchanged.
+ *
+ * The original FORTRAN source for these routines has been released by the Royal Statistical Society for free public distribution,
+ * and this Java implementation is released to the public domain.
+ *
+ * This java implementation is part of the limewire project.
+ */
+public class SWilk {
+   /*
+    * Constants and polynomial coefficients for swilk(). NOTE: FORTRAN counts the elements of the array x[length] as
+    * x[1] through x[length], not x[0] through x[length-1]. To avoid making pervasive, subtle changes to the algorithm
+    * (which would inevitably introduce pervasive, subtle bugs) the referenced arrays are padded with an unused 0th
+    * element, and the algorithm is ported so as to continue accessing from [1] through [length].
+    */
+   private static final double  C1[]  = { Double.NaN, 0.0E0, 0.221157E0, -0.147981E0, -0.207119E1, 0.4434685E1, -0.2706056E1 };
+   private static final double  C2[]  = { Double.NaN, 0.0E0, 0.42981E-1, -0.293762E0, -0.1752461E1, 0.5682633E1, -0.3582633E1 };
+   private static final double  C3[]  = { Double.NaN, 0.5440E0, -0.39978E0, 0.25054E-1, -0.6714E-3 };
+   private static final double  C4[]  = { Double.NaN, 0.13822E1, -0.77857E0, 0.62767E-1, -0.20322E-2 };
+   private static final double  C5[]  = { Double.NaN, -0.15861E1, -0.31082E0, -0.83751E-1, 0.38915E-2 };
+   private static final double  C6[]  = { Double.NaN, -0.4803E0, -0.82676E-1, 0.30302E-2 };
+   private static final double  C7[]  = { Double.NaN, 0.164E0, 0.533E0 };
+   private static final double  C8[]  = { Double.NaN, 0.1736E0, 0.315E0 };
+   private static final double  C9[]  = { Double.NaN, 0.256E0, -0.635E-2 };
+   private static final double  G[]   = { Double.NaN, -0.2273E1, 0.459E0 };
+   private static final double  Z90   = 0.12816E1, Z95 = 0.16449E1, Z99 = 0.23263E1;
+   private static final double  ZM    = 0.17509E1, ZSS = 0.56268E0;
+   private static final double  BF1   = 0.8378E0, XX90 = 0.556E0, XX95 = 0.622E0;
+   private static final double  SQRTH = 0.70711E0, TH = 0.375E0, SMALL = 1E-19;
+   private static final double  PI6   = 0.1909859E1, STQR = 0.1047198E1;
+   private static final boolean UPPER = true;
+
+
+   /**
+    * ALGORITHM AS R94 APPL. STATIST. (1995) VOL.44, NO.4
+    *
+    * Calculates Shapiro-Wilk normality test and P-value for sample sizes 3 <= n <= 5000 . Handles censored or uncensored data.
+    * Corrects AS 181, which was found to be inaccurate for n > 50.
+    *
+    * NOTE: Semi-strange porting kludge alert. FORTRAN allows subroutine arguments to be modified by the called routine (passed by
+    * reference, not value), and the original code for this routine makes use of that feature to return multiple results. To avoid
+    * changing the code any more than necessary, I've used Java arrays to simulate this pass-by-reference feature. Specifically,
+    * in the original code w, pw, and ifault are output results, not input parameters. Pass in double[1] arrays for w and pw, and
+    * an int[1] array for ifault, and extract the computed values from the [0] element on return. The argument init is both input
+    * and output; use a boolean[1] array and initialize [0] to false before the first call. The routine will update the value to
+    * true to record that initialization has been performed, to speed up subsequent calls on the same data set. Note that although
+    * the contents of a[] will be computed by the routine on the first call, the caller must still allocate the array space and
+    * pass the unfilled array in to the subroutine. The routine will set the contents but not allocate the space.
+    *
+    * As described above with the constants, the data arrays x[] and a[] are referenced with a base element of 1 (like FORTRAN)
+    * instead of 0 (like Java) to avoid screwing up the algorithm. To pass in 100 data points, declare x[101] and fill elements
+    * x[1] through x[100] with data. x[0] will be ignored.
+    *
+    * You might want to eliminate the ifault parameter completely, and throw Java exceptions instead. I didn't want to change the
+    * code that much.
+    *
+    * @param init
+    *                Input & output; pass in boolean[1], initialize to false before first call, routine will set to true
+    * @param x
+    *                Input; Data set to analyze; 100 points go in x[101] array from x[1] through x[100]
+    * @param n
+    *                Input; Number of data points in x
+    * @param n1
+    *                Input; dunno
+    * @param n2
+    *                Input; dunno either
+    * @param a
+    *                Output when init[0] == false, Input when init[0] == true; holds computed test coefficients
+    * @param w
+    *                Output; pass in double[1], will contain result in w[0] on return
+    * @param pw
+    *                Output; pass in double[1], will contain result in pw[0] on return
+    * @param ifault
+    *                Output; pass in int[1], will contain error code (0 == good) in ifault[0] on return
+    */
+   public static void swilk(final boolean[] init,
+                            final double[] x,
+                            final int n,
+                            final int n1,
+                            final int n2,
+                            final double[] a,
+                            final double[] w,
+                            final double[] pw,
+                            final int[] ifault) {
+
+      pw[0] = 1.0;
+      if (w[0] >= 0.0) {
+         w[0] = 1.0;
+      }
+      final double an = n;
+      ifault[0] = 3;
+      final int nn2 = n / 2;
+      if (n2 < nn2) {
+         return;
+      }
+      ifault[0] = 1;
+      if (n < 3) {
+         return;
+      }
+
+      // If INIT is false, calculates coefficients for the test
+
+      if (!init[0]) {
+         if (n == 3) {
+            a[1] = SQRTH;
+         }
+         else {
+            final double an25 = an + 0.25;
+            double summ2 = 0.0;
+            for (int i = 1; i <= n2; ++i) {
+               a[i] = ppnd((i - TH) / an25);
+               summ2 += a[i] * a[i];
+            }
+            summ2 *= 2.0;
+            final double ssumm2 = Math.sqrt(summ2);
+            final double rsn = 1.0 / Math.sqrt(an);
+            final double a1 = poly(C1, 6, rsn) - a[1] / ssumm2;
+
+            // Normalize coefficients
+
+            int i1;
+            double fac;
+            if (n > 5) {
+               i1 = 3;
+               final double a2 = -a[2] / ssumm2 + poly(C2, 6, rsn);
+               fac = Math.sqrt((summ2 - 2.0 * a[1] * a[1] - 2.0 * a[2] * a[2]) / (1.0 - 2.0 * a1 * a1 - 2.0 * a2 * a2));
+               a[1] = a1;
+               a[2] = a2;
+            }
+            else {
+               i1 = 2;
+               fac = Math.sqrt((summ2 - 2.0 * a[1] * a[1]) / (1.0 - 2.0 * a1 * a1));
+               a[1] = a1;
+            }
+            for (int i = i1; i <= nn2; ++i) {
+               a[i] = -a[i] / fac;
+            }
+         }
+         init[0] = true;
+      }
+      if (n1 < 3) {
+         return;
+      }
+      final int ncens = n - n1;
+      ifault[0] = 4;
+      if (ncens < 0 || (ncens > 0 && n < 20)) {
+         return;
+      }
+      ifault[0] = 5;
+      final double delta = ncens / an;
+      if (delta > 0.8) {
+         return;
+      }
+
+      // If W input as negative, calculate significance level of -W
+
+      double w1, xx;
+      if (w[0] < 0.0) {
+         w1 = 1.0 + w[0];
+         ifault[0] = 0;
+      }
+      else {
+
+         // Check for zero range
+
+         ifault[0] = 6;
+         final double range = x[n1] - x[1];
+         if (range < SMALL) {
+            return;
+         }
+
+         // Check for correct sort order on range - scaled X
+
+         ifault[0] = 7;
+         xx = x[1] / range;
+         double sx = xx;
+         double sa = -a[1];
+         int j = n - 1;
+         for (int i = 2; i <= n1; ++i) {
+            final double xi = x[i] / range;
+            // IF (XX-XI .GT. SMALL) PRINT *,' ANYTHING'
+            sx += xi;
+            if (i != j) {
+               sa += sign(1, i - j) * a[Math.min(i, j)];
+            }
+            xx = xi;
+            --j;
+         }
+         ifault[0] = 0;
+         if (n > 5000) {
+            ifault[0] = 2;
+         }
+
+         // Calculate W statistic as squared correlation between data and coefficients
+
+         sa /= n1;
+         sx /= n1;
+         double ssa = 0.0;
+         double ssx = 0.0;
+         double sax = 0.0;
+         j = n;
+         double asa;
+         for (int i = 1; i <= n1; ++i) {
+            if (i != j) {
+               asa = sign(1, i - j) * a[Math.min(i, j)] - sa;
+            }
+            else {
+               asa = -sa;
+            }
+            final double xsx = x[i] / range - sx;
+            ssa += asa * asa;
+            ssx += xsx * xsx;
+            sax += asa * xsx;
+            --j;
+         }
+
+         // W1 equals (1-W) calculated to avoid excessive rounding error
+         // for W very near 1 (a potential problem in very large samples)
+
+         final double ssassx = Math.sqrt(ssa * ssx);
+         w1 = (ssassx - sax) * (ssassx + sax) / (ssa * ssx);
+      }
+      w[0] = 1.0 - w1;
+
+      // Calculate significance level for W (exact for N=3)
+
+      if (n == 3) {
+         pw[0] = PI6 * (Math.asin(Math.sqrt(w[0])) - STQR);
+         return;
+      }
+      double y = Math.log(w1);
+      xx = Math.log(an);
+      double m = 0.0;
+      double s = 1.0;
+      if (n <= 11) {
+         final double gamma = poly(G, 2, an);
+         if (y >= gamma) {
+            pw[0] = SMALL;
+            return;
+         }
+         y = -Math.log(gamma - y);
+         m = poly(C3, 4, an);
+         s = Math.exp(poly(C4, 4, an));
+      }
+      else {
+         m = poly(C5, 4, xx);
+         s = Math.exp(poly(C6, 3, xx));
+      }
+      if (ncens > 0) {
+
+         // Censoring by proportion NCENS/N. Calculate mean and sd of normal equivalent deviate of W.
+
+         final double ld = -Math.log(delta);
+         final double bf = 1.0 + xx * BF1;
+         final double z90f = Z90 + bf * Math.pow(poly(C7, 2, Math.pow(XX90, xx)), ld);
+         final double z95f = Z95 + bf * Math.pow(poly(C8, 2, Math.pow(XX95, xx)), ld);
+         final double z99f = Z99 + bf * Math.pow(poly(C9, 2, xx), ld);
+
+         // Regress Z90F,...,Z99F on normal deviates Z90,...,Z99 to get
+         // pseudo-mean and pseudo-sd of z as the slope and intercept
+
+         final double zfm = (z90f + z95f + z99f) / 3.0;
+         final double zsd = (Z90 * (z90f - zfm) + Z95 * (z95f - zfm) + Z99 * (z99f - zfm)) / ZSS;
+         final double zbar = zfm - zsd * ZM;
+         m += zbar * s;
+         s *= zsd;
+      }
+      pw[0] = alnorm((y - m) / s, UPPER);
+   }
+
+
+   /**
+    * Constructs an int with the absolute value of x and the sign of y
+    *
+    * @param x
+    *                int to copy absolute value from
+    * @param y
+    *                int to copy sign from
+    * @return int with absolute value of x and sign of y
+    */
+   private static int sign(final int x,
+                           final int y) {
+      int result = Math.abs(x);
+      if (y < 0.0) {
+         result = -result;
+      }
+      return result;
+   }
+
+   // Constants & polynomial coefficients for ppnd(), slightly renamed to avoid conflicts. Could define
+   // them inside ppnd(), but static constants are more efficient.
+
+   // Coefficients for P close to 0.5
+   private static final double A0_p = 3.3871327179E+00, A1_p = 5.0434271938E+01, A2_p = 1.5929113202E+02,
+            A3_p = 5.9109374720E+01, B1_p = 1.7895169469E+01, B2_p = 7.8757757664E+01, B3_p = 6.7187563600E+01;
+
+   // Coefficients for P not close to 0, 0.5 or 1 (names changed to avoid conflict with swilk())
+   private static final double C0_p = 1.4234372777E+00, C1_p = 2.7568153900E+00, C2_p = 1.3067284816E+00,
+            C3_p = 1.7023821103E-01, D1_p = 7.3700164250E-01, D2_p = 1.2021132975E-01;
+
+   // Coefficients for P near 0 or 1.
+   private static final double E0_p = 6.6579051150E+00, E1_p = 3.0812263860E+00, E2_p = 4.2868294337E-01,
+            E3_p = 1.7337203997E-02, F1_p = 2.4197894225E-01, F2_p = 1.2258202635E-02;
+
+   private static final double SPLIT1 = 0.425, SPLIT2 = 5.0, CONST1 = 0.180625, CONST2 = 1.6;
+
+
+   /**
+    * ALGORITHM AS 241 APPL. STATIST. (1988) VOL. 37, NO. 3, 477-484.
+    *
+    * Produces the normal deviate Z corresponding to a given lower tail area of P; Z is accurate to about 1 part in 10**7.
+    *
+    * @param p
+    * @return
+    */
+   private static double ppnd(final double p) {
+      final double q = p - 0.5;
+      double r;
+      if (Math.abs(q) <= SPLIT1) {
+         r = CONST1 - q * q;
+         return q * (((A3_p * r + A2_p) * r + A1_p) * r + A0_p) / (((B3_p * r + B2_p) * r + B1_p) * r + 1.0);
+      }
+      else {
+         if (q < 0.0) {
+            r = p;
+         }
+         else {
+            r = 1.0 - p;
+         }
+         if (r <= 0.0) {
+            return 0.0;
+         }
+         r = Math.sqrt(-Math.log(r));
+         double normal_dev;
+         if (r <= SPLIT2) {
+            r -= CONST2;
+            normal_dev = (((C3_p * r + C2_p) * r + C1_p) * r + C0_p) / ((D2_p * r + D1_p) * r + 1.0);
+         }
+         else {
+            r -= SPLIT2;
+            normal_dev = (((E3_p * r + E2_p) * r + E1_p) * r + E0_p) / ((F2_p * r + F1_p) * r + 1.0);
+         }
+         if (q < 0.0) {
+            normal_dev = -normal_dev;
+         }
+         return normal_dev;
+      }
+   }
+
+
+   /**
+    * Algorithm AS 181.2 Appl. Statist. (1982) Vol. 31, No. 2
+    *
+    * Calculates the algebraic polynomial of order nord-1 with array of coefficients c. Zero order coefficient is c[1]
+    *
+    * @param c
+    * @param nord
+    * @param x
+    * @return
+    */
+   private static double poly(final double[] c,
+                              final int nord,
+                              final double x) {
+      double poly = c[1];
+      if (nord == 1) {
+         return poly;
+      }
+      double p = x * c[nord];
+      if (nord != 2) {
+         final int n2 = nord - 2;
+         int j = n2 + 1;
+         for (int i = 1; i <= n2; ++i) {
+            p = (p + c[j]) * x;
+            --j;
+         }
+      }
+      poly += p;
+      return poly;
+   }
+
+   // Constants & polynomial coefficients for alnorm(), slightly renamed to avoid conflicts.
+   private static final double CON_a = 1.28, LTONE_a = 7.0, UTZERO_a = 18.66;
+   private static final double P_a   = 0.398942280444, Q_a = 0.39990348504, R_a = 0.398942280385, A1_a = 5.75885480458,
+            A2_a = 2.62433121679, A3_a = 5.92885724438, B1_a = -29.8213557807, B2_a = 48.6959930692, C1_a = -3.8052E-8,
+            C2_a = 3.98064794E-4, C3_a = -0.151679116635, C4_a = 4.8385912808, C5_a = 0.742380924027, C6_a = 3.99019417011,
+            D1_a = 1.00000615302, D2_a = 1.98615381364, D3_a = 5.29330324926, D4_a = -15.1508972451, D5_a = 30.789933034;
+
+
+   /**
+    * Algorithm AS66 Applied Statistics (1973) vol.22, no.3
+    *
+    * Evaluates the tail area of the standardised normal curve from x to infinity if upper is true or from minus infinity to x if
+    * upper is false.
+    *
+    * @param x
+    * @param upper
+    * @return
+    */
+   private static double alnorm(final double x,
+                                final boolean upper) {
+      boolean up = upper;
+      double z = x;
+      if (z < 0.0) {
+         up = !up;
+         z = -z;
+      }
+      double fn_val;
+      if (z > LTONE_a && (!up || z > UTZERO_a)) {
+         fn_val = 0.0;
+      }
+      else {
+         double y = 0.5 * z * z;
+         if (z <= CON_a) {
+            fn_val = 0.5 - z * (P_a - Q_a * y / (y + A1_a + B1_a / (y + A2_a + B2_a / (y + A3_a))));
+         }
+         else {
+            fn_val = R_a
+                     * Math.exp(-y)
+                     / (z + C1_a + D1_a
+                                   / (z + C2_a + D2_a / (z + C3_a + D3_a / (z + C4_a + D4_a / (z + C5_a + D5_a / (z + C6_a))))));
+         }
+      }
+      if (!up) {
+         fn_val = 1.0 - fn_val;
+      }
+      return fn_val;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/SWilk.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/NormalityTestAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/NormalityTestAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/NormalityTestAlgorithm.java	(revision 369)
@@ -0,0 +1,133 @@
+
+
+package es.unex.sextante.tables.normalityTest;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+
+public class NormalityTestAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String FIELD  = "FIELD";
+   public static final String LAYER  = "LAYER";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      int iCount;
+      double dValue;
+      IVectorLayer layer;
+      final ArrayList<Double> array = new ArrayList<Double>();
+
+      layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      i = 0;
+      iCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            array.add(new Double(dValue));
+         }
+         catch (final Exception e) {
+         }
+         i++;
+      }
+      iter.close();
+
+      if (array.size() < 3) {
+         throw new GeoAlgorithmExecutionException(Sextante.getText("At_least_three_features_are_needed_for_using_this_algorithm"));
+      }
+
+      if (array.size() > 5000) {
+         Sextante.addWarningToLog("Mas_de_5000puntos_shapiro");
+      }
+
+      final double[] values = new double[array.size() + 1];
+      for (int j = 0; j < array.size(); j++) {
+         values[j + 1] = array.get(j).doubleValue();
+      }
+
+      final double[] pw = new double[1];
+      final double[] w = new double[1];
+      final double[] a = new double[array.size() / 2];
+      final int n = Math.min(5000, array.size());
+      final boolean[] init = new boolean[1];
+      init[0] = false;
+      final int[] ifault = new int[] { -1 };
+
+      SWilk.swilk(init, values, n, n, n / 2, a, w, pw, ifault);
+
+      if ((ifault[0] != 0) && (ifault[0] != 2)) {
+         throw new GeoAlgorithmExecutionException("Error_calculando_shapiro");
+      }
+
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         final DecimalFormat df = new DecimalFormat("##.###");
+         final HTMLDoc doc = new HTMLDoc();
+         doc.open(Sextante.getText("Normality_test"));
+         doc.addHeader(Sextante.getText("Normality_test"), 2);
+         doc.startUnorderedList();
+         doc.addListElement(Sextante.getText("Shapiro-Wilk_W") + df.format(w[0]));
+         doc.closeUnorderedList();
+         doc.close();
+
+         addOutputText(RESULT, Sextante.getText("Statistics") + "[" + layer.getName() + "]", doc.getHTMLCode());
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Normality_test"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "LAYER");
+         addOutputText(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/normalityTest/NormalityTestAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorParametersPanel.java	(revision 369)
@@ -0,0 +1,352 @@
+package es.unex.sextante.tables.vectorFieldCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+import es.unex.sextante.tables.filterVector.FilterVectorAlgorithm;
+
+public class VectorFieldCalculatorParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private JTextArea                   jTextExpression;
+   private JScrollPane                 jScrollPane;
+   private JTree                       jTree;
+   private JScrollPane                 jScrollPane1;
+   private CalculatorKeysPanel         m_KeysPanel;
+   private JPanel                      jPanel;
+   private HashMap                     m_Constants;
+   private GeoAlgorithm                m_Algorithm;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+   private JComboBox                   comboBox;
+
+
+   public VectorFieldCalculatorParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 20.0, 10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            jTextExpression = new JTextArea();
+            jScrollPane.setViewportView(jTextExpression);
+            jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+            jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jPanel = new JPanel();
+         final TableLayout panelLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL },
+                  { 20, TableLayoutConstants.FILL } });
+         jPanel.setLayout(panelLayout);
+         this.add(jPanel, "1, 1, 2, 3");
+         jScrollPane1 = new JScrollPane();
+         jPanel.add(jScrollPane1, "0,1");
+         jTree = new JTree();
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+               TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+               if ((iRow != -1) && (e.getClickCount() == 2)) {
+                  insertTextFromTree(path);
+               }
+            }
+         };
+         jTree.addMouseListener(ml);
+         jScrollPane1.setViewportView(jTree);
+         jScrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+         comboBox = new JComboBox();
+         final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(layers);
+         comboBox.setModel(defaultModel);
+         comboBox.addItemListener(new java.awt.event.ItemListener() {
+            public void itemStateChanged(final java.awt.event.ItemEvent e) {
+               populateTree();
+            }
+         });
+         jPanel.add(comboBox, "0,0");
+         populateTree();
+      }
+      try {
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         final Output out = ooSet.getOutput(VectorFieldCalculatorAlgorithm.RESULT);
+         outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+         this.add(outputChannelSelectionPanel, "3,6,4,6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i;
+
+      jTree.setModel(null);
+
+      //fields
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Fields"));
+      DefaultMutableTreeNode child;
+      final IVectorLayer layer = (IVectorLayer) comboBox.getSelectedItem();
+      try {
+         final String[] fieldNames = layer.getFieldNames();
+         for (i = 0; i < fieldNames.length; i++) {
+            child = new DefaultMutableTreeNode(fieldNames[i]);
+            node.add(child);
+         }
+      }
+      catch (final Exception e1) {}
+
+      main.add(node);
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sOperators[i] + " ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         child = new DefaultMutableTreeNode(iter.next());
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         String s = path.getLastPathComponent().toString();;
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+      int i;;
+      IVectorLayer layer;
+      String sFormula;
+      String sFieldName;
+      //ArrayList array = new ArrayList();
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      sFormula = jTextExpression.getText().toLowerCase();
+      sFormula = sFormula.toLowerCase().replaceAll(" ", "");
+      sFormula = replaceDots(sFormula);
+      layer = (IVectorLayer) comboBox.getSelectedItem();
+      try {
+         final String[] fieldNames = layer.getFieldNames();
+         for (i = 0; i < fieldNames.length; i++) {
+            sFieldName = fieldNames[i].toLowerCase();
+            sFieldName = sFieldName.replaceAll(" ", "");
+            sFieldName = sFieldName.replaceAll("\\.", "");
+            sFieldName = replaceDots(sFieldName);
+            if (sFormula.lastIndexOf(sFieldName) != -1) {
+               jep.addVariable(sFieldName, 0.0);
+            }
+         }
+      }
+      catch (final Exception e1) {}
+
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         throw new WrongInputException();
+      }
+
+
+      try {
+         m_Algorithm.getParameters().getParameter(VectorFieldCalculatorAlgorithm.LAYER).setParameterValue(layer);
+         m_Algorithm.getParameters().getParameter(VectorFieldCalculatorAlgorithm.FORMULA).setParameterValue(sFormula);
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      Output out;
+      IOutputChannel channel;
+
+      try {
+         out = ooSet.getOutput(VectorFieldCalculatorAlgorithm.RESULT);
+         channel = outputChannelSelectionPanel.getOutputChannel();
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      if (channel instanceof OverwriteOutputChannel) {
+         final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+         if (!ooc.getLayer().canBeEdited()) {
+            throw new LayerCannotBeOverwrittenException();
+         }
+      }
+      out.setOutputChannel(channel);
+
+
+   }
+
+
+   private String replaceDots(final String s) {
+
+      char c, c2;
+      StringBuffer sb = new StringBuffer(s);
+      for (int i = 0; i < sb.length() - 1; i++) {
+         c = sb.charAt(i);
+         c2 = sb.charAt(i + 1);
+         if ((c == '.') && !Character.isDigit(c2)) {
+            sb = sb.deleteCharAt(i);
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String outputName,
+                              final String sValue) {
+
+
+      outputChannelSelectionPanel.setText(sValue);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+
+      if (parameterName.equals(FilterVectorAlgorithm.FORMULA)) {
+         jTextExpression.setText(value);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/CalculatorKeysPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/CalculatorKeysPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/CalculatorKeysPanel.java	(revision 369)
@@ -0,0 +1,186 @@
+package es.unex.sextante.tables.vectorFieldCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+
+public class CalculatorKeysPanel
+         extends
+            JPanel {
+
+   private JTextArea m_TextExpression = null;
+   private JButton   jButtonMinus;
+   private JButton   jButtonDivide;
+   private JButton   jButton2;
+   private JButton   jButtonDot;
+   private JButton   jButtonBrackets;
+   private JButton   jButton0;
+   private JButton   jButton9;
+   private JButton   jButton8;
+   private JButton   jButton7;
+   private JButton   jButton6;
+   private JButton   jButton5;
+   private JButton   jButton4;
+   private JButton   jButton3;
+   private JButton   jButton1;
+   private JButton   jButtonMultiply;
+   private JButton   jButtonPlus;
+
+
+   public CalculatorKeysPanel(final JTextArea textExpression) {
+
+      super();
+
+      m_TextExpression = textExpression;
+
+      initialize();
+
+   }
+
+
+   private void initialize() {
+
+      final ActionListener listener = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            addText(evt.getSource());
+         }
+      };
+
+      final ActionListener listenerBrackets = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            m_TextExpression.insert(" ()", m_TextExpression.getCaretPosition());
+            m_TextExpression.setCaretPosition(m_TextExpression.getCaretPosition() - 1);
+         }
+      };
+
+      final TableLayout thisLayout = new TableLayout(
+               new double[][] {
+                        { TableLayoutConstants.FILL, 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL },
+                        { TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(284, 239));
+      {
+         jButtonPlus = new JButton();
+         this.add(jButtonPlus, "0, 0");
+         jButtonPlus.setText("+");
+         jButtonPlus.addActionListener(listener);
+      }
+      {
+         jButtonMinus = new JButton();
+         this.add(jButtonMinus, "0, 1");
+         jButtonMinus.setText("-");
+         jButtonMinus.addActionListener(listener);
+      }
+      {
+         jButtonMultiply = new JButton();
+         this.add(jButtonMultiply, "0, 2");
+         jButtonMultiply.setText("*");
+         jButtonMultiply.addActionListener(listener);
+      }
+      {
+         jButtonDivide = new JButton();
+         this.add(jButtonDivide, "0, 3");
+         jButtonDivide.setText("/");
+         jButtonDivide.addActionListener(listener);
+      }
+      {
+         jButton1 = new JButton();
+         this.add(jButton1, "2, 2");
+         jButton1.setText("1");
+         jButton1.addActionListener(listener);
+      }
+      {
+         jButton2 = new JButton();
+         this.add(jButton2, "3, 2");
+         jButton2.setText("2");
+         jButton2.addActionListener(listener);
+      }
+      {
+         jButton3 = new JButton();
+         this.add(jButton3, "4, 2");
+         jButton3.setText("3");
+         jButton3.addActionListener(listener);
+      }
+      {
+         jButton4 = new JButton();
+         this.add(jButton4, "2, 1");
+         jButton4.setText("4");
+         jButton4.addActionListener(listener);
+      }
+      {
+         jButton5 = new JButton();
+         this.add(jButton5, "3, 1");
+         jButton5.setText("5");
+         jButton5.addActionListener(listener);
+      }
+      {
+         jButton6 = new JButton();
+         this.add(jButton6, "4, 1");
+         jButton6.setText("6");
+         jButton6.addActionListener(listener);
+      }
+      {
+         jButton7 = new JButton();
+         this.add(jButton7, "2, 0");
+         jButton7.setText("7");
+         jButton7.addActionListener(listener);
+      }
+      {
+         jButton8 = new JButton();
+         this.add(jButton8, "3, 0");
+         jButton8.setText("8");
+         jButton8.addActionListener(listener);
+      }
+      {
+         jButton9 = new JButton();
+         this.add(jButton9, "4, 0");
+         jButton9.setText("9");
+         jButton9.addActionListener(listener);
+      }
+      {
+         jButton0 = new JButton();
+         this.add(jButton0, "2, 3");
+         jButton0.setText("0");
+         jButton0.addActionListener(listener);
+      }
+      {
+         jButtonDot = new JButton();
+         this.add(jButtonDot, "4, 3");
+         jButtonDot.setText(".");
+         jButtonDot.addActionListener(listener);
+      }
+      {
+         jButtonBrackets = new JButton();
+         this.add(jButtonBrackets, "3, 3");
+         jButtonBrackets.setText("( )");
+         jButtonBrackets.addActionListener(listenerBrackets);
+      }
+   }
+
+
+   private void addText(final Object source) {
+
+      if (source instanceof JButton) {
+         String s = ((JButton) source).getText();
+         try {
+            final int i = Integer.parseInt(s);
+         }
+         catch (final NumberFormatException e) {
+            s = " " + s + " ";
+         }
+         m_TextExpression.insert(s, m_TextExpression.getCaretPosition());
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/CalculatorKeysPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorAlgorithm.java	(revision 369)
@@ -0,0 +1,196 @@
+
+
+package es.unex.sextante.tables.vectorFieldCalculator;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class VectorFieldCalculatorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final Object NO_DATA = new Double(-99999.);
+
+   public static final String  FORMULA = "FORMULA";
+   public static final String  LAYER   = "LAYER";
+   public static final String  RESULT  = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      double dValue;
+      boolean bOK;
+      String sVariable;
+
+      final Class[] types = { Double.class };
+      final String[] sFields = { Sextante.getText("Result") };
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      String sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+      sFormula = sFormula.replaceAll(" ", "");
+      sFormula = replaceDots(sFormula);
+
+      final String[] fieldNames = layer.getFieldNames();
+      final ArrayList variables = new ArrayList();
+      final ArrayList variableIndex = new ArrayList();
+      for (i = 0; i < fieldNames.length; i++) {
+         sVariable = fieldNames[i].toLowerCase();
+         sVariable = sVariable.replaceAll(" ", "");
+         sVariable = replaceDots(sVariable);
+         if (sFormula.lastIndexOf(sVariable) != -1) {
+            jep.addVariable(sVariable, 0.0);
+            variables.add(sVariable);
+            variableIndex.add(new Integer(i));
+         }
+      }
+      final int[] iVariables = new int[variables.size()];
+      final String[] sVariables = new String[variables.size()];
+      for (i = 0; i < variableIndex.size(); i++) {
+         iVariables[i] = ((Integer) variableIndex.get(i)).intValue();
+         sVariables[i] = (String) variables.get(i);
+      }
+
+      jep.parseExpression(sFormula);
+
+      final int iTotalCount = layer.getShapesCount();
+      final Object[][] values = new Object[1][iTotalCount];
+      if (!jep.hasError()) {
+         final IFeatureIterator iter = layer.iterator();
+         IFeature feat;
+         int iCount = 0;
+         while (iter.hasNext() && setProgress(iCount, iTotalCount)) {
+            feat = iter.next();
+            bOK = true;
+            for (j = 0; (j < iVariables.length) && bOK; j++) {
+               try {
+                  dValue = Double.parseDouble(feat.getRecord().getValue(iVariables[j]).toString());
+                  jep.addVariable(sVariables[j], dValue);
+               }
+               catch (final NumberFormatException nfe) {
+                  bOK = false;
+               }
+
+            }
+            if (bOK) {
+               dValue = jep.getValue();
+               values[0][iCount] = new Double(dValue);
+            }
+            else {
+               values[0][iCount] = NO_DATA;
+            }
+            iCount++;
+         }
+
+         final IOutputChannel channel = getOutputChannel(RESULT);
+         final OutputVectorLayer out = new OutputVectorLayer();
+         out.setName(RESULT);
+         out.setOutputChannel(channel);
+         out.setDescription(Sextante.getText("Result"));
+         out.setOutputObject(ShapesTools.addFields(m_OutputFactory, layer, channel, sFields, values, types));
+         addOutputObject(out);
+
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(jep.getErrorInfo());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Field_calculator"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private String replaceDots(final String s) {
+
+      char c, c2;
+      StringBuffer sb = new StringBuffer(s);
+      for (int i = 0; i < sb.length() - 1; i++) {
+         c = sb.charAt(i);
+         c2 = sb.charAt(i + 1);
+         if ((c == '.') && !Character.isDigit(c2)) {
+            sb = sb.deleteCharAt(i);
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+   @Override
+   public boolean preprocessForModeller(final Object obj) throws GeoAlgorithmExecutionException {
+
+      final ModelAlgorithm model = (ModelAlgorithm) obj;
+
+      String sFormula = m_Parameters.getParameterValueAsString(FORMULA);
+
+      final HashMap inputs = model.getInputs();
+      final Set set = inputs.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final Object key = iter.next();
+         final Object input = inputs.get(key);
+         if (input instanceof ModelElementNumericalValue) {
+            if (sFormula.contains(((String) key))) {
+               return false;
+            }
+         }
+         if (sFormula.contains((String) key)) {
+            sFormula = sFormula.replace(key.toString(), input.toString());
+         }
+      }
+
+      m_Parameters.getParameter(FORMULA).setParameterValue(sFormula);
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,332 @@
+package es.unex.sextante.tables.vectorFieldCalculator;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongOutputIDException;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.gui.modeler.OutputLayerSettingsPanel;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementTableField;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+public class VectorFieldCalculatorModelerParametersPanel
+         extends
+            GeoAlgorithmModelerParametersPanel {
+
+   private JTextArea                jTextExpression;
+   private JScrollPane              jScrollPane;
+   private JTree                    jTree;
+   private JScrollPane              jScrollPane2;
+   private CalculatorKeysPanel      m_KeysPanel;
+   private HashMap                  m_Constants;
+
+   private OutputLayerSettingsPanel m_OutputLayerSettingsPanel;
+   private JPanel                   jPanel;
+   private JComboBox                comboBox;
+
+
+   public VectorFieldCalculatorModelerParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 50.0, 10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            try {
+               jTextExpression = new JTextArea();
+               jScrollPane.setViewportView(jTextExpression);
+               jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+               jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+               final Parameter param = m_Algorithm.getParameters().getParameter(VectorFieldCalculatorAlgorithm.FORMULA);
+               final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(param));
+               if (oad != null) {
+                  final String sFormula = (String) oad.getObject();
+                  jTextExpression.setText(sFormula);
+               }
+            }
+            catch (final Exception e) {
+               Sextante.addErrorToLog(e);
+            }
+
+
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jPanel = new JPanel();
+         final TableLayout panelLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL },
+                  { 20, TableLayoutConstants.FILL } });
+         jPanel.setLayout(panelLayout);
+         this.add(jPanel, "1, 1, 2, 3");
+         jScrollPane2 = new JScrollPane();
+         jPanel.add(jScrollPane2, "0,1");
+         jTree = new JTree();
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+               TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+               if ((iRow != -1) && (e.getClickCount() == 2)) {
+                  insertTextFromTree(path);
+               }
+            }
+         };
+         jTree.addMouseListener(ml);
+         jScrollPane2.setViewportView(jTree);
+         jScrollPane2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+         comboBox = new JComboBox();
+         final ObjectAndDescription[] layers = getElementsOfClass(ModelElementVectorLayer.class, false);
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(layers);
+         comboBox.setModel(defaultModel);
+
+         jPanel.add(comboBox, "0,0");
+         populateTree();
+      }
+      {
+         final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+         m_OutputLayerSettingsPanel = new OutputLayerSettingsPanel();
+         String sDescription = Sextante.getText("Result");
+         final String sKey = VectorFieldCalculatorAlgorithm.RESULT;
+
+         if (!oosetGlobal.containsKey(sKey + this.m_sAlgorithmName)) {
+            sDescription = "\"" + sDescription + "\" " + Sextante.getText("from") + " " + m_sAlgorithmDescription;
+            m_OutputLayerSettingsPanel.setKeepAsFinalResult(false);
+         }
+         else {
+            Output out;
+            try {
+               out = oosetGlobal.getOutput(sKey + this.m_sAlgorithmName);
+               sDescription = out.getDescription();
+               m_OutputLayerSettingsPanel.setKeepAsFinalResult(true);
+            }
+            catch (final WrongOutputIDException e) {
+               //cannot reach this
+            }
+
+         }
+         m_OutputLayerSettingsPanel.setName(sDescription);
+
+         this.add(m_OutputLayerSettingsPanel, "2, 6, 4, 6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i;
+      final int j;
+
+      jTree.setModel(null);
+
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      DefaultMutableTreeNode child;
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         final String s = " " + sOperators[i] + " ";
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+      main.add(node);
+
+      //numerical values
+      ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      node = new DefaultMutableTreeNode(Sextante.getText("Numerical_values"));
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+      //fields
+      values = getElementsOfClass(ModelElementTableField.class, false);
+      node = new DefaultMutableTreeNode(Sextante.getText("Fields"));
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final String s = (String) iter.next();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         String s = (String) ((ObjectAndDescription) node.getUserObject()).getObject();
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public boolean assignParameters(final HashMap map) {
+
+
+      map.put(VectorFieldCalculatorAlgorithm.LAYER, ((ObjectAndDescription) comboBox.getSelectedItem()).getObject());
+
+      final String sFormulaKey = getInnerParameterKey();
+      map.put(VectorFieldCalculatorAlgorithm.FORMULA, sFormulaKey);
+      final String sFormula = jTextExpression.getText();
+      m_DataObjects.put(sFormulaKey, new ObjectAndDescription("String", sFormula));
+
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      for (int i = 0; i < values.length; i++) {
+         if (sFormula.contains(values[i].getObject().toString())) {
+            jep.addVariable(values[i].getObject().toString(), 0);
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+      values = getElementsOfClass(ModelElementTableField.class, false);
+      for (int i = 0; i < values.length; i++) {
+         if (sFormula.contains(values[i].getObject().toString())) {
+            jep.addVariable(values[i].getObject().toString(), 0);
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+
+      jep.setAllowUndeclared(true);
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         return false;
+      }
+
+      final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+      final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+      final String sName = VectorFieldCalculatorAlgorithm.RESULT + this.m_sAlgorithmName;
+      if (m_OutputLayerSettingsPanel.getKeepAsFinalResult()) {
+         try {
+            final Output out = ooset.getOutput(VectorFieldCalculatorAlgorithm.RESULT);
+            final Output outToAdd = out.getClass().newInstance();
+            outToAdd.setName(sName);
+            outToAdd.setDescription(m_OutputLayerSettingsPanel.getName());
+            oosetGlobal.add(outToAdd);
+         }
+         catch (final Exception e) {}
+      }
+      else {
+         oosetGlobal.remove(sName);
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCalculator/VectorFieldCalculatorModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorHistogram/VectorHistogramAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorHistogram/VectorHistogramAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorHistogram/VectorHistogramAlgorithm.java	(revision 369)
@@ -0,0 +1,115 @@
+
+
+package es.unex.sextante.tables.vectorHistogram;
+
+import java.util.ArrayList;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.statistics.HistogramDataset;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+
+
+public class VectorHistogramAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String HISTOGRAM = "HISTOGRAM";
+   public static final String FIELD     = "FIELD";
+   public static final String LAYER     = "LAYER";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      int iShapesCount;
+      double dValue;
+      IVectorLayer layer;
+
+      layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      i = 0;
+      final ArrayList<Double> array = new ArrayList<Double>();
+      iShapesCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            array.add(new Double(dValue));
+         }
+         catch (final Exception e) {
+         }
+         i++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+
+      else {
+         final HistogramDataset dataset = new HistogramDataset();
+         final double[] values = new double[array.size()];
+         for (int j = 0; j < array.size(); j++) {
+            values[j] = array.get(j).doubleValue();
+         }
+         dataset.addSeries("Histogram", values, 100);
+         final JFreeChart chart = ChartFactory.createHistogram("", null, null, dataset, PlotOrientation.VERTICAL, true, false,
+                  false);
+         final ChartPanel jPanelChart = new ChartPanel(chart);
+         jPanelChart.setMouseZoomable(true, true);
+         jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+         jPanelChart.setPreferredSize(new java.awt.Dimension(500, 300));
+         jPanelChart.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray, 1));
+
+         addOutputChart(HISTOGRAM, Sextante.getText("Histogram"), jPanelChart);
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Histogram"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "LAYER");
+         addOutputChart(HISTOGRAM, Sextante.getText("Histogram"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorHistogram/VectorHistogramAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorSplitField/VectorSplitFieldAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorSplitField/VectorSplitFieldAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorSplitField/VectorSplitFieldAlgorithm.java	(revision 369)
@@ -0,0 +1,115 @@
+package es.unex.sextante.tables.vectorSplitField;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.shapesTools.ShapesTools;
+
+
+public class VectorSplitFieldAlgorithm
+         extends
+            GeoAlgorithm {
+
+   private static final Object NO_DATA     = new Double(-99999.);
+
+   public static final String  FIELD       = "FIELD";
+   public static final String  BREAKPOINTS = "BREAKPOINTS";
+   public static final String  LAYER       = "LAYER";
+   public static final String  RESULT      = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final int i, j;
+      final double dValue;
+      final boolean bOK;
+      final String sVariable;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+      final String sBreakpoints = m_Parameters.getParameterValueAsString(BREAKPOINTS);
+      final String[] sTokens = sBreakpoints.split(",");
+
+      final int[] breakpoints = new int[sTokens.length + 2];
+      breakpoints[0] = 0;
+      breakpoints[breakpoints.length - 1] = 1000;
+      for (int k = 0; k < sTokens.length; k++) {
+         breakpoints[k + 1] = Integer.parseInt(sTokens[k]);
+      }
+
+      final Class[] types = new Class[sTokens.length + 1];
+      for (int k = 0; k < types.length; k++) {
+         types[k] = String.class;
+      }
+
+      final String sBaseName = layer.getFieldName(iField);
+      final String[] sFields = new String[sTokens.length + 1];
+      for (int k = 0; k < sFields.length; k++) {
+         sFields[k] = sBaseName + "_" + Integer.toString(k);
+      }
+
+
+      final int iTotalCount = layer.getShapesCount();
+      final String[][] values = new String[breakpoints.length][iTotalCount];
+      final IFeatureIterator iter = layer.iterator();
+      IFeature feat;
+      int iCount = 0;
+      while (iter.hasNext() && setProgress(iCount, iTotalCount)) {
+         feat = iter.next();
+         final String s = feat.getRecord().getValue(iField).toString();
+         System.out.println(s);
+         for (int k = 1; k < breakpoints.length; k++) {
+            final int iMin = Math.min(breakpoints[k - 1], s.length());
+            final int iMin2 = Math.min(breakpoints[k], s.length());
+            values[k - 1][iCount] = s.substring(iMin, iMin2);
+         }
+         iCount++;
+      }
+
+
+      final IOutputChannel channel = getOutputChannel(RESULT);
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(RESULT);
+      out.setOutputChannel(channel);
+      out.setDescription(Sextante.getText("Result"));
+      out.setOutputObject(ShapesTools.addFields(m_OutputFactory, layer, channel, sFields, values, types));
+      addOutputObject(out);
+
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Split_field"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(BREAKPOINTS, Sextante.getText("Breakpoints"));
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorSplitField/VectorSplitFieldAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorBasicStats/VectorBasicStatsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorBasicStats/VectorBasicStatsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorBasicStats/VectorBasicStatsAlgorithm.java	(revision 369)
@@ -0,0 +1,135 @@
+
+
+package es.unex.sextante.tables.vectorBasicStats;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+
+
+public class VectorBasicStatsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String STATS             = "STATS";
+   public static final String FIELD             = "FIELD";
+   public static final String LAYER             = "LAYER";
+   public static final String MEAN              = "MEAN";
+   public static final String MEAN_SQUARED      = "MEAN_SQUARED";
+   public static final String MIN               = "MIN";
+   public static final String MAX               = "MAX";
+   public static final String VARIANCE          = "VARIANCE";
+   public static final String SUM               = "SUM";
+   public static final String COEF_OF_VARIATION = "COEF_OF_VARIATION";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      int iCount;
+      double dValue;
+      IVectorLayer layer;
+      final SimpleStats stats = new SimpleStats();
+
+      layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      i = 0;
+      iCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            stats.addValue(dValue);
+         }
+         catch (final Exception e) {
+         }
+         i++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         final DecimalFormat df = new DecimalFormat("##.###");
+         final HTMLDoc doc = new HTMLDoc();
+         doc.open(Sextante.getText("Statistics"));
+         doc.addHeader(Sextante.getText("Basic_statistics"), 2);
+         doc.startUnorderedList();
+         doc.addListElement(Sextante.getText("Mean_value") + ": " + df.format(stats.getMean()));
+         doc.addListElement(Sextante.getText("Mean_squared_value") + ": " + df.format(stats.getRMS()));
+         doc.addListElement(Sextante.getText("Min_value") + ": " + df.format(stats.getMin()));
+         doc.addListElement(Sextante.getText("Max_value") + ": " + df.format(stats.getMax()));
+         doc.addListElement(Sextante.getText("Variance") + ": " + df.format(stats.getVariance()));
+         doc.addListElement(Sextante.getText("Total_sum") + ": " + df.format(stats.getSum()));
+         doc.addListElement(Sextante.getText("Coefficient_of_variation") + ": " + df.format(stats.getCoeffOfVar()));
+         doc.closeUnorderedList();
+         doc.close();
+
+         addOutputText(STATS, Sextante.getText("Statistics") + "[" + layer.getName() + "]", doc.getHTMLCode());
+
+         addOutputNumericalValue(MEAN, stats.getMean());
+         addOutputNumericalValue(MEAN_SQUARED, stats.getRMS());
+         addOutputNumericalValue(MIN, stats.getMin());
+         addOutputNumericalValue(MAX, stats.getMax());
+         addOutputNumericalValue(VARIANCE, stats.getVariance());
+         addOutputNumericalValue(SUM, stats.getSum());
+         addOutputNumericalValue(COEF_OF_VARIATION, stats.getCoeffOfVar());
+
+
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Basic_statistics"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), "LAYER");
+         addOutputText(STATS, Sextante.getText("Statistics"));
+         addOutputNumericalValue(MEAN, Sextante.getText("Mean_value"));
+         addOutputNumericalValue(MEAN_SQUARED, Sextante.getText("Mean_squared_value"));
+         addOutputNumericalValue(MIN, Sextante.getText("Minimum_value"));
+         addOutputNumericalValue(MAX, Sextante.getText("Maximum_value"));
+         addOutputNumericalValue(VARIANCE, Sextante.getText("Variance"));
+         addOutputNumericalValue(SUM, Sextante.getText("Total_sum"));
+         addOutputNumericalValue(COEF_OF_VARIATION, Sextante.getText("Coefficient_of_variation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorBasicStats/VectorBasicStatsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/createEquivalentNumericalClass/CreateEquivalentNumericalClassAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/createEquivalentNumericalClass/CreateEquivalentNumericalClassAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/createEquivalentNumericalClass/CreateEquivalentNumericalClassAlgorithm.java	(revision 369)
@@ -0,0 +1,92 @@
+package es.unex.sextante.tables.createEquivalentNumericalClass;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class CreateEquivalentNumericalClassAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER          = "LAYER";
+   public static final String NEW_FIELD_NAME = "NEW_FIELD_NAME";
+   public static final String CLASS_FIELD    = "CLASS_FIELD";
+   public static final String RESULT         = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final ArrayList<String> list = new ArrayList<String>();
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      final int iField = m_Parameters.getParameterValueAsInt(CLASS_FIELD);
+      final Class[] types = new Class[layerIn.getFieldCount() + 1];
+      System.arraycopy(layerIn.getFieldTypes(), 0, types, 0, layerIn.getFieldCount());
+      types[types.length - 1] = Integer.class;
+      final String[] sFields = new String[layerIn.getFieldCount() + 1];
+      System.arraycopy(layerIn.getFieldNames(), 0, sFields, 0, layerIn.getFieldCount());
+      sFields[types.length - 1] = m_Parameters.getParameterValueAsString(NEW_FIELD_NAME);
+
+      final IVectorLayer driver = getNewVectorLayer(RESULT, layerIn.getName(), layerIn.getShapeType(), types, sFields);
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      int i = 0;
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final IRecord record = feature.getRecord();
+         final Object[] values = record.getValues();
+         final Object[] newValues = new Object[values.length + 1];
+         System.arraycopy(values, 0, newValues, 0, values.length);
+         int iClass = list.indexOf(values[iField].toString());
+         if (iClass == -1) {
+            iClass = list.size();
+            list.add(values[iField].toString());
+         }
+         newValues[values.length] = new Integer(iClass);
+         driver.addFeature(feature.getGeometry(), newValues);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Create_equivalent_numerical_class"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(NEW_FIELD_NAME, Sextante.getText("name_for_new_field"), "CLASS_ID");
+         m_Parameters.addTableField(CLASS_FIELD, Sextante.getText("Class_field"), LAYER);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/createEquivalentNumericalClass/CreateEquivalentNumericalClassAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorAlgorithm.java	(revision 369)
@@ -0,0 +1,179 @@
+
+
+package es.unex.sextante.tables.filterVector;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.gui.modeler.ModelAlgorithm;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+
+
+public class FilterVectorAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String FORMULA = "FORMULA";
+   public static final String LAYER   = "LAYER";
+   public static final String RESULT  = "RESULT";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i, j;
+      double dValue;
+      String sVariable;
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      final IVectorLayer outputLayer = getNewVectorLayer(RESULT, layer.getName(), layer.getShapeType(), layer.getFieldTypes(),
+               layer.getFieldNames());
+
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      String sFormula = m_Parameters.getParameterValueAsString(FORMULA).toLowerCase();
+      sFormula = sFormula.replaceAll(" ", "");
+      sFormula = replaceDots(sFormula);
+
+      final String[] fieldNames = layer.getFieldNames();
+      final ArrayList variables = new ArrayList();
+      final ArrayList variableIndex = new ArrayList();
+      for (i = 0; i < fieldNames.length; i++) {
+         sVariable = fieldNames[i].toLowerCase();
+         sVariable = sVariable.replaceAll(" ", "");
+         sVariable = replaceDots(sVariable);
+         if (sFormula.lastIndexOf(sVariable) != -1) {
+            jep.addVariable(sVariable, 0.0);
+            variables.add(sVariable);
+            variableIndex.add(new Integer(i));
+         }
+      }
+      final int[] iVariables = new int[variables.size()];
+      final String[] sVariables = new String[variables.size()];
+      for (i = 0; i < variableIndex.size(); i++) {
+         iVariables[i] = ((Integer) variableIndex.get(i)).intValue();
+         sVariables[i] = (String) variables.get(i);
+      }
+
+      sFormula = "if(" + sFormula + ",1,0)";
+      jep.parseExpression(sFormula);
+
+      int iCount = 0;
+      final int iTotalCount = layer.getShapesCount();
+      if (!jep.hasError()) {
+         final IFeatureIterator iter = layer.iterator();
+         IFeature feat;
+         while (iter.hasNext() && setProgress(iCount, iTotalCount)) {
+            feat = iter.next();
+            for (j = 0; (j < iVariables.length); j++) {
+               String sValue = null;
+               try {
+                  sValue = feat.getRecord().getValue(iVariables[j]).toString();
+                  dValue = Double.parseDouble(sValue);
+                  jep.addVariable(sVariables[j], dValue);
+               }
+               catch (final NumberFormatException nfe) {
+                  jep.addVariable(sVariables[j], sValue.toLowerCase());
+               }
+            }
+            dValue = jep.getValue();
+            if ((dValue != 0) && !Double.isNaN(dValue)) {
+               outputLayer.addFeature(feat);
+            }
+
+            iCount++;
+         }
+      }
+      else {
+         throw new GeoAlgorithmExecutionException(jep.getErrorInfo());
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Filter_vector"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(FORMULA, Sextante.getText("Formula"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private String replaceDots(final String s) {
+
+      char c, c2;
+      StringBuffer sb = new StringBuffer(s);
+      for (int i = 0; i < sb.length() - 1; i++) {
+         c = sb.charAt(i);
+         c2 = sb.charAt(i + 1);
+         if ((c == '.') && !Character.isDigit(c2)) {
+            sb = sb.deleteCharAt(i);
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+   @Override
+   public boolean preprocessForModeller(final Object obj) throws GeoAlgorithmExecutionException {
+
+      final ModelAlgorithm model = (ModelAlgorithm) obj;
+
+      String sFormula = m_Parameters.getParameterValueAsString(FORMULA);
+
+      final HashMap inputs = model.getInputs();
+      final Set set = inputs.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final Object key = iter.next();
+         final Object input = inputs.get(key);
+         if (input instanceof ModelElementNumericalValue) {
+            if (sFormula.contains(((String) key))) {
+               return false;
+            }
+         }
+         if (sFormula.contains((String) key)) {
+            sFormula = sFormula.replace(key.toString(), input.toString());
+         }
+      }
+
+      m_Parameters.getParameter(FORMULA).setParameterValue(sFormula);
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorModelerParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorModelerParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorModelerParametersPanel.java	(revision 369)
@@ -0,0 +1,332 @@
+package es.unex.sextante.tables.filterVector;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.core.ObjectAndDescription;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.exceptions.WrongOutputIDException;
+import es.unex.sextante.gui.modeler.GeoAlgorithmModelerParametersPanel;
+import es.unex.sextante.gui.modeler.OutputLayerSettingsPanel;
+import es.unex.sextante.modeler.elements.ModelElementNumericalValue;
+import es.unex.sextante.modeler.elements.ModelElementTableField;
+import es.unex.sextante.modeler.elements.ModelElementVectorLayer;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.parameters.Parameter;
+
+public class FilterVectorModelerParametersPanel
+         extends
+            GeoAlgorithmModelerParametersPanel {
+
+   private JTextArea                jTextExpression;
+   private JScrollPane              jScrollPane;
+   private JTree                    jTree;
+   private JScrollPane              jScrollPane2;
+   private CalculatorKeysPanel      m_KeysPanel;
+   private HashMap                  m_Constants;
+
+   private OutputLayerSettingsPanel m_OutputLayerSettingsPanel;
+   private JPanel                   jPanel;
+   private JComboBox                comboBox;
+
+
+   public FilterVectorModelerParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   protected void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 50.0, 10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            try {
+               jTextExpression = new JTextArea();
+               jScrollPane.setViewportView(jTextExpression);
+               jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+               jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+               final Parameter param = m_Algorithm.getParameters().getParameter(FilterVectorAlgorithm.FORMULA);
+               final ObjectAndDescription oad = ((ObjectAndDescription) getParameterValue(param));
+               if (oad != null) {
+                  final String sFormula = (String) oad.getObject();
+                  jTextExpression.setText(sFormula);
+               }
+            }
+            catch (final Exception e) {
+               Sextante.addErrorToLog(e);
+            }
+
+
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jPanel = new JPanel();
+         final TableLayout panelLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL },
+                  { 20, TableLayoutConstants.FILL } });
+         jPanel.setLayout(panelLayout);
+         this.add(jPanel, "1, 1, 2, 3");
+         jScrollPane2 = new JScrollPane();
+         jPanel.add(jScrollPane2, "0,1");
+         jTree = new JTree();
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+               TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+               if ((iRow != -1) && (e.getClickCount() == 2)) {
+                  insertTextFromTree(path);
+               }
+            }
+         };
+         jTree.addMouseListener(ml);
+         jScrollPane2.setViewportView(jTree);
+         jScrollPane2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+         comboBox = new JComboBox();
+         final ObjectAndDescription[] layers = getElementsOfClass(ModelElementVectorLayer.class, false);
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(layers);
+         comboBox.setModel(defaultModel);
+
+         jPanel.add(comboBox, "0,0");
+         populateTree();
+      }
+      {
+         final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+         m_OutputLayerSettingsPanel = new OutputLayerSettingsPanel();
+         String sDescription = Sextante.getText("Result");
+         final String sKey = FilterVectorAlgorithm.RESULT;
+
+         if (!oosetGlobal.containsKey(sKey + this.m_sAlgorithmName)) {
+            sDescription = "\"" + sDescription + "\" " + Sextante.getText("from") + " " + m_sAlgorithmDescription;
+            m_OutputLayerSettingsPanel.setKeepAsFinalResult(false);
+         }
+         else {
+            Output out;
+            try {
+               out = oosetGlobal.getOutput(sKey + this.m_sAlgorithmName);
+               sDescription = out.getDescription();
+               m_OutputLayerSettingsPanel.setKeepAsFinalResult(true);
+            }
+            catch (final WrongOutputIDException e) {
+               //cannot reach this
+            }
+
+         }
+         m_OutputLayerSettingsPanel.setName(sDescription);
+
+         this.add(m_OutputLayerSettingsPanel, "2, 6, 4, 6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i;
+      final int j;
+
+      jTree.setModel(null);
+
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      DefaultMutableTreeNode child;
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         final String s = " " + sOperators[i] + " ";
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+      main.add(node);
+
+      //numerical values
+      ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      node = new DefaultMutableTreeNode(Sextante.getText("Numerical_values"));
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+      //fields
+      values = getElementsOfClass(ModelElementTableField.class, false);
+      node = new DefaultMutableTreeNode(Sextante.getText("Fields"));
+      for (i = 0; i < values.length; i++) {
+         final String sName = values[i].getDescription();
+         final String sVariableName = values[i].getObject().toString();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(sName, sVariableName));
+         node.add(child);
+      }
+      main.add(node);
+
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         final String s = (String) iter.next();
+         child = new DefaultMutableTreeNode(new ObjectAndDescription(s, s));
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         final DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+         String s = (String) ((ObjectAndDescription) node.getUserObject()).getObject();
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public boolean assignParameters(final HashMap map) {
+
+      map.put(FilterVectorAlgorithm.LAYER, ((ObjectAndDescription) comboBox.getSelectedItem()).getObject());
+
+      final String sFormulaKey = getInnerParameterKey();
+      map.put(FilterVectorAlgorithm.FORMULA, sFormulaKey);
+      final String sFormula = jTextExpression.getText();
+      m_DataObjects.put(sFormulaKey, new ObjectAndDescription("String", sFormula));
+
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      ObjectAndDescription[] values = getElementsOfClass(ModelElementNumericalValue.class, false);
+      for (int i = 0; i < values.length; i++) {
+         if (sFormula.contains(values[i].getObject().toString())) {
+            jep.addVariable(values[i].getObject().toString(), 0);
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+      values = getElementsOfClass(ModelElementTableField.class, false);
+      for (int i = 0; i < values.length; i++) {
+         if (sFormula.contains(values[i].getObject().toString())) {
+            jep.addVariable(values[i].getObject().toString(), 0);
+            map.put("DUMMY" + this.getInnerParameterKey(), values[i].getObject().toString());
+         }
+      }
+
+      jep.setAllowUndeclared(true);
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         return false;
+      }
+
+      final OutputObjectsSet oosetGlobal = this.m_GlobalAlgorithm.getOutputObjects();
+      final OutputObjectsSet ooset = this.m_Algorithm.getOutputObjects();
+
+      final String sName = FilterVectorAlgorithm.RESULT + this.m_sAlgorithmName;
+      if (m_OutputLayerSettingsPanel.getKeepAsFinalResult()) {
+         try {
+            final Output out = ooset.getOutput(FilterVectorAlgorithm.RESULT);
+            final Output outToAdd = out.getClass().newInstance();
+            outToAdd.setName(sName);
+            outToAdd.setDescription(m_OutputLayerSettingsPanel.getName());
+            oosetGlobal.add(outToAdd);
+         }
+         catch (final Exception e) {}
+      }
+      else {
+         oosetGlobal.remove(sName);
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorModelerParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/CalculatorKeysPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/CalculatorKeysPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/CalculatorKeysPanel.java	(revision 369)
@@ -0,0 +1,186 @@
+package es.unex.sextante.tables.filterVector;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+
+public class CalculatorKeysPanel
+         extends
+            JPanel {
+
+   private JTextArea m_TextExpression = null;
+   private JButton   jButtonMinus;
+   private JButton   jButtonDivide;
+   private JButton   jButton2;
+   private JButton   jButtonDot;
+   private JButton   jButtonBrackets;
+   private JButton   jButton0;
+   private JButton   jButton9;
+   private JButton   jButton8;
+   private JButton   jButton7;
+   private JButton   jButton6;
+   private JButton   jButton5;
+   private JButton   jButton4;
+   private JButton   jButton3;
+   private JButton   jButton1;
+   private JButton   jButtonMultiply;
+   private JButton   jButtonPlus;
+
+
+   public CalculatorKeysPanel(final JTextArea textExpression) {
+
+      super();
+
+      m_TextExpression = textExpression;
+
+      initialize();
+
+   }
+
+
+   private void initialize() {
+
+      final ActionListener listener = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            addText(evt.getSource());
+         }
+      };
+
+      final ActionListener listenerBrackets = new ActionListener() {
+         public void actionPerformed(ActionEvent evt) {
+            m_TextExpression.insert(" ()", m_TextExpression.getCaretPosition());
+            m_TextExpression.setCaretPosition(m_TextExpression.getCaretPosition() - 1);
+         }
+      };
+
+      final TableLayout thisLayout = new TableLayout(
+               new double[][] {
+                        { TableLayoutConstants.FILL, 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL },
+                        { TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                                 TableLayoutConstants.FILL } });
+      thisLayout.setHGap(5);
+      thisLayout.setVGap(5);
+      this.setLayout(thisLayout);
+      this.setPreferredSize(new java.awt.Dimension(284, 239));
+      {
+         jButtonPlus = new JButton();
+         this.add(jButtonPlus, "0, 0");
+         jButtonPlus.setText("+");
+         jButtonPlus.addActionListener(listener);
+      }
+      {
+         jButtonMinus = new JButton();
+         this.add(jButtonMinus, "0, 1");
+         jButtonMinus.setText("-");
+         jButtonMinus.addActionListener(listener);
+      }
+      {
+         jButtonMultiply = new JButton();
+         this.add(jButtonMultiply, "0, 2");
+         jButtonMultiply.setText("*");
+         jButtonMultiply.addActionListener(listener);
+      }
+      {
+         jButtonDivide = new JButton();
+         this.add(jButtonDivide, "0, 3");
+         jButtonDivide.setText("/");
+         jButtonDivide.addActionListener(listener);
+      }
+      {
+         jButton1 = new JButton();
+         this.add(jButton1, "2, 2");
+         jButton1.setText("1");
+         jButton1.addActionListener(listener);
+      }
+      {
+         jButton2 = new JButton();
+         this.add(jButton2, "3, 2");
+         jButton2.setText("2");
+         jButton2.addActionListener(listener);
+      }
+      {
+         jButton3 = new JButton();
+         this.add(jButton3, "4, 2");
+         jButton3.setText("3");
+         jButton3.addActionListener(listener);
+      }
+      {
+         jButton4 = new JButton();
+         this.add(jButton4, "2, 1");
+         jButton4.setText("4");
+         jButton4.addActionListener(listener);
+      }
+      {
+         jButton5 = new JButton();
+         this.add(jButton5, "3, 1");
+         jButton5.setText("5");
+         jButton5.addActionListener(listener);
+      }
+      {
+         jButton6 = new JButton();
+         this.add(jButton6, "4, 1");
+         jButton6.setText("6");
+         jButton6.addActionListener(listener);
+      }
+      {
+         jButton7 = new JButton();
+         this.add(jButton7, "2, 0");
+         jButton7.setText("7");
+         jButton7.addActionListener(listener);
+      }
+      {
+         jButton8 = new JButton();
+         this.add(jButton8, "3, 0");
+         jButton8.setText("8");
+         jButton8.addActionListener(listener);
+      }
+      {
+         jButton9 = new JButton();
+         this.add(jButton9, "4, 0");
+         jButton9.setText("9");
+         jButton9.addActionListener(listener);
+      }
+      {
+         jButton0 = new JButton();
+         this.add(jButton0, "2, 3");
+         jButton0.setText("0");
+         jButton0.addActionListener(listener);
+      }
+      {
+         jButtonDot = new JButton();
+         this.add(jButtonDot, "4, 3");
+         jButtonDot.setText(".");
+         jButtonDot.addActionListener(listener);
+      }
+      {
+         jButtonBrackets = new JButton();
+         this.add(jButtonBrackets, "3, 3");
+         jButtonBrackets.setText("( )");
+         jButtonBrackets.addActionListener(listenerBrackets);
+      }
+   }
+
+
+   private void addText(final Object source) {
+
+      if (source instanceof JButton) {
+         String s = ((JButton) source).getText();
+         try {
+            final int i = Integer.parseInt(s);
+         }
+         catch (final NumberFormatException e) {
+            s = " " + s + " ";
+         }
+         m_TextExpression.insert(s, m_TextExpression.getCaretPosition());
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/CalculatorKeysPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorParametersPanel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorParametersPanel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorParametersPanel.java	(revision 369)
@@ -0,0 +1,350 @@
+package es.unex.sextante.tables.filterVector;
+
+import info.clearthought.layout.TableLayout;
+import info.clearthought.layout.TableLayoutConstants;
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.border.BevelBorder;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.nfunk.jep.JEP;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.OutputObjectsSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.WrongInputException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel;
+import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.exceptions.LayerCannotBeOverwrittenException;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.OverwriteOutputChannel;
+
+public class FilterVectorParametersPanel
+         extends
+            GeoAlgorithmParametersPanel {
+
+   private JTextArea                   jTextExpression;
+   private JScrollPane                 jScrollPane;
+   private JTree                       jTree;
+   private JScrollPane                 jScrollPane1;
+   private CalculatorKeysPanel         m_KeysPanel;
+   private JPanel                      jPanel;
+   private HashMap                     m_Constants;
+   private GeoAlgorithm                m_Algorithm;
+   private OutputChannelSelectionPanel outputChannelSelectionPanel;
+   private JComboBox                   comboBox;
+
+
+   public FilterVectorParametersPanel() {
+
+      super();
+
+   }
+
+
+   @Override
+   public void init(final GeoAlgorithm algorithm) {
+
+      m_Algorithm = algorithm;
+
+      initGUI();
+
+   }
+
+
+   private void initGUI() {
+
+      this.setPreferredSize(new java.awt.Dimension(570, 350));
+      final TableLayout thisLayout = new TableLayout(new double[][] {
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL,
+                        TableLayoutConstants.FILL, 10.0 },
+               { 10.0, TableLayoutConstants.FILL, TableLayoutConstants.FILL, TableLayoutConstants.FILL, 50.0, 5.0, 20.0, 10.0 } });
+      thisLayout.setHGap(10);
+      thisLayout.setVGap(10);
+      this.setLayout(thisLayout);
+      this.setSize(new java.awt.Dimension(350, 350));
+      {
+         jScrollPane = new JScrollPane();
+         this.add(jScrollPane, "1, 4, 4, 4");
+         jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         {
+            jTextExpression = new JTextArea();
+            jScrollPane.setViewportView(jTextExpression);
+            jTextExpression.setPreferredSize(new java.awt.Dimension(0, 0));
+            jTextExpression.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+         }
+      }
+      {
+         m_KeysPanel = new CalculatorKeysPanel(jTextExpression);
+         this.add(m_KeysPanel, "3, 1, 4, 3");
+      }
+      {
+         jPanel = new JPanel();
+         final TableLayout panelLayout = new TableLayout(new double[][] { { TableLayoutConstants.FILL },
+                  { 20, TableLayoutConstants.FILL } });
+         jPanel.setLayout(panelLayout);
+         this.add(jPanel, "1, 1, 2, 3");
+         jScrollPane1 = new JScrollPane();
+         jPanel.add(jScrollPane1, "0,1");
+         jTree = new JTree();
+         final MouseListener ml = new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+               int iRow = jTree.getRowForLocation(e.getX(), e.getY());
+               TreePath path = jTree.getPathForLocation(e.getX(), e.getY());
+               if ((iRow != -1) && (e.getClickCount() == 2)) {
+                  insertTextFromTree(path);
+               }
+            }
+         };
+         jTree.addMouseListener(ml);
+         jScrollPane1.setViewportView(jTree);
+         jScrollPane1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+         jTree.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+
+         comboBox = new JComboBox();
+         final IVectorLayer[] layers = SextanteGUI.getInputFactory().getVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_ANY);
+         final DefaultComboBoxModel defaultModel = new DefaultComboBoxModel(layers);
+         comboBox.setModel(defaultModel);
+         comboBox.addItemListener(new java.awt.event.ItemListener() {
+            public void itemStateChanged(final java.awt.event.ItemEvent e) {
+               populateTree();
+            }
+         });
+         jPanel.add(comboBox, "0,0");
+         populateTree();
+      }
+      try {
+         final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+         final Output out = ooSet.getOutput(FilterVectorAlgorithm.RESULT);
+         outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters());
+         this.add(outputChannelSelectionPanel, "3,6,4,6");
+         this.add(new JLabel(Sextante.getText("Result")), "1,6,2,6");
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   private void populateTree() {
+
+      int i;
+
+      jTree.setModel(null);
+
+      //fields
+      final DefaultMutableTreeNode main = new DefaultMutableTreeNode(Sextante.getText("ELEMENTS"));
+      DefaultMutableTreeNode node = new DefaultMutableTreeNode(Sextante.getText("Fields"));
+      DefaultMutableTreeNode child;
+      final IVectorLayer layer = (IVectorLayer) comboBox.getSelectedItem();
+      try {
+         final String[] fieldNames = layer.getFieldNames();
+         for (i = 0; i < fieldNames.length; i++) {
+            child = new DefaultMutableTreeNode(fieldNames[i]);
+            node.add(child);
+         }
+      }
+      catch (final Exception e1) {}
+
+      main.add(node);
+
+      //functions
+      final String sFunctions[] = { "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "sinh", "cosh", "tanh", "asinh",
+               "acosh", "atanh", "ln", "log", "exp", "abs", "rand", "mod", "sqrt", "if" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Functions"));
+      for (i = 0; i < sFunctions.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sFunctions[i] + "() ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //operators
+      final String sOperators[] = { "+", "-", "*", "/", "%", "!", "^", "&&", "||", "<", ">", "<=", ">=", "==", "!=" };
+      node = new DefaultMutableTreeNode(Sextante.getText("Operators"));
+      for (i = 0; i < sOperators.length; i++) {
+         child = new DefaultMutableTreeNode(" " + sOperators[i] + " ");
+         node.add(child);
+      }
+      main.add(node);
+
+      //constants
+      node = new DefaultMutableTreeNode(Sextante.getText("Constants"));
+      m_Constants = new HashMap();
+      m_Constants.put("e", " " + Double.toString(Math.E) + " ");
+      m_Constants.put("Pi", " " + Double.toString(Math.PI) + " ");
+
+      final Set set = m_Constants.keySet();
+      final Iterator iter = set.iterator();
+      while (iter.hasNext()) {
+         child = new DefaultMutableTreeNode(iter.next());
+         node.add(child);
+      }
+
+      main.add(node);
+
+      jTree.setModel(new DefaultTreeModel(main));
+      final DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) jTree.getCellRenderer();
+      renderer.setOpenIcon(null);
+      renderer.setClosedIcon(null);
+      renderer.setLeafIcon(null);
+
+   }
+
+
+   private void insertTextFromTree(final TreePath path) {
+
+      final TreePath parent = path.getParentPath();
+
+      if ((parent != null) && !parent.toString().equals("[" + Sextante.getText("ELEMENTS") + "]")) {
+         final String sParentName = parent.toString();
+         String s = path.getLastPathComponent().toString();;
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Constants]"))) {
+            if (m_Constants.containsKey(s)) {
+               s = (String) m_Constants.get(s);
+            }
+            else {
+               s = "";
+            }
+         }
+
+         jTextExpression.insert(s, jTextExpression.getCaretPosition());
+
+         if (sParentName.equals("[" + Sextante.getText("ELEMENTS") + ", " + Sextante.getText("Functions]"))) {
+            jTextExpression.setCaretPosition(jTextExpression.getCaretPosition() - 2);
+         }
+      }
+
+   }
+
+
+   @Override
+   public void assignParameters() throws WrongInputException, LayerCannotBeOverwrittenException {
+
+      int i;;
+      IVectorLayer layer;
+      String sFormula;
+      String sFieldName;
+      //ArrayList array = new ArrayList();
+      final JEP jep = new JEP();
+      jep.addStandardConstants();
+      jep.addStandardFunctions();
+
+      sFormula = jTextExpression.getText().toLowerCase();
+      sFormula = sFormula.toLowerCase().replaceAll(" ", "");
+      sFormula = replaceDots(sFormula);
+      layer = (IVectorLayer) comboBox.getSelectedItem();
+      try {
+         final String[] fieldNames = layer.getFieldNames();
+         for (i = 0; i < fieldNames.length; i++) {
+            sFieldName = fieldNames[i].toLowerCase();
+            sFieldName = sFieldName.replaceAll(" ", "");
+            sFieldName = sFieldName.replaceAll("\\.", "");
+            sFieldName = replaceDots(sFieldName);
+            if (sFormula.lastIndexOf(sFieldName) != -1) {
+               jep.addVariable(sFieldName, 0.0);
+            }
+         }
+      }
+      catch (final Exception e1) {}
+
+      jep.parseExpression(sFormula);
+
+      if (jep.hasError()) {
+         throw new WrongInputException();
+      }
+
+      try {
+         m_Algorithm.getParameters().getParameter(FilterVectorAlgorithm.LAYER).setParameterValue(layer);
+         m_Algorithm.getParameters().getParameter(FilterVectorAlgorithm.FORMULA).setParameterValue(sFormula);
+      }
+      catch (final WrongParameterIDException e) {
+         throw new WrongInputException();
+      }
+
+      final Output out;
+      final IOutputChannel channel;
+      final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects();
+      try {
+         out = ooSet.getOutput(FilterVectorAlgorithm.RESULT);
+         channel = outputChannelSelectionPanel.getOutputChannel();
+      }
+      catch (final Exception e) {
+         throw new WrongInputException();
+      }
+
+      if (channel instanceof OverwriteOutputChannel) {
+         final OverwriteOutputChannel ooc = (OverwriteOutputChannel) channel;
+         if (!ooc.getLayer().canBeEdited()) {
+            throw new LayerCannotBeOverwrittenException();
+         }
+      }
+
+      out.setOutputChannel(channel);
+
+
+   }
+
+
+   private String replaceDots(final String s) {
+
+      char c, c2;
+      StringBuffer sb = new StringBuffer(s);
+      for (int i = 0; i < sb.length() - 1; i++) {
+         c = sb.charAt(i);
+         c2 = sb.charAt(i + 1);
+         if ((c == '.') && !Character.isDigit(c2)) {
+            sb = sb.deleteCharAt(i);
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+   @Override
+   public void setOutputValue(final String outputName,
+                              final String sValue) {
+
+      outputChannelSelectionPanel.setText(sValue);
+
+   }
+
+
+   @Override
+   public void setParameterValue(final String parameterName,
+                                 final String value) {
+
+      if (parameterName.equals(FilterVectorAlgorithm.FORMULA)) {
+         jTextExpression.setText(value);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/filterVector/FilterVectorParametersPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableBasicStats/TableBasicStatsAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableBasicStats/TableBasicStatsAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableBasicStats/TableBasicStatsAlgorithm.java	(revision 369)
@@ -0,0 +1,125 @@
+package es.unex.sextante.tables.tableBasicStats;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IRecordsetIterator;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.simpleStats.SimpleStats;
+
+public class TableBasicStatsAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String TABLE             = "TABLE";
+   public static final String FIELD             = "FIELD";
+   public static final String STATS             = "STATS";
+   public static final String MEAN              = "MEAN";
+   public static final String MEAN_SQUARED      = "MEAN_SQUARED";
+   public static final String MIN               = "MIN";
+   public static final String MAX               = "MAX";
+   public static final String VARIANCE          = "VARIANCE";
+   public static final String SUM               = "SUM";
+   public static final String COEF_OF_VARIATION = "COEF_OF_VARIATION";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iField;
+      long iCount;
+      double dValue;
+      ITable table;
+      final SimpleStats stats = new SimpleStats();
+
+      table = m_Parameters.getParameterValueAsTable(TABLE);
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      i = 0;
+      iCount = table.getRecordCount();
+      final IRecordsetIterator iter = table.iterator();
+      while (iter.hasNext() && setProgress(i, (int) iCount)) {
+         final IRecord record = iter.next();
+         try {
+            dValue = Double.parseDouble(record.getValue(iField).toString());
+            stats.addValue(dValue);
+         }
+         catch (final NumberFormatException e) {}
+         i++;
+      }
+      iter.close();
+
+      if (m_Task.isCanceled()) {
+         return false;
+      }
+      else {
+         final DecimalFormat df = new DecimalFormat("##.###");
+         final HTMLDoc doc = new HTMLDoc();
+         doc.open(Sextante.getText("Statistics"));
+         doc.addHeader(Sextante.getText("Basic_statistics"), 2);
+         doc.startUnorderedList();
+         doc.addListElement(Sextante.getText("Mean_value") + ": " + df.format(stats.getMean()));
+         doc.addListElement(Sextante.getText("Mean_squared_value") + ": " + df.format(stats.getRMS()));
+         doc.addListElement(Sextante.getText("Min_value") + ": " + df.format(stats.getMin()));
+         doc.addListElement(Sextante.getText("Max_value") + ": " + df.format(stats.getMax()));
+         doc.addListElement(Sextante.getText("Variance") + ": " + df.format(stats.getVariance()));
+         doc.addListElement(Sextante.getText("Total_sum") + ": " + df.format(stats.getSum()));
+         doc.addListElement(Sextante.getText("Coefficient_of_variation") + ": " + df.format(stats.getCoeffOfVar()));
+         doc.closeUnorderedList();
+         doc.close();
+
+         addOutputText("STATS", Sextante.getText("Statistics") + "[" + table.getName() + "]", doc.getHTMLCode());
+
+         addOutputNumericalValue(MEAN, Sextante.getText("Mean_value"));
+         addOutputNumericalValue(MEAN_SQUARED, Sextante.getText("Mean_squared_value"));
+         addOutputNumericalValue(MIN, Sextante.getText("Minimum_value"));
+         addOutputNumericalValue(MAX, Sextante.getText("Maximum_value"));
+         addOutputNumericalValue(VARIANCE, Sextante.getText("Variance"));
+         addOutputNumericalValue(SUM, Sextante.getText("Total_sum"));
+         addOutputNumericalValue(COEF_OF_VARIATION, Sextante.getText("Coefficient_of_variation"));
+
+         return true;
+      }
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Basic_statistics"));
+      setGroup(Sextante.getText("Table_tools"));
+
+      try {
+         m_Parameters.addInputTable(TABLE, Sextante.getText("Table"), true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), TABLE);
+         addOutputText(STATS, Sextante.getText("Statistics"));
+         addOutputNumericalValue(MEAN, Sextante.getText("Mean_value"));
+         addOutputNumericalValue(MEAN_SQUARED, Sextante.getText("Mean_squared_value"));
+         addOutputNumericalValue(MIN, Sextante.getText("Minimum_value"));
+         addOutputNumericalValue(MAX, Sextante.getText("Maximum_value"));
+         addOutputNumericalValue(VARIANCE, Sextante.getText("Variance"));
+         addOutputNumericalValue(SUM, Sextante.getText("Total_sum"));
+         addOutputNumericalValue(COEF_OF_VARIATION, Sextante.getText("Coefficient_of_variation"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/tableBasicStats/TableBasicStatsAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCorrelation/VectorFieldCorrelationAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCorrelation/VectorFieldCorrelationAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCorrelation/VectorFieldCorrelationAlgorithm.java	(revision 369)
@@ -0,0 +1,112 @@
+package es.unex.sextante.tables.vectorFieldCorrelation;
+
+import java.text.DecimalFormat;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.additionalResults.CorrelationGraphCreator;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.docEngines.html.HTMLDoc;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.math.regression.Regression;
+
+public class VectorFieldCorrelationAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String FIELD2          = "FIELD2";
+   public static final String FIELD           = "FIELD";
+   public static final String LAYER           = "LAYER";
+   public static final String METHOD          = "METHOD";
+   public static final String REGRESSION      = "REGRESSION";
+   public static final String REGRESSION_DATA = "REGRESSION_DATA";
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i;
+      int iCount;
+      int iField, iField2;
+      double dValue, dValue2;
+      IVectorLayer layer;
+      final Regression regression = new Regression();
+
+      final int iType = m_Parameters.getParameterValueAsInt(METHOD);
+      layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      iField = m_Parameters.getParameterValueAsInt(FIELD);
+      iField2 = m_Parameters.getParameterValueAsInt(FIELD2);
+
+      i = 0;
+      iCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(i, iCount)) {
+         final IFeature feature = iter.next();
+         try {
+            dValue = Double.parseDouble(feature.getRecord().getValue(iField).toString());
+            dValue2 = Double.parseDouble(feature.getRecord().getValue(iField2).toString());
+            regression.addValue(dValue, dValue2);
+         }
+         catch (final Exception e) {}
+         i++;
+      }
+      iter.close();
+
+      regression.calculate(iType);
+      final CorrelationGraphCreator panel = new CorrelationGraphCreator(regression);
+
+      addOutputChart(REGRESSION, Sextante.getText("Regression"), panel.getChartPanel());
+
+      final DecimalFormat df = new DecimalFormat("####.###");
+      final HTMLDoc doc = new HTMLDoc();
+      doc.open(Sextante.getText("Regression"));
+      doc.addHeader(Sextante.getText("Regression"), 2);
+      doc.startUnorderedList();
+      doc.addListElement(regression.getExpression());
+      doc.addListElement("R� = " + df.format(regression.getR2()));
+      doc.closeUnorderedList();
+      doc.close();
+
+      addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"), doc.getHTMLCode());
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      final String sMethod[] = { Sextante.getText("Best_fit"), "y = a + b * x", "y = a + b / x", "y = a / (b - x)",
+               "y = a * x^b", "y = a e^(b * x)", "y = a + b * ln(x)" };
+
+      setName(Sextante.getText("Correlation_between_fields"));
+      setGroup(Sextante.getText("Tools_for_vector_layers"));
+      setUserCanDefineAnalysisExtent(false);
+      try {
+         m_Parameters.addInputVectorLayer("LAYER", Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LAYER);
+         m_Parameters.addTableField(FIELD2, Sextante.getText("Field") + "2", LAYER);
+         m_Parameters.addSelection(METHOD, Sextante.getText("Equation"), sMethod);
+         addOutputChart(REGRESSION, Sextante.getText("Regression"));
+         addOutputText(REGRESSION_DATA, Sextante.getText("Regression_values"));
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+      catch (final OptionalParentParameterException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/tables/vectorFieldCorrelation/VectorFieldCorrelationAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractEndpointsOfLines/ExtractEndpointsOfLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractEndpointsOfLines/ExtractEndpointsOfLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractEndpointsOfLines/ExtractEndpointsOfLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,104 @@
+
+
+package es.unex.sextante.topology.extractEndpointsOfLines;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class ExtractEndpointsOfLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Extract_endpoints_of_lines"));
+      setGroup(Sextante.getText("Topology"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_POINT);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(ExtractEndpointsOfLinesAlgorithm.LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] in_ftypes = layerIn.getFieldTypes();
+      final Class[] out_ftypes = new Class[in_ftypes.length + 2];
+      System.arraycopy(in_ftypes, 0, out_ftypes, 0, in_ftypes.length);
+      out_ftypes[out_ftypes.length - 2] = Integer.class;
+      out_ftypes[out_ftypes.length - 1] = Integer.class;
+
+      final String[] in_fnames = layerIn.getFieldNames();
+      final String[] out_fnames = new String[in_ftypes.length + 2];
+      System.arraycopy(in_fnames, 0, out_fnames, 0, in_fnames.length);
+      out_fnames[out_fnames.length - 2] = "LINEFID";
+      out_fnames[out_fnames.length - 1] = "ISSTART";
+
+      final IVectorLayer driver = getNewVectorLayer(ExtractEndpointsOfLinesAlgorithm.RESULT, Sextante.getText("Endpoints"),
+               OutputVectorLayer.SHAPE_TYPE_POINT, out_ftypes, out_fnames);
+
+      final IFeatureIterator iter = layerIn.iterator();
+      final int iTotal = layerIn.getShapesCount();
+      final Object[] values = new Object[out_fnames.length];
+      int count = 0;
+      final GeometryFactory gf = new GeometryFactory();
+      while (iter.hasNext() && setProgress(i, iTotal)) {
+         final IFeature feature = iter.next();
+         final Coordinate[] coords = feature.getGeometry().getCoordinates();
+         final Object[] aux_values = feature.getRecord().getValues();
+         System.arraycopy(aux_values, 0, values, 0, aux_values.length);
+         values[values.length - 2] = count;
+         values[values.length - 1] = 0;
+         final Point startPoint = gf.createPoint(coords[0]);
+         driver.addFeature(startPoint, values);
+
+         count++;
+
+         System.arraycopy(aux_values, 0, values, 0, aux_values.length);
+         values[values.length - 2] = count;
+         values[values.length - 1] = 1;
+         final Point endPoint = gf.createPoint(coords[coords.length - 1]);
+         driver.addFeature(endPoint, values);
+         setProgress(i, iTotal);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractEndpointsOfLines/ExtractEndpointsOfLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/nodeLines/NodeLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/nodeLines/NodeLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/nodeLines/NodeLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,85 @@
+
+
+package es.unex.sextante.topology.nodeLines;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class NodeLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String RESULT = "RESULT";
+   public static final String LINES  = "LINES";
+
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Node_lines"));
+      setGroup(Sextante.getText("Topology"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Lines"), OutputVectorLayer.SHAPE_TYPE_LINE, LINES);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      m_Output = getNewVectorLayer(RESULT, Sextante.getText("Result"), IVectorLayer.SHAPE_TYPE_LINE, lines.getFieldTypes(),
+               lines.getFieldNames());
+
+      int i = 0;
+      final int iShapeCount = lines.getShapesCount();
+      IFeatureIterator iter = lines.iterator();
+      IFeature feature = iter.next();
+      Geometry geom = feature.getGeometry();
+      final Geometry merged = geom;
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         feature = iter.next();
+         geom = feature.getGeometry();
+         merged.union(geom);
+         i++;
+      }
+      iter.close();
+
+      i = 0;
+      iter = lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapeCount)) {
+         feature = iter.next();
+         m_Output.addFeature(merged.getGeometryN(i), feature.getRecord().getValues());
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/nodeLines/NodeLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java	(revision 369)
@@ -0,0 +1,244 @@
+
+
+package es.unex.sextante.topology.checkLineDirectionCoherence;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class CheckLineDirectionCoherenceAlgorithm
+         extends
+            GeoAlgorithm {
+
+    private static final Logger LOG =
+        LoggerFactory.getLogger(CheckLineDirectionCoherenceAlgorithm.class);
+
+   public static final String  RESULT    = "RESULT";
+   public static final String  LINES     = "LINES";
+   public static final String  FIELD     = "FIELD";
+   private static final String TOLERANCE = "TOLERANCE";
+
+   private IVectorLayer        m_Lines;
+   private IVectorLayer        m_Output;
+
+   private double              m_dTolerance;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("CheckLineDirectionCoherence"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LINES);
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+      } catch (final RepeatedParameterNameException e) {
+          LOG.error("Repeated parameter name", e);
+          return;
+      } catch (UndefinedParentParameterNameException e) {
+          LOG.error("Undefined parameter name", e);
+          return;
+      } catch (OptionalParentParameterException e) {
+          LOG.error("Optional parent parameter", e);
+          return;
+      }
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+      int iShapesCount;
+      final HashMap map = new HashMap();
+      final HashMap<String, ArrayList<IFeature>> classes = new HashMap<String, ArrayList<IFeature>>();
+
+      m_Lines = m_Parameters.getParameterValueAsVectorLayer(LINES);
+      if (!m_bIsAutoExtent) {
+         m_Lines.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+      m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+
+      m_Output = getNewVectorLayer(RESULT, m_Lines.getName(), m_Lines.getShapeType(), m_Lines.getFieldTypes(),
+               m_Lines.getFieldNames());
+
+      //this is a naive approach. Might not work with very large layers...
+      iShapesCount = m_Lines.getShapesCount();
+      final IFeatureIterator iter = m_Lines.iterator();
+      while (iter.hasNext() && setProgress(i, iShapesCount)) {
+         final IFeature feature = iter.next();
+         final String sClass = feature.getRecord().getValue(iField).toString();
+         ArrayList<IFeature> features = classes.get(sClass);
+         if (features == null) {
+            features = new ArrayList<IFeature>();
+            classes.put(sClass, features);
+         }
+         features.add(feature);
+         i++;
+      }
+      iter.close();
+
+      final Set set = classes.keySet();
+      final Iterator keys = set.iterator();
+      i = 0;
+      while (keys.hasNext() && setProgress(i, classes.size())) {
+         final Object sClass = keys.next();
+         final ArrayList<IFeature> lines = classes.get(sClass);
+         processLines(lines);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private void processLines(final ArrayList<IFeature> lines) {
+
+      final BitSet bitset = new BitSet(lines.size());
+      while (bitset.cardinality() != bitset.length() || bitset.isEmpty()) {
+         final IFeature line = getExtremeLine(lines, bitset);
+         m_Output.addFeature(line);
+         followLine(line, lines, bitset);
+      }
+      for (int i = 0; i < lines.size(); i++) {
+          if(!bitset.get(i)){
+              IFeature line = lines.get(i);
+              m_Output.addFeature(line);
+          }
+      }
+   }
+
+
+   private void followLine(final IFeature feature,
+                           final ArrayList<IFeature> lines,
+                           final BitSet bitset) {
+
+
+      final Geometry line = feature.getGeometry();
+      for (int i = 0; i < lines.size(); i++) {
+         if (!bitset.get(i)) {
+            final Coordinate[] coords = line.getCoordinates();
+            for (int j = 0; j < lines.size(); j++) {
+                IFeature feature2 = lines.get(j);
+                final Geometry line2 = feature2.getGeometry();
+               final Coordinate[] coords2 = line2.getCoordinates();
+               if (!bitset.get(j) && !line.equals(line2) && coords2[0].distance(coords[coords.length - 1]) < m_dTolerance) {
+                  m_Output.addFeature(feature2);
+                  bitset.set(j);
+                  followLine(feature2, lines, bitset);
+               }
+            }
+         }
+      }
+      for (int i = 0; i < lines.size(); i++) {
+         if (!bitset.get(i)) {
+            final Coordinate[] coords = line.getCoordinates();
+            for (int j = 0; j < lines.size(); j++) {
+                IFeature feature2 = lines.get(j);
+                final Geometry line2 = feature2.getGeometry();
+               final Coordinate[] coords2 = line2.getCoordinates();
+               if (!bitset.get(j) && !line.equals(line2) && coords2[coords2.length - 1].distance(coords[coords.length - 1]) < m_dTolerance) {
+                  final Geometry inverted = invertDirection(feature.getGeometry());
+                  m_Output.addFeature(inverted, feature2.getRecord().getValues());
+                  bitset.set(j);
+                  followLine(lines.get(j), lines, bitset);
+               }
+            }
+         }
+      }
+
+
+   }
+
+
+   private Geometry invertDirection(final Geometry geometry) {
+
+      final Coordinate[] coords = geometry.getCoordinates();
+      final Coordinate[] newCoords = new Coordinate[coords.length];
+      for (int i = 0; i < coords.length; i++) {
+         newCoords[i] = coords[coords.length - i - 1];
+      }
+      final GeometryFactory gf = new GeometryFactory();
+      return gf.createLineString(newCoords);
+
+   }
+
+
+   private IFeature getExtremeLine(final ArrayList<IFeature> lines,
+ final BitSet bitset) {
+
+        for (int i = 0; i < lines.size(); i++) {
+            if (!bitset.get(i)) {
+                final Geometry line = lines.get(i).getGeometry();
+                final Coordinate[] coords = line.getCoordinates();
+                boolean bHasContiguousLineOnStart = false;
+                for (int j = 0; j < lines.size(); j++) {
+                    final Geometry line2 = lines.get(j).getGeometry();
+
+                    final Coordinate[] coords2 = line2.getCoordinates();
+                    if (i!=j && ((coords2[0].distance(coords[0]) < m_dTolerance)
+                        || (coords2[coords2.length - 1].distance(coords[0]) < m_dTolerance))) {
+                        bHasContiguousLineOnStart = true;
+                        break;
+                    }
+                }
+                boolean bHasContiguousLineOnEnd = false;
+                for (int j = 0; j < lines.size(); j++) {
+                    final Geometry line2 = lines.get(j).getGeometry();
+                    final Coordinate[] coords2 = line2.getCoordinates();
+                    if (i!=j && ((coords2[0].distance(coords[coords.length - 1]) < m_dTolerance)
+                        || (coords2[coords2.length - 1].distance(coords[coords.length - 1]) < m_dTolerance))) {
+                        bHasContiguousLineOnEnd = true;
+                        break;
+                    }
+                }
+                if (bHasContiguousLineOnEnd != bHasContiguousLineOnStart) {
+                    bitset.set(i);
+                    return lines.get(i);
+                }
+            }
+        }
+
+        for (int i = 0; i < lines.size(); i++) {
+            if (!bitset.get(i)) {
+                bitset.set(i);
+                return lines.get(i);
+            }
+        }
+
+        return null;
+
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/ExtractNodesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/ExtractNodesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/ExtractNodesAlgorithm.java	(revision 369)
@@ -0,0 +1,134 @@
+
+
+package es.unex.sextante.topology.extractNodes;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class ExtractNodesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Extract_Nodes"));
+      setGroup(Sextante.getText("Topology"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Capa de entrada"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+                  true);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Nodes"), OutputVectorLayer.SHAPE_TYPE_POINT);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      int i = 0;
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(ExtractNodesAlgorithm.LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final Class[] out_ftypes = new Class[1];
+      out_ftypes[0] = Integer.class;
+
+      final String[] out_fnames = new String[1];
+      out_fnames[0] = "DEGREE";
+
+      final IVectorLayer driver = getNewVectorLayer(ExtractNodesAlgorithm.RESULT, Sextante.getText("Nodes"),
+               OutputVectorLayer.SHAPE_TYPE_POINT, out_ftypes, out_fnames);
+
+
+      final HashMap nodesHashMap = new HashMap();
+      final GeometryFactory gf = new GeometryFactory();
+
+      // STEP 01 - Get Nodes
+      int count = 0;
+      int idx = 0;
+      final int iTotal = layerIn.getShapesCount();
+      final IFeatureIterator iter = layerIn.iterator();
+
+      idx = 0;
+      while (iter.hasNext() && setProgress(count, iTotal)) {
+         final IFeature feature = iter.next();
+         final Coordinate[] coords = feature.getGeometry().getCoordinates();
+
+         Point point = gf.createPoint(coords[0]);
+         processNode(nodesHashMap, point, count, feature, idx);
+         count++;
+         point = gf.createPoint(coords[coords.length - 1]);
+         processNode(nodesHashMap, point, count, feature, idx);
+
+         setProgress(count, iTotal);
+         idx++;
+      }
+      iter.close();
+
+      final Iterator nodesIter = nodesHashMap.values().iterator();
+      while (nodesIter.hasNext() && setProgress(i, iTotal)) {
+         final Node n = (Node) nodesIter.next();
+         final Geometry g = n.getGeometry();
+         final Object[] values = { n.getDegree() };
+         driver.addFeature(g, values);
+         setProgress(i, iTotal);
+         i++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   public void processNode(final HashMap endpoints,
+                           final Geometry point,
+                           final int count,
+                           final IFeature feat,
+                           final int featIdx) {
+
+      if (!endpoints.containsKey(point.toText())) {
+         final Node node = new Node(count, point, feat);
+         node.addConnectedLine(feat, featIdx);
+         endpoints.put(point.toText(), node);
+
+      }
+      else {
+         //TODO What about SELF-LINE-NODES?
+         final Node ep = (Node) endpoints.get(point.toText());
+         ep.incrementDegree();
+         ep.addConnectedLine(feat, featIdx);
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/ExtractNodesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/Node.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/Node.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/Node.java	(revision 369)
@@ -0,0 +1,92 @@
+package es.unex.sextante.topology.extractNodes;
+
+import java.util.ArrayList;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.dataObjects.IFeature;
+
+public class Node {
+
+   private int             ID = 0;
+   private final Geometry  geom;
+   IFeature                lineFeature;
+   private int             degree;
+   //FIDs connectedLines
+   private final ArrayList lines;
+   private final ArrayList linesIdx;
+   //IDs near endpoints
+   private final ArrayList closeNodes;
+
+
+   public Node(final int iD,
+               final Geometry geom,
+               final IFeature lineFeature) {
+      ID = iD;
+      this.geom = geom;
+      this.degree = 1;
+      this.lineFeature = lineFeature;
+      lines = new ArrayList();
+      linesIdx = new ArrayList();
+      closeNodes = new ArrayList();
+   }
+
+
+   public void incrementDegree() {
+      degree++;
+   }
+
+
+   public int getDegree() {
+      return degree;
+   }
+
+
+   public Geometry getGeometry() {
+      return geom;
+   }
+
+
+   public void addConnectedLine(final IFeature feat,
+                                final int idx) {
+      if (!lines.contains(feat)) {
+         lines.add(feat);
+      }
+      if (!linesIdx.contains(idx)) {
+         linesIdx.add(idx);
+      }
+   }
+
+
+   public void processIfClose(final Node n,
+                              final double tolerance) {
+
+      if (closeNodes.contains(n) || n.getGeometry().equals(getGeometry())) {
+         //System.out.println(n + " " + this + "   equals?" + (n.getGeometry().equals(getGeometry())));
+         return;
+      }
+      final Geometry g = n.getGeometry();
+      final double dist = geom.distance(g);
+      if (dist < tolerance) {
+         System.out.println("Added a node a " + dist);
+         closeNodes.add(n);
+      }
+
+   }
+
+
+   public ArrayList getCloseNodes() {
+      return closeNodes;
+   }
+
+
+   public ArrayList getConnectedLines() {
+      return lines;
+   }
+
+
+   public ArrayList getConnectedLinesIdx() {
+      return linesIdx;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/extractNodes/Node.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/joinAdjacentLines/JoinAdjacentLinesAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/joinAdjacentLines/JoinAdjacentLinesAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/joinAdjacentLines/JoinAdjacentLinesAlgorithm.java	(revision 369)
@@ -0,0 +1,330 @@
+
+
+package es.unex.sextante.topology.joinAdjacentLines;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.index.strtree.STRtree;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.FeatureImpl;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class JoinAdjacentLinesAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER     = "LAYER";
+   public static final String TOLERANCE = "TOLERANCE";
+   public static final String RESULT    = "RESULT";
+   private double             m_dTolerance;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Join_near_lines"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setIsDeterminatedProcess(false);
+      setUserCanDefineAnalysisExtent(true);
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Input_Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+
+         m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 5.0, 0.0001, Double.MAX_VALUE);
+
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE);
+
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+      m_dTolerance = m_Parameters.getParameterValueAsDouble(TOLERANCE);
+
+      int idx = 0;
+      final int iTotal = layerIn.getShapesCount();
+      final IFeatureIterator iter = layerIn.iterator();
+      IFeature[] newFeatures = new IFeature[iTotal];
+      while (iter.hasNext()) {
+         newFeatures[idx] = iter.next();
+         idx++;
+      }
+
+      IFeature[] features;
+      int i = 1;
+      setProgressText(Sextante.getText("Iteration") + " 1");
+      do {
+         features = newFeatures;
+         newFeatures = joinLines(features);
+         i++;
+         setProgressText(Sextante.getText("Iteration") + " " + Integer.toString(i) + "("
+                         + Integer.toString(features.length - newFeatures.length) + " " + Sextante.getText("lines_joined"));
+      }
+      while ((newFeatures.length != features.length) && !m_Task.isCanceled());
+
+      final IVectorLayer out = getNewVectorLayer(RESULT, layerIn.getName(), OutputVectorLayer.SHAPE_TYPE_LINE,
+               layerIn.getFieldTypes(), layerIn.getFieldNames());
+      for (final IFeature element : features) {
+         out.addFeature(element);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+
+   private IFeature[] joinLines(final IFeature[] features) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final ArrayList<IFeature> newFeatures = new ArrayList<IFeature>();
+      final STRtree tree = new STRtree();
+      final BitSet bitset = new BitSet(features.length);
+
+      for (int i = 0; i < features.length; i++) {
+         final Envelope envelope = features[i].getGeometry().getEnvelopeInternal();
+         tree.insert(envelope, new Integer(i));
+      }
+
+      Coordinate[] coords2;
+      for (int i = 0; i < features.length; i++) {
+         if (!bitset.get(i)) {
+            final Geometry geom = features[i].getGeometry();
+            final Coordinate[] coords = geom.getCoordinates();
+            final Envelope envelope = features[i].getGeometry().getEnvelopeInternal();
+            envelope.expandBy(m_dTolerance);
+            final List geoms = tree.query(envelope);
+            boolean bFound = false;
+            bitset.set(i);
+            for (int j = 0; j < geoms.size(); j++) {
+               final int idx = ((Integer) geoms.get(j)).intValue();
+               if ((i != idx) && !bitset.get(idx)) {
+                  final Geometry geom2 = features[idx].getGeometry();
+                  coords2 = geom2.getCoordinates();
+                  if (coords2[0].distance(coords[coords.length - 1]) < m_dTolerance) {
+                     Coordinate[] newCoords = new Coordinate[coords.length + coords2.length];
+                     System.arraycopy(coords, 0, newCoords, 0, coords.length);
+                     System.arraycopy(coords2, 0, newCoords, coords.length, coords2.length);
+                     final FeatureImpl newFeature = new FeatureImpl(gf.createLineString(newCoords),
+                              features[i].getRecord().getValues());
+                     newFeatures.add(newFeature);
+                     newCoords = null;
+                     bFound = true;
+                     bitset.set(idx);
+                     break;
+                  }
+                  else if (coords2[coords2.length - 1].distance(coords[0]) < m_dTolerance) {
+                     Coordinate[] newCoords = new Coordinate[coords.length + coords2.length];
+                     System.arraycopy(coords2, 0, newCoords, 0, coords2.length);
+                     System.arraycopy(coords, 0, newCoords, coords2.length, coords.length);
+                     final FeatureImpl newFeature = new FeatureImpl(gf.createLineString(newCoords),
+                              features[i].getRecord().getValues());
+                     newFeatures.add(newFeature);
+                     newCoords = null;
+                     bFound = true;
+                     bitset.set(idx);
+                     break;
+                  }
+                  else if (coords2[0].distance(coords[0]) < m_dTolerance) {
+                     Coordinate[] newCoords = new Coordinate[coords.length + coords2.length];
+                     for (int k = 0; k < coords.length; k++) {
+                        newCoords[k] = coords[coords.length - 1 - k];
+                     }
+                     System.arraycopy(coords2, 0, newCoords, coords.length, coords2.length);
+                     final FeatureImpl newFeature = new FeatureImpl(gf.createLineString(newCoords),
+                              features[i].getRecord().getValues());
+                     newFeatures.add(newFeature);
+                     newCoords = null;
+                     bFound = true;
+                     bitset.set(idx);
+                     break;
+                  }
+                  else if (coords2[coords2.length - 1].distance(coords[coords.length - 1]) < m_dTolerance) {
+                     Coordinate[] newCoords = new Coordinate[coords.length + coords2.length];
+                     System.arraycopy(coords, 0, newCoords, 0, coords.length);
+                     for (int k = 0; k < coords2.length; k++) {
+                        newCoords[k + coords.length] = coords2[coords2.length - 1 - k];
+                     }
+
+                     final FeatureImpl newFeature = new FeatureImpl(gf.createLineString(newCoords),
+                              features[i].getRecord().getValues());
+                     newFeatures.add(newFeature);
+                     newCoords = null;
+                     bFound = true;
+                     bitset.set(idx);
+                     break;
+                  }
+               }
+            }
+            if (!bFound) {
+               newFeatures.add(features[i]);
+               System.out.println(i + " " + coords.length);
+            }
+         }
+      }
+
+      System.gc();
+
+      return newFeatures.toArray(new IFeature[0]);
+
+   }
+
+   /**
+    * Create nodes, increment its degree and add connectedline.
+    * 
+    * @param endpoints
+    * @param point
+    * @param count
+    * @param feat
+    */
+   //	public void processEndpoint(HashMap endpoints, Geometry point, int count, IFeature feat, int featIdx){
+   //
+   //		if (!endpoints.containsKey(point.toText())) {
+   //			Node node = new Node(count, point, feat);
+   //			node.addConnectedLine(feat, featIdx);
+   //			endpoints.put(point.toText(), node);
+   //
+   //		} else {
+   //			//TODO What about SELF-LINE-NODES?
+   //			Node ep = (Node)endpoints.get(point.toText());
+   //			ep.incrementDegree();
+   //			ep.addConnectedLine(feat, featIdx);
+   //		}
+   //
+   //	}
+   //
+   //	private Geometry changeEndpointVertex(Geometry lineGeom, Geometry currentVertex,
+   //			Geometry newVertex) {
+   //
+   //		// Detect if add the new vertex as first or last point
+   //		Coordinate[] coords = lineGeom.getCoordinates();
+   //		if (coords[0].equals2D(currentVertex.getCoordinate())) {
+   //			coords[0] = newVertex.getCoordinate();
+   //		} else {
+   //			coords[coords.length-1] = newVertex.getCoordinate();
+   //		}
+   //		GeometryFactory gf = new GeometryFactory();
+   //		return gf.createLineString(coords);
+   //	}
+   //
+   //	public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+   //
+   //		HashMap nodesHashMap = new HashMap();
+   //		GeometryFactory gf = new GeometryFactory();
+   //
+   //		IVectorLayer layerIn = m_Parameters.getParameterValueAsVectorLayer(this.LAYER);
+   //		double tolerance = m_Parameters.getParameterValueAsDouble(this.TOLERANCE);
+   //
+   //		// STEP 01 - Get Nodes
+   //		int count = 0;
+   //		int idx = 0;
+   //		int iTotal = layerIn.getShapesCount();
+   //		IFeatureIterator iter = layerIn.iterator();
+   //		IFeature[] featArray = new IFeature[iTotal];
+   //		Geometry[] geomArray = new Geometry[iTotal];
+   //		while (iter.hasNext() && setProgress(idx, iTotal)){
+   //			IFeature feature = iter.next();
+   //			featArray[idx] = feature;
+   //			geomArray[idx] = feature.getGeometry();
+   //			idx++;
+   //		}
+   //
+   //		idx= 0;
+   //		nodesHashMap.clear();
+   //		while (idx < featArray.length && setProgress(count, iTotal)){
+   //			IFeature feature = featArray[idx];
+   //			Coordinate[] coords = geomArray[idx].getCoordinates();
+   //
+   //			Point point = gf.createPoint(coords[0]);
+   //			processEndpoint(nodesHashMap, point, count, feature, idx);
+   //			count++;
+   //			point = gf.createPoint(coords[coords.length-1]);
+   //			processEndpoint(nodesHashMap, point, count, feature, idx);
+   //
+   //			setProgress(idx, iTotal);
+   //			idx++;
+   //		}
+   //		iter.close();
+   //
+   //		//STEP 02 - Get close endpoints
+   //		Collection nodes = nodesHashMap.values();
+   //		int i = 0;
+   //		double dist;
+   //		for (Iterator it1 = nodes.iterator(); it1.hasNext(); i++){
+   //			Node node1 = (Node)it1.next();
+   //			int j = 0;
+   //			for (Iterator it2 = nodes.iterator(); it2.hasNext(); j++){
+   //				if (i == j){
+   //					continue;
+   //				}
+   //				Node node2 = (Node)it2.next();
+   //				node1.processIfClose(node2, tolerance);
+   //			}
+   //		}
+   //
+   //		//STEP 03 - For simple cases when degree 1 and just one closeNode
+   //		//          Get closest and modified
+   //		IVectorLayer driver2 = getNewVectorLayer(this.RESULT,
+   //				Sextante.getText("Result"),
+   //				OutputVectorLayer.SHAPE_TYPE_LINE,
+   //				layerIn.getFieldTypes(),
+   //				layerIn.getFieldNames());
+   //
+   //		ArrayList removedNodes = new ArrayList();
+   //		for (Iterator it1 = nodes.iterator(); it1.hasNext(); i++){
+   //			Node node1 = (Node)it1.next();
+   //			if (removedNodes.contains(node1)){
+   //				continue;
+   //			}
+   //			//TODO It must works with any closeNodes number. Find the one with more grade and the closest one
+   //			if (node1.getDegree() == 1 && node1.getCloseNodes().size() == 1){
+   //				//IFeature line = (IFeature)node1.getConnectedLines().toArray()[0];
+   //				int lineIdx = (Integer) node1.getConnectedLinesIdx().toArray()[0];
+   //				Geometry lineGeom = geomArray[lineIdx];
+   //				//IRecord record = line.getRecord();
+   //				Node closeNode = (Node)node1.getCloseNodes().toArray()[0];
+   //				Geometry currentEndpointGeom = node1.getGeometry();
+   //				Geometry newEndpointGeom = closeNode.getGeometry();
+   //				Geometry newLineGeom = changeEndpointVertex(lineGeom, currentEndpointGeom, newEndpointGeom);
+   //				geomArray[lineIdx] = newLineGeom;
+   //				removedNodes.add(closeNode);
+   //			}
+   //		}
+   //
+   //		iter = layerIn.iterator();
+   //		for (idx = 0; iter.hasNext(); idx++){
+   //			IFeature feat = iter.next();
+   //			driver2.addFeature(geomArray[idx], feat.getRecord().getValues());
+   //		}
+   //		iter.close();
+   //
+   //		return !m_Task.isCanceled();
+   //	}
+   //
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/joinAdjacentLines/JoinAdjacentLinesAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/shortestPath/ShortestPathAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/shortestPath/ShortestPathAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/shortestPath/ShortestPathAlgorithm.java	(revision 369)
@@ -0,0 +1,5 @@
+package es.unex.sextante.topology.shortestPath;
+
+public class ShortestPathAlgorithm {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/topology/shortestPath/ShortestPathAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/gvsig/toolbox/algorithm/ToolboxAlgorithmLibrary.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/gvsig/toolbox/algorithm/ToolboxAlgorithmLibrary.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/gvsig/toolbox/algorithm/ToolboxAlgorithmLibrary.java	(revision 369)
@@ -0,0 +1,36 @@
+package org.gvsig.toolbox.algorithm;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.Library;
+import org.gvsig.tools.library.LibraryException;
+
+public class ToolboxAlgorithmLibrary extends AbstractLibrary {
+
+	public ToolboxAlgorithmLibrary() {
+		super();
+	}
+
+	@Override
+	public void doRegistration() {
+		this.registerAs(ToolboxAlgorithmLibrary.class, Library.TYPE.IMPL);
+	}
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+		if (!Messages.hasLocales()) {
+			Messages.addLocale(Locale.getDefault());
+		}
+
+		Messages.addResourceFamily("org.gvsig.toolbox.algorithm.i18n.text",
+				ToolboxAlgorithmLibrary.class.getClassLoader(),
+				ToolboxAlgorithmLibrary.class.getClass().getName()); 
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/gvsig/toolbox/algorithm/ToolboxAlgorithmLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTP.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTP.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTP.java	(revision 369)
@@ -0,0 +1,191 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert an HTTP header to a JSONObject and back.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class HTTP {
+
+   /** Carriage return/line feed. */
+   public static final String CRLF = "\r\n";
+
+
+   /**
+    * Convert an HTTP header string into a JSONObject. It can be a request header or a response header. A request header will
+    * contain
+    *
+    * <pre>
+    * {
+    *    Method: &quot;POST&quot; (for example),
+    *    &quot;Request-URI&quot;: &quot;/&quot; (for example),
+    *    &quot;HTTP-Version&quot;: &quot;HTTP/1.1&quot; (for example)
+    * }
+    * </pre>
+    *
+    * A response header will contain
+    *
+    * <pre>
+    * {
+    *    &quot;HTTP-Version&quot;: &quot;HTTP/1.1&quot; (for example),
+    *    &quot;Status-Code&quot;: &quot;200&quot; (for example),
+    *    &quot;Reason-Phrase&quot;: &quot;OK&quot; (for example)
+    * }
+    * </pre>
+    *
+    * In addition, the other parameters in the header will be captured, using the HTTP field names as JSON names, so that
+    *
+    * <pre>
+    *    Date: Sun, 26 May 2002 18:06:04 GMT
+    *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&amp;b=2&amp;f=s
+    *    Cache-Control: no-cache
+    * </pre>
+    *
+    * become
+    *
+    * <pre>
+    * {...
+    *    Date: &quot;Sun, 26 May 2002 18:06:04 GMT&quot;,
+    *    Cookie: &quot;Q=q2=PPEAsg--; B=677gi6ouf29bn&amp;b=2&amp;f=s&quot;,
+    *    &quot;Cache-Control&quot;: &quot;no-cache&quot;,
+    * ...}
+    * </pre>
+    *
+    * It does no further checking or conversion. It does not parse dates. It does not do '%' transforms on URLs.
+    *
+    * @param string
+    *                An HTTP header string.
+    * @return A JSONObject containing the elements and attributes of the XML string.
+    * @throws JSONException
+    */
+   public static JSONObject toJSONObject(final String string) throws JSONException {
+      final JSONObject o = new JSONObject();
+      final HTTPTokener x = new HTTPTokener(string);
+      String t;
+
+      t = x.nextToken();
+      if (t.toUpperCase().startsWith("HTTP")) {
+
+         // Response
+
+         o.put("HTTP-Version", t);
+         o.put("Status-Code", x.nextToken());
+         o.put("Reason-Phrase", x.nextTo('\0'));
+         x.next();
+
+      }
+      else {
+
+         // Request
+
+         o.put("Method", t);
+         o.put("Request-URI", x.nextToken());
+         o.put("HTTP-Version", x.nextToken());
+      }
+
+      // Fields
+
+      while (x.more()) {
+         final String name = x.nextTo(':');
+         x.next(':');
+         o.put(name, x.nextTo('\0'));
+         x.next();
+      }
+      return o;
+   }
+
+
+   /**
+    * Convert a JSONObject into an HTTP header. A request header must contain
+    *
+    * <pre>
+    * {
+    *    Method: &quot;POST&quot; (for example),
+    *    &quot;Request-URI&quot;: &quot;/&quot; (for example),
+    *    &quot;HTTP-Version&quot;: &quot;HTTP/1.1&quot; (for example)
+    * }
+    * </pre>
+    *
+    * A response header must contain
+    *
+    * <pre>
+    * {
+    *    &quot;HTTP-Version&quot;: &quot;HTTP/1.1&quot; (for example),
+    *    &quot;Status-Code&quot;: &quot;200&quot; (for example),
+    *    &quot;Reason-Phrase&quot;: &quot;OK&quot; (for example)
+    * }
+    * </pre>
+    *
+    * Any other members of the JSONObject will be output as HTTP fields. The result will end with two CRLF pairs.
+    *
+    * @param o
+    *                A JSONObject
+    * @return An HTTP header string.
+    * @throws JSONException
+    *                 if the object does not contain enough information.
+    */
+   public static String toString(final JSONObject o) throws JSONException {
+      final Iterator keys = o.keys();
+      String s;
+      final StringBuffer sb = new StringBuffer();
+      if (o.has("Status-Code") && o.has("Reason-Phrase")) {
+         sb.append(o.getString("HTTP-Version"));
+         sb.append(' ');
+         sb.append(o.getString("Status-Code"));
+         sb.append(' ');
+         sb.append(o.getString("Reason-Phrase"));
+      }
+      else if (o.has("Method") && o.has("Request-URI")) {
+         sb.append(o.getString("Method"));
+         sb.append(' ');
+         sb.append('"');
+         sb.append(o.getString("Request-URI"));
+         sb.append('"');
+         sb.append(' ');
+         sb.append(o.getString("HTTP-Version"));
+      }
+      else {
+         throw new JSONException("Not enough material for an HTTP header.");
+      }
+      sb.append(CRLF);
+      while (keys.hasNext()) {
+         s = keys.next().toString();
+         if (!s.equals("HTTP-Version") && !s.equals("Status-Code") && !s.equals("Reason-Phrase") && !s.equals("Method")
+             && !s.equals("Request-URI") && !o.isNull(s)) {
+            sb.append(s);
+            sb.append(": ");
+            sb.append(o.getString(s));
+            sb.append(CRLF);
+         }
+      }
+      sb.append(CRLF);
+      return sb.toString();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTP.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Test.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Test.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Test.java	(revision 369)
@@ -0,0 +1,434 @@
+package org.json;
+
+import java.io.StringWriter;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Test class. This file is not formally a member of the org.json library. It is just a casual test tool.
+ */
+public class Test {
+
+   /**
+    * Entry point.
+    *
+    * @param args
+    */
+   public static void main(final String args[]) {
+      Iterator it;
+      JSONArray a;
+      JSONObject j;
+      JSONStringer jj;
+      String s;
+
+      // Obj is a typical class that implements JSONString.
+
+      class Obj
+               implements
+                  JSONString {
+         public String  aString;
+         public double  aNumber;
+         public boolean aBoolean;
+
+
+         public Obj(final String string,
+                    final double n,
+                    final boolean b) {
+            this.aString = string;
+            this.aNumber = n;
+            this.aBoolean = b;
+         }
+
+
+         public String toJSONString() {
+            return "{" + JSONObject.quote(this.aString) + ":" + JSONObject.doubleToString(this.aNumber) + "}";
+         }
+
+
+         @Override
+         public String toString() {
+            return this.aString + " " + this.aNumber + " " + this.aBoolean;
+         }
+      }
+
+
+      try {
+         final String sa[] = { "aString", "aNumber", "aBoolean" };
+         final Obj obj = new Obj("A string, a number, and a boolean", 42, true);
+
+         j = XML.toJSONObject("<![CDATA[This is a collection of test patterns and examples for org.json.]]>  Ignore the stuff past the end.  ");
+         System.out.println(j.toString());
+
+         jj = new JSONStringer();
+         s = jj.object().key("foo").value("bar").key("baz").array().object().key("quux").value("Thanks, Josh!").endObject().endArray().endObject().toString();
+         System.out.println(s);
+
+         System.out.println(new JSONStringer().object().key("a").array().array().array().value("b").endArray().endArray().endArray().endObject().toString());
+
+         jj = new JSONStringer();
+         jj.array();
+         jj.value(1);
+         jj.array();
+         jj.value(null);
+         jj.array();
+         jj.object();
+         jj.key("empty-array").array().endArray();
+         jj.key("answer").value(42);
+         jj.key("null").value(null);
+         jj.key("false").value(false);
+         jj.key("true").value(true);
+         jj.key("big").value(123456789e+88);
+         jj.key("small").value(123456789e-88);
+         jj.key("empty-object").object().endObject();
+         jj.key("long");
+         jj.value(9223372036854775807L);
+         jj.endObject();
+         jj.value("two");
+         jj.endArray();
+         jj.value(true);
+         jj.endArray();
+         jj.value(98.6);
+         jj.value(-100.0);
+         jj.object();
+         jj.endObject();
+         jj.object();
+         jj.key("one");
+         jj.value(1.00);
+         jj.endObject();
+         jj.value(obj);
+         jj.endArray();
+         System.out.println(jj.toString());
+
+         System.out.println(new JSONArray(jj.toString()).toString(4));
+
+         j = new JSONObject(obj, sa);
+         j.put("test", obj);
+         j.put("comment", "This object contains a test object that implements JSONString");
+         System.out.println(j.toString(4));
+
+         j = new JSONObject(
+                  "{slashes: '///', closetag: '</script>', backslash:'\\\\', ei: {quotes: '\"\\''},eo: {a: '\"quoted\"', b:\"don't\"}, quotes: [\"'\", '\"']}");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = new JSONObject("/*comment*/{foo: [true, false,9876543210,    0.0, 1.00000001,  1.000000000001, 1.00000000000000001,"
+                            + " .00000000000000001, 2.00, 0.1, 2e100, -32,[],{}, \"string\"], " + "  to   : null, op : 'Good',"
+                            + "ten:10} postfix comment");
+         j.put("String", "98.6");
+         j.put("JSONObject", new JSONObject());
+         j.put("JSONArray", new JSONArray());
+         j.put("int", 57);
+         j.put("double", 123456789012345678901234567890.);
+         j.put("true", true);
+         j.put("false", false);
+         j.put("null", JSONObject.NULL);
+         j.put("bool", "true");
+         j.put("zero", -0.0);
+         j.put("\\u2028", "\u2028");
+         j.put("\\u2029", "\u2029");
+         a = j.getJSONArray("foo");
+         a.put(666);
+         a.put(2001.99);
+         a.put("so \"fine\".");
+         a.put("so <fine>.");
+         a.put(true);
+         a.put(false);
+         a.put(new JSONArray());
+         a.put(new JSONObject());
+         System.out.println(j.toString(4));
+         System.out.println(XML.toString(j));
+
+         System.out.println("String: " + j.getDouble("String"));
+         System.out.println("  bool: " + j.getBoolean("bool"));
+         System.out.println("    to: " + j.getString("to"));
+         System.out.println("  true: " + j.getString("true"));
+         System.out.println("   foo: " + j.getJSONArray("foo"));
+         System.out.println("    op: " + j.getString("op"));
+         System.out.println("   ten: " + j.getInt("ten"));
+         System.out.println("  oops: " + j.optBoolean("oops"));
+
+         j = XML.toJSONObject("<xml one = 1 two=' \"2\" '><five></five>First \u0009&lt;content&gt;<five></five> This is \"content\". <three>  3  </three>JSON does not preserve the sequencing of elements and contents.<three>  III  </three>  <three>  T H R E E</three><four/>Content text is an implied structure in XML. <six content=\"6\"/>JSON does not have implied structure:<seven>7</seven>everything is explicit.<![CDATA[CDATA blocks<are><supported>!]]></xml>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<mapping><empty/>   <class name = \"Customer\">      <field name = \"ID\" type = \"string\">         <bind-xml name=\"ID\" node=\"attribute\"/>      </field>      <field name = \"FirstName\" type = \"FirstName\"/>      <field name = \"MI\" type = \"MI\"/>      <field name = \"LastName\" type = \"LastName\"/>   </class>   <class name = \"FirstName\">      <field name = \"text\">         <bind-xml name = \"text\" node = \"text\"/>      </field>   </class>   <class name = \"MI\">      <field name = \"text\">         <bind-xml name = \"text\" node = \"text\"/>      </field>   </class>   <class name = \"LastName\">      <field name = \"text\">         <bind-xml name = \"text\" node = \"text\"/>      </field>   </class></mapping>");
+
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<?xml version=\"1.0\" ?><Book Author=\"Anonymous\"><Title>Sample Book</Title><Chapter id=\"1\">This is chapter 1. It is not very long or interesting.</Chapter><Chapter id=\"2\">This is chapter 2. Although it is longer than chapter 1, it is not any more interesting.</Chapter></Book>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<!DOCTYPE bCard 'http://www.cs.caltech.edu/~adam/schemas/bCard'><bCard><?xml default bCard        firstname = ''        lastname  = '' company   = '' email = '' homepage  = ''?><bCard        firstname = 'Rohit'        lastname  = 'Khare'        company   = 'MCI'        email     = 'khare@mci.net'        homepage  = 'http://pest.w3.org/'/><bCard        firstname = 'Adam'        lastname  = 'Rifkin'        company   = 'Caltech Infospheres Project'        email     = 'adam@cs.caltech.edu'        homepage  = 'http://www.cs.caltech.edu/~adam/'/></bCard>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<?xml version=\"1.0\"?><customer>    <firstName>        <text>Fred</text>    </firstName>    <ID>fbs0001</ID>    <lastName> <text>Scerbo</text>    </lastName>    <MI>        <text>B</text>    </MI></customer>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<!ENTITY tp-address PUBLIC '-//ABC University::Special Collections Library//TEXT (titlepage: name and address)//EN' 'tpspcoll.sgm'><list type='simple'><head>Repository Address </head><item>Special Collections Library</item><item>ABC University</item><item>Main Library, 40 Circle Drive</item><item>Ourtown, Pennsylvania</item><item>17654 USA</item></list>");
+         System.out.println(j.toString());
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<test intertag status=ok><empty/>deluxe<blip sweet=true>&amp;&quot;toot&quot;&toot;&#x41;</blip><x>eks</x><w>bonus</w><w>bonus2</w></test>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = HTTP.toJSONObject("GET / HTTP/1.0\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*\nAccept-Language: en-us\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T312461; Q312461)\nHost: www.nokko.com\nConnection: keep-alive\nAccept-encoding: gzip, deflate\n");
+         System.out.println(j.toString(2));
+         System.out.println(HTTP.toString(j));
+         System.out.println("");
+
+         j = HTTP.toJSONObject("HTTP/1.1 200 Oki Doki\nDate: Sun, 26 May 2002 17:38:52 GMT\nServer: Apache/1.3.23 (Unix) mod_perl/1.26\nKeep-Alive: timeout=15, max=100\nConnection: Keep-Alive\nTransfer-Encoding: chunked\nContent-Type: text/html\n");
+         System.out.println(j.toString(2));
+         System.out.println(HTTP.toString(j));
+         System.out.println("");
+
+         j = new JSONObject(
+                  "{nix: null, nux: false, null: 'null', 'Request-URI': '/', Method: 'GET', 'HTTP-Version': 'HTTP/1.0'}");
+         System.out.println(j.toString(2));
+         System.out.println("isNull: " + j.isNull("nix"));
+         System.out.println("   has: " + j.has("nix"));
+         System.out.println(XML.toString(j));
+         System.out.println(HTTP.toString(j));
+         System.out.println("");
+
+         j = XML.toJSONObject("<?xml version='1.0' encoding='UTF-8'?>" + "\n\n" + "<SOAP-ENV:Envelope"
+                              + " xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\""
+                              + " xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\""
+                              + " xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\">" + "<SOAP-ENV:Body><ns1:doGoogleSearch"
+                              + " xmlns:ns1=\"urn:GoogleSearch\""
+                              + " SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
+                              + "<key xsi:type=\"xsd:string\">GOOGLEKEY</key> <q"
+                              + " xsi:type=\"xsd:string\">'+search+'</q> <start" + " xsi:type=\"xsd:int\">0</start> <maxResults"
+                              + " xsi:type=\"xsd:int\">10</maxResults> <filter"
+                              + " xsi:type=\"xsd:boolean\">true</filter> <restrict"
+                              + " xsi:type=\"xsd:string\"></restrict> <safeSearch"
+                              + " xsi:type=\"xsd:boolean\">false</safeSearch> <lr" + " xsi:type=\"xsd:string\"></lr> <ie"
+                              + " xsi:type=\"xsd:string\">latin1</ie> <oe" + " xsi:type=\"xsd:string\">latin1</oe>"
+                              + "</ns1:doGoogleSearch>" + "</SOAP-ENV:Body></SOAP-ENV:Envelope>");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = new JSONObject(
+                  "{Envelope: {Body: {\"ns1:doGoogleSearch\": {oe: \"latin1\", filter: true, q: \"'+search+'\", key: \"GOOGLEKEY\", maxResults: 10, \"SOAP-ENV:encodingStyle\": \"http://schemas.xmlsoap.org/soap/encoding/\", start: 0, ie: \"latin1\", safeSearch:false, \"xmlns:ns1\": \"urn:GoogleSearch\"}}}}");
+         System.out.println(j.toString(2));
+         System.out.println(XML.toString(j));
+         System.out.println("");
+
+         j = CookieList.toJSONObject("  f%oo = b+l=ah  ; o;n%40e = t.wo ");
+         System.out.println(j.toString(2));
+         System.out.println(CookieList.toString(j));
+         System.out.println("");
+
+         j = Cookie.toJSONObject("f%oo=blah; secure ;expires = April 24, 2002");
+         System.out.println(j.toString(2));
+         System.out.println(Cookie.toString(j));
+         System.out.println("");
+
+         j = new JSONObject(
+                  "{script: 'It is not allowed in HTML to send a close script tag in a string<script>because it confuses browsers</script>so we insert a backslash before the /'}");
+         System.out.println(j.toString());
+         System.out.println("");
+
+         final JSONTokener jt = new JSONTokener("{op:'test', to:'session', pre:1}{op:'test', to:'session', pre:2}");
+         j = new JSONObject(jt);
+         System.out.println(j.toString());
+         System.out.println("pre: " + j.optInt("pre"));
+         final int i = jt.skipTo('{');
+         System.out.println(i);
+         j = new JSONObject(jt);
+         System.out.println(j.toString());
+         System.out.println("");
+
+         a = CDL.toJSONArray("No quotes, 'Single Quotes', \"Double Quotes\"\n1,'2',\"3\"\n,'It is \"good,\"', \"It works.\"\n\n");
+
+         System.out.println(CDL.toString(a));
+         System.out.println("");
+         System.out.println(a.toString(4));
+         System.out.println("");
+
+         a = new JSONArray(" [\"<escape>\", next is an implied null , , ok,] ");
+         System.out.println(a.toString());
+         System.out.println("");
+         System.out.println(XML.toString(a));
+         System.out.println("");
+
+         j = new JSONObject(
+                  "{ fun => with non-standard forms ; forgiving => This package can be used to parse formats that are similar to but not stricting conforming to JSON; why=To make it easier to migrate existing data to JSON,one = [[1.00]]; uno=[[{1=>1}]];'+':+6e66 ;pluses=+++;empty = '' , 'double':0.666,true: TRUE, false: FALSE, null=NULL;[true] = [[!,@;*]]; string=>  o. k. ; # comment\r oct=0666; hex=0x666; dec=666; o=0999; noh=0x0x}");
+         System.out.println(j.toString(4));
+         System.out.println("");
+         if (j.getBoolean("true") && !j.getBoolean("false")) {
+            System.out.println("It's all good");
+         }
+
+         System.out.println("");
+         j = new JSONObject(j, new String[] { "dec", "oct", "hex", "missing" });
+         System.out.println(j.toString(4));
+
+         System.out.println("");
+         System.out.println(new JSONStringer().array().value(a).value(j).endArray());
+
+         j = new JSONObject(
+                  "{string: \"98.6\", long: 2147483648, int: 2147483647, longer: 9223372036854775807, double: 9223372036854775808}");
+         System.out.println(j.toString(4));
+
+         System.out.println("\ngetInt");
+         System.out.println("int    " + j.getInt("int"));
+         System.out.println("long   " + j.getInt("long"));
+         System.out.println("longer " + j.getInt("longer"));
+         System.out.println("double " + j.getInt("double"));
+         System.out.println("string " + j.getInt("string"));
+
+         System.out.println("\ngetLong");
+         System.out.println("int    " + j.getLong("int"));
+         System.out.println("long   " + j.getLong("long"));
+         System.out.println("longer " + j.getLong("longer"));
+         System.out.println("double " + j.getLong("double"));
+         System.out.println("string " + j.getLong("string"));
+
+         System.out.println("\ngetDouble");
+         System.out.println("int    " + j.getDouble("int"));
+         System.out.println("long   " + j.getDouble("long"));
+         System.out.println("longer " + j.getDouble("longer"));
+         System.out.println("double " + j.getDouble("double"));
+         System.out.println("string " + j.getDouble("string"));
+
+         j.put("good sized", 9223372036854775807L);
+         System.out.println(j.toString(4));
+
+         a = new JSONArray("[2147483647, 2147483648, 9223372036854775807, 9223372036854775808]");
+         System.out.println(a.toString(4));
+
+         System.out.println("\nKeys: ");
+         it = j.keys();
+         while (it.hasNext()) {
+            s = (String) it.next();
+            System.out.println(s + ": " + j.getString(s));
+         }
+
+
+         System.out.println("\naccumulate: ");
+         j = new JSONObject();
+         j.accumulate("stooge", "Curly");
+         j.accumulate("stooge", "Larry");
+         j.accumulate("stooge", "Moe");
+         a = j.getJSONArray("stooge");
+         a.put(5, "Shemp");
+         System.out.println(j.toString(4));
+
+         System.out.println("\nwrite:");
+         System.out.println(j.write(new StringWriter()));
+
+         s = "<xml empty><a></a><a>1</a><a>22</a><a>333</a></xml>";
+         j = XML.toJSONObject(s);
+         System.out.println(j.toString(4));
+         System.out.println(XML.toString(j));
+
+         s = "<book><chapter>Content of the first chapter</chapter><chapter>Content of the second chapter      <chapter>Content of the first subchapter</chapter>      <chapter>Content of the second subchapter</chapter></chapter><chapter>Third Chapter</chapter></book>";
+         j = XML.toJSONObject(s);
+         System.out.println(j.toString(4));
+         System.out.println(XML.toString(j));
+
+         final Collection c = null;
+         final Map m = null;
+
+         j = new JSONObject(m);
+         a = new JSONArray(c);
+         j.append("stooge", "Joe DeRita");
+         j.append("stooge", "Shemp");
+         j.accumulate("stooges", "Curly");
+         j.accumulate("stooges", "Larry");
+         j.accumulate("stooges", "Moe");
+         j.accumulate("stoogearray", j.get("stooges"));
+         j.put("map", m);
+         j.put("collection", c);
+         j.put("array", a);
+         a.put(m);
+         a.put(c);
+         System.out.println(j.toString(4));
+
+         System.out.println("\nTesting Exceptions: ");
+
+         System.out.print("Exception: ");
+         try {
+            System.out.println(j.getDouble("stooge"));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            System.out.println(j.getDouble("howard"));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            System.out.println(j.put(null, "howard"));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            System.out.println(a.getDouble(0));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            System.out.println(a.get(-1));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            System.out.println(a.put(Double.NaN));
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            j = XML.toJSONObject("<a><b>    ");
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            j = XML.toJSONObject("<a></b>    ");
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+         System.out.print("Exception: ");
+         try {
+            j = XML.toJSONObject("<a></a    ");
+         }
+         catch (final Exception e) {
+            System.out.println(e);
+         }
+
+      }
+      catch (final Exception e) {
+         System.out.println(e.toString());
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Test.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONObject.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONObject.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONObject.java	(revision 369)
@@ -0,0 +1,1319 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces with colons
+ * between the names and values, and commas between the values and names. The internal form is an object having <code>get</code>
+ * and <code>opt</code> methods for accessing the values by name, and <code>put</code> methods for adding or replacing values
+ * by name. The values can be any of these types: <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>,
+ * <code>Number</code>, <code>String</code>, or the <code>JSONObject.NULL</code> object. A JSONObject constructor can be
+ * used to convert an external form JSON text into an internal form whose values can be retrieved with the <code>get</code> and
+ * <code>opt</code> methods, or to convert values into a JSON text using the <code>put</code> and <code>toString</code>
+ * methods. A <code>get</code> method returns a value if one can be found, and throws an exception if one cannot be found. An
+ * <code>opt</code> method returns a default value instead of throwing an exception, and so is useful for obtaining optional
+ * values.
+ * <p>
+ * The generic <code>get()</code> and <code>opt()</code> methods return an object, which you can cast or query for type. There
+ * are also typed <code>get</code> and <code>opt</code> methods that do type checking and type coersion for you.
+ * <p>
+ * The <code>put</code> methods adds values to an object. For example,
+ *
+ * <pre>
+ * myString = new JSONObject().put(&quot;JSON&quot;, &quot;Hello, World!&quot;).toString();
+ * </pre>
+ *
+ * produces the string <code>{"JSON": "Hello, World"}</code>.
+ * <p>
+ * The texts produced by the <code>toString</code> methods strictly conform to the JSON sysntax rules. The constructors are more
+ * forgiving in the texts they will accept:
+ * <ul>
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just before the closing brace.</li>
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single quote)</small>.</li>
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote or single quote, and if they do not contain
+ * leading or trailing spaces, and if they do not contain any of these characters: <code>{ } [ ] / \ : , = ; #</code> and if
+ * they do not look like numbers and if they are not the reserved words <code>true</code>, <code>false</code>, or
+ * <code>null</code>.</li>
+ * <li>Keys can be followed by <code>=</code> or <code>=></code> as well as by <code>:</code>.</li>
+ * <li>Values can be followed by <code>;</code> <small>(semicolon)</small> as well as by <code>,</code> <small>(comma)</small>.</li>
+ * <li>Numbers may have the <code>0-</code> <small>(octal)</small> or <code>0x-</code> <small>(hex)</small> prefix.</li>
+ * <li>Comments written in the slashshlash, slashstar, and hash conventions will be ignored.</li>
+ * </ul>
+ *
+ * @author JSON.org
+ * @version 2
+ */
+@SuppressWarnings("all")
+public class JSONObject {
+
+   /**
+    * JSONObject.NULL is equivalent to the value that JavaScript calls null, whilst Java's null is equivalent to the value that
+    * JavaScript calls undefined.
+    */
+   private static final class Null {
+
+      /**
+       * There is only intended to be a single instance of the NULL object, so the clone method returns itself.
+       *
+       * @return NULL.
+       */
+      @Override
+      protected final Object clone() {
+         return this;
+      }
+
+
+      /**
+       * A Null object is equal to the null value and to itself.
+       *
+       * @param object
+       *                An object to test for nullness.
+       * @return true if the object parameter is the JSONObject.NULL object or null.
+       */
+      @Override
+      public boolean equals(final Object object) {
+         return (object == null) || (object == this);
+      }
+
+
+      /**
+       * Get the "null" string value.
+       *
+       * @return The string "null".
+       */
+      @Override
+      public String toString() {
+         return "null";
+      }
+   }
+
+
+   /**
+    * The hash map where the JSONObject's properties are kept.
+    */
+   private final HashMap      myHashMap;
+
+
+   /**
+    * It is sometimes more convenient and less ambiguous to have a <code>NULL</code> object than to use Java's <code>null</code>
+    * value. <code>JSONObject.NULL.equals(null)</code> returns <code>true</code>. <code>JSONObject.NULL.toString()</code>
+    * returns <code>"null"</code>.
+    */
+   public static final Object NULL = new Null();
+
+
+   /**
+    * Construct an empty JSONObject.
+    */
+   public JSONObject() {
+      this.myHashMap = new HashMap();
+   }
+
+
+   /**
+    * Construct a JSONObject from a subset of another JSONObject. An array of strings is used to identify the keys that should be
+    * copied. Missing keys are ignored.
+    *
+    * @param jo
+    *                A JSONObject.
+    * @param sa
+    *                An array of strings.
+    * @exception JSONException
+    *                    If a value is a non-finite number.
+    */
+   public JSONObject(final JSONObject jo,
+                     final String[] sa) throws JSONException {
+      this();
+      for (final String element : sa) {
+         putOpt(element, jo.opt(element));
+      }
+   }
+
+
+   /**
+    * Construct a JSONObject from a JSONTokener.
+    *
+    * @param x
+    *                A JSONTokener object containing the source string.
+    * @throws JSONException
+    *                 If there is a syntax error in the source string.
+    */
+   public JSONObject(final JSONTokener x) throws JSONException {
+      this();
+      char c;
+      String key;
+
+      if (x.nextClean() != '{') {
+         throw x.syntaxError("A JSONObject text must begin with '{'");
+      }
+      for (;;) {
+         c = x.nextClean();
+         switch (c) {
+            case 0:
+               throw x.syntaxError("A JSONObject text must end with '}'");
+            case '}':
+               return;
+            default:
+               x.back();
+               key = x.nextValue().toString();
+         }
+
+         /*
+          * The key is followed by ':'. We will also tolerate '=' or '=>'.
+          */
+
+         c = x.nextClean();
+         if (c == '=') {
+            if (x.next() != '>') {
+               x.back();
+            }
+         }
+         else if (c != ':') {
+            throw x.syntaxError("Expected a ':' after a key");
+         }
+         put(key, x.nextValue());
+
+         /*
+          * Pairs are separated by ','. We will also tolerate ';'.
+          */
+
+         switch (x.nextClean()) {
+            case ';':
+            case ',':
+               if (x.nextClean() == '}') {
+                  return;
+               }
+               x.back();
+               break;
+            case '}':
+               return;
+            default:
+               throw x.syntaxError("Expected a ',' or '}'");
+         }
+      }
+   }
+
+
+   /**
+    * Construct a JSONObject from a Map.
+    *
+    * @param map
+    *                A map object that can be used to initialize the contents of the JSONObject.
+    */
+   public JSONObject(final Map map) {
+      this.myHashMap = (map == null) ? new HashMap() : new HashMap(map);
+   }
+
+
+   /**
+    * Construct a JSONObject from an Object, using reflection to find the public members. The resulting JSONObject's keys will be
+    * the strings from the names array, and the values will be the field values associated with those keys in the object. If a key
+    * is not found or not visible, then it will not be copied into the new JSONObject.
+    *
+    * @param object
+    *                An object that has fields that should be used to make a JSONObject.
+    * @param names
+    *                An array of strings, the names of the fields to be used from the object.
+    */
+   public JSONObject(final Object object,
+                     final String names[]) {
+      this();
+      final Class c = object.getClass();
+      for (final String name : names) {
+         try {
+            final Field field = c.getField(name);
+            final Object value = field.get(object);
+            this.put(name, value);
+         }
+         catch (final Exception e) {
+            /* forget about it */
+         }
+      }
+   }
+
+
+   /**
+    * Construct a JSONObject from a string. This is the most commonly used JSONObject constructor.
+    *
+    * @param string
+    *                A string beginning with <code>{</code>&nbsp;<small>(left brace)</small> and ending with <code>}</code>
+    *                &nbsp;<small>(right brace)</small>.
+    * @exception JSONException
+    *                    If there is a syntax error in the source string.
+    */
+   public JSONObject(final String string) throws JSONException {
+      this(new JSONTokener(string));
+   }
+
+
+   /**
+    * Accumulate values under a key. It is similar to the put method except that if there is already an object stored under the
+    * key then a JSONArray is stored under the key to hold all of the accumulated values. If there is already a JSONArray, then
+    * the new value is appended to it. In contrast, the put method replaces the previous value.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                An object to be accumulated under the key.
+    * @return this.
+    * @throws JSONException
+    *                 If the value is an invalid number or if the key is null.
+    */
+   public JSONObject accumulate(final String key,
+                                final Object value) throws JSONException {
+      testValidity(value);
+      final Object o = opt(key);
+      if (o == null) {
+         put(key, value instanceof JSONArray ? new JSONArray().put(value) : value);
+      }
+      else if (o instanceof JSONArray) {
+         ((JSONArray) o).put(value);
+      }
+      else {
+         put(key, new JSONArray().put(o).put(value));
+      }
+      return this;
+   }
+
+
+   /**
+    * Append values to the array under a key. If the key does not exist in the JSONObject, then the key is put in the JSONObject
+    * with its value being a JSONArray containing the value parameter. If the key was already associated with a JSONArray, then
+    * the value parameter is appended to it.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                An object to be accumulated under the key.
+    * @return this.
+    * @throws JSONException
+    *                 If the key is null or if the current value associated with the key is not a JSONArray.
+    */
+   public JSONObject append(final String key,
+                            final Object value) throws JSONException {
+      testValidity(value);
+      final Object o = opt(key);
+      if (o == null) {
+         put(key, new JSONArray().put(value));
+      }
+      else if (o instanceof JSONArray) {
+         put(key, ((JSONArray) o).put(value));
+      }
+      else {
+         throw new JSONException("JSONObject[" + key + "] is not a JSONArray.");
+      }
+      return this;
+   }
+
+
+   /**
+    * Produce a string from a double. The string "null" will be returned if the number is not finite.
+    *
+    * @param d
+    *                A double.
+    * @return A String.
+    */
+   static public String doubleToString(final double d) {
+      if (Double.isInfinite(d) || Double.isNaN(d)) {
+         return "null";
+      }
+
+      // Shave off trailing zeros and decimal point, if possible.
+
+      String s = Double.toString(d);
+      if ((s.indexOf('.') > 0) && (s.indexOf('e') < 0) && (s.indexOf('E') < 0)) {
+         while (s.endsWith("0")) {
+            s = s.substring(0, s.length() - 1);
+         }
+         if (s.endsWith(".")) {
+            s = s.substring(0, s.length() - 1);
+         }
+      }
+      return s;
+   }
+
+
+   /**
+    * Get the value object associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return The object associated with the key.
+    * @throws JSONException
+    *                 if the key is not found.
+    */
+   public Object get(final String key) throws JSONException {
+      final Object o = opt(key);
+      if (o == null) {
+         throw new JSONException("JSONObject[" + quote(key) + "] not found.");
+      }
+      return o;
+   }
+
+
+   /**
+    * Get the boolean value associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return The truth.
+    * @throws JSONException
+    *                 if the value is not a Boolean or the String "true" or "false".
+    */
+   public boolean getBoolean(final String key) throws JSONException {
+      final Object o = get(key);
+      if (o.equals(Boolean.FALSE) || ((o instanceof String) && ((String) o).equalsIgnoreCase("false"))) {
+         return false;
+      }
+      else if (o.equals(Boolean.TRUE) || ((o instanceof String) && ((String) o).equalsIgnoreCase("true"))) {
+         return true;
+      }
+      throw new JSONException("JSONObject[" + quote(key) + "] is not a Boolean.");
+   }
+
+
+   /**
+    * Get the double value associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return The numeric value.
+    * @throws JSONException
+    *                 if the key is not found or if the value is not a Number object and cannot be converted to a number.
+    */
+   public double getDouble(final String key) throws JSONException {
+      final Object o = get(key);
+      try {
+         return o instanceof Number ? ((Number) o).doubleValue() : Double.valueOf((String) o).doubleValue();
+      }
+      catch (final Exception e) {
+         throw new JSONException("JSONObject[" + quote(key) + "] is not a number.");
+      }
+   }
+
+
+   /**
+    * Get the int value associated with a key. If the number value is too large for an int, it will be clipped.
+    *
+    * @param key
+    *                A key string.
+    * @return The integer value.
+    * @throws JSONException
+    *                 if the key is not found or if the value cannot be converted to an integer.
+    */
+   public int getInt(final String key) throws JSONException {
+      final Object o = get(key);
+      return o instanceof Number ? ((Number) o).intValue() : (int) getDouble(key);
+   }
+
+
+   /**
+    * Get the JSONArray value associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return A JSONArray which is the value.
+    * @throws JSONException
+    *                 if the key is not found or if the value is not a JSONArray.
+    */
+   public JSONArray getJSONArray(final String key) throws JSONException {
+      final Object o = get(key);
+      if (o instanceof JSONArray) {
+         return (JSONArray) o;
+      }
+      throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray.");
+   }
+
+
+   /**
+    * Get the JSONObject value associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return A JSONObject which is the value.
+    * @throws JSONException
+    *                 if the key is not found or if the value is not a JSONObject.
+    */
+   public JSONObject getJSONObject(final String key) throws JSONException {
+      final Object o = get(key);
+      if (o instanceof JSONObject) {
+         return (JSONObject) o;
+      }
+      throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONObject.");
+   }
+
+
+   /**
+    * Get the long value associated with a key. If the number value is too long for a long, it will be clipped.
+    *
+    * @param key
+    *                A key string.
+    * @return The long value.
+    * @throws JSONException
+    *                 if the key is not found or if the value cannot be converted to a long.
+    */
+   public long getLong(final String key) throws JSONException {
+      final Object o = get(key);
+      return o instanceof Number ? ((Number) o).longValue() : (long) getDouble(key);
+   }
+
+
+   /**
+    * Get the string associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return A string which is the value.
+    * @throws JSONException
+    *                 if the key is not found.
+    */
+   public String getString(final String key) throws JSONException {
+      return get(key).toString();
+   }
+
+
+   /**
+    * Determine if the JSONObject contains a specific key.
+    *
+    * @param key
+    *                A key string.
+    * @return true if the key exists in the JSONObject.
+    */
+   public boolean has(final String key) {
+      return this.myHashMap.containsKey(key);
+   }
+
+
+   /**
+    * Determine if the value associated with the key is null or if there is no value.
+    *
+    * @param key
+    *                A key string.
+    * @return true if there is no value associated with the key or if the value is the JSONObject.NULL object.
+    */
+   public boolean isNull(final String key) {
+      return JSONObject.NULL.equals(opt(key));
+   }
+
+
+   /**
+    * Get an enumeration of the keys of the JSONObject.
+    *
+    * @return An iterator of the keys.
+    */
+   public Iterator keys() {
+      return this.myHashMap.keySet().iterator();
+   }
+
+
+   /**
+    * Get the number of keys stored in the JSONObject.
+    *
+    * @return The number of keys in the JSONObject.
+    */
+   public int length() {
+      return this.myHashMap.size();
+   }
+
+
+   /**
+    * Produce a JSONArray containing the names of the elements of this JSONObject.
+    *
+    * @return A JSONArray containing the key strings, or null if the JSONObject is empty.
+    */
+   public JSONArray names() {
+      final JSONArray ja = new JSONArray();
+      final Iterator keys = keys();
+      while (keys.hasNext()) {
+         ja.put(keys.next());
+      }
+      return ja.length() == 0 ? null : ja;
+   }
+
+
+   /**
+    * Produce a string from a Number.
+    *
+    * @param n
+    *                A Number
+    * @return A String.
+    * @throws JSONException
+    *                 If n is a non-finite number.
+    */
+   static public String numberToString(final Number n) throws JSONException {
+      if (n == null) {
+         throw new JSONException("Null pointer");
+      }
+      testValidity(n);
+
+      // Shave off trailing zeros and decimal point, if possible.
+
+      String s = n.toString();
+      if ((s.indexOf('.') > 0) && (s.indexOf('e') < 0) && (s.indexOf('E') < 0)) {
+         while (s.endsWith("0")) {
+            s = s.substring(0, s.length() - 1);
+         }
+         if (s.endsWith(".")) {
+            s = s.substring(0, s.length() - 1);
+         }
+      }
+      return s;
+   }
+
+
+   /**
+    * Get an optional value associated with a key.
+    *
+    * @param key
+    *                A key string.
+    * @return An object which is the value, or null if there is no value.
+    */
+   public Object opt(final String key) {
+      return key == null ? null : this.myHashMap.get(key);
+   }
+
+
+   /**
+    * Get an optional boolean associated with a key. It returns false if there is no such key, or if the value is not Boolean.TRUE
+    * or the String "true".
+    *
+    * @param key
+    *                A key string.
+    * @return The truth.
+    */
+   public boolean optBoolean(final String key) {
+      return optBoolean(key, false);
+   }
+
+
+   /**
+    * Get an optional boolean associated with a key. It returns the defaultValue if there is no such key, or if it is not a
+    * Boolean or the String "true" or "false" (case insensitive).
+    *
+    * @param key
+    *                A key string.
+    * @param defaultValue
+    *                The default.
+    * @return The truth.
+    */
+   public boolean optBoolean(final String key,
+                             final boolean defaultValue) {
+      try {
+         return getBoolean(key);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                A Collection value.
+    * @return this.
+    * @throws JSONException
+    */
+   public JSONObject put(final String key,
+                         final Collection value) throws JSONException {
+      put(key, new JSONArray(value));
+      return this;
+   }
+
+
+   /**
+    * Get an optional double associated with a key, or NaN if there is no such key or if its value is not a number. If the value
+    * is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A string which is the key.
+    * @return An object which is the value.
+    */
+   public double optDouble(final String key) {
+      return optDouble(key, Double.NaN);
+   }
+
+
+   /**
+    * Get an optional double associated with a key, or the defaultValue if there is no such key or if its value is not a number.
+    * If the value is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A key string.
+    * @param defaultValue
+    *                The default.
+    * @return An object which is the value.
+    */
+   public double optDouble(final String key,
+                           final double defaultValue) {
+      try {
+         final Object o = opt(key);
+         return o instanceof Number ? ((Number) o).doubleValue() : new Double((String) o).doubleValue();
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get an optional int value associated with a key, or zero if there is no such key or if the value is not a number. If the
+    * value is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A key string.
+    * @return An object which is the value.
+    */
+   public int optInt(final String key) {
+      return optInt(key, 0);
+   }
+
+
+   /**
+    * Get an optional int value associated with a key, or the default if there is no such key or if the value is not a number. If
+    * the value is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A key string.
+    * @param defaultValue
+    *                The default.
+    * @return An object which is the value.
+    */
+   public int optInt(final String key,
+                     final int defaultValue) {
+      try {
+         return getInt(key);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get an optional JSONArray associated with a key. It returns null if there is no such key, or if its value is not a
+    * JSONArray.
+    *
+    * @param key
+    *                A key string.
+    * @return A JSONArray which is the value.
+    */
+   public JSONArray optJSONArray(final String key) {
+      final Object o = opt(key);
+      return o instanceof JSONArray ? (JSONArray) o : null;
+   }
+
+
+   /**
+    * Get an optional JSONObject associated with a key. It returns null if there is no such key, or if its value is not a
+    * JSONObject.
+    *
+    * @param key
+    *                A key string.
+    * @return A JSONObject which is the value.
+    */
+   public JSONObject optJSONObject(final String key) {
+      final Object o = opt(key);
+      return o instanceof JSONObject ? (JSONObject) o : null;
+   }
+
+
+   /**
+    * Get an optional long value associated with a key, or zero if there is no such key or if the value is not a number. If the
+    * value is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A key string.
+    * @return An object which is the value.
+    */
+   public long optLong(final String key) {
+      return optLong(key, 0);
+   }
+
+
+   /**
+    * Get an optional long value associated with a key, or the default if there is no such key or if the value is not a number. If
+    * the value is a string, an attempt will be made to evaluate it as a number.
+    *
+    * @param key
+    *                A key string.
+    * @param defaultValue
+    *                The default.
+    * @return An object which is the value.
+    */
+   public long optLong(final String key,
+                       final long defaultValue) {
+      try {
+         return getLong(key);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get an optional string associated with a key. It returns an empty string if there is no such key. If the value is not a
+    * string and is not null, then it is coverted to a string.
+    *
+    * @param key
+    *                A key string.
+    * @return A string which is the value.
+    */
+   public String optString(final String key) {
+      return optString(key, "");
+   }
+
+
+   /**
+    * Get an optional string associated with a key. It returns the defaultValue if there is no such key.
+    *
+    * @param key
+    *                A key string.
+    * @param defaultValue
+    *                The default.
+    * @return A string which is the value.
+    */
+   public String optString(final String key,
+                           final String defaultValue) {
+      final Object o = opt(key);
+      return o != null ? o.toString() : defaultValue;
+   }
+
+
+   /**
+    * Put a key/boolean pair in the JSONObject.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                A boolean which is the value.
+    * @return this.
+    * @throws JSONException
+    *                 If the key is null.
+    */
+   public JSONObject put(final String key,
+                         final boolean value) throws JSONException {
+      put(key, value ? Boolean.TRUE : Boolean.FALSE);
+      return this;
+   }
+
+
+   /**
+    * Put a key/double pair in the JSONObject.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                A double which is the value.
+    * @return this.
+    * @throws JSONException
+    *                 If the key is null or if the number is invalid.
+    */
+   public JSONObject put(final String key,
+                         final double value) throws JSONException {
+      put(key, new Double(value));
+      return this;
+   }
+
+
+   /**
+    * Put a key/int pair in the JSONObject.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                An int which is the value.
+    * @return this.
+    * @throws JSONException
+    *                 If the key is null.
+    */
+   public JSONObject put(final String key,
+                         final int value) throws JSONException {
+      put(key, new Integer(value));
+      return this;
+   }
+
+
+   /**
+    * Put a key/long pair in the JSONObject.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                A long which is the value.
+    * @return this.
+    * @throws JSONException
+    *                 If the key is null.
+    */
+   public JSONObject put(final String key,
+                         final long value) throws JSONException {
+      put(key, new Long(value));
+      return this;
+   }
+
+
+   /**
+    * Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                A Map value.
+    * @return this.
+    * @throws JSONException
+    */
+   public JSONObject put(final String key,
+                         final Map value) throws JSONException {
+      put(key, new JSONObject(value));
+      return this;
+   }
+
+
+   /**
+    * Put a key/value pair in the JSONObject. If the value is null, then the key will be removed from the JSONObject if it is
+    * present.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONArray,
+    *                JSONObject, Long, String, or the JSONObject.NULL object.
+    * @return this.
+    * @throws JSONException
+    *                 If the value is non-finite number or if the key is null.
+    */
+   public JSONObject put(final String key,
+                         final Object value) throws JSONException {
+      if (key == null) {
+         throw new JSONException("Null key.");
+      }
+      if (value != null) {
+         testValidity(value);
+         this.myHashMap.put(key, value);
+      }
+      else {
+         remove(key);
+      }
+      return this;
+   }
+
+
+   /**
+    * Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.
+    *
+    * @param key
+    *                A key string.
+    * @param value
+    *                An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONArray,
+    *                JSONObject, Long, String, or the JSONObject.NULL object.
+    * @return this.
+    * @throws JSONException
+    *                 If the value is a non-finite number.
+    */
+   public JSONObject putOpt(final String key,
+                            final Object value) throws JSONException {
+      if ((key != null) && (value != null)) {
+         put(key, value);
+      }
+      return this;
+   }
+
+
+   /**
+    * Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted within </,
+    * allowing JSON text to be delivered in HTML. In JSON text, a string cannot contain a control character or an unescaped quote
+    * or backslash.
+    *
+    * @param string
+    *                A String
+    * @return A String correctly formatted for insertion in a JSON text.
+    */
+   public static String quote(final String string) {
+      if ((string == null) || (string.length() == 0)) {
+         return "\"\"";
+      }
+
+      char b;
+      char c = 0;
+      int i;
+      final int len = string.length();
+      final StringBuffer sb = new StringBuffer(len + 4);
+      String t;
+
+      sb.append('"');
+      for (i = 0; i < len; i += 1) {
+         b = c;
+         c = string.charAt(i);
+         switch (c) {
+            case '\\':
+            case '"':
+               sb.append('\\');
+               sb.append(c);
+               break;
+            case '/':
+               if (b == '<') {
+                  sb.append('\\');
+               }
+               sb.append(c);
+               break;
+            case '\b':
+               sb.append("\\b");
+               break;
+            case '\t':
+               sb.append("\\t");
+               break;
+            case '\n':
+               sb.append("\\n");
+               break;
+            case '\f':
+               sb.append("\\f");
+               break;
+            case '\r':
+               sb.append("\\r");
+               break;
+            default:
+               if ((c < ' ') || ((c >= '\u0080') && (c < '\u00a0')) || ((c >= '\u2000') && (c < '\u2100'))) {
+                  t = "000" + Integer.toHexString(c);
+                  sb.append("\\u" + t.substring(t.length() - 4));
+               }
+               else {
+                  sb.append(c);
+               }
+         }
+      }
+      sb.append('"');
+      return sb.toString();
+   }
+
+
+   /**
+    * Remove a name and its value, if present.
+    *
+    * @param key
+    *                The name to be removed.
+    * @return The value that was associated with the name, or null if there was no value.
+    */
+   public Object remove(final String key) {
+      return this.myHashMap.remove(key);
+   }
+
+
+   /**
+    * Throw an exception if the object is an NaN or infinite number.
+    *
+    * @param o
+    *                The object to test.
+    * @throws JSONException
+    *                 If o is a non-finite number.
+    */
+   static void testValidity(final Object o) throws JSONException {
+      if (o != null) {
+         if (o instanceof Double) {
+            if (((Double) o).isInfinite() || ((Double) o).isNaN()) {
+               throw new JSONException("JSON does not allow non-finite numbers.");
+            }
+         }
+         else if (o instanceof Float) {
+            if (((Float) o).isInfinite() || ((Float) o).isNaN()) {
+               throw new JSONException("JSON does not allow non-finite numbers.");
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Produce a JSONArray containing the values of the members of this JSONObject.
+    *
+    * @param names
+    *                A JSONArray containing a list of key strings. This determines the sequence of the values in the result.
+    * @return A JSONArray of values.
+    * @throws JSONException
+    *                 If any of the values are non-finite numbers.
+    */
+   public JSONArray toJSONArray(final JSONArray names) throws JSONException {
+      if ((names == null) || (names.length() == 0)) {
+         return null;
+      }
+      final JSONArray ja = new JSONArray();
+      for (int i = 0; i < names.length(); i += 1) {
+         ja.put(this.opt(names.getString(i)));
+      }
+      return ja;
+   }
+
+
+   /**
+    * Make a JSON text of this JSONObject. For compactness, no whitespace is added. If this would not result in a syntactically
+    * correct JSON text, then null will be returned instead.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @return a printable, displayable, portable, transmittable representation of the object, beginning with <code>{</code>
+    *         &nbsp;<small>(left brace)</small> and ending with <code>}</code>&nbsp;<small>(right brace)</small>.
+    */
+   @Override
+   public String toString() {
+      try {
+         final Iterator keys = keys();
+         final StringBuffer sb = new StringBuffer("{");
+
+         while (keys.hasNext()) {
+            if (sb.length() > 1) {
+               sb.append(',');
+            }
+            final Object o = keys.next();
+            sb.append(quote(o.toString()));
+            sb.append(':');
+            sb.append(valueToString(this.myHashMap.get(o)));
+         }
+         sb.append('}');
+         return sb.toString();
+      }
+      catch (final Exception e) {
+         return null;
+      }
+   }
+
+
+   /**
+    * Make a prettyprinted JSON text of this JSONObject.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param indentFactor
+    *                The number of spaces to add to each level of indentation.
+    * @return a printable, displayable, portable, transmittable representation of the object, beginning with <code>{</code>
+    *         &nbsp;<small>(left brace)</small> and ending with <code>}</code>&nbsp;<small>(right brace)</small>.
+    * @throws JSONException
+    *                 If the object contains an invalid number.
+    */
+   public String toString(final int indentFactor) throws JSONException {
+      return toString(indentFactor, 0);
+   }
+
+
+   /**
+    * Make a prettyprinted JSON text of this JSONObject.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param indentFactor
+    *                The number of spaces to add to each level of indentation.
+    * @param indent
+    *                The indentation of the top level.
+    * @return a printable, displayable, transmittable representation of the object, beginning with <code>{</code> &nbsp;<small>(left
+    *         brace)</small> and ending with <code>}</code>&nbsp;<small>(right brace)</small>.
+    * @throws JSONException
+    *                 If the object contains an invalid number.
+    */
+   String toString(final int indentFactor,
+                   final int indent) throws JSONException {
+      int i;
+      final int n = length();
+      if (n == 0) {
+         return "{}";
+      }
+      final Iterator keys = keys();
+      final StringBuffer sb = new StringBuffer("{");
+      final int newindent = indent + indentFactor;
+      Object o;
+      if (n == 1) {
+         o = keys.next();
+         sb.append(quote(o.toString()));
+         sb.append(": ");
+         sb.append(valueToString(this.myHashMap.get(o), indentFactor, indent));
+      }
+      else {
+         while (keys.hasNext()) {
+            o = keys.next();
+            if (sb.length() > 1) {
+               sb.append(",\n");
+            }
+            else {
+               sb.append('\n');
+            }
+            for (i = 0; i < newindent; i += 1) {
+               sb.append(' ');
+            }
+            sb.append(quote(o.toString()));
+            sb.append(": ");
+            sb.append(valueToString(this.myHashMap.get(o), indentFactor, newindent));
+         }
+         if (sb.length() > 1) {
+            sb.append('\n');
+            for (i = 0; i < indent; i += 1) {
+               sb.append(' ');
+            }
+         }
+      }
+      sb.append('}');
+      return sb.toString();
+   }
+
+
+   /**
+    * Make a JSON text of an Object value. If the object has an value.toJSONString() method, then that method will be used to
+    * produce the JSON text. The method is required to produce a strictly conforming text. If the object does not contain a
+    * toJSONString method (which is the most common case), then a text will be produced by the rules.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param value
+    *                The value to be serialized.
+    * @return a printable, displayable, transmittable representation of the object, beginning with <code>{</code> &nbsp;<small>(left
+    *         brace)</small> and ending with <code>}</code>&nbsp;<small>(right brace)</small>.
+    * @throws JSONException
+    *                 If the value is or contains an invalid number.
+    */
+   static String valueToString(final Object value) throws JSONException {
+      if ((value == null) || value.equals(null)) {
+         return "null";
+      }
+      if (value instanceof JSONString) {
+         Object o;
+         try {
+            o = ((JSONString) value).toJSONString();
+         }
+         catch (final Exception e) {
+            throw new JSONException(e);
+         }
+         if (o instanceof String) {
+            return (String) o;
+         }
+         throw new JSONException("Bad value from toJSONString: " + o);
+      }
+      if (value instanceof Number) {
+         return numberToString((Number) value);
+      }
+      if ((value instanceof Boolean) || (value instanceof JSONObject) || (value instanceof JSONArray)) {
+         return value.toString();
+      }
+      return quote(value.toString());
+   }
+
+
+   /**
+    * Make a prettyprinted JSON text of an object value.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param value
+    *                The value to be serialized.
+    * @param indentFactor
+    *                The number of spaces to add to each level of indentation.
+    * @param indent
+    *                The indentation of the top level.
+    * @return a printable, displayable, transmittable representation of the object, beginning with <code>{</code> &nbsp;<small>(left
+    *         brace)</small> and ending with <code>}</code>&nbsp;<small>(right brace)</small>.
+    * @throws JSONException
+    *                 If the object contains an invalid number.
+    */
+   static String valueToString(final Object value,
+                               final int indentFactor,
+                               final int indent) throws JSONException {
+      if ((value == null) || value.equals(null)) {
+         return "null";
+      }
+      try {
+         if (value instanceof JSONString) {
+            final Object o = ((JSONString) value).toJSONString();
+            if (o instanceof String) {
+               return (String) o;
+            }
+         }
+      }
+      catch (final Exception e) {
+         /* forget about it */
+      }
+      if (value instanceof Number) {
+         return numberToString((Number) value);
+      }
+      if (value instanceof Boolean) {
+         return value.toString();
+      }
+      if (value instanceof JSONObject) {
+         return ((JSONObject) value).toString(indentFactor, indent);
+      }
+      if (value instanceof JSONArray) {
+         return ((JSONArray) value).toString(indentFactor, indent);
+      }
+      return quote(value.toString());
+   }
+
+
+   /**
+    * Write the contents of the JSONObject as JSON text to a writer. For compactness, no whitespace is added.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @return The writer.
+    * @throws JSONException
+    */
+   public Writer write(final Writer writer) throws JSONException {
+      try {
+         boolean b = false;
+         final Iterator keys = keys();
+         writer.write('{');
+
+         while (keys.hasNext()) {
+            if (b) {
+               writer.write(',');
+            }
+            final Object k = keys.next();
+            writer.write(quote(k.toString()));
+            writer.write(':');
+            final Object v = this.myHashMap.get(k);
+            if (v instanceof JSONObject) {
+               ((JSONObject) v).write(writer);
+            }
+            else if (v instanceof JSONArray) {
+               ((JSONArray) v).write(writer);
+            }
+            else {
+               writer.write(valueToString(v));
+            }
+            b = true;
+         }
+         writer.write('}');
+         return writer;
+      }
+      catch (final IOException e) {
+         throw new JSONException(e);
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONObject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONString.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONString.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONString.java	(revision 369)
@@ -0,0 +1,16 @@
+package org.json;
+
+/**
+ * The <code>JSONString</code> interface allows a <code>toJSONString()</code> method so that a class can change the behavior
+ * of <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, and <code>JSONWriter.value(</code>Object<code>)</code>.
+ * The <code>toJSONString</code> method will be used instead of the default behavior of using the Object's
+ * <code>toString()</code> method and quoting the result.
+ */
+public interface JSONString {
+   /**
+    * The <code>toJSONString</code> method allows a class to produce its own JSON serialization.
+    *
+    * @return A strictly syntactically correct JSON text.
+    */
+   public String toJSONString();
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONString.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XML.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XML.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XML.java	(revision 369)
@@ -0,0 +1,437 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+
+/**
+ * This provides static methods to convert an XML text into a JSONObject, and to covert a JSONObject into an XML text.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class XML {
+
+   /** The Character '&'. */
+   public static final Character AMP   = new Character('&');
+
+   /** The Character '''. */
+   public static final Character APOS  = new Character('\'');
+
+   /** The Character '!'. */
+   public static final Character BANG  = new Character('!');
+
+   /** The Character '='. */
+   public static final Character EQ    = new Character('=');
+
+   /** The Character '>'. */
+   public static final Character GT    = new Character('>');
+
+   /** The Character '<'. */
+   public static final Character LT    = new Character('<');
+
+   /** The Character '?'. */
+   public static final Character QUEST = new Character('?');
+
+   /** The Character '"'. */
+   public static final Character QUOT  = new Character('"');
+
+   /** The Character '/'. */
+   public static final Character SLASH = new Character('/');
+
+
+   /**
+    * Replace special characters with XML escapes:
+    *
+    * <pre>
+    * &amp; &lt;small&gt;(ampersand)&lt;/small&gt; is replaced by &amp;amp;
+    * &lt; &lt;small&gt;(less than)&lt;/small&gt; is replaced by &amp;lt;
+    * &gt; &lt;small&gt;(greater than)&lt;/small&gt; is replaced by &amp;gt;
+    * &quot; &lt;small&gt;(double quote)&lt;/small&gt; is replaced by &amp;quot;
+    * </pre>
+    *
+    * @param string
+    *                The string to be escaped.
+    * @return The escaped string.
+    */
+   public static String escape(final String string) {
+      final StringBuffer sb = new StringBuffer();
+      for (int i = 0, len = string.length(); i < len; i++) {
+         final char c = string.charAt(i);
+         switch (c) {
+            case '&':
+               sb.append("&amp;");
+               break;
+            case '<':
+               sb.append("&lt;");
+               break;
+            case '>':
+               sb.append("&gt;");
+               break;
+            case '"':
+               sb.append("&quot;");
+               break;
+            default:
+               sb.append(c);
+         }
+      }
+      return sb.toString();
+   }
+
+
+   /**
+    * Scan the content following the named tag, attaching it to the context.
+    *
+    * @param x
+    *                The XMLTokener containing the source string.
+    * @param context
+    *                The JSONObject that will include the new material.
+    * @param name
+    *                The tag name.
+    * @return true if the close tag is processed.
+    * @throws JSONException
+    */
+   private static boolean parse(final XMLTokener x,
+                                final JSONObject context,
+                                final String name) throws JSONException {
+      char c;
+      int i;
+      String n;
+      JSONObject o = null;
+      String s;
+      Object t;
+
+      // Test for and skip past these forms:
+      //      <!-- ... -->
+      //      <!   ...   >
+      //      <![  ... ]]>
+      //      <?   ...  ?>
+      // Report errors for these forms:
+      //      <>
+      //      <=
+      //      <<
+
+      t = x.nextToken();
+
+      // <!
+
+      if (t == BANG) {
+         c = x.next();
+         if (c == '-') {
+            if (x.next() == '-') {
+               x.skipPast("-->");
+               return false;
+            }
+            x.back();
+         }
+         else if (c == '[') {
+            t = x.nextToken();
+            if (t.equals("CDATA")) {
+               if (x.next() == '[') {
+                  s = x.nextCDATA();
+                  if (s.length() > 0) {
+                     context.accumulate("content", s);
+                  }
+                  return false;
+               }
+            }
+            throw x.syntaxError("Expected 'CDATA['");
+         }
+         i = 1;
+         do {
+            t = x.nextMeta();
+            if (t == null) {
+               throw x.syntaxError("Missing '>' after '<!'.");
+            }
+            else if (t == LT) {
+               i += 1;
+            }
+            else if (t == GT) {
+               i -= 1;
+            }
+         }
+         while (i > 0);
+         return false;
+      }
+      else if (t == QUEST) {
+
+         // <?
+
+         x.skipPast("?>");
+         return false;
+      }
+      else if (t == SLASH) {
+
+         // Close tag </
+
+         t = x.nextToken();
+         if (name == null) {
+            throw x.syntaxError("Mismatched close tag" + t);
+         }
+         if (!t.equals(name)) {
+            throw x.syntaxError("Mismatched " + name + " and " + t);
+         }
+         if (x.nextToken() != GT) {
+            throw x.syntaxError("Misshaped close tag");
+         }
+         return true;
+
+      }
+      else if (t instanceof Character) {
+         throw x.syntaxError("Misshaped tag");
+
+         // Open tag <
+
+      }
+      else {
+         n = (String) t;
+         t = null;
+         o = new JSONObject();
+         for (;;) {
+            if (t == null) {
+               t = x.nextToken();
+            }
+
+            // attribute = value
+
+            if (t instanceof String) {
+               s = (String) t;
+               t = x.nextToken();
+               if (t == EQ) {
+                  t = x.nextToken();
+                  if (!(t instanceof String)) {
+                     throw x.syntaxError("Missing value");
+                  }
+                  o.accumulate(s, t);
+                  t = null;
+               }
+               else {
+                  o.accumulate(s, "");
+               }
+
+               // Empty tag <.../>
+
+            }
+            else if (t == SLASH) {
+               if (x.nextToken() != GT) {
+                  throw x.syntaxError("Misshaped tag");
+               }
+               context.accumulate(n, o);
+               return false;
+
+               // Content, between <...> and </...>
+
+            }
+            else if (t == GT) {
+               for (;;) {
+                  t = x.nextContent();
+                  if (t == null) {
+                     if (n != null) {
+                        throw x.syntaxError("Unclosed tag " + n);
+                     }
+                     return false;
+                  }
+                  else if (t instanceof String) {
+                     s = (String) t;
+                     if (s.length() > 0) {
+                        o.accumulate("content", s);
+                     }
+
+                     // Nested element
+
+                  }
+                  else if (t == LT) {
+                     if (parse(x, o, n)) {
+                        if (o.length() == 0) {
+                           context.accumulate(n, "");
+                        }
+                        else if (o.length() == 1 && o.opt("content") != null) {
+                           context.accumulate(n, o.opt("content"));
+                        }
+                        else {
+                           context.accumulate(n, o);
+                        }
+                        return false;
+                     }
+                  }
+               }
+            }
+            else {
+               throw x.syntaxError("Misshaped tag");
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this
+    * transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text,
+    * while JSON uses unordered collections of name/value pairs and arrays of values. JSON does not does not like to distinguish
+    * between elements and attributes. Sequences of similar elements are represented as JSONArrays. Content text may be placed in
+    * a "content" member. Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
+    *
+    * @param string
+    *                The source string.
+    * @return A JSONObject containing the structured data from the XML string.
+    * @throws JSONException
+    */
+   public static JSONObject toJSONObject(final String string) throws JSONException {
+      final JSONObject o = new JSONObject();
+      final XMLTokener x = new XMLTokener(string);
+      while (x.more() && x.skipPast("<")) {
+         parse(x, o, null);
+      }
+      return o;
+   }
+
+
+   /**
+    * Convert a JSONObject into a well-formed, element-normal XML string.
+    *
+    * @param o
+    *                A JSONObject.
+    * @return A string.
+    * @throws JSONException
+    */
+   public static String toString(final Object o) throws JSONException {
+      return toString(o, null);
+   }
+
+
+   /**
+    * Convert a JSONObject into a well-formed, element-normal XML string.
+    *
+    * @param o
+    *                A JSONObject.
+    * @param tagName
+    *                The optional name of the enclosing tag.
+    * @return A string.
+    * @throws JSONException
+    */
+   public static String toString(final Object o,
+                                 final String tagName) throws JSONException {
+      final StringBuffer b = new StringBuffer();
+      int i;
+      JSONArray ja;
+      JSONObject jo;
+      String k;
+      Iterator keys;
+      int len;
+      String s;
+      Object v;
+      if (o instanceof JSONObject) {
+
+         // Emit <tagName>
+
+         if (tagName != null) {
+            b.append('<');
+            b.append(tagName);
+            b.append('>');
+         }
+
+         // Loop thru the keys.
+
+         jo = (JSONObject) o;
+         keys = jo.keys();
+         while (keys.hasNext()) {
+            k = keys.next().toString();
+            v = jo.get(k);
+            if (v instanceof String) {
+               s = (String) v;
+            }
+            else {
+               s = null;
+            }
+
+            // Emit content in body
+
+            if (k.equals("content")) {
+               if (v instanceof JSONArray) {
+                  ja = (JSONArray) v;
+                  len = ja.length();
+                  for (i = 0; i < len; i += 1) {
+                     if (i > 0) {
+                        b.append('\n');
+                     }
+                     b.append(escape(ja.get(i).toString()));
+                  }
+               }
+               else {
+                  b.append(escape(v.toString()));
+               }
+
+               // Emit an array of similar keys
+
+            }
+            else if (v instanceof JSONArray) {
+               ja = (JSONArray) v;
+               len = ja.length();
+               for (i = 0; i < len; i += 1) {
+                  b.append(toString(ja.get(i), k));
+               }
+            }
+            else if (v.equals("")) {
+               b.append('<');
+               b.append(k);
+               b.append("/>");
+
+               // Emit a new tag <k>
+
+            }
+            else {
+               b.append(toString(v, k));
+            }
+         }
+         if (tagName != null) {
+
+            // Emit the </tagname> close tag
+
+            b.append("</");
+            b.append(tagName);
+            b.append('>');
+         }
+         return b.toString();
+
+         // XML does not have good support for arrays. If an array appears in a place
+         // where XML is lacking, synthesize an <array> element.
+
+      }
+      else if (o instanceof JSONArray) {
+         ja = (JSONArray) o;
+         len = ja.length();
+         for (i = 0; i < len; ++i) {
+            b.append(toString(ja.opt(i), (tagName == null) ? "array" : tagName));
+         }
+         return b.toString();
+      }
+      else {
+         s = (o == null) ? "null" : escape(o.toString());
+         return (tagName == null) ? "\"" + s + "\"" : (s.length() == 0) ? "<" + tagName + "/>" : "<" + tagName + ">" + s + "</"
+                                                                                                 + tagName + ">";
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XML.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONTokener.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONTokener.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONTokener.java	(revision 369)
@@ -0,0 +1,479 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * A JSONTokener takes a source string and extracts characters and tokens from it. It is used by the JSONObject and JSONArray
+ * constructors to parse JSON source strings.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class JSONTokener {
+
+   /**
+    * The index of the next character.
+    */
+   private int    myIndex;
+
+
+   /**
+    * The source string being tokenized.
+    */
+   private final String mySource;
+
+
+   /**
+    * Construct a JSONTokener from a string.
+    *
+    * @param s
+    *                A source string.
+    */
+   public JSONTokener(final String s) {
+      this.myIndex = 0;
+      this.mySource = s;
+   }
+
+
+   /**
+    * Back up one character. This provides a sort of lookahead capability, so that you can test for a digit or letter before
+    * attempting to parse the next number or identifier.
+    */
+   public void back() {
+      if (this.myIndex > 0) {
+         this.myIndex -= 1;
+      }
+   }
+
+
+   /**
+    * Get the hex value of a character (base16).
+    *
+    * @param c
+    *                A character between '0' and '9' or between 'A' and 'F' or between 'a' and 'f'.
+    * @return An int between 0 and 15, or -1 if c was not a hex digit.
+    */
+   public static int dehexchar(final char c) {
+      if (c >= '0' && c <= '9') {
+         return c - '0';
+      }
+      if (c >= 'A' && c <= 'F') {
+         return c - ('A' - 10);
+      }
+      if (c >= 'a' && c <= 'f') {
+         return c - ('a' - 10);
+      }
+      return -1;
+   }
+
+
+   /**
+    * Determine if the source string still contains characters that next() can consume.
+    *
+    * @return true if not yet at the end of the source.
+    */
+   public boolean more() {
+      return this.myIndex < this.mySource.length();
+   }
+
+
+   /**
+    * Get the next character in the source string.
+    *
+    * @return The next character, or 0 if past the end of the source string.
+    */
+   public char next() {
+      if (more()) {
+         final char c = this.mySource.charAt(this.myIndex);
+         this.myIndex += 1;
+         return c;
+      }
+      return 0;
+   }
+
+
+   /**
+    * Consume the next character, and check that it matches a specified character.
+    *
+    * @param c
+    *                The character to match.
+    * @return The character.
+    * @throws JSONException
+    *                 if the character does not match.
+    */
+   public char next(final char c) throws JSONException {
+      final char n = next();
+      if (n != c) {
+         throw syntaxError("Expected '" + c + "' and instead saw '" + n + "'");
+      }
+      return n;
+   }
+
+
+   /**
+    * Get the next n characters.
+    *
+    * @param n
+    *                The number of characters to take.
+    * @return A string of n characters.
+    * @throws JSONException
+    *                 Substring bounds error if there are not n characters remaining in the source string.
+    */
+   public String next(final int n) throws JSONException {
+      final int i = this.myIndex;
+      final int j = i + n;
+      if (j >= this.mySource.length()) {
+         throw syntaxError("Substring bounds error");
+      }
+      this.myIndex += n;
+      return this.mySource.substring(i, j);
+   }
+
+
+   /**
+    * Get the next char in the string, skipping whitespace and comments (slashslash, slashstar, and hash).
+    *
+    * @throws JSONException
+    * @return A character, or 0 if there are no more characters.
+    */
+   public char nextClean() throws JSONException {
+      for (;;) {
+         char c = next();
+         if (c == '/') {
+            switch (next()) {
+               case '/':
+                  do {
+                     c = next();
+                  }
+                  while (c != '\n' && c != '\r' && c != 0);
+                  break;
+               case '*':
+                  for (;;) {
+                     c = next();
+                     if (c == 0) {
+                        throw syntaxError("Unclosed comment");
+                     }
+                     if (c == '*') {
+                        if (next() == '/') {
+                           break;
+                        }
+                        back();
+                     }
+                  }
+                  break;
+               default:
+                  back();
+                  return '/';
+            }
+         }
+         else if (c == '#') {
+            do {
+               c = next();
+            }
+            while (c != '\n' && c != '\r' && c != 0);
+         }
+         else if (c == 0 || c > ' ') {
+            return c;
+         }
+      }
+   }
+
+
+   /**
+    * Return the characters up to the next close quote character. Backslash processing is done. The formal JSON format does not
+    * allow strings in single quotes, but an implementation is allowed to accept them.
+    *
+    * @param quote
+    *                The quoting character, either <code>"</code>&nbsp;<small>(double quote)</small> or <code>'</code>&nbsp;<small>(single
+    *                quote)</small>.
+    * @return A String.
+    * @throws JSONException
+    *                 Unterminated string.
+    */
+   public String nextString(final char quote) throws JSONException {
+      char c;
+      final StringBuffer sb = new StringBuffer();
+      for (;;) {
+         c = next();
+         switch (c) {
+            case 0:
+            case '\n':
+            case '\r':
+               throw syntaxError("Unterminated string");
+            case '\\':
+               c = next();
+               switch (c) {
+                  case 'b':
+                     sb.append('\b');
+                     break;
+                  case 't':
+                     sb.append('\t');
+                     break;
+                  case 'n':
+                     sb.append('\n');
+                     break;
+                  case 'f':
+                     sb.append('\f');
+                     break;
+                  case 'r':
+                     sb.append('\r');
+                     break;
+                  case 'u':
+                     sb.append((char) Integer.parseInt(next(4), 16));
+                     break;
+                  case 'x':
+                     sb.append((char) Integer.parseInt(next(2), 16));
+                     break;
+                  default:
+                     sb.append(c);
+               }
+               break;
+            default:
+               if (c == quote) {
+                  return sb.toString();
+               }
+               sb.append(c);
+         }
+      }
+   }
+
+
+   /**
+    * Get the text up but not including the specified character or the end of line, whichever comes first.
+    *
+    * @param d
+    *                A delimiter character.
+    * @return A string.
+    */
+   public String nextTo(final char d) {
+      final StringBuffer sb = new StringBuffer();
+      for (;;) {
+         final char c = next();
+         if (c == d || c == 0 || c == '\n' || c == '\r') {
+            if (c != 0) {
+               back();
+            }
+            return sb.toString().trim();
+         }
+         sb.append(c);
+      }
+   }
+
+
+   /**
+    * Get the text up but not including one of the specified delimeter characters or the end of line, whichever comes first.
+    *
+    * @param delimiters
+    *                A set of delimiter characters.
+    * @return A string, trimmed.
+    */
+   public String nextTo(final String delimiters) {
+      char c;
+      final StringBuffer sb = new StringBuffer();
+      for (;;) {
+         c = next();
+         if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') {
+            if (c != 0) {
+               back();
+            }
+            return sb.toString().trim();
+         }
+         sb.append(c);
+      }
+   }
+
+
+   /**
+    * Get the next value. The value can be a Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
+    * JSONObject.NULL object.
+    *
+    * @throws JSONException
+    *                 If syntax error.
+    *
+    * @return An object.
+    */
+   public Object nextValue() throws JSONException {
+      char c = nextClean();
+      String s;
+
+      switch (c) {
+         case '"':
+         case '\'':
+            return nextString(c);
+         case '{':
+            back();
+            return new JSONObject(this);
+         case '[':
+            back();
+            return new JSONArray(this);
+      }
+
+      /*
+       * Handle unquoted text. This could be the values true, false, or
+       * null, or it can be a number. An implementation (such as this one)
+       * is allowed to also accept non-standard forms.
+       *
+       * Accumulate characters until we reach the end of the text or a
+       * formatting character.
+       */
+
+      final StringBuffer sb = new StringBuffer();
+      final char b = c;
+      while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
+         sb.append(c);
+         c = next();
+      }
+      back();
+
+      /*
+       * If it is true, false, or null, return the proper value.
+       */
+
+      s = sb.toString().trim();
+      if (s.equals("")) {
+         throw syntaxError("Missing value");
+      }
+      if (s.equalsIgnoreCase("true")) {
+         return Boolean.TRUE;
+      }
+      if (s.equalsIgnoreCase("false")) {
+         return Boolean.FALSE;
+      }
+      if (s.equalsIgnoreCase("null")) {
+         return JSONObject.NULL;
+      }
+
+      /*
+       * If it might be a number, try converting it. We support the 0- and 0x-
+       * conventions. If a number cannot be produced, then the value will just
+       * be a string. Note that the 0-, 0x-, plus, and implied string
+       * conventions are non-standard. A JSON parser is free to accept
+       * non-JSON forms as long as it accepts all correct JSON forms.
+       */
+
+      if ((b >= '0' && b <= '9') || b == '.' || b == '-' || b == '+') {
+         if (b == '0') {
+            if (s.length() > 2 && (s.charAt(1) == 'x' || s.charAt(1) == 'X')) {
+               try {
+                  return new Integer(Integer.parseInt(s.substring(2), 16));
+               }
+               catch (final Exception e) {
+                  /* Ignore the error */
+               }
+            }
+            else {
+               try {
+                  return new Integer(Integer.parseInt(s, 8));
+               }
+               catch (final Exception e) {
+                  /* Ignore the error */
+               }
+            }
+         }
+         try {
+            return new Integer(s);
+         }
+         catch (final Exception e) {
+            try {
+               return new Long(s);
+            }
+            catch (final Exception f) {
+               try {
+                  return new Double(s);
+               }
+               catch (final Exception g) {
+                  return s;
+               }
+            }
+         }
+      }
+      return s;
+   }
+
+
+   /**
+    * Skip characters until the next character is the requested character. If the requested character is not found, no characters
+    * are skipped.
+    *
+    * @param to
+    *                A character to skip to.
+    * @return The requested character, or zero if the requested character is not found.
+    */
+   public char skipTo(final char to) {
+      char c;
+      final int index = this.myIndex;
+      do {
+         c = next();
+         if (c == 0) {
+            this.myIndex = index;
+            return c;
+         }
+      }
+      while (c != to);
+      back();
+      return c;
+   }
+
+
+   /**
+    * Skip characters until past the requested string. If it is not found, we are left at the end of the source.
+    *
+    * @param to
+    *                A string to skip past.
+    */
+   public boolean skipPast(final String to) {
+      this.myIndex = this.mySource.indexOf(to, this.myIndex);
+      if (this.myIndex < 0) {
+         this.myIndex = this.mySource.length();
+         return false;
+      }
+      this.myIndex += to.length();
+      return true;
+
+   }
+
+
+   /**
+    * Make a JSONException to signal a syntax error.
+    *
+    * @param message
+    *                The error message.
+    * @return A JSONException object, suitable for throwing
+    */
+   public JSONException syntaxError(final String message) {
+      return new JSONException(message + toString());
+   }
+
+
+   /**
+    * Make a printable string of this JSONTokener.
+    *
+    * @return " at character [this.myIndex] of [this.mySource]"
+    */
+   @Override
+   public String toString() {
+      return " at character " + this.myIndex + " of " + this.mySource;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONTokener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CDL.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CDL.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CDL.java	(revision 369)
@@ -0,0 +1,287 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * This provides static methods to convert comma delimited text into a JSONArray, and to covert a JSONArray into comma delimited
+ * text. Comma delimited text is a very popular format for data interchange. It is understood by most database, spreadsheet, and
+ * organizer programs.
+ * <p>
+ * Each row of text represents a row in a table or a data record. Each row ends with a NEWLINE character. Each row contains one or
+ * more values. Values are separated by commas. A value can contain any character except for comma, unless is is wrapped in single
+ * quotes or double quotes.
+ * <p>
+ * The first row usually contains the names of the columns.
+ * <p>
+ * A comma delimited list can be converted into a JSONArray of JSONObjects. The names for the elements in the JSONObjects can be
+ * taken from the names in the first row.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class CDL {
+
+   /**
+    * Get the next value. The value can be wrapped in quotes. The value can be empty.
+    *
+    * @param x
+    *                A JSONTokener of the source text.
+    * @return The value string, or null if empty.
+    * @throws JSONException
+    *                 if the quoted string is badly formed.
+    */
+   private static String getValue(final JSONTokener x) throws JSONException {
+      char c;
+      do {
+         c = x.next();
+      }
+      while (c <= ' ' && c != 0);
+      switch (c) {
+         case 0:
+            return null;
+         case '"':
+         case '\'':
+            return x.nextString(c);
+         case ',':
+            x.back();
+            return "";
+         default:
+            x.back();
+            return x.nextTo(',');
+      }
+   }
+
+
+   /**
+    * Produce a JSONArray of strings from a row of comma delimited values.
+    *
+    * @param x
+    *                A JSONTokener of the source text.
+    * @return A JSONArray of strings.
+    * @throws JSONException
+    */
+   public static JSONArray rowToJSONArray(final JSONTokener x) throws JSONException {
+      final JSONArray ja = new JSONArray();
+      for (;;) {
+         final String value = getValue(x);
+         if (value == null) {
+            return null;
+         }
+         ja.put(value);
+         for (;;) {
+            final char c = x.next();
+            if (c == ',') {
+               break;
+            }
+            if (c != ' ') {
+               if (c == '\n' || c == '\r' || c == 0) {
+                  return ja;
+               }
+               throw x.syntaxError("Bad character '" + c + "' (" + (int) c + ").");
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Produce a JSONObject from a row of comma delimited text, using a parallel JSONArray of strings to provides the names of the
+    * elements.
+    *
+    * @param names
+    *                A JSONArray of names. This is commonly obtained from the first row of a comma delimited text file using the
+    *                rowToJSONArray method.
+    * @param x
+    *                A JSONTokener of the source text.
+    * @return A JSONObject combining the names and values.
+    * @throws JSONException
+    */
+   public static JSONObject rowToJSONObject(final JSONArray names,
+                                            final JSONTokener x) throws JSONException {
+      final JSONArray ja = rowToJSONArray(x);
+      return ja != null ? ja.toJSONObject(names) : null;
+   }
+
+
+   /**
+    * Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
+    *
+    * @param string
+    *                The comma delimited text.
+    * @return A JSONArray of JSONObjects.
+    * @throws JSONException
+    */
+   public static JSONArray toJSONArray(final String string) throws JSONException {
+      return toJSONArray(new JSONTokener(string));
+   }
+
+
+   /**
+    * Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
+    *
+    * @param x
+    *                The JSONTokener containing the comma delimited text.
+    * @return A JSONArray of JSONObjects.
+    * @throws JSONException
+    */
+   public static JSONArray toJSONArray(final JSONTokener x) throws JSONException {
+      return toJSONArray(rowToJSONArray(x), x);
+   }
+
+
+   /**
+    * Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element
+    * names.
+    *
+    * @param names
+    *                A JSONArray of strings.
+    * @param string
+    *                The comma delimited text.
+    * @return A JSONArray of JSONObjects.
+    * @throws JSONException
+    */
+   public static JSONArray toJSONArray(final JSONArray names,
+                                       final String string) throws JSONException {
+      return toJSONArray(names, new JSONTokener(string));
+   }
+
+
+   /**
+    * Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element
+    * names.
+    *
+    * @param names
+    *                A JSONArray of strings.
+    * @param x
+    *                A JSONTokener of the source text.
+    * @return A JSONArray of JSONObjects.
+    * @throws JSONException
+    */
+   public static JSONArray toJSONArray(final JSONArray names,
+                                       final JSONTokener x) throws JSONException {
+      if (names == null || names.length() == 0) {
+         return null;
+      }
+      final JSONArray ja = new JSONArray();
+      for (;;) {
+         final JSONObject jo = rowToJSONObject(names, x);
+         if (jo == null) {
+            break;
+         }
+         ja.put(jo);
+      }
+      if (ja.length() == 0) {
+         return null;
+      }
+      return ja;
+   }
+
+
+   /**
+    * Produce a comma delimited text row from a JSONArray. Values containing the comma character will be quoted.
+    *
+    * @param ja
+    *                A JSONArray of strings.
+    * @return A string ending in NEWLINE.
+    */
+   public static String rowToString(final JSONArray ja) {
+      final StringBuffer sb = new StringBuffer();
+      for (int i = 0; i < ja.length(); i += 1) {
+         if (i > 0) {
+            sb.append(',');
+         }
+         final Object o = ja.opt(i);
+         if (o != null) {
+            final String s = o.toString();
+            if (s.indexOf(',') >= 0) {
+               if (s.indexOf('"') >= 0) {
+                  sb.append('\'');
+                  sb.append(s);
+                  sb.append('\'');
+               }
+               else {
+                  sb.append('"');
+                  sb.append(s);
+                  sb.append('"');
+               }
+            }
+            else {
+               sb.append(s);
+            }
+         }
+      }
+      sb.append('\n');
+      return sb.toString();
+
+   }
+
+
+   /**
+    * Produce a comma delimited text from a JSONArray of JSONObjects. The first row will be a list of names obtained by inspecting
+    * the first JSONObject.
+    *
+    * @param ja
+    *                A JSONArray of JSONObjects.
+    * @return A comma delimited text.
+    * @throws JSONException
+    */
+   public static String toString(final JSONArray ja) throws JSONException {
+      final JSONObject jo = ja.optJSONObject(0);
+      if (jo != null) {
+         final JSONArray names = jo.names();
+         if (names != null) {
+            return rowToString(names) + toString(names, ja);
+         }
+      }
+      return null;
+   }
+
+
+   /**
+    * Produce a comma delimited text from a JSONArray of JSONObjects using a provided list of names. The list of names is not
+    * included in the output.
+    *
+    * @param names
+    *                A JSONArray of strings.
+    * @param ja
+    *                A JSONArray of JSONObjects.
+    * @return A comma delimited text.
+    * @throws JSONException
+    */
+   public static String toString(final JSONArray names,
+                                 final JSONArray ja) throws JSONException {
+      if (names == null || names.length() == 0) {
+         return null;
+      }
+      final StringBuffer sb = new StringBuffer();
+      for (int i = 0; i < ja.length(); i += 1) {
+         final JSONObject jo = ja.optJSONObject(i);
+         if (jo != null) {
+            sb.append(rowToString(jo.toJSONArray(names)));
+         }
+      }
+      return sb.toString();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CDL.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CookieList.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CookieList.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CookieList.java	(revision 369)
@@ -0,0 +1,92 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert a web browser cookie list string to a JSONObject and back.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class CookieList {
+
+   /**
+    * Convert a cookie list into a JSONObject. A cookie list is a sequence of name/value pairs. The names are separated from the
+    * values by '='. The pairs are separated by ';'. The names and the values will be unescaped, possibly converting '+' and '%'
+    * sequences.
+    *
+    * To add a cookie to a cooklist, cookielistJSONObject.put(cookieJSONObject.getString("name"),
+    * cookieJSONObject.getString("value"));
+    *
+    * @param string
+    *                A cookie list string
+    * @return A JSONObject
+    * @throws JSONException
+    */
+   public static JSONObject toJSONObject(final String string) throws JSONException {
+      final JSONObject o = new JSONObject();
+      final JSONTokener x = new JSONTokener(string);
+      while (x.more()) {
+         final String name = Cookie.unescape(x.nextTo('='));
+         x.next('=');
+         o.put(name, Cookie.unescape(x.nextTo(';')));
+         x.next();
+      }
+      return o;
+   }
+
+
+   /**
+    * Convert a JSONObject into a cookie list. A cookie list is a sequence of name/value pairs. The names are separated from the
+    * values by '='. The pairs are separated by ';'. The characters '%', '+', '=', and ';' in the names and values are replaced by
+    * "%hh".
+    *
+    * @param o
+    *                A JSONObject
+    * @return A cookie list string
+    * @throws JSONException
+    */
+   public static String toString(final JSONObject o) throws JSONException {
+      boolean b = false;
+      final Iterator keys = o.keys();
+      String s;
+      final StringBuffer sb = new StringBuffer();
+      while (keys.hasNext()) {
+         s = keys.next().toString();
+         if (!o.isNull(s)) {
+            if (b) {
+               sb.append(';');
+            }
+            sb.append(Cookie.escape(s));
+            sb.append("=");
+            sb.append(Cookie.escape(o.getString(s)));
+            b = true;
+         }
+      }
+      return sb.toString();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/CookieList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONWriter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONWriter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONWriter.java	(revision 369)
@@ -0,0 +1,349 @@
+package org.json;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+Copyright (c) 2006 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * JSONWriter provides a quick and convenient way of producing JSON text. The texts produced strictly conform to JSON syntax
+ * rules. No whitespace is added, so the results are ready for transmission or storage. Each instance of JSONWriter can produce
+ * one JSON text.
+ * <p>
+ * A JSONWriter instance provides a <code>value</code> method for appending values to the text, and a <code>key</code> method
+ * for adding keys before values in objects. There are <code>array</code> and <code>endArray</code> methods that make and
+ * bound array values, and <code>object</code> and <code>endObject</code> methods which make and bound object values. All of
+ * these methods return the JSONWriter instance, permitting a cascade style. For example,
+ *
+ * <pre>
+ * new JSONWriter(myWriter).object().key(&quot;JSON&quot;).value(&quot;Hello, World!&quot;).endObject();
+ * </pre>
+ *
+ * which writes
+ *
+ * <pre>
+ * {&quot;JSON&quot;:&quot;Hello, World!&quot;}
+ * </pre>
+ *
+ * <p>
+ * The first method called must be <code>array</code> or <code>object</code>. There are no methods for adding commas or
+ * colons. JSONWriter adds them for you. Objects and arrays can be nested up to 20 levels deep.
+ * <p>
+ * This can sometimes be easier than using a JSONObject to build a string.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class JSONWriter {
+   private static final int maxdepth = 20;
+
+   /**
+    * The comma flag determines if a comma should be output before the next value.
+    */
+   private boolean          comma;
+
+   /**
+    * The current mode. Values: 'a' (array), 'd' (done), 'i' (initial), 'k' (key), 'o' (object).
+    */
+   protected char           mode;
+
+   /**
+    * The object/array stack.
+    */
+   private final char             stack[];
+
+   /**
+    * The stack top index. A value of 0 indicates that the stack is empty.
+    */
+   private int              top;
+
+   /**
+    * The writer that will receive the output.
+    */
+   protected Writer         writer;
+
+
+   /**
+    * Make a fresh JSONWriter. It can be used to build one JSON text.
+    */
+   public JSONWriter(final Writer w) {
+      this.comma = false;
+      this.mode = 'i';
+      this.stack = new char[maxdepth];
+      this.top = 0;
+      this.writer = w;
+   }
+
+
+   /**
+    * Append a value.
+    *
+    * @param s
+    *                A string value.
+    * @return this
+    * @throws JSONException
+    *                 If the value is out of sequence.
+    */
+   private JSONWriter append(final String s) throws JSONException {
+      if (s == null) {
+         throw new JSONException("Null pointer");
+      }
+      if (this.mode == 'o' || this.mode == 'a') {
+         try {
+            if (this.comma && this.mode == 'a') {
+               this.writer.write(',');
+            }
+            this.writer.write(s);
+         }
+         catch (final IOException e) {
+            throw new JSONException(e);
+         }
+         if (this.mode == 'o') {
+            this.mode = 'k';
+         }
+         this.comma = true;
+         return this;
+      }
+      throw new JSONException("Value out of sequence.");
+   }
+
+
+   /**
+    * Begin appending a new array. All values until the balancing <code>endArray</code> will be appended to this array. The
+    * <code>endArray</code> method must be called to mark the array's end.
+    *
+    * @return this
+    * @throws JSONException
+    *                 If the nesting is too deep, or if the object is started in the wrong place (for example as a key or after
+    *                 the end of the outermost array or object).
+    */
+   public JSONWriter array() throws JSONException {
+      if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
+         this.push('a');
+         this.append("[");
+         this.comma = false;
+         return this;
+      }
+      throw new JSONException("Misplaced array.");
+   }
+
+
+   /**
+    * End something.
+    *
+    * @param m
+    *                Mode
+    * @param c
+    *                Closing character
+    * @return this
+    * @throws JSONException
+    *                 If unbalanced.
+    */
+   private JSONWriter end(final char m,
+                          final char c) throws JSONException {
+      if (this.mode != m) {
+         throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray.");
+      }
+      this.pop(m);
+      try {
+         this.writer.write(c);
+      }
+      catch (final IOException e) {
+         throw new JSONException(e);
+      }
+      this.comma = true;
+      return this;
+   }
+
+
+   /**
+    * End an array. This method most be called to balance calls to <code>array</code>.
+    *
+    * @return this
+    * @throws JSONException
+    *                 If incorrectly nested.
+    */
+   public JSONWriter endArray() throws JSONException {
+      return this.end('a', ']');
+   }
+
+
+   /**
+    * End an object. This method most be called to balance calls to <code>object</code>.
+    *
+    * @return this
+    * @throws JSONException
+    *                 If incorrectly nested.
+    */
+   public JSONWriter endObject() throws JSONException {
+      return this.end('k', '}');
+   }
+
+
+   /**
+    * Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key.
+    *
+    * @param s
+    *                A key string.
+    * @return this
+    * @throws JSONException
+    *                 If the key is out of place. For example, keys do not belong in arrays or if the key is null.
+    */
+   public JSONWriter key(final String s) throws JSONException {
+      if (s == null) {
+         throw new JSONException("Null key.");
+      }
+      if (this.mode == 'k') {
+         try {
+            if (this.comma) {
+               this.writer.write(',');
+            }
+            this.writer.write(JSONObject.quote(s));
+            this.writer.write(':');
+            this.comma = false;
+            this.mode = 'o';
+            return this;
+         }
+         catch (final IOException e) {
+            throw new JSONException(e);
+         }
+      }
+      throw new JSONException("Misplaced key.");
+   }
+
+
+   /**
+    * Begin appending a new object. All keys and values until the balancing <code>endObject</code> will be appended to this
+    * object. The <code>endObject</code> method must be called to mark the object's end.
+    *
+    * @return this
+    * @throws JSONException
+    *                 If the nesting is too deep, or if the object is started in the wrong place (for example as a key or after
+    *                 the end of the outermost array or object).
+    */
+   public JSONWriter object() throws JSONException {
+      if (this.mode == 'i') {
+         this.mode = 'o';
+      }
+      if (this.mode == 'o' || this.mode == 'a') {
+         this.append("{");
+         this.push('k');
+         this.comma = false;
+         return this;
+      }
+      throw new JSONException("Misplaced object.");
+
+   }
+
+
+   /**
+    * Pop an array or object scope.
+    *
+    * @param c
+    *                The scope to close.
+    * @throws JSONException
+    *                 If nesting is wrong.
+    */
+   private void pop(final char c) throws JSONException {
+      if (this.top <= 0 || this.stack[this.top - 1] != c) {
+         throw new JSONException("Nesting error.");
+      }
+      this.top -= 1;
+      this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1];
+   }
+
+
+   /**
+    * Push an array or object scope.
+    *
+    * @param c
+    *                The scope to open.
+    * @throws JSONException
+    *                 If nesting is too deep.
+    */
+   private void push(final char c) throws JSONException {
+      if (this.top >= maxdepth) {
+         throw new JSONException("Nesting too deep.");
+      }
+      this.stack[this.top] = c;
+      this.mode = c;
+      this.top += 1;
+   }
+
+
+   /**
+    * Append either the value <code>true</code> or the value <code>false</code>.
+    *
+    * @param b
+    *                A boolean.
+    * @return this
+    * @throws JSONException
+    */
+   public JSONWriter value(final boolean b) throws JSONException {
+      return this.append(b ? "true" : "false");
+   }
+
+
+   /**
+    * Append a double value.
+    *
+    * @param d
+    *                A double.
+    * @return this
+    * @throws JSONException
+    *                 If the number is not finite.
+    */
+   public JSONWriter value(final double d) throws JSONException {
+      return this.value(new Double(d));
+   }
+
+
+   /**
+    * Append a long value.
+    *
+    * @param l
+    *                A long.
+    * @return this
+    * @throws JSONException
+    */
+   public JSONWriter value(final long l) throws JSONException {
+      return this.append(Long.toString(l));
+   }
+
+
+   /**
+    * Append an object value.
+    *
+    * @param o
+    *                The object to append. It can be null, or a Boolean, Number, String, JSONObject, or JSONArray, or an object
+    *                with a toJSONString() method.
+    * @return this
+    * @throws JSONException
+    *                 If the value is out of sequence.
+    */
+   public JSONWriter value(final Object o) throws JSONException {
+      return this.append(JSONObject.valueToString(o));
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONWriter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTPTokener.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTPTokener.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTPTokener.java	(revision 369)
@@ -0,0 +1,83 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * The HTTPTokener extends the JSONTokener to provide additional methods for the parsing of HTTP headers.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class HTTPTokener
+         extends
+            JSONTokener {
+
+   /**
+    * Construct an XMLTokener from a string.
+    *
+    * @param s
+    *                A source string.
+    */
+   public HTTPTokener(final String s) {
+      super(s);
+   }
+
+
+   /**
+    * Get the next token or string. This is used in parsing HTTP headers.
+    *
+    * @throws JSONException
+    * @return A String.
+    */
+   public String nextToken() throws JSONException {
+      char c;
+      char q;
+      final StringBuffer sb = new StringBuffer();
+      do {
+         c = next();
+      }
+      while (Character.isWhitespace(c));
+      if (c == '"' || c == '\'') {
+         q = c;
+         for (;;) {
+            c = next();
+            if (c < ' ') {
+               throw syntaxError("Unterminated string.");
+            }
+            if (c == q) {
+               return sb.toString();
+            }
+            sb.append(c);
+         }
+      }
+      for (;;) {
+         if (c == 0 || Character.isWhitespace(c)) {
+            return sb.toString();
+         }
+         sb.append(c);
+         c = next();
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/HTTPTokener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONStringer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONStringer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONStringer.java	(revision 369)
@@ -0,0 +1,80 @@
+package org.json;
+
+/*
+Copyright (c) 2006 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.StringWriter;
+
+/**
+ * JSONStringer provides a quick and convenient way of producing JSON text. The texts produced strictly conform to JSON syntax
+ * rules. No whitespace is added, so the results are ready for transmission or storage. Each instance of JSONStringer can produce
+ * one JSON text.
+ * <p>
+ * A JSONStringer instance provides a <code>value</code> method for appending values to the text, and a <code>key</code>
+ * method for adding keys before values in objects. There are <code>array</code> and <code>endArray</code> methods that make
+ * and bound array values, and <code>object</code> and <code>endObject</code> methods which make and bound object values. All
+ * of these methods return the JSONWriter instance, permitting cascade style. For example,
+ *
+ * <pre>
+ * myString = new JSONStringer().object().key(&quot;JSON&quot;).value(&quot;Hello, World!&quot;).endObject().toString();
+ * </pre>
+ *
+ * which produces the string
+ *
+ * <pre>
+ * {&quot;JSON&quot;:&quot;Hello, World!&quot;}
+ * </pre>
+ *
+ * <p>
+ * The first method called must be <code>array</code> or <code>object</code>. There are no methods for adding commas or
+ * colons. JSONStringer adds them for you. Objects and arrays can be nested up to 20 levels deep.
+ * <p>
+ * This can sometimes be easier than using a JSONObject to build a string.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class JSONStringer
+         extends
+            JSONWriter {
+   /**
+    * Make a fresh JSONStringer. It can be used to build one JSON text.
+    */
+   public JSONStringer() {
+      super(new StringWriter());
+   }
+
+
+   /**
+    * Return the JSON text. This method is used to obtain the product of the JSONStringer instance. It will return
+    * <code>null</code> if there was a problem in the construction of the JSON text (such as the calls to <code>array</code>
+    * were not properly balanced with calls to <code>endArray</code>).
+    *
+    * @return The JSON text.
+    */
+   @Override
+   public String toString() {
+      return this.mode == 'd' ? this.writer.toString() : null;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONStringer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONArray.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONArray.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONArray.java	(revision 369)
@@ -0,0 +1,919 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * A JSONArray is an ordered sequence of values. Its external text form is a string wrapped in square brackets with commas
+ * separating the values. The internal form is an object having <code>get</code> and <code>opt</code> methods for accessing
+ * the values by index, and <code>put</code> methods for adding or replacing values. The values can be any of these types:
+ * <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>, <code>Number</code>, <code>String</code>,
+ * or the <code>JSONObject.NULL object</code>.
+ * <p>
+ * The constructor can convert a JSON text into a Java object. The <code>toString</code> method converts to JSON text.
+ * <p>
+ * A <code>get</code> method returns a value if one can be found, and throws an exception if one cannot be found. An
+ * <code>opt</code> method returns a default value instead of throwing an exception, and so is useful for obtaining optional
+ * values.
+ * <p>
+ * The generic <code>get()</code> and <code>opt()</code> methods return an object which you can cast or query for type. There
+ * are also typed <code>get</code> and <code>opt</code> methods that do type checking and type coersion for you.
+ * <p>
+ * The texts produced by the <code>toString</code> methods strictly conform to JSON syntax rules. The constructors are more
+ * forgiving in the texts they will accept:
+ * <ul>
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just before the closing bracket.</li>
+ * <li>The <code>null</code> value will be inserted when there is <code>,</code>&nbsp;<small>(comma)</small> elision.</li>
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single quote)</small>.</li>
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote or single quote, and if they do not contain
+ * leading or trailing spaces, and if they do not contain any of these characters: <code>{ } [ ] / \ : , = ; #</code> and if
+ * they do not look like numbers and if they are not the reserved words <code>true</code>, <code>false</code>, or
+ * <code>null</code>.</li>
+ * <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as well as by <code>,</code> <small>(comma)</small>.</li>
+ * <li>Numbers may have the <code>0-</code> <small>(octal)</small> or <code>0x-</code> <small>(hex)</small> prefix.</li>
+ * <li>Comments written in the slashshlash, slashstar, and hash conventions will be ignored.</li>
+ * </ul>
+ *
+ * @author JSON.org
+ * @version 2
+ */
+@SuppressWarnings("all")
+public class JSONArray {
+
+
+   /**
+    * The arrayList where the JSONArray's properties are kept.
+    */
+   private final ArrayList myArrayList;
+
+
+   /**
+    * Construct an empty JSONArray.
+    */
+   public JSONArray() {
+      this.myArrayList = new ArrayList();
+   }
+
+
+   /**
+    * Construct a JSONArray from a JSONTokener.
+    *
+    * @param x
+    *                A JSONTokener
+    * @throws JSONException
+    *                 If there is a syntax error.
+    */
+   public JSONArray(final JSONTokener x) throws JSONException {
+      this();
+      if (x.nextClean() != '[') {
+         throw x.syntaxError("A JSONArray text must start with '['");
+      }
+      if (x.nextClean() == ']') {
+         return;
+      }
+      x.back();
+      for (;;) {
+         if (x.nextClean() == ',') {
+            x.back();
+            this.myArrayList.add(null);
+         }
+         else {
+            x.back();
+            this.myArrayList.add(x.nextValue());
+         }
+         switch (x.nextClean()) {
+            case ';':
+            case ',':
+               if (x.nextClean() == ']') {
+                  return;
+               }
+               x.back();
+               break;
+            case ']':
+               return;
+            default:
+               throw x.syntaxError("Expected a ',' or ']'");
+         }
+      }
+   }
+
+
+   /**
+    * Construct a JSONArray from a source sJSON text.
+    *
+    * @param string
+    *                A string that begins with <code>[</code>&nbsp;<small>(left bracket)</small> and ends with <code>]</code>
+    *                &nbsp;<small>(right bracket)</small>.
+    * @throws JSONException
+    *                 If there is a syntax error.
+    */
+   public JSONArray(final String string) throws JSONException {
+      this(new JSONTokener(string));
+   }
+
+
+   /**
+    * Construct a JSONArray from a Collection.
+    *
+    * @param collection
+    *                A Collection.
+    */
+   public JSONArray(final Collection collection) {
+      this.myArrayList = (collection == null) ? new ArrayList() : new ArrayList(collection);
+   }
+
+
+   /**
+    * Get the object value associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return An object value.
+    * @throws JSONException
+    *                 If there is no value for the index.
+    */
+   public Object get(final int index) throws JSONException {
+      final Object o = opt(index);
+      if (o == null) {
+         throw new JSONException("JSONArray[" + index + "] not found.");
+      }
+      return o;
+   }
+
+
+   /**
+    * Get the boolean value associated with an index. The string values "true" and "false" are converted to boolean.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The truth.
+    * @throws JSONException
+    *                 If there is no value for the index or if the value is not convertable to boolean.
+    */
+   public boolean getBoolean(final int index) throws JSONException {
+      final Object o = get(index);
+      if (o.equals(Boolean.FALSE) || ((o instanceof String) && ((String) o).equalsIgnoreCase("false"))) {
+         return false;
+      }
+      else if (o.equals(Boolean.TRUE) || ((o instanceof String) && ((String) o).equalsIgnoreCase("true"))) {
+         return true;
+      }
+      throw new JSONException("JSONArray[" + index + "] is not a Boolean.");
+   }
+
+
+   /**
+    * Get the double value associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    * @throws JSONException
+    *                 If the key is not found or if the value cannot be converted to a number.
+    */
+   public double getDouble(final int index) throws JSONException {
+      final Object o = get(index);
+      try {
+         return o instanceof Number ? ((Number) o).doubleValue() : Double.valueOf((String) o).doubleValue();
+      }
+      catch (final Exception e) {
+         throw new JSONException("JSONArray[" + index + "] is not a number.");
+      }
+   }
+
+
+   /**
+    * Get the int value associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    * @throws JSONException
+    *                 If the key is not found or if the value cannot be converted to a number. if the value cannot be converted to
+    *                 a number.
+    */
+   public int getInt(final int index) throws JSONException {
+      final Object o = get(index);
+      return o instanceof Number ? ((Number) o).intValue() : (int) getDouble(index);
+   }
+
+
+   /**
+    * Get the JSONArray associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return A JSONArray value.
+    * @throws JSONException
+    *                 If there is no value for the index. or if the value is not a JSONArray
+    */
+   public JSONArray getJSONArray(final int index) throws JSONException {
+      final Object o = get(index);
+      if (o instanceof JSONArray) {
+         return (JSONArray) o;
+      }
+      throw new JSONException("JSONArray[" + index + "] is not a JSONArray.");
+   }
+
+
+   /**
+    * Get the JSONObject associated with an index.
+    *
+    * @param index
+    *                subscript
+    * @return A JSONObject value.
+    * @throws JSONException
+    *                 If there is no value for the index or if the value is not a JSONObject
+    */
+   public JSONObject getJSONObject(final int index) throws JSONException {
+      final Object o = get(index);
+      if (o instanceof JSONObject) {
+         return (JSONObject) o;
+      }
+      throw new JSONException("JSONArray[" + index + "] is not a JSONObject.");
+   }
+
+
+   /**
+    * Get the long value associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    * @throws JSONException
+    *                 If the key is not found or if the value cannot be converted to a number.
+    */
+   public long getLong(final int index) throws JSONException {
+      final Object o = get(index);
+      return o instanceof Number ? ((Number) o).longValue() : (long) getDouble(index);
+   }
+
+
+   /**
+    * Get the string associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return A string value.
+    * @throws JSONException
+    *                 If there is no value for the index.
+    */
+   public String getString(final int index) throws JSONException {
+      return get(index).toString();
+   }
+
+
+   /**
+    * Determine if the value is null.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return true if the value at the index is null, or if there is no value.
+    */
+   public boolean isNull(final int index) {
+      return JSONObject.NULL.equals(opt(index));
+   }
+
+
+   /**
+    * Make a string from the contents of this JSONArray. The <code>separator</code> string is inserted between each element.
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param separator
+    *                A string that will be inserted between the elements.
+    * @return a string.
+    * @throws JSONException
+    *                 If the array contains an invalid number.
+    */
+   public String join(final String separator) throws JSONException {
+      final int len = length();
+      final StringBuffer sb = new StringBuffer();
+
+      for (int i = 0; i < len; i += 1) {
+         if (i > 0) {
+            sb.append(separator);
+         }
+         sb.append(JSONObject.valueToString(this.myArrayList.get(i)));
+      }
+      return sb.toString();
+   }
+
+
+   /**
+    * Get the number of elements in the JSONArray, included nulls.
+    *
+    * @return The length (or size).
+    */
+   public int length() {
+      return this.myArrayList.size();
+   }
+
+
+   /**
+    * Get the optional object value associated with an index.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return An object value, or null if there is no object at that index.
+    */
+   public Object opt(final int index) {
+      return ((index < 0) || (index >= length())) ? null : this.myArrayList.get(index);
+   }
+
+
+   /**
+    * Get the optional boolean value associated with an index. It returns false if there is no value at that index, or if the
+    * value is not Boolean.TRUE or the String "true".
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The truth.
+    */
+   public boolean optBoolean(final int index) {
+      return optBoolean(index, false);
+   }
+
+
+   /**
+    * Get the optional boolean value associated with an index. It returns the defaultValue if there is no value at that index or
+    * if it is not a Boolean or the String "true" or "false" (case insensitive).
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @param defaultValue
+    *                A boolean default.
+    * @return The truth.
+    */
+   public boolean optBoolean(final int index,
+                             final boolean defaultValue) {
+      try {
+         return getBoolean(index);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get the optional double value associated with an index. NaN is returned if there is no value for the index, or if the value
+    * is not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    */
+   public double optDouble(final int index) {
+      return optDouble(index, Double.NaN);
+   }
+
+
+   /**
+    * Get the optional double value associated with an index. The defaultValue is returned if there is no value for the index, or
+    * if the value is not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                subscript
+    * @param defaultValue
+    *                The default value.
+    * @return The value.
+    */
+   public double optDouble(final int index,
+                           final double defaultValue) {
+      try {
+         return getDouble(index);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get the optional int value associated with an index. Zero is returned if there is no value for the index, or if the value is
+    * not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    */
+   public int optInt(final int index) {
+      return optInt(index, 0);
+   }
+
+
+   /**
+    * Get the optional int value associated with an index. The defaultValue is returned if there is no value for the index, or if
+    * the value is not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @param defaultValue
+    *                The default value.
+    * @return The value.
+    */
+   public int optInt(final int index,
+                     final int defaultValue) {
+      try {
+         return getInt(index);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get the optional JSONArray associated with an index.
+    *
+    * @param index
+    *                subscript
+    * @return A JSONArray value, or null if the index has no value, or if the value is not a JSONArray.
+    */
+   public JSONArray optJSONArray(final int index) {
+      final Object o = opt(index);
+      return o instanceof JSONArray ? (JSONArray) o : null;
+   }
+
+
+   /**
+    * Get the optional JSONObject associated with an index. Null is returned if the key is not found, or null if the index has no
+    * value, or if the value is not a JSONObject.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return A JSONObject value.
+    */
+   public JSONObject optJSONObject(final int index) {
+      final Object o = opt(index);
+      return o instanceof JSONObject ? (JSONObject) o : null;
+   }
+
+
+   /**
+    * Get the optional long value associated with an index. Zero is returned if there is no value for the index, or if the value
+    * is not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return The value.
+    */
+   public long optLong(final int index) {
+      return optLong(index, 0);
+   }
+
+
+   /**
+    * Get the optional long value associated with an index. The defaultValue is returned if there is no value for the index, or if
+    * the value is not a number and cannot be converted to a number.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @param defaultValue
+    *                The default value.
+    * @return The value.
+    */
+   public long optLong(final int index,
+                       final long defaultValue) {
+      try {
+         return getLong(index);
+      }
+      catch (final Exception e) {
+         return defaultValue;
+      }
+   }
+
+
+   /**
+    * Get the optional string value associated with an index. It returns an empty string if there is no value at that index. If
+    * the value is not a string and is not null, then it is coverted to a string.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @return A String value.
+    */
+   public String optString(final int index) {
+      return optString(index, "");
+   }
+
+
+   /**
+    * Get the optional string associated with an index. The defaultValue is returned if the key is not found.
+    *
+    * @param index
+    *                The index must be between 0 and length() - 1.
+    * @param defaultValue
+    *                The default value.
+    * @return A String value.
+    */
+   public String optString(final int index,
+                           final String defaultValue) {
+      final Object o = opt(index);
+      return o != null ? o.toString() : defaultValue;
+   }
+
+
+   /**
+    * Append a boolean value. This increases the array's length by one.
+    *
+    * @param value
+    *                A boolean value.
+    * @return this.
+    */
+   public JSONArray put(final boolean value) {
+      put(value ? Boolean.TRUE : Boolean.FALSE);
+      return this;
+   }
+
+
+   /**
+    * Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.
+    *
+    * @param value
+    *                A Collection value.
+    * @return this.
+    */
+   public JSONArray put(final Collection value) {
+      put(new JSONArray(value));
+      return this;
+   }
+
+
+   /**
+    * Append a double value. This increases the array's length by one.
+    *
+    * @param value
+    *                A double value.
+    * @throws JSONException
+    *                 if the value is not finite.
+    * @return this.
+    */
+   public JSONArray put(final double value) throws JSONException {
+      final Double d = new Double(value);
+      JSONObject.testValidity(d);
+      put(d);
+      return this;
+   }
+
+
+   /**
+    * Append an int value. This increases the array's length by one.
+    *
+    * @param value
+    *                An int value.
+    * @return this.
+    */
+   public JSONArray put(final int value) {
+      put(new Integer(value));
+      return this;
+   }
+
+
+   /**
+    * Append an long value. This increases the array's length by one.
+    *
+    * @param value
+    *                A long value.
+    * @return this.
+    */
+   public JSONArray put(final long value) {
+      put(new Long(value));
+      return this;
+   }
+
+
+   /**
+    * Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.
+    *
+    * @param value
+    *                A Map value.
+    * @return this.
+    */
+   public JSONArray put(final Map value) {
+      put(new JSONObject(value));
+      return this;
+   }
+
+
+   /**
+    * Append an object value. This increases the array's length by one.
+    *
+    * @param value
+    *                An object value. The value should be a Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or
+    *                the JSONObject.NULL object.
+    * @return this.
+    */
+   public JSONArray put(final Object value) {
+      this.myArrayList.add(value);
+      return this;
+   }
+
+
+   /**
+    * Put or replace a boolean value in the JSONArray. If the index is greater than the length of the JSONArray, then null
+    * elements will be added as necessary to pad it out.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                A boolean value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative.
+    */
+   public JSONArray put(final int index,
+                        final boolean value) throws JSONException {
+      put(index, value ? Boolean.TRUE : Boolean.FALSE);
+      return this;
+   }
+
+
+   /**
+    * Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                A Collection value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative or if the value is not finite.
+    */
+   public JSONArray put(final int index,
+                        final Collection value) throws JSONException {
+      put(index, new JSONArray(value));
+      return this;
+   }
+
+
+   /**
+    * Put or replace a double value. If the index is greater than the length of the JSONArray, then null elements will be added as
+    * necessary to pad it out.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                A double value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative or if the value is not finite.
+    */
+   public JSONArray put(final int index,
+                        final double value) throws JSONException {
+      put(index, new Double(value));
+      return this;
+   }
+
+
+   /**
+    * Put or replace an int value. If the index is greater than the length of the JSONArray, then null elements will be added as
+    * necessary to pad it out.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                An int value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative.
+    */
+   public JSONArray put(final int index,
+                        final int value) throws JSONException {
+      put(index, new Integer(value));
+      return this;
+   }
+
+
+   /**
+    * Put or replace a long value. If the index is greater than the length of the JSONArray, then null elements will be added as
+    * necessary to pad it out.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                A long value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative.
+    */
+   public JSONArray put(final int index,
+                        final long value) throws JSONException {
+      put(index, new Long(value));
+      return this;
+   }
+
+
+   /**
+    * Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                The Map value.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative or if the the value is an invalid number.
+    */
+   public JSONArray put(final int index,
+                        final Map value) throws JSONException {
+      put(index, new JSONObject(value));
+      return this;
+   }
+
+
+   /**
+    * Put or replace an object value in the JSONArray. If the index is greater than the length of the JSONArray, then null
+    * elements will be added as necessary to pad it out.
+    *
+    * @param index
+    *                The subscript.
+    * @param value
+    *                The value to put into the array. The value should be a Boolean, Double, Integer, JSONArray, JSONObject, Long,
+    *                or String, or the JSONObject.NULL object.
+    * @return this.
+    * @throws JSONException
+    *                 If the index is negative or if the the value is an invalid number.
+    */
+   public JSONArray put(final int index,
+                        final Object value) throws JSONException {
+      JSONObject.testValidity(value);
+      if (index < 0) {
+         throw new JSONException("JSONArray[" + index + "] not found.");
+      }
+      if (index < length()) {
+         this.myArrayList.set(index, value);
+      }
+      else {
+         while (index != length()) {
+            put(JSONObject.NULL);
+         }
+         put(value);
+      }
+      return this;
+   }
+
+
+   /**
+    * Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.
+    *
+    * @param names
+    *                A JSONArray containing a list of key strings. These will be paired with the values.
+    * @return A JSONObject, or null if there are no names or if this JSONArray has no values.
+    * @throws JSONException
+    *                 If any of the names are null.
+    */
+   public JSONObject toJSONObject(final JSONArray names) throws JSONException {
+      if ((names == null) || (names.length() == 0) || (length() == 0)) {
+         return null;
+      }
+      final JSONObject jo = new JSONObject();
+      for (int i = 0; i < names.length(); i += 1) {
+         jo.put(names.getString(i), this.opt(i));
+      }
+      return jo;
+   }
+
+
+   /**
+    * Make a JSON text of this JSONArray. For compactness, no unnecessary whitespace is added. If it is not possible to produce a
+    * syntactically correct JSON text then null will be returned instead. This could occur if the array contains an invalid
+    * number.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @return a printable, displayable, transmittable representation of the array.
+    */
+   @Override
+   public String toString() {
+      try {
+         return '[' + join(",") + ']';
+      }
+      catch (final Exception e) {
+         return null;
+      }
+   }
+
+
+   /**
+    * Make a prettyprinted JSON text of this JSONArray. Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param indentFactor
+    *                The number of spaces to add to each level of indentation.
+    * @return a printable, displayable, transmittable representation of the object, beginning with <code>[</code> &nbsp;<small>(left
+    *         bracket)</small> and ending with <code>]</code>&nbsp;<small>(right bracket)</small>.
+    * @throws JSONException
+    */
+   public String toString(final int indentFactor) throws JSONException {
+      return toString(indentFactor, 0);
+   }
+
+
+   /**
+    * Make a prettyprinted JSON text of this JSONArray. Warning: This method assumes that the data structure is acyclical.
+    *
+    * @param indentFactor
+    *                The number of spaces to add to each level of indentation.
+    * @param indent
+    *                The indention of the top level.
+    * @return a printable, displayable, transmittable representation of the array.
+    * @throws JSONException
+    */
+   String toString(final int indentFactor,
+                   final int indent) throws JSONException {
+      final int len = length();
+      if (len == 0) {
+         return "[]";
+      }
+      int i;
+      final StringBuffer sb = new StringBuffer("[");
+      if (len == 1) {
+         sb.append(JSONObject.valueToString(this.myArrayList.get(0), indentFactor, indent));
+      }
+      else {
+         final int newindent = indent + indentFactor;
+         sb.append('\n');
+         for (i = 0; i < len; i += 1) {
+            if (i > 0) {
+               sb.append(",\n");
+            }
+            for (int j = 0; j < newindent; j += 1) {
+               sb.append(' ');
+            }
+            sb.append(JSONObject.valueToString(this.myArrayList.get(i), indentFactor, newindent));
+         }
+         sb.append('\n');
+         for (i = 0; i < indent; i += 1) {
+            sb.append(' ');
+         }
+      }
+      sb.append(']');
+      return sb.toString();
+   }
+
+
+   /**
+    * Write the contents of the JSONArray as JSON text to a writer. For compactness, no whitespace is added.
+    * <p>
+    * Warning: This method assumes that the data structure is acyclical.
+    *
+    * @return The writer.
+    * @throws JSONException
+    */
+   public Writer write(final Writer writer) throws JSONException {
+      try {
+         boolean b = false;
+         final int len = length();
+
+         writer.write('[');
+
+         for (int i = 0; i < len; i += 1) {
+            if (b) {
+               writer.write(',');
+            }
+            final Object v = this.myArrayList.get(i);
+            if (v instanceof JSONObject) {
+               ((JSONObject) v).write(writer);
+            }
+            else if (v instanceof JSONArray) {
+               ((JSONArray) v).write(writer);
+            }
+            else {
+               writer.write(JSONObject.valueToString(v));
+            }
+            b = true;
+         }
+         writer.write(']');
+         return writer;
+      }
+      catch (final IOException e) {
+         throw new JSONException(e);
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONArray.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONException.java	(revision 369)
@@ -0,0 +1,37 @@
+package org.json;
+
+/**
+ * The JSONException is thrown by the JSON.org classes then things are amiss.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+@SuppressWarnings("all")
+public class JSONException
+         extends
+            Exception {
+   private Throwable cause;
+
+
+   /**
+    * Constructs a JSONException with an explanatory message.
+    *
+    * @param message
+    *                Detail about the reason for the exception.
+    */
+   public JSONException(final String message) {
+      super(message);
+   }
+
+
+   public JSONException(final Throwable t) {
+      super(t.getMessage());
+      this.cause = t;
+   }
+
+
+   @Override
+   public Throwable getCause() {
+      return this.cause;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/JSONException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XMLTokener.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XMLTokener.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XMLTokener.java	(revision 369)
@@ -0,0 +1,306 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * The XMLTokener extends the JSONTokener to provide additional methods for the parsing of XML texts.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+@SuppressWarnings("all")
+public class XMLTokener
+         extends
+            JSONTokener {
+
+
+   /**
+    * The table of entity values. It initially contains Character values for amp, apos, gt, lt, quot.
+    */
+   public static final java.util.HashMap entity;
+
+   static {
+      entity = new java.util.HashMap(8);
+      XMLTokener.entity.put("amp", XML.AMP);
+      XMLTokener.entity.put("apos", XML.APOS);
+      XMLTokener.entity.put("gt", XML.GT);
+      XMLTokener.entity.put("lt", XML.LT);
+      XMLTokener.entity.put("quot", XML.QUOT);
+   }
+
+
+   /**
+    * Construct an XMLTokener from a string.
+    *
+    * @param s
+    *                A source string.
+    */
+   public XMLTokener(final String s) {
+      super(s);
+   }
+
+
+   /**
+    * Get the text in the CDATA block.
+    *
+    * @return The string up to the <code>]]&gt;</code>.
+    * @throws JSONException
+    *                 If the <code>]]&gt;</code> is not found.
+    */
+   public String nextCDATA() throws JSONException {
+      char c;
+      int i;
+      final StringBuffer sb = new StringBuffer();
+      for (;;) {
+         c = next();
+         if (c == 0) {
+            throw syntaxError("Unclosed CDATA");
+         }
+         sb.append(c);
+         i = sb.length() - 3;
+         if ((i >= 0) && (sb.charAt(i) == ']') && (sb.charAt(i + 1) == ']') && (sb.charAt(i + 2) == '>')) {
+            sb.setLength(i);
+            return sb.toString();
+         }
+      }
+   }
+
+
+   /**
+    * Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '<' character which begins a markup
+    * tag, and the content text between markup tags.
+    *
+    * @return A string, or a '<' Character, or null if there is no more source text.
+    * @throws JSONException
+    */
+   public Object nextContent() throws JSONException {
+      char c;
+      StringBuffer sb;
+      do {
+         c = next();
+      }
+      while (Character.isWhitespace(c));
+      if (c == 0) {
+         return null;
+      }
+      if (c == '<') {
+         return XML.LT;
+      }
+      sb = new StringBuffer();
+      for (;;) {
+         if ((c == '<') || (c == 0)) {
+            back();
+            return sb.toString().trim();
+         }
+         if (c == '&') {
+            sb.append(nextEntity(c));
+         }
+         else {
+            sb.append(c);
+         }
+         c = next();
+      }
+   }
+
+
+   /**
+    * Return the next entity. These entities are translated to Characters: <code>&amp;  &apos;  &gt;  &lt;  &quot;</code>.
+    *
+    * @param a
+    *                An ampersand character.
+    * @return A Character or an entity String if the entity is not recognized.
+    * @throws JSONException
+    *                 If missing ';' in XML entity.
+    */
+   public Object nextEntity(final char a) throws JSONException {
+      final StringBuffer sb = new StringBuffer();
+      for (;;) {
+         final char c = next();
+         if (Character.isLetterOrDigit(c) || (c == '#')) {
+            sb.append(Character.toLowerCase(c));
+         }
+         else if (c == ';') {
+            break;
+         }
+         else {
+            throw syntaxError("Missing ';' in XML entity: &" + sb);
+         }
+      }
+      final String s = sb.toString();
+      final Object e = XMLTokener.entity.get(s);
+      return e != null ? e : a + s + ";";
+   }
+
+
+   /**
+    * Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.
+    *
+    * @return Syntax characters (<code>< > / = ! ?</code>) are returned as Character, and strings and names are returned as
+    *         Boolean. We don't care what the values actually are.
+    * @throws JSONException
+    *                 If a string is not properly closed or if the XML is badly structured.
+    */
+   public Object nextMeta() throws JSONException {
+      char c;
+      char q;
+      do {
+         c = next();
+      }
+      while (Character.isWhitespace(c));
+      switch (c) {
+         case 0:
+            throw syntaxError("Misshaped meta tag");
+         case '<':
+            return XML.LT;
+         case '>':
+            return XML.GT;
+         case '/':
+            return XML.SLASH;
+         case '=':
+            return XML.EQ;
+         case '!':
+            return XML.BANG;
+         case '?':
+            return XML.QUEST;
+         case '"':
+         case '\'':
+            q = c;
+            for (;;) {
+               c = next();
+               if (c == 0) {
+                  throw syntaxError("Unterminated string");
+               }
+               if (c == q) {
+                  return Boolean.TRUE;
+               }
+            }
+         default:
+            for (;;) {
+               c = next();
+               if (Character.isWhitespace(c)) {
+                  return Boolean.TRUE;
+               }
+               switch (c) {
+                  case 0:
+                  case '<':
+                  case '>':
+                  case '/':
+                  case '=':
+                  case '!':
+                  case '?':
+                  case '"':
+                  case '\'':
+                     back();
+                     return Boolean.TRUE;
+               }
+            }
+      }
+   }
+
+
+   /**
+    * Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters:
+    * <code>/ > = ! ?</code> or it may be a string wrapped in single quotes or double quotes, or it may be a name.
+    *
+    * @return a String or a Character.
+    * @throws JSONException
+    *                 If the XML is not well formed.
+    */
+   public Object nextToken() throws JSONException {
+      char c;
+      char q;
+      StringBuffer sb;
+      do {
+         c = next();
+      }
+      while (Character.isWhitespace(c));
+      switch (c) {
+         case 0:
+            throw syntaxError("Misshaped element");
+         case '<':
+            throw syntaxError("Misplaced '<'");
+         case '>':
+            return XML.GT;
+         case '/':
+            return XML.SLASH;
+         case '=':
+            return XML.EQ;
+         case '!':
+            return XML.BANG;
+         case '?':
+            return XML.QUEST;
+
+            // Quoted string
+
+         case '"':
+         case '\'':
+            q = c;
+            sb = new StringBuffer();
+            for (;;) {
+               c = next();
+               if (c == 0) {
+                  throw syntaxError("Unterminated string");
+               }
+               if (c == q) {
+                  return sb.toString();
+               }
+               if (c == '&') {
+                  sb.append(nextEntity(c));
+               }
+               else {
+                  sb.append(c);
+               }
+            }
+         default:
+
+            // Name
+
+            sb = new StringBuffer();
+            for (;;) {
+               sb.append(c);
+               c = next();
+               if (Character.isWhitespace(c)) {
+                  return sb.toString();
+               }
+               switch (c) {
+                  case 0:
+                  case '>':
+                  case '/':
+                  case '=':
+                  case '!':
+                  case '?':
+                  case '[':
+                  case ']':
+                     back();
+                     return sb.toString();
+                  case '<':
+                  case '"':
+                  case '\'':
+                     throw syntaxError("Bad character in a name");
+               }
+            }
+      }
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/XMLTokener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Cookie.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Cookie.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Cookie.java	(revision 369)
@@ -0,0 +1,170 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * Convert a web browser cookie specification to a JSONObject and back. JSON and Cookies are both notations for name/value pairs.
+ *
+ * @author JSON.org
+ * @version 2
+ */
+public class Cookie {
+
+   /**
+    * Produce a copy of a string in which the characters '+', '%', '=', ';' and control characters are replaced with "%hh". This
+    * is a gentle form of URL encoding, attempting to cause as little distortion to the string as possible. The characters '=' and
+    * ';' are meta characters in cookies. By convention, they are escaped using the URL-encoding. This is only a convention, not a
+    * standard. Often, cookies are expected to have encoded values. We encode '=' and ';' because we must. We encode '%' and '+'
+    * because they are meta characters in URL encoding.
+    *
+    * @param string
+    *                The source string.
+    * @return The escaped result.
+    */
+   public static String escape(final String string) {
+      char c;
+      final String s = string.trim();
+      final StringBuffer sb = new StringBuffer();
+      final int len = s.length();
+      for (int i = 0; i < len; i += 1) {
+         c = s.charAt(i);
+         if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') {
+            sb.append('%');
+            sb.append(Character.forDigit((char) ((c >>> 4) & 0x0f), 16));
+            sb.append(Character.forDigit((char) (c & 0x0f), 16));
+         }
+         else {
+            sb.append(c);
+         }
+      }
+      return sb.toString();
+   }
+
+
+   /**
+    * Convert a cookie specification string into a JSONObject. The string will contain a name value pair separated by '='. The
+    * name and the value will be unescaped, possibly converting '+' and '%' sequences. The cookie properties may follow, separated
+    * by ';', also represented as name=value (except the secure property, which does not have a value). The name will be stored
+    * under the key "name", and the value will be stored under the key "value". This method does not do checking or validation of
+    * the parameters. It only converts the cookie string into a JSONObject.
+    *
+    * @param string
+    *                The cookie specification string.
+    * @return A JSONObject containing "name", "value", and possibly other members.
+    * @throws JSONException
+    */
+   public static JSONObject toJSONObject(final String string) throws JSONException {
+      String n;
+      final JSONObject o = new JSONObject();
+      Object v;
+      final JSONTokener x = new JSONTokener(string);
+      o.put("name", x.nextTo('='));
+      x.next('=');
+      o.put("value", x.nextTo(';'));
+      x.next();
+      while (x.more()) {
+         n = unescape(x.nextTo("=;"));
+         if (x.next() != '=') {
+            if (n.equals("secure")) {
+               v = Boolean.TRUE;
+            }
+            else {
+               throw x.syntaxError("Missing '=' in cookie parameter.");
+            }
+         }
+         else {
+            v = unescape(x.nextTo(';'));
+            x.next();
+         }
+         o.put(n, v);
+      }
+      return o;
+   }
+
+
+   /**
+    * Convert a JSONObject into a cookie specification string. The JSONObject must contain "name" and "value" members. If the
+    * JSONObject contains "expires", "domain", "path", or "secure" members, they will be appended to the cookie specification
+    * string. All other members are ignored.
+    *
+    * @param o
+    *                A JSONObject
+    * @return A cookie specification string
+    * @throws JSONException
+    */
+   public static String toString(final JSONObject o) throws JSONException {
+      final StringBuffer sb = new StringBuffer();
+
+      sb.append(escape(o.getString("name")));
+      sb.append("=");
+      sb.append(escape(o.getString("value")));
+      if (o.has("expires")) {
+         sb.append(";expires=");
+         sb.append(o.getString("expires"));
+      }
+      if (o.has("domain")) {
+         sb.append(";domain=");
+         sb.append(escape(o.getString("domain")));
+      }
+      if (o.has("path")) {
+         sb.append(";path=");
+         sb.append(escape(o.getString("path")));
+      }
+      if (o.optBoolean("secure")) {
+         sb.append(";secure");
+      }
+      return sb.toString();
+   }
+
+
+   /**
+    * Convert <code>%</code><i>hh</i> sequences to single characters, and convert plus to space.
+    *
+    * @param s
+    *                A string that may contain <code>+</code>&nbsp;<small>(plus)</small> and <code>%</code><i>hh</i>
+    *                sequences.
+    * @return The unescaped string.
+    */
+   public static String unescape(final String s) {
+      final int len = s.length();
+      final StringBuffer b = new StringBuffer();
+      for (int i = 0; i < len; ++i) {
+         char c = s.charAt(i);
+         if (c == '+') {
+            c = ' ';
+         }
+         else if (c == '%' && i + 2 < len) {
+            final int d = JSONTokener.dehexchar(s.charAt(i + 1));
+            final int e = JSONTokener.dehexchar(s.charAt(i + 2));
+            if (d >= 0 && e >= 0) {
+               c = (char) (d * 16 + e);
+               i += 2;
+            }
+         }
+         b.append(c);
+      }
+      return b.toString();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/org/json/Cookie.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorDeleteField/VectorDeleteFieldAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorDeleteField/VectorDeleteFieldAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorDeleteField/VectorDeleteFieldAlgorithm.java	(revision 369)
@@ -0,0 +1,102 @@
+package it.falciano.sextante.vectorDeleteField;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class VectorDeleteFieldAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT  = "INPUT";
+   public static final String FIELD  = "FIELD";
+   public static final String RESULT = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Delete_field"));
+      this.setGroup(Sextante.getText("Tools_for_vector_layers"));
+      this.setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(INPUT, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD, Sextante.getText("Field"), INPUT);
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, INPUT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         e.printStackTrace();
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         e.printStackTrace();
+      }
+      catch (final OptionalParentParameterException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   @SuppressWarnings("unchecked")
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(INPUT);
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD);
+
+      final Class[] inputFieldTypes = layer.getFieldTypes();
+      final String[] inputFieldNames = layer.getFieldNames();
+      final Class[] outputFieldTypes = new Class[inputFieldTypes.length - 1];
+      final String[] outputFieldNames = new String[inputFieldTypes.length - 1];
+
+      int j = 0;
+      for (int i = 0; i < inputFieldTypes.length; i++) {
+         if (i != iField) {
+            outputFieldTypes[j] = inputFieldTypes[i];
+            outputFieldNames[j] = inputFieldNames[i];
+            j++;
+         }
+      }
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, layer.getName(), layer.getShapeType(), outputFieldTypes,
+               outputFieldNames);
+
+      final int k = 0;
+      final int iShapeCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(k, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Object[] inputValues = feature.getRecord().getValues();
+         final Object[] outputValues = new Object[inputValues.length - 1];
+         j = 0;
+         for (int i = 0; i < inputFieldTypes.length; i++) {
+            if (i != iField) {
+               if (inputValues[i] == null) {
+                  outputValues[j] = null;
+               }
+               else {
+                  outputValues[j] = inputValues[i];
+               }
+               j++;
+            }
+         }
+         final Geometry geom = feature.getGeometry();
+         output.addFeature(geom, outputValues);
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorDeleteField/VectorDeleteFieldAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorRenameField/VectorRenameFieldAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorRenameField/VectorRenameFieldAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorRenameField/VectorRenameFieldAlgorithm.java	(revision 369)
@@ -0,0 +1,108 @@
+package it.falciano.sextante.vectorRenameField;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+public class VectorRenameFieldAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT           = "INPUT";
+   public static final String FIELD_TO_RENAME = "FIELD_TO_RENAME";
+   public static final String NEW_FIELD_NAME  = "NEW_FIELD_NAME";
+   public static final String RESULT          = "RESULT";
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Rename_field"));
+      this.setGroup(Sextante.getText("Tools_for_vector_layers"));
+      this.setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(INPUT, Sextante.getText("Vector layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addTableField(FIELD_TO_RENAME, Sextante.getText("field_to_rename"), "INPUT");
+         m_Parameters.addString(NEW_FIELD_NAME, Sextante.getText("name_for_new_field"), "");
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, INPUT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         e.printStackTrace();
+      }
+      catch (final UndefinedParentParameterNameException e) {
+         e.printStackTrace();
+      }
+      catch (final OptionalParentParameterException e) {
+         e.printStackTrace();
+      }
+
+   }
+
+
+   @Override
+   @SuppressWarnings("unchecked")
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(INPUT);
+      final int iField = m_Parameters.getParameterValueAsInt(FIELD_TO_RENAME);
+      final String sNewFieldName = m_Parameters.getParameterValueAsString(NEW_FIELD_NAME);
+
+      if (sNewFieldName.length() == 0) {
+         final String s = Sextante.getText("New_field_name_is_empty_Processing_aborted!");
+         Sextante.addErrorToLog(s);
+         throw new GeoAlgorithmExecutionException(s);
+      }
+      else if (sNewFieldName.length() > 10) {
+         final String s = Sextante.getText("The_length_of_new_field_name_is_over_10_characters_Processing_aborted!");
+         Sextante.addErrorToLog(s);
+         throw new GeoAlgorithmExecutionException(s);
+      }
+
+      final Class[] inputFieldTypes = layer.getFieldTypes();
+      final String[] inputFieldNames = layer.getFieldNames();
+      final Class[] outputFieldTypes = new Class[inputFieldTypes.length];
+      final String[] outputFieldNames = new String[inputFieldTypes.length];
+
+      for (int i = 0; i < inputFieldTypes.length; i++) {
+         outputFieldTypes[i] = inputFieldTypes[i];
+         if (i != iField) {
+            outputFieldNames[i] = inputFieldNames[i];
+         }
+         else {
+            outputFieldNames[i] = sNewFieldName;
+         }
+      }
+
+      final IVectorLayer output = getNewVectorLayer("RESULT", layer.getName(), layer.getShapeType(), outputFieldTypes,
+               outputFieldNames);
+
+      final int j = 0;
+      final int iShapeCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(j, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Object[] inputValues = feature.getRecord().getValues();
+         final Object[] outputValues = new Object[inputValues.length];
+         for (int i = 0; i < inputFieldTypes.length; i++) {
+            outputValues[i] = inputValues[i];
+         }
+         final Geometry geom = feature.getGeometry();
+         output.addFeature(geom, outputValues);
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorRenameField/VectorRenameFieldAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/polygonize/PolygonizeAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/polygonize/PolygonizeAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/polygonize/PolygonizeAlgorithm.java	(revision 369)
@@ -0,0 +1,144 @@
+
+
+package it.falciano.sextante.polygonize;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryCollection;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
+import com.vividsolutions.jts.geom.Polygon;
+import com.vividsolutions.jts.geom.TopologyException;
+import com.vividsolutions.jts.operation.polygonize.Polygonizer;
+import com.vividsolutions.jts.precision.EnhancedPrecisionOp;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class PolygonizeAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String LAYER  = "LAYER";
+   public static final String RESULT = "RESULT";
+
+   private IVectorLayer       m_Layer;
+   private IVectorLayer       m_Output;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      setName(Sextante.getText("Polygonize"));
+      setGroup(Sextante.getText("Tools_for_line_layers"));
+      setUserCanDefineAnalysisExtent(true);
+
+      try {
+         m_Parameters.addInputVectorLayer(LAYER, Sextante.getText("Polylines"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true);
+         addOutputVectorLayer(RESULT, Sextante.getText("Polygons"), OutputVectorLayer.SHAPE_TYPE_POLYGON);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   @SuppressWarnings("unchecked")
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      m_Layer = m_Parameters.getParameterValueAsVectorLayer(LAYER);
+      if (!m_bIsAutoExtent) {
+         m_Layer.addFilter(new BoundingBoxFilter(m_AnalysisExtent));
+      }
+
+      final IFeatureIterator iter = m_Layer.iterator();
+      int i = 0;
+      int k = 0;
+      final Collection<LineString> cLineStrings = new ArrayList<LineString>();
+      int errorcount = 0;
+
+      while (iter.hasNext()) {
+         final IFeature feature = iter.next();
+         final Geometry geom = feature.getGeometry();
+         // Converting MultiLineString to Linestring
+         if (MultiLineString.class.isAssignableFrom(geom.getClass())) {
+            final MultiLineString mls = (MultiLineString) geom;
+            final int N = mls.getNumGeometries();
+            for (int j = 0; j < N; j++) {
+               cLineStrings.add((LineString) mls.getGeometryN(j));
+               k++;
+            }
+         } else {
+        	 if(geom instanceof LineString){
+        		 cLineStrings.add((LineString)geom);
+        	 } else {
+					if (errorcount < 10) {
+						Sextante.addWarningToLog("Polygonize Algorithm require a LineString, found at " + i + " a "
+								+ geom.getClass().getName());
+						errorcount++;
+					}
+        	 }
+
+         }
+         i++;
+      }
+
+      try {
+         // Noding a set of linestrings
+         final GeometryFactory factory = new GeometryFactory();
+         final GeometryCollection geometryCollection = (GeometryCollection) factory.buildGeometry(cLineStrings);
+         Geometry nodedLineStrings = (geometryCollection).getGeometryN(0);
+
+         // Union of noded linestrings
+         for (int j = 1; j < cLineStrings.size(); j++) {
+            // here there could be a TopologyException, so I enhance the precision!!!
+            final LineString newLineString = ((ArrayList<LineString>) cLineStrings).get(j);
+            nodedLineStrings = EnhancedPrecisionOp.union(nodedLineStrings, newLineString);
+            setProgress(j, cLineStrings.size());
+         }
+
+         // Polygonization
+         final Polygonizer polygonizer = new Polygonizer();
+         polygonizer.add(nodedLineStrings);
+         final Collection<Polygon> cPolygons = polygonizer.getPolygons();
+
+         // Preparing the output(s)
+         final Class[] outputFieldTypes = new Class[1];
+         final String[] outputFieldNames = new String[1];
+         outputFieldTypes[0] = Integer.class;
+         outputFieldNames[0] = "ID";
+
+         m_Output = getNewVectorLayer(RESULT, m_Layer.getName(), IVectorLayer.SHAPE_TYPE_POLYGON, outputFieldTypes,
+                  outputFieldNames);
+
+         final Polygon[] aPolygons = cPolygons.toArray(new Polygon[cPolygons.size()]);
+         final Integer[] outputValues = new Integer[1];
+
+         for (int k1 = 0; k1 < aPolygons.length; k1++) {
+            outputValues[0] = k1;
+            m_Output.addFeature(aPolygons[k1].getGeometryN(0), outputValues);
+         }
+      }
+      catch (final TopologyException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/polygonize/PolygonizeAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorAddField/VectorAddFieldAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorAddField/VectorAddFieldAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorAddField/VectorAddFieldAlgorithm.java	(revision 369)
@@ -0,0 +1,189 @@
+
+
+package it.falciano.sextante.vectorAddField;
+
+import java.math.BigDecimal;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class VectorAddFieldAlgorithm
+         extends
+            GeoAlgorithm {
+
+   public static final String INPUT                  = "INPUT";
+   public static final String FIELD_NAME             = "FIELD_NAME";
+   public static final String FIELD_TYPE             = "FIELD_TYPE";
+   public static final String FIELD_LENGTH           = "FIELD_LENGTH";
+   public static final String FIELD_PRECISION        = "FIELD_PRECISION";
+   public static final String DEFAULT_VALUE          = "DEFAULT_VALUE";
+   public static final String RESULT                 = "RESULT";
+
+   public static final int    TYPE_INT               = 0;
+   public static final int    TYPE_DOUBLE            = 1;
+   public static final int    TYPE_STRING            = 2;
+
+   // check these values on http://en.wikipedia.org/wiki/Shapefile#Data_storage
+   //	* Incapable of storing null values (this is a serious issue for quantitative data, as it
+   //	  may skew representation and statistics as null quantities are often represented with 0)
+   //	* Poor support for Unicode field names or field storage
+   //	* Maximum length of field names is 10 characters
+   //	* Maximum number of fields is 255
+   //	* Supported field types are: floating point (13 character storage), integer (4 or 9 character
+   //	  storage), date (no time storage; 8 character storage), and text (maximum 254 character storage)
+   //	* Floating point numbers may contain rounding errors since they are stored as text
+
+   public static final double DEFAULT_FIELD_LENGTH   = 1;
+   public static final double DEFAUL_FIELD_PRECISION = 0;
+   public static final double MIN_FIELD_LENGTH       = 1;
+   public static final double MIN_FIELD_PRECISION    = 0;
+   // TODO: MAX_FIELD_LENGTH depends by field type
+   public static final double MAX_FIELD_LENGTH       = 254;
+   public static final double MAX_FIELD_PRECISION    = 20;
+
+
+   @Override
+   public void defineCharacteristics() {
+
+      this.setName(Sextante.getText("Add_field"));
+      this.setGroup(Sextante.getText("Tools_for_vector_layers"));
+      this.setUserCanDefineAnalysisExtent(false);
+
+      try {
+         m_Parameters.addInputVectorLayer(INPUT, Sextante.getText("Layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_ANY, true);
+         m_Parameters.addString(FIELD_NAME, Sextante.getText("Field_name"));
+         final String[] sTypes = { "Integer", "Double", "String" };
+         m_Parameters.addSelection(FIELD_TYPE, Sextante.getText("Field_type"), sTypes);
+         m_Parameters.addNumericalValue(FIELD_LENGTH, Sextante.getText("Field_length"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER,
+                  DEFAULT_FIELD_LENGTH, MIN_FIELD_LENGTH, MAX_FIELD_LENGTH);
+         m_Parameters.addNumericalValue(FIELD_PRECISION, Sextante.getText("Field_precision_Double_only"),
+                  AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER, DEFAUL_FIELD_PRECISION, MIN_FIELD_PRECISION,
+                  MAX_FIELD_PRECISION);
+         m_Parameters.addString(DEFAULT_VALUE, Sextante.getText("Default_value"));
+         addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_UNDEFINED, INPUT);
+      }
+      catch (final RepeatedParameterNameException e) {
+         Sextante.addErrorToLog(e);
+      }
+
+   }
+
+
+   @Override
+   @SuppressWarnings("unchecked")
+   public boolean processAlgorithm() throws GeoAlgorithmExecutionException {
+
+      final IVectorLayer layer = m_Parameters.getParameterValueAsVectorLayer(INPUT);
+      final String fieldName = m_Parameters.getParameterValueAsString(FIELD_NAME);
+      final int iFieldType = m_Parameters.getParameterValueAsInt(FIELD_TYPE);
+
+      final int iFieldLength = m_Parameters.getParameterValueAsInt(FIELD_LENGTH);
+      final int iFieldPrecision = m_Parameters.getParameterValueAsInt(FIELD_PRECISION);
+      String sDefaultValue;
+      try {
+         if (iFieldType == TYPE_DOUBLE) {
+            sDefaultValue = m_Parameters.getParameterValueAsString(DEFAULT_VALUE).substring(0, iFieldLength + 1);
+         }
+         else {
+            sDefaultValue = m_Parameters.getParameterValueAsString(DEFAULT_VALUE).substring(0, iFieldLength);
+         }
+      }
+      catch (final StringIndexOutOfBoundsException e) {
+         sDefaultValue = m_Parameters.getParameterValueAsString(DEFAULT_VALUE);
+         Sextante.addErrorToLog(e);
+      }
+
+      final Class[] inputFieldTypes = layer.getFieldTypes();
+      final String[] inputFieldNames = layer.getFieldNames();
+      final Class[] outputFieldTypes = new Class[inputFieldTypes.length + 1];
+      final String[] outputFieldNames = new String[inputFieldTypes.length + 1];
+
+      for (int i = 0; i < inputFieldTypes.length; i++) {
+         outputFieldTypes[i] = inputFieldTypes[i];
+         outputFieldNames[i] = inputFieldNames[i];
+      }
+      switch (iFieldType) {
+         case TYPE_INT:
+            outputFieldTypes[inputFieldTypes.length] = Integer.class;
+            break;
+         case TYPE_DOUBLE:
+            outputFieldTypes[inputFieldTypes.length] = Double.class;
+            break;
+         case TYPE_STRING:
+            outputFieldTypes[inputFieldTypes.length] = String.class;
+            break;
+         default:
+            break;
+      }
+      outputFieldNames[inputFieldTypes.length] = fieldName;
+
+      final IVectorLayer output = getNewVectorLayer(RESULT, layer.getName(), layer.getShapeType(), outputFieldTypes,
+               outputFieldNames);
+
+      int j = 0;
+      final int iShapeCount = layer.getShapesCount();
+      final IFeatureIterator iter = layer.iterator();
+      while (iter.hasNext() && setProgress(j, iShapeCount)) {
+         final IFeature feature = iter.next();
+         final Object[] inputValues = feature.getRecord().getValues();
+         final Object[] outputValues = new Object[inputValues.length + 1];
+         for (int i = 0; i < inputFieldTypes.length; i++) {
+            if (inputValues[i] == null) {
+               outputValues[i] = null;
+            }
+            else {
+               outputValues[i] = inputValues[i];
+            }
+         }
+         if (sDefaultValue.length() == 0) {
+        	 if (iFieldType == TYPE_INT || iFieldType == TYPE_DOUBLE) {
+        		 outputValues[inputFieldTypes.length] = 0;
+        	 } else {
+        		 outputValues[inputFieldTypes.length] = "";
+        	 }
+         } else {
+            try {
+               switch (iFieldType) {
+                  case TYPE_INT:
+                     final Integer iDefaultValue = new Integer(Integer.parseInt(sDefaultValue));
+                     outputValues[inputFieldTypes.length] = iDefaultValue;
+                     break;
+                  case TYPE_DOUBLE:
+                     final BigDecimal roundDefaultValue = new BigDecimal(Double.parseDouble(sDefaultValue)).setScale(
+                              iFieldPrecision, BigDecimal.ROUND_HALF_EVEN);
+                     final Double dDefaultValue = new Double(roundDefaultValue.doubleValue());
+                     outputValues[inputFieldTypes.length] = dDefaultValue;
+                     break;
+                  case TYPE_STRING:
+                     outputValues[inputFieldTypes.length] = sDefaultValue;
+                     break;
+                  default:
+                     break;
+               }
+            }
+            catch (final NumberFormatException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+         final Geometry geom = feature.getGeometry();
+         output.addFeature(geom, outputValues);
+         j++;
+      }
+      iter.close();
+
+      return !m_Task.isCanceled();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/it/falciano/sextante/vectorAddField/VectorAddFieldAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/wf/rothermel/Behave.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/wf/rothermel/Behave.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/wf/rothermel/Behave.java	(revision 369)
@@ -0,0 +1,751 @@
+/**
+ * A modified version of the Behave class by Andreas Bachmann,
+ * available at  http://www.geo.unizh.ch/gis/research/edmg/fire/unc.html
+ *
+ * @author: Andreas Bachman, Victor Olaya
+ *
+ *
+ */
+package wf.rothermel;
+
+public class Behave {
+
+
+   /**
+    * INSTANCE VARS
+    */
+
+   public boolean isCalculated = false;
+   public boolean canDerive    = true;
+
+   // Rothermel's model input variables
+   public int     fuelModel    = 0;          // fuel model nr
+   public double  w0_d1        = 0.;         // Fuel loading [kg/m2]
+   public double  w0_d2        = 0.;
+   public double  w0_d3        = 0.;
+   public double  w0_lh        = 0.;
+   public double  w0_lw        = 0.;
+   public double  sv_d1        = 0.;         // surface to volume ratio [1/m]
+   public double  sv_d2        = 357.6115;
+   public double  sv_d3        = 98.4252;
+   public double  sv_lh        = 4921.2598;
+   public double  sv_lw        = 4921.2598;
+   public double  depth        = 0.;         // fuel bed depth [m]
+   public double  rho_p        = 512.72341;  // particle density [kg/m3]
+   public double  heat         = 18606.70194; // particle low heat content [kJ/kg]
+   public double  s_t          = 5.5;        // total mineral content [%]
+   public double  s_e          = 1.0;        // effective mineral content [%]
+   public double  mx           = 0.;         // moisture of extinction, dead fuel [%]
+   public double  m_d1         = 0.;         // fuel moisture [%]
+   public double  m_d2         = 0.;
+   public double  m_d3         = 0.;
+   public double  m_lh         = 0.;
+   public double  m_lw         = 0.;
+
+   public double  wsp          = 0.;         // wind speed [m/s]
+   public double  wdr          = 0.;         // wind dir [Degree],Northern wind = 0.0!
+   public double  slp          = 0.;         // slope [Degree]
+   public double  asp          = 0.;         // aspect [Degree] southfacing = 180 !
+
+   // additional variables...
+   public double  rho_b        = 0.;         // bulk density     [kg/m3]
+   public double  beta         = 0.;         // packing ratio
+   public double  beta_opt     = 0.;         // optimal packing ratio
+   public double  beta_ratio   = 0.;         // ratio mean/optimal packing ratio
+   public double  w_n          = 0.;         // net fuel loading
+   public double  eta_s        = 0.;         // mineral damping coefficient
+   public double  eta_M        = 0.;         // moisture damping coefficient
+   public double  xi           = 0.;         // propagating flux ratio
+   public double  A            = 0.;
+   public double  gamma        = 0.;         // potential reaction velocity [1/s]
+   public double  gamma_max    = 0.;         // maximum reaction velocity [1/s]
+   public double  I_r          = 0.;         // reaction intensity [kW/m2]
+   public double  phi_s        = 0.;         // slope factor
+   public double  B, C, E = 0.;
+   public double  phi_w        = 0.;         // wind factor
+   public double  phi_t        = 0.;         // combined slope/wind factor
+   public double  vx, vy, vl = 0.;           // Vector components
+   public double  ecc          = 0;          // eccentricity
+
+   public double  asp_r;                     // radians equivalent of asp
+   public double  slp_r;                     // radians equivalent of slp
+   public double  wdr_r;                     // radians equivalent of wdr
+   public double  sdr_r;                     // radians equivalent of sdr
+   public double  sin_asp;
+   public double  cos_asp;
+   public double  sin_wdr;
+   public double  cos_wdr;
+   public double  tan_slp;
+
+   public double  al;
+   public double  splitDeg, splitRad;
+   public double  cos_splitRad, sin_splitRad;
+   public double  alDeg, alRad;
+
+   public double  sw_d1, sw_d2, sw_d3, sw_lh, sw_lw, sw_d, sw_l, sw_t = 0.;
+   public double  s2w_d, s2w_l, s2w_t = 0.;
+   public double  sw2_d, sw2_l, sw2_t = 0.;
+   public double  swm_d, swm_l, swm_t = 0.;
+   public double  sigma        = 0.;
+   public double  w0           = 0.;
+   public double  wn_d1, wn_d2, wn_d3, wn_lh, wn_lw, wn_d, wn_l;
+
+   public double  eps_d1, eps_d2, eps_d3, eps_lh, eps_lw;
+   public double  q_d1, q_d2, q_d3, q_lh, q_lw;
+   public double  hskz;
+
+   public double  hn_d1, hn_d2, hn_d3, hn_lh, hn_lw = 0.;
+   public double  sumhd, sumhl, sumhdm = 0.;
+   public double  W            = 0.;                                       // W' ratio of "fine" fuel loading
+   public double  eta_Ml, eta_Md = 0.;                                     // damping coefficient
+   public double  rm_d, rm_l = 0.;                                         // moisture ratio
+   public double  Mf_dead      = 0.;                                       // Moisture content of dead fine fuel
+   public double  Mx_live      = 0.;                                       // Moisture of extinction of living fuel
+   public double  dead, live = 0.;
+
+   // resulting variables
+   public double  sdr          = 0.;                                       // spread direction           [degree]
+   public double  efw          = 0.;                                       // effective wind speed       [m/s]
+   public double  hsk          = 0.;                                       // heat sink term             [kJ/m3]
+   public double  ros          = 0.;                                       // rate of spread             [m/s]
+   public double  tau          = 0.;                                       // flame residence time       [s]
+   public double  hpa          = 0.;                                       // heat release per unit area [kJ/m2]
+   public double  fzd          = 0.;                                       // flame zone depth           [m]
+   public double  fli          = 0.;                                       // fire line intensity        [kW/m]
+   public double  fln          = 0.;                                       // flame length               [m]
+
+
+   public boolean setFuelModel(final int model) {
+
+      if (model != this.fuelModel) {
+         this.fuelModel = model;
+         switch (fuelModel) {
+            case 1:
+               setFuelModelValues(0.18, 0., 0., 0., 0., 0.3048, 11482.940, 12.);
+               break;
+            case 2:
+               setFuelModelValues(0.486, 0.243, 0.122, 0.122, 0., 0.3048, 9842.0, 15.);
+               break;
+            case 3:
+               setFuelModelValues(0.732, 0., 0., 0., 0., 0.762, 4921.2598, 25);
+               break;
+            case 4:
+               setFuelModelValues(1.218, 0.975, 0.486, 1.218, 0., 1.8288, 6561.67979, 20);
+               break;
+            case 5:
+               setFuelModelValues(0.243, 0.122, 0., 0., 0.122, 0.6096, 6561.680, 20);
+               break;
+            case 6:
+               setFuelModelValues(0.365, 0.608, 0., 0., 0.486, 0.732, 5741.47, 25);
+               break;
+            case 7:
+               setFuelModelValues(0.275, 0.645, 0.365, 0., 0.090, 0.762, 5741.47, 40);
+               break;
+            /*case 8:
+            	setFuelmodelValues(0.365, 0.243, 0.6075, 0.0, 0.06096, *, 30);
+            	break;
+            case 9:
+            	setFuelmodelValues(0.7046, 0.0996, 0.03645, 0.0, 0.06096, *, 25);
+            	break;
+            case 10:
+            	setFuelmodelValues(0.729, 0.486, 1.215, 0.486, 0.3048, * 25);
+            	break;
+            case 11:
+            	setFuelmodelValues(0.365, 1.093, 1.3365, 0.0, 0.3048, *, 15);
+            	break;
+            case 12:
+            	setFuelmodelValues(0.972, 3.402, 4.0095, 0.0, 0.6992,*, 20);
+            	break;
+            case 13:
+            	setFuelmodelValues(1.701, 5.589, 6.804, 0.0, 0.9144,*, 25);
+            	break;*/
+            default:
+               return false;
+         }
+      }
+      else if (model < 1 || model > 13) {
+         return false;
+      }
+
+      return true;
+
+   }
+
+
+   private void setFuelModelValues(final double wd1,
+                                   final double wd2,
+                                   final double wd3,
+                                   final double wlh,
+                                   final double wlw,
+                                   final double dep,
+                                   final double sv,
+                                   final double mox) {
+
+      w0_d1 = wd1;
+      w0_d2 = wd2;
+      w0_d3 = wd3;
+      w0_lh = wlh;
+      w0_lw = wlw;
+      depth = dep;
+      sv_d1 = sv;
+      mx = mox;
+      w0 = w0_d1 + w0_d2 + w0_d3 + w0_lh + w0_lw;
+
+   }
+
+
+   public void setWindSpeed(final double speed) {
+      this.wsp = speed;
+   }
+
+
+   public void setWindDir(final double dir) {
+      this.wdr = dir;
+   }
+
+
+   public void setSlope(final double slope) {
+      this.slp = slope;
+   }
+
+
+   public void setAspect(final double aspect) {
+      this.asp = aspect;
+   }
+
+
+   public void setDeadMoisture1(final double moisture) {
+      this.m_d1 = moisture;
+   }
+
+
+   public void setDeadMoisture10(final double moisture) {
+      this.m_d2 = moisture;
+   }
+
+
+   public void setDeadMoisture100(final double moisture) {
+      this.m_d3 = moisture;
+   }
+
+
+   public void setHerbMoisture(final double moisture) {
+      this.m_lh = moisture;
+   }
+
+
+   public void setWoodyMoisture(final double moisture) {
+      this.m_lw = moisture;
+   }
+
+
+   public static double getRosInDir(final double dRos,
+                                    final double dMaxDirection,
+                                    final double dDirection,
+                                    final double dEcc) {
+
+      double dDir;
+
+      if ((dDir = Math.abs(dMaxDirection - dDirection)) > 180.) {
+         dDir = 360. - dDir;
+      }
+
+      return (dRos * (1. - dEcc) / (1. - dEcc * Math.cos(Math.toRadians(dDir))));
+
+   }
+
+
+   public void calc() {
+      calcRothermel();
+   }
+
+
+   /******************************************************************************************************************************
+    * calcRothermel
+    *
+    * the main logic of rothermel wildfire behaviour calculation
+    *
+    *****************************************************************************************************************************/
+   private void calcRothermel() {
+
+      // reset flags
+      isCalculated = false;
+      canDerive = true;
+
+      /* prepare fuel parameters */
+      calcFuel();
+
+      /* mineral damping coefficient:  eta_s */
+      /*   Rothermel 1972: eq. (62)  */
+      eta_s = 0.174 * Math.pow(s_e / 100, -0.19);
+
+      /* moisture damping coefficient: eta_M */
+      moistureDamping();
+
+      /* reaction velocity: gamma */
+      reactionVelocity();
+
+      /* reaction intensity */
+      I_r = gamma * heat * eta_s * eta_M;
+
+      /* propagating flux ratio: xi
+      	Rothermel 1972: eq. (42)
+      	Formula:
+      	with sigma[1/ft]:
+      	  xi = exp[(0.792 + 0.681*            sqrt(sigma))*(beta + 0.1)] /
+      	       (192 + 0.259*sigma)
+      	with sigma[1/m] :
+      	  xi = exp[(0.792 + 0.681*sqrt(.3048)*sqrt(sigma))*(beta + 0.1)] /
+      	       (192 + 0.259*0.3048*sigma)
+      */
+      xi = Math.exp((0.792 + 0.37597 * Math.sqrt(sigma)) * (beta + 0.1)) / (192 + 0.0791 * sigma);
+
+      /* heat sink: hsk */
+      heatSink();
+
+      /* forward rate of spread   */
+      /*     no wind and no slope */
+      ros = I_r * xi / hsk;
+
+      /*     wind and slope       */
+      combinedWindAndSlopeFactor(); // -> phi_t
+
+      if (phi_t > 0.) {
+         ros = I_r * xi * (1 + phi_t) / hsk; // (52), [m/s]
+      }
+
+      /** ******************************************************************** */
+      /* additional fire behaviour results                                   */
+      //
+      /* flame residence time: tau               */
+      /* Anderson 1969, in Albini (1976), p.91:  */
+      /* tau = 384/ sigma   [min]                */
+      tau = 384. * 60 / (sigma * 0.3048); // [s]
+
+      /* heat release per unit area: hpa */
+      hpa = I_r * tau;
+
+      /* flame zone depth	*/
+      fzd = ros * tau;
+
+      /* fireline intensity */
+      fli = I_r * fzd;
+
+      /* flame length                                   */
+      /* based on Byram (1959), in Albini (1976), p. 91 */
+      fln = 0.0775 * Math.pow(fli, 0.46);
+
+      /* it's over...*/
+      isCalculated = true;
+   }
+
+
+   /******************************************************************************************************************************
+    * calcFuel
+    *
+    * calculates: - characteristic surface-to-volume ration (sigma) - bulk densities (rho_b) - packing ratios (beta, beta_opt,
+    * beta_ratio) - net fuel loadings (wn_..)
+    *
+    *
+    * Exceptions are thrown if - w0 <= 0. no fuel specified - sw_t <= 0. surface-to-voume-ratios not properly specified - depth <=
+    * 0. depth of fuel bed not properly specified
+    *****************************************************************************************************************************/
+   protected void calcFuel() {
+
+      /* reset all values to 0. ***************************/
+      sigma = 0.;
+      rho_b = 0.;
+      beta = 0.;
+      beta_opt = 0.;
+      beta_ratio = 0.;
+      // sw_
+      sw_d1 = 0.;
+      sw_d2 = 0.;
+      sw_d3 = 0.;
+      sw_lh = 0.;
+      sw_lw = 0.;
+      s2w_d = 0.;
+      s2w_l = 0.;
+      s2w_t = 0.;
+      sw2_d = 0.;
+      sw2_l = 0.;
+      sw2_t = 0.;
+      swm_d = 0.;
+      swm_l = 0.;
+      //
+      wn_d1 = 0.;
+      wn_d2 = 0.;
+      wn_d3 = 0.;
+      wn_lh = 0.;
+      wn_lw = 0.;
+      wn_d = 0.;
+      wn_l = 0.;
+      /** ********************************************** */
+
+      // auxiliary variables
+      sw_d1 = sv_d1 * w0_d1;
+      sw_d2 = sv_d2 * w0_d2;
+      sw_d3 = sv_d3 * w0_d3;
+      sw_lh = sv_lh * w0_lh;
+      sw_lw = sv_lw * w0_lw;
+      sw_d = sw_d1 + sw_d2 + sw_d3;
+      sw_l = sw_lh + sw_lw;
+      sw_t = sw_d + sw_l;
+      //
+      s2w_d = sw_d1 * sv_d1 + sw_d2 * sv_d2 + sw_d3 * sv_d3;
+      s2w_l = sw_lh * sv_lh + sw_lw * sv_lw;
+      s2w_t = s2w_d + s2w_l;
+      //
+      sw2_d = sw_d1 * w0_d1 + sw_d2 * w0_d2 + sw_d3 * w0_d3;
+      sw2_l = sw_lh * w0_lh + sw_lw * w0_lw;
+      sw2_t = sw2_d + sw2_l;
+      //
+      swm_d = sw_d1 * m_d1 + sw_d2 * m_d2 + sw_d3 * m_d3;
+      swm_l = sw_lh * m_lh + sw_lw * m_lw;
+
+      sigma = s2w_t / sw_t;
+
+      /**
+       * mean bulk density Rothermel 1972: eq. (74)
+       */
+      // see further down "beta"
+      // rho_b should not be bigger than 0.5 of the particle density
+      //
+      rho_b = w0 / depth;
+      /**
+       * packing ratios
+       */
+      // mean packing ratio
+      beta = rho_b / rho_p;
+      // should be between 0. and 0.5?
+      // in Rothermel 1972, p.18-19, values are between 0 and 0.12
+      if ((beta > 1) || (beta < 0)) {
+         System.out.println("Mean packing ration [beta] out of limits [0,1]: " + beta);
+      }
+
+      // optimal packing ratio
+      beta_opt = 8.8578 * Math.pow(sigma, -0.8189);
+
+      // ratio mean / optimal packing
+      beta_ratio = beta / beta_opt;
+
+      /**
+       * Net fuel loading Rothermel 1972: eq. (60), adjusted by Albini 1976, p.88
+       */
+      wn_d1 = w0_d1 * (1 - s_t / 100);
+      wn_d2 = w0_d2 * (1 - s_t / 100);
+      wn_d3 = w0_d3 * (1 - s_t / 100);
+      wn_lh = w0_lh * (1 - s_t / 100);
+      wn_lw = w0_lw * (1 - s_t / 100);
+      // Rothermel 1972: eq. (59)
+      if (sw_d > 0) {
+         wn_d = (1 - s_t / 100) * sw2_d / sw_d;
+      }
+      if (sw_l > 0) {
+         wn_l = (1 - s_t / 100) * sw2_l / sw_l;
+      }
+   }
+
+
+   //END calcFuel()
+
+   /******************************************************************************************************************************
+    * phi_s: slope factor
+    *
+    * called from combinedWindAndSlopeFactor()
+    *****************************************************************************************************************************/
+   protected void slopeFactor() {
+      slp_r = Math.toRadians(slp);
+      tan_slp = Math.tan(slp_r);
+      phi_s = 5.275 * Math.pow(beta, -0.3) * Math.pow(tan_slp, 2);
+   }
+
+
+   /******************************************************************************************************************************
+    * phi_w: wind factor
+    *
+    * called from combinedWindAndSlopeFactor()
+    *
+    * conversion: sigma [1/ft] = sigma[1/m] * 0.3048! original formulae in Rothermel 1972, eq. XXXXX B = 0.013298 *
+    * Math.pow(sigma,0.54); C = 7.47 * Math.exp(-0.06919 * Math.pow(sigma,0.55)); E = 0.715 * Math.exp(0.0001094 * sigma);
+    *
+    *****************************************************************************************************************************/
+   protected void windFactor() {
+      B = 0.02526 * Math.pow(sigma * 0.3048, 0.54);
+      C = 7.47 * Math.exp(-0.133 * Math.pow(sigma * 0.3048, 0.55));
+      E = 0.715 * Math.exp(-0.000359 * 0.3048 * sigma);
+      phi_w = C * Math.pow(3.281 * 60 * wsp, B) * Math.pow(beta_ratio, -E);
+   }
+
+
+   /******************************************************************************************************************************
+    * phi combined wind and slope factor assumptions: wsp > 0. and/or slp > 0.
+    *  -> phi_t
+    *****************************************************************************************************************************/
+   protected void combinedWindAndSlopeFactor() {
+      // reset values
+      phi_t = 0.;
+      vl = 0.;
+
+      // calculate the wind and slope factor
+      slopeFactor(); // -> phi_s
+      windFactor(); // -> phi_w
+
+      // combine the two factors using a vector sum..
+      // conversion of input values....
+      asp_r = Math.toRadians(asp);
+      wdr_r = Math.toRadians(wdr);
+
+      // Flip Aspect
+      // -> upslope direction is needed
+      if (asp_r < Math.PI) {
+         asp_r = asp_r + Math.PI;
+      }
+      else {
+         asp_r = asp_r - Math.PI;
+      }
+
+      /*
+       * Flip Wind Direction
+       * standard meteorological definitions says
+       *        winddirection == direction where the wind is blowing FROM
+       * for the calculation we need
+       *        winddirection == direction where the is blowing TO
+       */
+      if (wdr_r < Math.PI) {
+         wdr_r = wdr_r + Math.PI;
+      }
+      else {
+         wdr_r = wdr_r - Math.PI;
+      }
+
+      /* the following code according to fireLib.c
+       * 1. normalize for upslope direction
+       * 2. consider differing angle of wind by splitAngle
+       */
+      splitRad = Math.abs(wdr_r - asp_r) >= Math.PI ? wdr_r + asp_r - 2 * Math.PI : wdr_r - asp_r;
+      cos_splitRad = Math.cos(splitRad);
+      sin_splitRad = Math.sin(splitRad);
+      vx = phi_s + phi_w * cos_splitRad;
+      vy = phi_w * sin_splitRad;
+      vl = Math.sqrt(vx * vx + vy * vy);
+      //
+      al = Math.asin(vy / vl);
+      //
+      if (vx >= 0.) {
+         alRad = (vy >= 0.) ? asp_r + al : asp_r + al + 2 * Math.PI;
+      }
+      else {
+         alRad = asp_r - al + Math.PI;
+      }
+      alDeg = Math.toDegrees(alRad);
+      if (alDeg > 360) {
+         alDeg -= 360.;
+      }
+      //
+      sdr = alDeg;
+      /***************************************************************************************************************************
+       * effective windspeed actually this is only the inverse function of phi_w
+       **************************************************************************************************************************/
+      efw = (Math.pow(vl / (C * Math.pow(beta_ratio, -E)), 1 / B)) / 196.85;
+      // rothermel 87: sets an upper limit on
+      // the wind multiplication factor
+      if (efw > 0.024 * I_r) {
+         efw = Math.min(efw, 0.024 * I_r);
+         phi_t = C * Math.pow(196.85 * efw, B) * Math.pow(beta_ratio, -E);
+         // flag that derivations are not allowed!
+         canDerive = false;
+      }
+      else {
+         phi_t = vl;
+      }
+      final double lwRatio = 1. + 0.002840909 * efw;
+      ecc = Math.sqrt(lwRatio * lwRatio - 1.0) / lwRatio;
+
+   }
+
+
+   /******************************************************************************************************************************
+    * moistureDamping ********************************************************************* calculate the moisture damping
+    * coefficients for dead and live fuel
+    *
+    * Exceptions thrown if mx <= 0.
+    */
+   protected void moistureDamping() {
+      // reset variables...
+      hn_d1 = 0.;
+      hn_d2 = 0.;
+      hn_d3 = 0.;
+      hn_lh = 0.;
+      hn_lw = 0.;
+      sumhd = 0.;
+      sumhl = 0.;
+      sumhdm = 0.;
+      W = 0.;
+      Mf_dead = 0.;
+      Mx_live = 0.;
+      eta_Ml = 0.;
+      eta_Md = 0.;
+      eta_M = 0.;
+
+      /**
+       * moisture damping coefficient weighting factors for live moisture of extinction...
+       *
+       * Rothermel (1972): eq. (88) (mx)_living = 2.9W(1-(M_f)_dead/0.3) - 0.226 (min = 0.3)
+       *  => Albini (1976): page 89! (mx)_living = 2.9W'(1-(M'_f)_dead/(mx)_dead) - 0.226 (min = mx)
+       *
+       * -------------------------------------------------------- Ratio of "fine fuel loadings, dead/live W' =
+       * SUM(w0_d*exp(-138/sv_d*)/SUM(w0_l*exp(-500/sv_l*) 0.20482 = Multiplier for [pound/ft2] to [kg/m2] -452.76 = -138 / 0.3048
+       * -1640.2 = -500 / 0.3048
+       */
+      if (sv_d1 > 0.) {
+         hn_d1 = 0.20482 * w0_d1 * Math.exp(-452.76 / sv_d1);
+      }
+      if (sv_d2 > 0.) {
+         hn_d2 = 0.20482 * w0_d2 * Math.exp(-452.76 / sv_d2);
+      }
+      if (sv_d3 > 0.) {
+         hn_d3 = 0.20482 * w0_d3 * Math.exp(-452.76 / sv_d3);
+      }
+      if (sv_lh > 0.) {
+         hn_lh = 0.20482 * w0_lh * Math.exp(-1640.42 / sv_lh);
+      }
+      if (sv_lw > 0.) {
+         hn_lw = 0.20482 * w0_lw * Math.exp(-1640.42 / sv_lw);
+      }
+
+      // sum up...
+      sumhd = hn_d1 + hn_d2 + hn_d3;
+      sumhl = hn_lh + hn_lw;
+      sumhdm = hn_d1 * m_d1 + hn_d2 * m_d2 + hn_d3 * m_d3;
+
+      /*
+        moisture damping for live fuel
+       */
+      // calc only if there is any live fuel available...
+      // sw_l = sv_lh * w0_lh + sv_lw * w0_lw
+      // sw_l > 0 ensures that sumhl > 0
+      if (sw_l > 0.) {
+         // W' ratio of "fine" fuel loading, dead/living
+         W = sumhd / sumhl;
+
+         // Moisture content of "fine" dead fuel
+         if (sumhd > 0) {
+            Mf_dead = sumhdm / sumhd;
+         }
+
+         // Moisture of extinction of living fuel
+         Mx_live = (2.9 * W * (1 - Mf_dead / mx) - 0.226) * 100;
+
+         /*
+          * Check for Minimum of Mx_live
+          *        Mx_live = Math.max(Mx_live,mx)
+          *
+          * if Mx_live is lower than mx, we have a problem with the
+          * calculation of the error, as the function is no longer continuos
+          *
+          */
+         if (Mx_live < mx) {
+            canDerive = false;
+            Mx_live = mx;
+         }
+         // dead moisture ratio
+         rm_l = swm_l / (sw_l * Mx_live);
+      }
+
+      // moisture ratios
+      // Rothermel (1972): eq. (65) & (66)
+      if (sw_d > 0) {
+         rm_d = swm_d / (sw_d * mx);
+      }
+
+      // moisture damping coefficient
+      // Rothermel (1972): eq. (64)
+      // damping coefficients range from 0 to 1 (Rothermel 1972, p.11!).
+      // 0 means a moisture ratio rm_* greater than 1, i.e. the moisture
+      //   content is higher than the moisture of extinction
+      //
+      eta_Md = 1 - 2.59 * (rm_d) + 5.11 * Math.pow(rm_d, 2) - 3.52 * Math.pow(rm_d, 3);
+      eta_Ml = 1 - 2.59 * (rm_l) + 5.11 * Math.pow(rm_l, 2) - 3.52 * Math.pow(rm_l, 3);
+
+      // check for eta_* lower than 0;
+      if (eta_Md < 0) {
+         eta_Md = 0.;
+      }
+      if (eta_Ml < 0) {
+         eta_Ml = 0.;
+      }
+
+      //
+      eta_M = wn_d * eta_Md + wn_l * eta_Ml;
+   }
+
+
+   /******************************************************************************************************************************
+    * gamma': reaction velocity
+    *
+    *****************************************************************************************************************************/
+   protected void reactionVelocity() {
+      /**
+       * exponent A: => Rothermel 1972 eq.(70), replaced by Albini (1976) (p.88) A = 133 * sigma**-0.7913 ;sigma[1/ft] = 133 *
+       * 0.3048**-0.7913 * sigma**-0.7913 ;sigma[1/m] = 340.53 * sigma**-0.7913 ;sigma[1/m]
+       */
+      A = 340.53 * Math.pow(sigma, -0.7913);
+      /**
+       * maximum reaction velocity: => Rothermel 1972: (68), based on (36) conversion: gamma_max [min-1] = 60 gamma_max [s-1]
+       * Formulae: gamma_max = sigma**1.5 / (495 + 0.0594* sigma**1.5) counter = sigma**1.5 ;sigma [1/ft] = 1 * Math.pow(0.3048,
+       * 1.5) * sigma**1.5 ;sigma [1/m] = 0.16828 * sigma**1.5
+       *
+       * denominator = 495 + 0.0594 * sigma**1.5 ;sigma[1/ft] = 495*60 + 0.0594*60*0.16828 * sigma**1.5 ;sigma[1/m] = 29700 +
+       * 0.5997 * sigma**1.5 ;sigma[1/m]
+       */
+      gamma_max = 0.16828 * Math.pow(sigma, 1.5) / (29700 + 0.5997 * Math.pow(sigma, 1.5));
+      gamma = gamma_max * Math.pow(beta_ratio, A) * Math.exp(A * (1 - beta_ratio));
+   }
+
+
+   /******************************************************************************************************************************
+    * heat sink term
+    *
+    * Rothermel (1972): eq. (77) + (78)
+    *****************************************************************************************************************************/
+   protected void heatSink() {
+      /**
+       * Effective heating number: epsilon = exp(-138 / sigma_ft) (14) = exp(-138 / (sigma_m * 0.3048)) conversion! = exp( -452.76 /
+       * sigma)
+       */
+
+      if (sv_d1 > 0.0) {
+         eps_d1 = Math.exp(-452.76 / sv_d1);
+      }
+      if (sv_d2 > 0.0) {
+         eps_d2 = Math.exp(-452.76 / sv_d2);
+      }
+      if (sv_d3 > 0.0) {
+         eps_d3 = Math.exp(-452.76 / sv_d3);
+      }
+      if (sv_lh > 0.0) {
+         eps_lh = Math.exp(-452.76 / sv_lh);
+      }
+      if (sv_lw > 0.0) {
+         eps_lw = Math.exp(-452.76 / sv_lw);
+      }
+      /**
+       * Heat of Preignition: Q_ig, [Btu/lb] = 1.05506 kJ / 0.4535 kg = 2.3265 kJ/kg Q_ig = 250.0 + 1116 * M_f ; M_f [fraction] =
+       * 581.5 + 2.3265 *(0.01 * M_f) ; M_f [%]
+       */
+      q_d1 = 581.5 + 25.957 * m_d1;
+      q_d2 = 581.5 + 25.957 * m_d2;
+      q_d3 = 581.5 + 25.957 * m_d3;
+      q_lh = 581.5 + 25.957 * m_lh;
+      q_lw = 581.5 + 25.957 * m_lw;
+
+      /**
+       * Heat Sink
+       */
+      hskz = sw_d1 * eps_d1 * q_d1 + sw_d2 * eps_d2 * q_d2 + sw_d3 * eps_d3 * q_d3 + sw_lh * eps_lh * q_lh + sw_lw * eps_lw
+             * q_lw;
+      hsk = rho_b * hskz / sw_t;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/wf/rothermel/Behave.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/TwitterException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/TwitterException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/TwitterException.java	(revision 369)
@@ -0,0 +1,147 @@
+package winterwell.jtwitter;
+
+
+/**
+ * A runtime exception for when Twitter requests don't work. All {@link Twitter} methods can throw this.
+ * <p>
+ * This contains several subclasses which should be thrown to mark different problems. Error handling is particularly important as
+ * Twitter tends to be a bit flaky.
+ * <p>
+ * I believe unchecked exceptions are preferable to checked ones, because they avoid the problems caused by swallowing exceptions.
+ * But if you don't like runtime exceptions, just edit this class.
+ *
+ * @author Daniel Winterstein
+ */
+@SuppressWarnings("all")
+public class TwitterException
+         extends
+            RuntimeException {
+
+   /**
+    * Something has gone wrong. Occasionally Twitter behaves strangely.
+    */
+   public static class Unexplained
+            extends
+               TwitterException {
+      public Unexplained(final String msg) {
+         super(msg);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+
+   /**
+    * A timeout exception - probably caused by Twitter being overloaded.
+    */
+   public static class Timeout
+            extends
+               TwitterException {
+      public Timeout(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+   /**
+    * A code 50X error (e.g. 502) - indicating something went wrong at Twitter's end. The API equivalent of the Fail Whale.
+    * Usually retrying in a minute will fix this.
+    */
+   public static class E50X
+            extends
+               TwitterException {
+      public E50X(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+   /**
+    * A Forbidden exception. This is thrown if the authenticating used does not have the right to make a request.
+    */
+   public static class E403
+            extends
+               TwitterException {
+      public E403(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+   /**
+    * An unauthorised exception. This is thrown (eg) if a password is wrong or a login is required.
+    */
+   public static class E401
+            extends
+               TwitterException {
+      public E401(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+
+
+   private static final long serialVersionUID = 1L;
+
+   private String            additionalInfo   = "";
+
+
+   /**
+    * Wrap an exception as a TwitterException.
+    */
+   TwitterException(final Exception e) {
+      super(e);
+      // avoid gratuitous nesting of exceptions
+      assert !(e instanceof TwitterException) : e;
+   }
+
+
+   /**
+    * @param string
+    */
+   public TwitterException(final String string) {
+      super(string);
+   }
+
+
+   public TwitterException(final String string,
+                           final String additionalInfo) {
+      this(string);
+      this.setAdditionalInfo(additionalInfo);
+   }
+
+
+   public void setAdditionalInfo(final String additionalInfo) {
+      this.additionalInfo = additionalInfo;
+   }
+
+
+   public String getAdditionalInfo() {
+      return additionalInfo;
+   }
+
+   /**
+    * Indicates a 404: resource does not exist error from Twitter. Note: Can be throw in relation to suspended users.
+    */
+   public static class E404
+            extends
+               TwitterException {
+      public E404(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+   /**
+    * Indicates a rate limit error (i.e. you've over-used Twitter)
+    */
+   public static class RateLimit
+            extends
+               TwitterException {
+      public RateLimit(final String string) {
+         super(string);
+      }
+
+      private static final long serialVersionUID = 1L;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/TwitterException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/URLConnectionHttpClient.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/URLConnectionHttpClient.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/URLConnectionHttpClient.java	(revision 369)
@@ -0,0 +1,359 @@
+package winterwell.jtwitter;
+
+import java.io.BufferedReader;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
+import java.net.ConnectException;
+import java.net.HttpURLConnection;
+import java.net.SocketTimeoutException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import org.apache.commons.codec.binary.Base64;
+
+/**
+ * A simple http client that uses the built in URLConnection class.
+ *
+ * @author Daniel Winterstein
+ *
+ */
+@SuppressWarnings("all")
+public class URLConnectionHttpClient
+         implements
+            Twitter.IHttpClient {
+
+   private final String name;
+   private final String password;
+   /**
+    * true if we are in the middle of a retry attempt. false normally
+    */
+   private boolean      retryingFlag;
+   /**
+    * If true, will wait 1 second and make a second when presented with a server error.
+    */
+   private boolean      retryOnError;
+
+
+   public URLConnectionHttpClient(final String name,
+                                  final String password) {
+      this.name = name;
+      this.password = password;
+      assert ((name != null) && (password != null)) || ((name == null) && (password == null));
+   }
+
+
+   public URLConnectionHttpClient() {
+      this(null, null);
+   }
+
+
+   public boolean canAuthenticate() {
+      return (name != null) && (password != null);
+   }
+
+
+   private static final int dfltTimeOutMilliSecs = 10 * 1000;
+
+   private int              timeout              = URLConnectionHttpClient.dfltTimeOutMilliSecs;
+
+
+   public void setTimeout(final int millisecs) {
+      this.timeout = millisecs;
+   }
+
+
+   public String getPage(String uri,
+                         final Map<String, String> vars,
+                         final boolean authenticate) throws TwitterException {
+      assert uri != null;
+      if ((vars != null) && (vars.size() != 0)) {
+         uri += "?";
+         for (final Entry<String, String> e : vars.entrySet()) {
+            if (e.getValue() == null) {
+               continue;
+            }
+            uri += encode(e.getKey()) + "=" + encode(e.getValue()) + "&";
+         }
+      }
+      try {
+         // Setup a connection
+         final HttpURLConnection connection = (HttpURLConnection) new URL(uri).openConnection();
+         // Authenticate
+         if (authenticate) {
+            setBasicAuthentication(connection, name, password);
+         }
+         // To keep the search API happy - which wants either a referrer or a user agent
+         connection.setRequestProperty("User-Agent", "JTwitter/" + Twitter.version);
+         connection.setDoInput(true);
+         connection.setReadTimeout(timeout);
+         // Open a connection
+         processError(connection);
+         final InputStream inStream = connection.getInputStream();
+         // Read in the web page
+         final String page = toString(inStream);
+         // Done
+         return page;
+      }
+      catch (final IOException e) {
+         throw new TwitterException(e);
+      }
+      catch (final TwitterException.E50X e) {
+         if (!retryOnError || retryingFlag) {
+            throw e;
+         }
+         try {
+            retryingFlag = true;
+            Thread.sleep(1000);
+            return getPage(uri, vars, authenticate);
+         }
+         catch (final InterruptedException ex) {
+            throw new TwitterException(ex);
+         }
+         finally {
+            retryingFlag = false;
+         }
+      }
+   }
+
+
+   /**
+    * Throw an exception if the connection failed
+    *
+    * @param connection
+    */
+   void processError(final HttpURLConnection connection) {
+      try {
+         final int code = connection.getResponseCode();
+         if (code == 200) {
+            return;
+         }
+         final URL url = connection.getURL();
+         final String error = connection.getResponseMessage();
+         if (code == 401) {
+            throw new TwitterException.E401(error + " " + url + " (" + (name == null ? "anonymous" : name) + ")");
+         }
+         if (code == 403) {
+            throw new TwitterException.E403(error + " " + url + " (" + (name == null ? "anonymous" : name) + ")");
+         }
+         if (code == 404) {
+            throw new TwitterException.E404(error + " " + url);
+         }
+         if ((code >= 500) && (code < 600)) {
+            throw new TwitterException.E50X(error + " " + url);
+         }
+         final boolean rateLimitExceeded = error.contains("Rate limit exceeded");
+         if (rateLimitExceeded) {
+            throw new TwitterException.RateLimit(error);
+         }
+         // Rate limiter can sometimes cause a 400 Bad Request
+         if (code == 400) {
+            final String json = getPage("http://twitter.com/account/rate_limit_status.json", null, password != null);
+            try {
+               final JSONObject obj = new JSONObject(json);
+               final int hits = obj.getInt("remaining_hits");
+               if (hits < 1) {
+                  throw new TwitterException.RateLimit(error);
+               }
+            }
+            catch (final JSONException e) {
+               // oh well
+            }
+         }
+         // just report it as a vanilla exception
+         throw new TwitterException(code + " " + error + " " + url);
+      }
+      catch (final SocketTimeoutException e) {
+         final URL url = connection.getURL();
+         throw new TwitterException.Timeout(timeout + "milli-secs for " + url);
+      }
+      catch (final ConnectException e) {
+         // probably also a time out
+         final URL url = connection.getURL();
+         throw new TwitterException.Timeout(url.toString());
+      }
+      catch (final IOException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   private String getErrorStream(final HttpURLConnection connection) {
+      try {
+         return toString(connection.getErrorStream());
+      }
+      catch (final NullPointerException e) {
+         return null;
+      }
+   }
+
+
+   @Override
+   public String toString() {
+      return getClass().getName() + "[name=" + name + ", password=" + (password == null ? "null" : "XXX") + "]";
+   }
+
+
+   /**
+    * Set a header for basic authentication login.
+    */
+   private void setBasicAuthentication(final URLConnection connection,
+                                       final String name,
+                                       final String password) {
+      assert (name != null) && (password != null) : "Authentication requested but no login details are set!";
+      final String token = name + ":" + password;
+      //final String encoding = new BASE64Encoder().encode(token.getBytes());
+      final String encoding = new Base64().encodeToString(token.getBytes());
+      connection.setRequestProperty("Authorization", "Basic " + encoding);
+   }
+
+
+   public String post(final String uri,
+                      final Map<String, String> vars,
+                      final boolean authenticate) throws TwitterException {
+      HttpURLConnection connection = null;
+      try {
+         connection = (HttpURLConnection) new URL(uri).openConnection();
+         connection.setRequestMethod("POST");
+         connection.setDoOutput(true);
+         connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+         connection.setReadTimeout(timeout);
+         if (authenticate) {
+            setBasicAuthentication(connection, name, password);
+         }
+         final StringBuilder encodedData = new StringBuilder();
+         if (vars != null) {
+            for (final String key : vars.keySet()) {
+               final String val = encode(vars.get(key));
+               encodedData.append(encode(key));
+               encodedData.append('=');
+               encodedData.append(val);
+               encodedData.append('&');
+            }
+         }
+         connection.setRequestProperty("Content-Length", "" + encodedData.length());
+         final OutputStream os = connection.getOutputStream();
+         os.write(encodedData.toString().getBytes());
+         close(os);
+         // Get the response
+         processError(connection);
+         final String response = toString(connection.getInputStream());
+         return response;
+      }
+      catch (final IOException e) {
+         throw new TwitterException(e);
+      }
+      catch (final TwitterException.E50X e) {
+         if (!retryOnError || retryingFlag) {
+            throw e;
+         }
+         try {
+            Thread.sleep(1000);
+            retryingFlag = true;
+            return post(uri, vars, authenticate);
+         }
+         catch (final InterruptedException ex) {
+            throw new TwitterException(ex);
+         }
+         finally {
+            retryingFlag = false;
+         }
+      }
+   }
+
+
+   /**
+    * False by default. Setting this to true switches on a robustness workaround: when presented with a 50X server error, the
+    * system will wait 1 second and make a second attempt.
+    */
+   public void setRetryOnError(final boolean retryOnError) {
+      this.retryOnError = retryOnError;
+   }
+
+
+   private static String encode(final Object x) {
+      return URLEncoder.encode(String.valueOf(x));
+   }
+
+
+   /**
+    * Use a bufferred reader (preferably UTF-8) to extract the contents of the given stream. A convenience method for
+    * {@link #toString(Reader)}.
+    */
+   private static String toString(final InputStream inputStream) {
+      InputStreamReader reader;
+      try {
+         reader = new InputStreamReader(inputStream, "UTF-8");
+      }
+      catch (final UnsupportedEncodingException e) {
+         reader = new InputStreamReader(inputStream);
+      }
+      return toString(reader);
+   }
+
+
+   /**
+    * Use a buffered reader to extract the contents of the given reader.
+    *
+    * @param reader
+    * @return The contents of this reader.
+    */
+   private static String toString(Reader reader) throws RuntimeException {
+      try {
+         // Buffer if not already buffered
+         reader = reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
+         final StringBuilder output = new StringBuilder();
+         while (true) {
+            final int c = reader.read();
+            if (c == -1) {
+               break;
+            }
+            output.append((char) c);
+         }
+         return output.toString();
+      }
+      catch (final IOException ex) {
+         throw new RuntimeException(ex);
+      }
+      finally {
+         close(reader);
+      }
+   }
+
+
+   /**
+    * Close a reader/writer/stream, ignoring any exceptions that result. Also flushes if there is a flush() method.
+    */
+   private static void close(final Closeable input) {
+      if (input == null) {
+         return;
+      }
+      // Flush (annoying that this is not part of Closeable)
+      try {
+         final Method m = input.getClass().getMethod("flush");
+         m.invoke(input);
+      }
+      catch (final Exception e) {
+         // Ignore
+      }
+      // Close
+      try {
+         input.close();
+      }
+      catch (final IOException e) {
+         // Ignore
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/URLConnectionHttpClient.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/Twitter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/Twitter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/Twitter.java	(revision 369)
@@ -0,0 +1,2549 @@
+package winterwell.jtwitter;
+
+import java.lang.reflect.Field;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import winterwell.jtwitter.TwitterException.E403;
+
+/**
+ * Java wrapper for the Twitter API version 1.4.3
+ * <p>
+ * Example usage: <code><pre>
+ * // Make a Twitter object
+ * Twitter twitter = new Twitter(&quot;my-name&quot;, &quot;my-password&quot;);
+ * // Print Winterstein's status
+ * System.out.println(twitter.getStatus(&quot;winterstein&quot;));
+ * // Set my status
+ * twitter.updateStatus(&quot;Messing about in Java&quot;);
+ * </pre></code>
+ * <p>
+ * See {@link http://www.winterwell.com/software/jtwitter.php} for more information about this wrapper. See {@link http
+ * ://apiwiki.twitter.com/Twitter-API-Documentation} for more information about the Twitter API.
+ * <p>
+ * Notes:
+ * <ul>
+ * <li>This wrapper takes care of all url-encoding/decoding.
+ * <li>This wrapper will throw a runtime exception (TwitterException) if a methods fails, e.g. it cannot connect to Twitter.com
+ * or you make a bad request. I would like to improve error-handling, and welcome suggestions on cases where more informative
+ * exceptions would be helpful.
+ * </ul>
+ *
+ * <h4>Copyright and License</h4>
+ * This code is copyright (c) Winterwell Associates 2008/2009 and (c) ThinkTank Mathematics Ltd, 2007 except where otherwise
+ * stated. It is released as open-source under the LGPL license. See <a href="http://www.gnu.org/licenses/lgpl.html"
+ * >http://www.gnu.org/licenses/lgpl.html</a> for license details. This code comes with no warranty or support.
+ *
+ * <h4>Change List</h4>
+ * The change list is kept online at: {@link http://www.winterwell.com/software/changelist.txt}
+ *
+ * @author Daniel Winterstein
+ */
+@SuppressWarnings("all")
+public class Twitter {
+
+   /**
+    * Change this to access sites other than Twitter that support the Twitter API.
+    */
+   private String TWITTER_URL = "http://api.twitter.com/1";
+
+
+   /**
+    * Set this to access sites other than Twitter that support the Twitter API. E.g. WordPress or Identi.ca. Note that not all
+    * methods may work!
+    *
+    * @param url
+    *                Format: "http://domain-name", e.g. "http://twitter.com" by default.
+    */
+   public void setAPIRootUrl(final String url) {
+      assert url.startsWith("http://") || url.startsWith("https://");
+      assert !url.endsWith("/") : "Please remove the trailing / from " + url;
+      TWITTER_URL = url;
+   }
+
+   /**
+    * Use to register per-page callbacks for long-running searches. To stop the search, return true.
+    *
+    * @author miles
+    *
+    */
+   public interface ICallback {
+      public boolean process(List<Status> statuses);
+   }
+
+   /**
+    * Interface for an http client - e.g. allows for OAuth to be used instead. The default version is
+    * {@link URLConnectionHttpClient}.
+    * <p>
+    * If creating your own version, please provide support for throwing the right subclass of TwitterException - see
+    * {@link URLConnectionHttpClient#processError(java.net.HttpURLConnection)} for example code.
+    *
+    * @author Daniel Winterstein
+    */
+   public static interface IHttpClient {
+      /** Whether this client can authenticate to the server. */
+      boolean canAuthenticate();
+
+
+      /**
+       * Send an HTTP GET request and return the response body. Note that this will change all line breaks into system line
+       * breaks!
+       *
+       * @param uri
+       *                The uri to fetch
+       * @param vars
+       *                get arguments to add to the uri
+       * @param authenticate
+       *                If true, use authentication. The authentication method used depends on the implementation (basic-auth,
+       *                OAuth). It is an error to use true if no authentication details have been set.
+       *
+       * @throws TwitterException
+       *                 for a variety of reasons
+       * @throws TwitterException.E404
+       *                 for resource-does-not-exist errors
+       */
+      String getPage(String uri,
+                     Map<String, String> vars,
+                     boolean authenticate) throws TwitterException;
+
+
+      /**
+       * Send an HTTP POST request and return the response body.
+       *
+       * @param uri
+       *                The uri to post to.
+       * @param vars
+       *                The form variables to send. These are URL encoded before sending.
+       * @param authenticate
+       *                If true, send user authentication
+       * @return The response from the server.
+       *
+       * @throws TwitterException
+       *                 for a variety of reasons
+       * @throws TwitterException.E404
+       *                 for resource-does-not-exist errors
+       */
+      String post(String uri,
+                  Map<String, String> vars,
+                  boolean authenticate) throws TwitterException;
+
+   }
+
+   /**
+    * This gives common access to features that are common to both {@link Message}s and {@link Status}es.
+    *
+    * @author daniel
+    *
+    */
+   public static interface ITweet {
+
+      Date getCreatedAt();
+
+
+      /**
+       * @return The Twitter id for this post. This is used by some API methods.
+       */
+      long getId();
+
+
+      /** The actual status text. This is also returned by {@link #toString()} */
+      String getText();
+
+
+      /** The User who made the tweet */
+      User getUser();
+
+   }
+
+   /**
+    * A Twitter direct message. Fields are null if unset.
+    * <p>
+    * Historical note: this class used to cover \@you mentions as well, but these are better described by Statuses.
+    */
+   public static final class Message
+            implements
+               ITweet {
+
+      /**
+       * Equivalent to {@link Status#inReplyToStatusId} *but null by default*. If you want to use this, you must set it yourself.
+       * Strangely Twitter don't report the previous ID for messages.
+       */
+      public Long inReplyToMessageId;
+
+
+      /**
+       *
+       * @param json
+       * @return
+       * @throws TwitterException
+       */
+      static List<Message> getMessages(final String json) throws TwitterException {
+         if (json.trim().equals("")) {
+            return Collections.emptyList();
+         }
+         try {
+            final List<Message> msgs = new ArrayList<Message>();
+            final JSONArray arr = new JSONArray(json);
+            for (int i = 0; i < arr.length(); i++) {
+               final JSONObject obj = arr.getJSONObject(i);
+               final Message u = new Message(obj);
+               msgs.add(u);
+            }
+            return msgs;
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+      private final Date   createdAt;
+      private final long   id;
+      private final User   recipient;
+      private final User   sender;
+      private final String text;
+
+
+      /**
+       * @param obj
+       * @throws JSONException
+       * @throws TwitterException
+       */
+      Message(final JSONObject obj) throws JSONException, TwitterException {
+         id = obj.getLong("id");
+         final String _text = obj.getString("text");
+         text = unencode(_text);
+         final String c = jsonGet("created_at", obj);
+         createdAt = new Date(c);
+         sender = new User(obj.getJSONObject("sender"), null);
+         // recipient - for messages you sent
+         if (obj.has("recipient")) {
+            recipient = new User(obj.getJSONObject("recipient"), null);
+         }
+         else {
+            recipient = null;
+         }
+      }
+
+
+      public Date getCreatedAt() {
+         return createdAt;
+      }
+
+
+      public long getId() {
+         return id;
+      }
+
+
+      /**
+       * @return the recipient (for messages sent by the authenticating user)
+       */
+      public User getRecipient() {
+         return recipient;
+      }
+
+
+      public User getSender() {
+         return sender;
+      }
+
+
+      public String getText() {
+         return text;
+      }
+
+
+      /**
+       * This is equivalent to {@link #getSender()}
+       */
+      public User getUser() {
+         return getSender();
+      }
+
+
+      @Override
+      public String toString() {
+         return text;
+      }
+
+   }
+
+   /**
+    * A Twitter status post. .toString() returns the status text.
+    * <p>
+    * Notes: This is a finalised data object. It exposes its fields for convenient access. If you want to change your status, use
+    * {@link Twitter#setStatus(String)} and {@link Twitter#destroyStatus(Status)}.
+    */
+   public static final class Status
+            implements
+               ITweet {
+
+      @Override
+      public int hashCode() {
+         return (int) (id ^ (id >>> 32));
+      }
+
+
+      @Override
+      public boolean equals(final Object obj) {
+         if (this == obj) {
+            return true;
+         }
+         if (obj == null) {
+            return false;
+         }
+         if (getClass() != obj.getClass()) {
+            return false;
+         }
+         final Status other = (Status) obj;
+         if (id != other.id) {
+            return false;
+         }
+         return true;
+      }
+
+
+      /**
+       * Convert from a json array of objects into a list of tweets.
+       *
+       * @param json
+       *                can be empty, must not be null
+       * @throws TwitterException
+       */
+      static List<Status> getStatuses(final String json) throws TwitterException {
+         if (json.trim().equals("")) {
+            return Collections.emptyList();
+         }
+         try {
+            final List<Status> tweets = new ArrayList<Status>();
+            final JSONArray arr = new JSONArray(json);
+            for (int i = 0; i < arr.length(); i++) {
+               final JSONObject obj = arr.getJSONObject(i);
+               final Status tweet = new Status(obj, null);
+               tweets.add(tweet);
+            }
+            return tweets;
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+
+      /**
+       * Search results use a slightly different protocol! In particular w.r.t. user ids and info.
+       *
+       * @param searchResults
+       * @return search results as Status objects - but with dummy users! The dummy users have a screenname and a profile image
+       *         url, but no other information. This reflects the current behaviour of the Twitter API.
+       */
+      static List<Status> getStatusesFromSearch(final Twitter tw,
+                                                final String json) {
+         try {
+            final JSONObject searchResults = new JSONObject(json);
+            final List<Status> users = new ArrayList<Status>();
+            final JSONArray arr = searchResults.getJSONArray("results");
+            for (int i = 0; i < arr.length(); i++) {
+               final JSONObject obj = arr.getJSONObject(i);
+               final String userScreenName = obj.getString("from_user");
+               final String profileImgUrl = obj.getString("profile_image_url");
+               final User user = new User(userScreenName);
+               user.profileImageUrl = URI(profileImgUrl);
+               final Status s = new Status(obj, user);
+               users.add(s);
+            }
+            return users;
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+      public final Date   createdAt;
+      public final long   id;
+      /** The actual status text. */
+      public final String text;
+
+      public final User   user;
+      public String       geo;
+
+      /**
+       * E.g. "web" vs. "im"
+       */
+      public final String source;
+
+      /**
+       * Often null. This is the in-reply-to status id as reported by Twitter. Strangely they don't report this for messages.
+       */
+      public final Long   inReplyToStatusId;
+
+      private boolean     favorited;
+
+
+      /**
+       * true if this has been marked as a favourite by the authenticating user
+       */
+      public boolean isFavorite() {
+         return favorited;
+      }
+
+      /**
+       * regex for
+       *
+       * @you mentions
+       */
+      static final Pattern AT_YOU_SIR = Pattern.compile("@(\\w+)");
+
+
+      /**
+       * @param object
+       * @param user
+       *                Set when parsing the json returned for a User
+       * @throws TwitterException
+       */
+      Status(final JSONObject object,
+             final User user) throws TwitterException {
+         try {
+
+            System.out.println(object.toString());
+
+
+            id = object.getLong("id");
+            final String _text = jsonGet("text", object);
+            text = unencode(_text);
+            final String c = jsonGet("created_at", object);
+            createdAt = new Date(c);
+            source = jsonGet("source", object);
+            final String irt = jsonGet("in_reply_to_status_id", object);
+            inReplyToStatusId = irt == null ? null : Long.valueOf(irt);
+            favorited = object.has("favorited") && object.getBoolean("favorited");
+            geo = jsonGet("geo", object);
+
+            if (user != null) {
+               this.user = user;
+            }
+            else {
+               final JSONObject jsonUser = object.optJSONObject("user");
+               this.user = new User(jsonUser, this);
+            }
+            //				TODO location if geocoding is on
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+
+      public Date getCreatedAt() {
+         return createdAt;
+      }
+
+
+      /**
+       * @return The Twitter id for this post. This is used by some API methods.
+       */
+      public long getId() {
+         return id;
+      }
+
+
+      /**
+       * @return list of \@mentioned people (there is no guarantee that these mentions are for correct Twitter screen-names). May
+       *         be empty, never null. Screen-names are always lowercased.
+       */
+      public List<String> getMentions() {
+         final Matcher m = Status.AT_YOU_SIR.matcher(text);
+         final List<String> list = new ArrayList<String>(2);
+         while (m.find()) {
+            // skip email addresses (and other poorly formatted things)
+            if ((m.start() != 0) && (text.charAt(m.start() - 1) != ' ')) {
+               continue;
+            }
+            final String mention = m.group(1);
+            // enforce lower case
+            list.add(mention.toLowerCase());
+         }
+         return list;
+      }
+
+
+      /** The actual status text. This is also returned by {@link #toString()} */
+      public String getText() {
+         return text;
+      }
+
+
+      public User getUser() {
+         return user;
+      }
+
+
+      /**
+       * @return The text of this status. E.g. "Kicking fommil's arse at Civilisation."
+       */
+
+      @Override
+      public String toString() {
+         return text;
+      }
+
+
+      public String getGeo() {
+         return geo;
+      }
+
+
+      public void setGeo(final String geo) {
+         this.geo = geo;
+      }
+   }
+   /**
+    * A Twitter user. Fields are null if unset.
+    *
+    * @author daniel
+    */
+   public static final class User {
+      /**
+       * Convert from a JSON array into a list of users.
+       *
+       * @param json
+       * @throws TwitterException
+       */
+      static List<User> getUsers(final String json) throws TwitterException {
+         if (json.trim().equals("")) {
+            return Collections.emptyList();
+         }
+         try {
+            final List<User> users = new ArrayList<User>();
+            final JSONArray arr = new JSONArray(json);
+            for (int i = 0; i < arr.length(); i++) {
+               final JSONObject obj = arr.getJSONObject(i);
+               final User u = new User(obj, null);
+               users.add(u);
+            }
+            return users;
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+      public final String  description;
+      public final long    id;
+      public final String  location;
+      /** The display name, e.g. "Daniel Winterstein" */
+      public final String  name;
+      /**
+       * The url for the user's Twitter profile picture.
+       * <p>
+       * Note: we allow this to be edited as a convenience for the User objects generated by search
+       */
+      public URI           profileImageUrl;
+      /**
+       * true if this user keeps their updates private
+       */
+      public final boolean protectedUser;
+      /**
+       * The login name, e.g. "winterstein" This is the only thing used by equals() and hashcode(). This is always lower-case, as
+       * Twitter screen-names are case insensitive.
+       */
+      public final String  screenName;
+      public final Status  status;
+      public final URI     website;
+      /**
+       * Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or
+       * UTC. Can be positive or negative.
+       */
+      public final int     timezoneOffSet;
+      public final String  timezone;
+      public int           followersCount;
+      public final String  profileBackgroundColor;
+      public final String  profileLinkColor;
+      public final String  profileTextColor;
+      public final String  profileSidebarFillColor;
+      public final String  profileSidebarBorderColor;
+
+      /**
+       * number of people this user is following
+       */
+      public final int     friendsCount;
+
+      public final Date    createdAt;
+
+      public final int     favoritesCount;
+
+      public final URI     profileBackgroundImageUrl;
+
+      public final boolean profileBackgroundTile;
+
+      public final int     statusesCount;
+
+      public final boolean notifications;
+
+      public final boolean verified;
+      public final boolean following;
+
+
+      User(final JSONObject obj,
+           final Status status) throws TwitterException {
+         try {
+            //    System.out.println(obj.toString());
+            //TODO:// A�adir im�genes-> background & profile
+
+
+            id = obj.getLong("id");
+            name = unencode(jsonGet("name", obj));
+            screenName = jsonGet("screen_name", obj).toLowerCase();
+            location = jsonGet("location", obj);
+            description = unencode(jsonGet("description", obj));
+            String img = jsonGet("profile_image_url", obj);
+            profileImageUrl = img == null ? null : URI(img);
+            final String url = jsonGet("url", obj);
+            website = url == null ? null : URI(url);
+            protectedUser = obj.getBoolean("protected");
+            followersCount = obj.getInt("followers_count");
+            profileBackgroundColor = obj.getString("profile_background_color");
+            profileLinkColor = obj.getString("profile_link_color");
+            profileTextColor = obj.getString("profile_text_color");
+            profileSidebarFillColor = obj.getString("profile_sidebar_fill_color");
+            profileSidebarBorderColor = obj.getString("profile_sidebar_border_color");
+            friendsCount = obj.getInt("friends_count");
+            final String c = jsonGet("created_at", obj);
+            createdAt = new Date(c);
+            favoritesCount = obj.getInt("favourites_count");
+            final String utcOffSet = jsonGet("utc_offset", obj);
+            timezoneOffSet = utcOffSet == null ? 0 : Integer.parseInt(utcOffSet);
+            timezone = jsonGet("time_zone", obj);
+            img = jsonGet("profile_background_image_url", obj);
+            profileBackgroundImageUrl = img == null ? null : URI(img);
+            profileBackgroundTile = obj.getBoolean("profile_background_tile");
+            statusesCount = obj.getInt("statuses_count");
+            notifications = obj.optBoolean("notifications");
+            verified = obj.optBoolean("verified");
+            following = obj.optBoolean("following");
+            // status
+            if (status == null) {
+               final JSONObject s = obj.optJSONObject("status");
+               this.status = s == null ? null : new Status(s, this);
+            }
+            else {
+               this.status = status;
+            }
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+      }
+
+
+      /**
+       * Create a dummy User object. All fields are set to null. This will be equals() to an actual User object, so it can be used
+       * to query collections. E.g. <code><pre>
+       * // Test whether jtwit is a friend
+       * twitter.getFriends().contains(new User(&quot;jtwit&quot;));
+       * </pre></code>
+       *
+       * @param screenName
+       *                This will be converted to lower-case as Twitter screen-names are case insensitive
+       */
+      public User(final String screenName) {
+         id = -1;
+         name = null;
+         this.screenName = screenName.toLowerCase();
+         status = null;
+         location = null;
+         description = null;
+         profileImageUrl = null;
+         website = null;
+         protectedUser = false;
+         followersCount = 0;
+         profileBackgroundColor = null;
+         profileLinkColor = null;
+         profileTextColor = null;
+         profileSidebarFillColor = null;
+         profileSidebarBorderColor = null;
+         friendsCount = 0;
+         createdAt = null;
+         favoritesCount = 0;
+         timezoneOffSet = -1;
+         timezone = null;
+         profileBackgroundImageUrl = null;
+         profileBackgroundTile = false;
+         statusesCount = 0;
+         notifications = false;
+         verified = false;
+         following = false;
+      }
+
+
+      @Override
+      public boolean equals(final Object other) {
+         if (this == other) {
+            return true;
+         }
+         if (!(other instanceof User)) {
+            return false;
+         }
+         final User ou = (User) other;
+         if (screenName.equals(ou.screenName)) {
+            return true;
+         }
+         return false;
+      }
+
+
+      public Date getCreatedAt() {
+         return createdAt;
+      }
+
+
+      public String getDescription() {
+         return description;
+      }
+
+
+      /** number of statuses a user has marked as favorite */
+      public int getFavoritesCount() {
+         return favoritesCount;
+      }
+
+
+      public int getFollowersCount() {
+         return followersCount;
+      }
+
+
+      /**
+       * @return number of people this user is following
+       */
+      public int getFriendsCount() {
+         return friendsCount;
+      }
+
+
+      public long getId() {
+         return id;
+      }
+
+
+      public String getLocation() {
+         return location;
+      }
+
+
+      /**
+       * The display name, e.g. "Daniel Winterstein"
+       *
+       * @see #getScreenName()
+       */
+      public String getName() {
+         return name;
+      }
+
+
+      public String getProfileBackgroundColor() {
+         return profileBackgroundColor;
+      }
+
+
+      public URI getProfileBackgroundImageUrl() {
+         return profileBackgroundImageUrl;
+      }
+
+
+      public URI getProfileImageUrl() {
+         return profileImageUrl;
+      }
+
+
+      public String getProfileLinkColor() {
+         return profileLinkColor;
+      }
+
+
+      public String getProfileSidebarBorderColor() {
+         return profileSidebarBorderColor;
+      }
+
+
+      public String getProfileSidebarFillColor() {
+         return profileSidebarFillColor;
+      }
+
+
+      public String getProfileTextColor() {
+         return profileTextColor;
+      }
+
+
+      public boolean getProtectedUser() {
+         return protectedUser;
+      }
+
+
+      /** The login name, e.g. "winterstein" */
+      public String getScreenName() {
+         return screenName;
+      }
+
+
+      public Status getStatus() {
+         return status;
+      }
+
+
+      public int getStatusesCount() {
+         return statusesCount;
+      }
+
+
+      /**
+       * String version of the timezone
+       */
+      public String getTimezone() {
+         return timezone;
+      }
+
+
+      /**
+       * Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or
+       * UTC. Can be positive or negative.
+       */
+      public int getTimezoneOffSet() {
+         return timezoneOffSet;
+      }
+
+
+      public URI getWebsite() {
+         return website;
+      }
+
+
+      @Override
+      public int hashCode() {
+         return screenName.hashCode();
+      }
+
+
+      /**
+       * @return true if this is a dummy User object, in which case almost all of it's fields will be null - with the exception of
+       *         screenName and possibly {@link #profileImageUrl}. Dummy User objects are equals() to full User objects.
+       */
+      public boolean isDummyObject() {
+         return name == null;
+      }
+
+
+      public boolean isFollowing() {
+         return following;
+      }
+
+
+      public boolean isNotifications() {
+         return notifications;
+      }
+
+
+      public boolean isProfileBackgroundTile() {
+         return profileBackgroundTile;
+      }
+
+
+      /**
+       * true if this user keeps their updates private
+       */
+      public boolean isProtectedUser() {
+         return protectedUser;
+      }
+
+
+      /**
+       * @return true if the account has been verified by Twitter to really be who it claims to be.
+       */
+      public boolean isVerified() {
+         return verified;
+      }
+
+
+      /**
+       * Returns the User's screenName (i.e. their Twitter login)
+       */
+      @Override
+      public String toString() {
+         return screenName;
+      }
+   }
+
+   /**
+    * JTwitter version
+    */
+   public final static String version = "1.4.4";
+
+
+   /**
+    * Create a map from a list of key, value pairs. An easy way to make small maps, basically the equivalent of
+    * {@link Arrays#asList(Object...)}.
+    */
+   @SuppressWarnings("unchecked")
+   private static <K, V> Map<K, V> asMap(final Object... keyValuePairs) {
+      assert keyValuePairs.length % 2 == 0;
+      final Map m = new HashMap(keyValuePairs.length / 2);
+      for (int i = 0; i < keyValuePairs.length; i += 2) {
+         m.put(keyValuePairs[i], keyValuePairs[i + 1]);
+      }
+      return m;
+   }
+
+
+   /**
+    * Twitter html encodes some entities: ", ', <, >, &
+    *
+    * @param text
+    *                Can be null (which returns null)
+    * @return normal-ish text
+    */
+   static String unencode(String text) {
+      if (text == null) {
+         return null;
+      }
+      // TODO use Jakarta to handle all html entities
+      text = text.replace("&quot;", "\"");
+      text = text.replace("&apos;", "'");
+      text = text.replace("&nbsp;", " ");
+      text = text.replace("&amp;", "&");
+      text = text.replace("&gt;", ">");
+      text = text.replace("&lt;", "<");
+      //		if (Pattern.compile("&\\w+;").matcher(text).find()) {
+      //			System.out.print(text);
+      //		}
+      return text;
+   }
+
+
+   /**
+    * Convenience method for making Dates. Because Date is a tricksy bugger of a class.
+    *
+    * @param year
+    * @param month
+    * @param day
+    * @return date object
+    */
+   public static Date getDate(final int year,
+                              final String month,
+                              final int day) {
+      try {
+         final Field field = GregorianCalendar.class.getField(month.toUpperCase());
+         final int m = field.getInt(null);
+         final Calendar date = new GregorianCalendar(year, m, day);
+         return date.getTime();
+      }
+      catch (final Exception x) {
+         throw new IllegalArgumentException(x.getMessage());
+      }
+   }
+
+
+   /**
+    * Convenience method: Finds a user with the given screen-name from the list.
+    *
+    * @param screenName
+    *                aka login name
+    * @param users
+    * @return User with the given name, or null.
+    */
+   public static User getUser(final String screenName,
+                              final List<User> users) {
+      assert (screenName != null) && (users != null);
+      for (final User user : users) {
+         if (screenName.equals(user.screenName)) {
+            return user;
+         }
+      }
+      return null;
+   }
+
+
+   /** Helper method to deal with JSON-in-Java weirdness */
+   protected static String jsonGet(final String key,
+                                   final JSONObject jsonObj) {
+      final Object val = jsonObj.opt(key);
+      if (val == null) {
+         return null;
+      }
+      if (JSONObject.NULL.equals(val)) {
+         return null;
+      }
+      return val.toString();
+   }
+
+
+   /**
+    *
+    * @param args
+    *                Can be used as a command-line tweet tool. To do so, enter 3 arguments: name, password, tweet
+    *
+    * If empty, prints version info.
+    */
+   public static void main(final String[] args) {
+      // Post a tweet if we are handed a name, password and tweet
+      if (args.length == 3) {
+         final Twitter tw = new Twitter(args[0], args[1]);
+         //			int s = 0;
+         //			List<Long> fids = tw.getFollowerIDs();
+         //			for (Long fid : fids) {
+         //				User f = tw.follow(""+fid);
+         //				if (f!=null) s++;
+         //			}
+         final Status s = tw.setStatus(args[2]);
+         System.out.println(s);
+         return;
+      }
+      System.out.println("Java interface for Twitter");
+      System.out.println("--------------------------");
+      System.out.println("Version " + Twitter.version);
+      System.out.println("Released under LGPL by Winterwell Associates Ltd.");
+      System.out.println("See source code or JavaDoc for details on how to use.");
+   }
+
+
+   /**
+    * Convert to a URI, or return null if this is badly formatted
+    */
+   private static URI URI(final String uri) {
+      try {
+         return new URI(uri);
+      }
+      catch (final URISyntaxException e) {
+         return null; // Bad syntax
+      }
+   }
+
+   private String            sourceApp  = "jtwitterlib";
+
+   /**
+    * Gets used once then reset to null by {@link #addStandardishParameters(Map)}. Gets updated in the while loops of methods
+    * doing a get-all-pages.
+    */
+   private Integer           pageNumber;
+
+   private Long              sinceId;
+
+   private Date              sinceDate;
+
+   private Date              untilDate;
+
+   /**
+    * Provides support for fetching many pages
+    */
+   private int               maxResults = -1;
+
+   private final IHttpClient http;
+
+   /**
+    * Twitter login name. Can be null even if we have authentication when using OAuth
+    */
+   private final String      name;
+
+
+   /**
+    * Create a Twitter client without specifying a user.
+    */
+   public Twitter() {
+      this(null, new URLConnectionHttpClient());
+   }
+
+
+   /**
+    * Java wrapper for the Twitter API.
+    *
+    * @param name
+    *                the authenticating user's name, if known. Can be null.
+    * @param client
+    */
+   public Twitter(final String name,
+                  final IHttpClient client) {
+      this.name = name;
+      http = client;
+   }
+
+
+   /**
+    * Java wrapper for the Twitter API.
+    *
+    * @param screenName
+    *                The name of the Twitter user. Only used by some methods. Can be null if you avoid methods requiring
+    *                authentication.
+    * @param password
+    *                The password of the Twitter user. Can be null if you avoid methods requiring authentication.
+    */
+   public Twitter(final String screenName,
+                  final String password) {
+      this(screenName, new URLConnectionHttpClient(screenName, password));
+   }
+
+
+   // private Format format = Format.xml;
+
+   /**
+    * Add in since_id, page and count, if set. This is called by methods that return lists of statuses or messages.
+    *
+    * @param vars
+    * @return vars
+    */
+   private Map<String, String> addStandardishParameters(final Map<String, String> vars) {
+      if (sinceId != null) {
+         vars.put("since_id", sinceId.toString());
+      }
+      if (pageNumber != null) {
+         vars.put("page", pageNumber.toString());
+         // this is used once only
+         pageNumber = null;
+      }
+      if (count != null) {
+         vars.put("count", count.toString());
+      }
+      return vars;
+   }
+
+   Integer        count;
+
+   private String lang;
+
+
+   /**
+    * *Some* methods - the timeline ones for example - allow a count of number-of-tweets to return.
+    *
+    * @param count
+    *                null for default behaviour. 200 is the current maximum. Twitter may reject or ignore high counts.
+    */
+   public void setCount(final Integer count) {
+      this.count = count;
+   }
+
+
+   /**
+    * Create a map from a list of key/value pairs.
+    *
+    * @param keyValuePairs
+    * @return
+    */
+   private Map<String, String> aMap(final String... keyValuePairs) {
+      final HashMap<String, String> map = new HashMap<String, String>();
+      for (int i = 0; i < keyValuePairs.length; i += 2) {
+         map.put(keyValuePairs[i], keyValuePairs[i + 1]);
+      }
+      return map;
+   }
+
+
+   /**
+    * Equivalent to {@link #follow(String)}. C.f. http://apiwiki.twitter.com/Migrating-to-followers-terminology
+    *
+    * @param username
+    *                Required. The screen name of the user to befriend.
+    * @return The befriended user.
+    * @deprecated Use {@link #follow(String)} instead, which is equivalent.
+    */
+   @Deprecated
+   public User befriend(final String username) throws TwitterException {
+      return follow(username);
+   }
+
+
+   /**
+    * Equivalent to {@link #stopFollowing(String)}.
+    *
+    * @deprecated Please use {@link #stopFollowing(String)} instead.
+    */
+   @Deprecated
+   public User breakFriendship(final String username) {
+      return stopFollowing(username);
+   }
+
+
+   /**
+    * Filter keeping only those messages that come between sinceDate and untilDate (if either or both are set).
+    *
+    * @param list
+    * @return filtered list
+    */
+   private <T extends ITweet> List<T> dateFilter(final List<T> list) {
+      if ((sinceDate == null) && (untilDate == null)) {
+         return list;
+      }
+      final ArrayList<T> filtered = new ArrayList<T>(list.size());
+      for (final T message : list) {
+         // this code could prob be cleaned up a bit...
+         if (message.getCreatedAt() == null) {
+            filtered.add(message);
+            continue;
+         }
+         if (notTooEarly(message) && notTooLate(message)) {
+            filtered.add(message);
+         }
+      }
+      return filtered;
+   }
+
+
+   /**
+    * Is a message later than sinceDate (if that's set)?
+    *
+    * @param <T>
+    * @param message
+    * @return
+    */
+   private <T extends ITweet> boolean notTooEarly(final T message) {
+      return (sinceDate == null) || (sinceDate.before(message.getCreatedAt()));
+   }
+
+
+   /**
+    * Is a message earlier than untilDate (if that's set)?
+    *
+    * @param <T>
+    * @param message
+    * @return
+    */
+   private <T extends ITweet> boolean notTooLate(final T message) {
+      return (untilDate == null) || (untilDate.after(message.getCreatedAt()));
+   }
+
+
+   /**
+    * Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified
+    * status.
+    *
+    */
+   public void destroyStatus(final long id) throws TwitterException {
+      final String page = post(TWITTER_URL + "/statuses/destroy/" + id + ".json", null, true);
+      // Note: Sends two HTTP requests to Twitter rather than one: Twitter appears
+      // not to make deletions visible until the user's status page is requested.
+      flush();
+      assert page != null;
+   }
+
+
+   /**
+    * Destroys the given status. Equivalent to {@link #destroyStatus(int)}. The authenticating user must be the author of the
+    * status post.
+    */
+   public void destroyStatus(final Status status) throws TwitterException {
+      destroyStatus(status.getId());
+   }
+
+
+   void flush() {
+      // This seems to prompt twitter to update in some cases!
+      http.getPage("http://twitter.com/" + name, null, true);
+   }
+
+
+   /**
+    * Start following a user.
+    *
+    * @param username
+    *                Required. The ID or screen name of the user to befriend.
+    * @return The befriended user, or null if they were already being followed.
+    * @throws TwitterException
+    *                 if the user does not exist or has been suspended.
+    */
+   public User follow(final String username) throws TwitterException {
+      if (username == null) {
+         throw new NullPointerException();
+      }
+      String page;
+      try {
+         final Map<String, String> vars = newMap("screen_name", username);
+         page = post(TWITTER_URL + "/friendships/create.json", vars, true);
+         // is this needed? doesn't seem to fix things
+         //			http.getPage(TWITTER_URL+"/friends", null, true);
+      }
+      catch (final E403 e) {
+         // check if we've tried to follow someone we're already
+         // following
+         if (isFollowing(username)) {
+            return null;
+         }
+         throw e;
+      }
+      try {
+         return new User(new JSONObject(page), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Convenience for {@link #follow(String)}
+    *
+    * @param user
+    */
+   public void follow(final User user) {
+      follow(user.screenName);
+   }
+
+
+   /**
+    * Returns a list of the direct messages sent to the authenticating user.
+    * <p>
+    * Note: the Twitter API makes this available in rss if that's of interest.
+    */
+   public List<Message> getDirectMessages() {
+      return getMessages(TWITTER_URL + "/direct_messages.json", standardishParameters());
+   }
+
+
+   /**
+    * Returns a list of the direct messages sent *by* the authenticating user.
+    */
+   public List<Message> getDirectMessagesSent() {
+      return getMessages(TWITTER_URL + "/direct_messages/sent.json", standardishParameters());
+   }
+
+
+   /**
+    * The most recent 20 favourite tweets. (Note: This can use page - and page only - to fetch older favourites).
+    */
+   public List<Status> getFavorites() {
+      return getStatuses(TWITTER_URL + "/favorites.json", standardishParameters(), true);
+   }
+
+
+   public void setFavorite(final Status status,
+                           final boolean isFavorite) {
+      final String uri = isFavorite ? TWITTER_URL + "/favorites/create/" + status.id + ".json" : TWITTER_URL
+                                                                                                 + "/favorites/destroy/"
+                                                                                                 + status.id + ".json";
+      http.getPage(uri, null, true);
+   }
+
+
+   /**
+    * The most recent 20 favourite tweets for the given user. (Note: This can use page - and page only - to fetch older
+    * favourites).
+    *
+    * @param screenName
+    *                login-name.
+    */
+   public List<Status> getFavorites(final String screenName) {
+      final Map<String, String> vars = newMap("screen_name", screenName);
+      return getStatuses(TWITTER_URL + "/favorites.json", addStandardishParameters(vars), http.canAuthenticate());
+   }
+
+
+   /**
+    * Returns a list of the users currently featured on the site with their current statuses inline.
+    * <p>
+    * Note: This is no longer part of the Twitter API. Support is provided via other methods.
+    */
+   public List<User> getFeatured() throws TwitterException {
+      final List<User> users = new ArrayList<User>();
+      final List<Status> featured = getPublicTimeline();
+      for (final Status status : featured) {
+         final User user = status.getUser();
+         users.add(user);
+      }
+      return users;
+   }
+
+
+   /**
+    * Returns the IDs of the authenticating user's followers.
+    *
+    * @throws TwitterException
+    */
+   public List<Long> getFollowerIDs() throws TwitterException {
+      return getUserIDs(TWITTER_URL + "/followers/ids.json", null);
+   }
+
+
+   /**
+    * Returns the IDs of the specified user's followers.
+    *
+    * @param The
+    *                screen name of the user whose followers are to be fetched.
+    * @throws TwitterException
+    */
+   public List<Long> getFollowerIDs(final String screenName) throws TwitterException {
+      return getUserIDs(TWITTER_URL + "/followers/ids.json", screenName);
+   }
+
+
+   /**
+    * Returns the authenticating user's (latest) followers, each with current status inline. Occasionally contains duplicates.
+    */
+   public List<User> getFollowers() throws TwitterException {
+      return getUsers(TWITTER_URL + "/statuses/followers.json", null);
+   }
+
+
+   /**
+    *
+    * Returns the (latest 100) given user's followers, each with current status inline. Occasionally contains duplicates.
+    *
+    * @param username
+    *                The screen name of the user for whom to request a list of friends.
+    * @throws TwitterException
+    */
+
+   public List<User> getFollowers(final String username) throws TwitterException {
+      return getUsers(TWITTER_URL + "/statuses/followers.json", username);
+   }
+
+
+   /**
+    * Returns the IDs of the authenticating user's friends. (people who the user follows).
+    *
+    * @throws TwitterException
+    */
+   public List<Long> getFriendIDs() throws TwitterException {
+      return getUserIDs(TWITTER_URL + "/friends/ids.json", null);
+   }
+
+
+   /**
+    * Returns the IDs of the specified user's friends. Occasionally contains duplicates.
+    *
+    * @param The
+    *                screen name of the user whose friends are to be fetched.
+    * @throws TwitterException
+    */
+   public List<Long> getFriendIDs(final String screenName) throws TwitterException {
+      return getUserIDs(TWITTER_URL + "/friends/ids.json", screenName);
+   }
+
+
+   /**
+    * Returns the authenticating user's (latest 100) friends, each with current status inline. NB - friends are people who *you*
+    * follow. Occasionally contains duplicates.
+    * <p>
+    * Note that there seems to be a small delay from Twitter in updates to this list.
+    *
+    * @throws TwitterException
+    * @see #getFriendIDs()
+    * @see #isFollowing(String)
+    */
+   public List<User> getFriends() throws TwitterException {
+      return getUsers(TWITTER_URL + "/statuses/friends.json", null);
+   }
+
+
+   /**
+    *
+    * Returns the (latest 100) given user's friends, each with current status inline. Occasionally contains duplicates.
+    *
+    * @param username
+    *                The screen name of the user for whom to request a list of friends.
+    * @throws TwitterException
+    */
+   public List<User> getFriends(final String username) throws TwitterException {
+      return getUsers(TWITTER_URL + "/statuses/friends.json", username);
+   }
+
+
+   /**
+    * Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user and that user's friends.
+    */
+   public List<Status> getFriendsTimeline() throws TwitterException {
+      return getStatuses(TWITTER_URL + "/statuses/friends_timeline.json", standardishParameters(), true);
+   }
+
+
+   /**
+    * Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user and that user's friends,
+    * including retweets.
+    */
+   public List<Status> getHomeTimeline() throws TwitterException {
+      return getStatuses(TWITTER_URL + "/statuses/home_timeline.json", standardishParameters(), true);
+   }
+
+
+   /**
+    *
+    * @param url
+    * @param var
+    * @param isPublic
+    *                Value to set for Message.isPublic
+    * @return
+    */
+   private List<Message> getMessages(final String url,
+                                     final Map<String, String> var) {
+      // Default: 1 page
+      if (maxResults < 1) {
+         List<Message> msgs = Message.getMessages(http.getPage(url, var, true));
+         msgs = dateFilter(msgs);
+         return msgs;
+      }
+      // Fetch all pages until we run out
+      // -- or Twitter complains in which case you'll get an exception
+      pageNumber = 1;
+      final List<Message> msgs = new ArrayList<Message>();
+      while (msgs.size() <= maxResults) {
+         final String p = http.getPage(url, var, true);
+         List<Message> nextpage = Message.getMessages(p);
+         nextpage = dateFilter(nextpage);
+         msgs.addAll(nextpage);
+         if (nextpage.size() < 20) {
+            break;
+         }
+         pageNumber++;
+         var.put("page", Integer.toString(pageNumber));
+      }
+      return msgs;
+   }
+
+
+   /**
+    * @return Login name of the authenticating user, or null if not set.
+    */
+   public String getScreenName() {
+      return name;
+   }
+
+
+   /**
+    * Returns the 20 most recent statuses from non-protected users who have set a custom user icon. Does not require
+    * authentication.
+    * <p>
+    * Note: Twitter cache-and-refresh this every 60 seconds, so there is little point calling it more frequently than that.
+    */
+   public List<Status> getPublicTimeline() throws TwitterException {
+      return getStatuses(TWITTER_URL + "/statuses/public_timeline.json", standardishParameters(), false);
+   }
+
+
+   /**
+    * @return the remaining number of API requests available to the authenticating user before the API limit is reached for the
+    *         current hour. <i>If this is negative you should stop using Twitter with this login for a bit.</i> Note: Calls to
+    *         rate_limit_status do not count against the rate limit.
+    */
+   public int getRateLimitStatus() {
+      final String json = http.getPage(TWITTER_URL + "/account/rate_limit_status.json", null, http.canAuthenticate());
+      try {
+         final JSONObject obj = new JSONObject(json);
+         final int hits = obj.getInt("remaining_hits");
+         return hits;
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Returns the 20 most recent replies/mentions (status updates with
+    *
+    * @username) to the authenticating user. Replies are only available to the authenticating user; you can not request a list of
+    *            replies to another user whether public or protected.
+    *            <p>
+    *            The Twitter API now refers to replies as <i>mentions</i>. We have kept the old terminology here.
+    */
+   public List<Status> getReplies() throws TwitterException {
+      return getStatuses(TWITTER_URL + "/statuses/replies.json", standardishParameters(), true);
+   }
+
+
+   /**
+    *
+    * TODO
+    *
+    * @return retweets of your tweets
+    */
+   public List<Status> getRetweetsOfMe() {
+      //TWITTER_URL/statuses/retweets_of_me.json
+      throw new RuntimeException("TODO: Implement");
+   }
+
+
+   /**
+    *
+    * @return retweets of this tweet, based on a word search
+    */
+   // TODO use Twitter's new retweet API
+   public List<Status> getRetweets(final Status tweet) {
+      final String[] words = tweet.text.split("\\s");
+      final StringBuilder sq = new StringBuilder();
+      sq.append("rt @" + tweet.getUser().getScreenName());
+      for (final String w : words) {
+         // TODO ignore some stop words - esp those which can be shortened by txt speak
+         sq.append(" ");
+         sq.append(w);
+      }
+      return search(sq.toString());
+   }
+
+
+   /**
+    * @return The current status of the user. null if unset (ie if they have never tweeted)
+    */
+   public Status getStatus() throws TwitterException {
+      final Map<String, String> vars = asMap("count", 1);
+      final String json = http.getPage(TWITTER_URL + "/statuses/user_timeline.json", vars, true);
+      final List<Status> statuses = Status.getStatuses(json);
+      if (statuses.size() == 0) {
+         return null;
+      }
+      return statuses.get(0);
+   }
+
+
+   /**
+    * Returns a single status, specified by the id parameter below. The status's author will be returned inline.
+    *
+    * @param id
+    *                The numerical ID of the status you're trying to retrieve.
+    */
+   public Status getStatus(final long id) throws TwitterException {
+      final String json = http.getPage(TWITTER_URL + "/statuses/show/" + id + ".json", null, true);
+      try {
+         return new Status(new JSONObject(json), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * @return The current status of the given user, as a normal String.
+    */
+   public Status getStatus(final String username) throws TwitterException {
+      assert username != null;
+      final Map<String, String> vars = asMap("id", username, "count", 1);
+      final String json = http.getPage(TWITTER_URL + "/statuses/user_timeline.json", vars, false);
+      final List<Status> statuses = Status.getStatuses(json);
+      if (statuses.size() == 0) {
+         return null;
+      }
+      return statuses.get(0);
+
+   }
+
+
+   /**
+    *
+    * @param url
+    * @param var
+    * @param authenticate
+    * @return
+    */
+   private List<Status> getStatuses(final String url,
+                                    final Map<String, String> var,
+                                    final boolean authenticate) {
+      // Default: 1 page
+      if (maxResults < 1) {
+         List<Status> msgs = Status.getStatuses(http.getPage(url, var, authenticate));
+         msgs = dateFilter(msgs);
+         return msgs;
+      }
+      // Fetch all pages until we run out
+      // -- or Twitter complains in which case you'll get an exception
+      pageNumber = 1;
+      final List<Status> msgs = new ArrayList<Status>();
+      while (msgs.size() <= maxResults) {
+         List<Status> nextpage = Status.getStatuses(http.getPage(url, var, authenticate));
+         nextpage = dateFilter(nextpage);
+         msgs.addAll(nextpage);
+         if (nextpage.size() < 20) {
+            break;
+         }
+         pageNumber++;
+         var.put("page", Integer.toString(pageNumber));
+      }
+      return msgs;
+   }
+
+
+   /**
+    *
+    * @param url
+    *                API method to call
+    * @param screenName
+    * @return twitter-id numbers for friends/followers of screenName Is affected by {@link #maxResults}
+    */
+   private List<Long> getUserIDs(final String url,
+                                 final String screenName) {
+      Long cursor = -1L;
+      final List<Long> ids = new ArrayList<Long>();
+      while ((cursor != 0) && !enoughResults(ids)) {
+         final Map vars = newMap("screen_name", screenName);
+         vars.put("cursor", cursor);
+         final String json = http.getPage(url, vars, http.canAuthenticate());
+         try {
+            final JSONObject jobj = new JSONObject(json);
+            final JSONArray jarr = (JSONArray) jobj.get("ids");
+            for (int i = 0; i < jarr.length(); i++) {
+               ids.add(jarr.getLong(i));
+            }
+            cursor = new Long(jobj.getString("next_cursor"));
+         }
+         catch (final JSONException e) {
+            throw new TwitterException("Could not parse id list" + e);
+         }
+      }
+      return ids;
+   }
+
+
+   /**
+    * Have we got enough results for the current search?
+    *
+    * @param list
+    * @return false if maxResults is set to -1 (ie, unlimited) or if list contains less than maxResults results.
+    */
+   private <X> boolean enoughResults(final List<X> list) {
+      return ((maxResults != -1) && (list.size() >= maxResults));
+   }
+
+
+   /**
+    * Convenience method for building small maps.
+    *
+    * @param keyValuePairs
+    * @return map with these settings
+    */
+   private Map<String, String> newMap(final String... keyValuePairs) {
+      final HashMap<String, String> map = new HashMap<String, String>();
+      for (int i = 0; i < keyValuePairs.length; i += 2) {
+         map.put(keyValuePairs[i], keyValuePairs[i + 1]);
+      }
+      return map;
+   }
+
+
+   /**
+    * Low-level method for fetching e.g. your friends
+    *
+    * @param url
+    * @param screenName
+    *                e.g. your screen-name
+    * @return
+    */
+   private List<User> getUsers(final String url,
+                               final String screenName) {
+      final Map<String, String> vars = newMap("screen_name", screenName);
+      final List<User> users = new ArrayList<User>();
+      Long cursor = -1L;
+      while ((cursor != 0) && !enoughResults(users)) {
+         vars.put("cursor", cursor.toString());
+         JSONObject jobj;
+         try {
+            jobj = new JSONObject(http.getPage(url, vars, http.canAuthenticate()));
+            users.addAll(User.getUsers(jobj.getString("users")));
+            cursor = new Long(jobj.getString("next_cursor"));
+         }
+         catch (final JSONException e) {
+            throw new TwitterException("Could not parse user listing: " + e);
+         }
+      }
+      return users;
+   }
+
+
+   /**
+    * Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user.
+    */
+   public List<Status> getUserTimeline() throws TwitterException {
+      return getStatuses(TWITTER_URL + "/statuses/user_timeline.json", standardishParameters(), true);
+   }
+
+
+   /**
+    * Returns the most recent statuses posted in the last 24 hours from the given user.
+    * <p>
+    * This method will authenticate if it can (i.e. if the Twitter object has a username and password). Authentication is needed
+    * to see the posts of a private user.
+    *
+    * @param screenName
+    *                Can be null. Specifies the screen name of the user for whom to return the user_timeline.
+    * @param since
+    *                Can be null. Narrows the returned results to just those statuses created after the specified date.
+    */
+   public List<Status> getUserTimeline(final String screenName) throws TwitterException {
+      final Map<String, String> vars = asMap("screen_name", screenName);
+      addStandardishParameters(vars);
+      // Should we authenticate?
+      final boolean authenticate = http.canAuthenticate();
+      final String json = http.getPage(TWITTER_URL + "/statuses/user_timeline.json", vars, authenticate);
+      return Status.getStatuses(json);
+   }
+
+
+   /**
+    * Is the authenticating user <i>followed by</i> userB?
+    *
+    * @param userB
+    *                The screen name of a Twitter user.
+    * @return Whether or not the user is followed by userB.
+    */
+   public boolean isFollower(final String userB) {
+      return isFollower(userB, name);
+   }
+
+
+   /**
+    * @return true if followerScreenName <i>is</i> following followedScreenName
+    *
+    * @throws TwitterException.E403
+    *                 if one of the users has protected their updates and you don't have access. This can be counter-intuitive
+    *                 (and annoying) at times!
+    */
+   public boolean isFollower(final String followerScreenName,
+                             final String followedScreenName) {
+      assert (followerScreenName != null) && (followedScreenName != null);
+      final String page = http.getPage(TWITTER_URL + "/friendships/exists.json", aMap("user_a", followerScreenName, "user_b",
+               followedScreenName), true);
+      return Boolean.valueOf(page);
+   }
+
+
+   /**
+    * Does the authenticating user <i>follow</i> userB?
+    *
+    * @param userB
+    *                The screen name of a Twitter user.
+    * @return Whether or not the user follows userB.
+    */
+   public boolean isFollowing(final String userB) {
+      if (isFollower(name, userB)) {
+         return true;
+      }
+      //		// hopefully temporary workarounds for hopefully temporary issues with Twitter's follower API
+      //		// Note: These do not appear to help! Left in 'cos what harm can they do?
+      //		List<User> friends = getFriends();
+      //		User b = new User(userB);
+      //		if (friends.contains(b)) return true;
+      //		long bid = show(userB).getId();
+      //		List<Long> fids = getFriendIDs();
+      //		if (fids.contains(bid)) return true;
+      return false;
+   }
+
+
+   /**
+    * Convenience for {@link #isFollowing(String)}
+    *
+    * @param user
+    */
+   public boolean isFollowing(final User user) {
+      return isFollowing(user.screenName);
+   }
+
+
+   /**
+    * Are the login details used for authentication valid?
+    *
+    * @return
+    */
+   public boolean isValidLogin() {
+      try {
+         getDirectMessages();
+         return true;
+      }
+      catch (final TwitterException.E403 e) {
+         return false;
+      }
+      catch (final TwitterException.E401 e) {
+         return false;
+      }
+      catch (final TwitterException e) {
+         throw e;
+      }
+   }
+
+
+   /**
+    * Switches off notifications for updates from the specified user <i>who must already be a friend</i>.
+    *
+    * @param screenName
+    *                Stop getting notifications from this user, who must already be one of your friends.
+    * @return the specified user
+    */
+   public User leaveNotifications(final String screenName) {
+      final Map<String, String> vars = newMap("screen_name", screenName);
+      final String page = http.getPage(TWITTER_URL + "/notifications/leave.json", vars, true);
+      try {
+         return new User(new JSONObject(page), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Enables notifications for updates from the specified user <i>who must already be a friend</i>.
+    *
+    * @param username
+    *                Get notifications from this user, who must already be one of your friends.
+    * @return the specified user
+    */
+   public User notify(final String username) {
+      final Map<String, String> vars = newMap("screen_name", username);
+      final String page = http.getPage(TWITTER_URL + "/notifications/follow.json", vars, true);
+      try {
+         return new User(new JSONObject(page), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Wrapper for {@link IHttpClient#post(String, Map, boolean)}.
+    */
+   private String post(final String uri,
+                       final Map<String, String> vars,
+                       final boolean authenticate) throws TwitterException {
+      final String page = http.post(uri, vars, authenticate);
+      return page;
+   }
+
+
+   /**
+    * Perform a search of Twitter.
+    * <p>
+    * Warning: the User objects returned by a search (as part of the Status objects) are dummy-users. The only information that is
+    * set is the user's screen-name and a profile image url. This reflects the current behaviour of the Twitter API. If you need
+    * more info, call {@link #show(String)} with the screen name.
+    * <p>
+    * This supports {@link #maxResults} and pagination. A language filter can be set via {@link #setLanguage(String)} TODO
+    * parameters: geocode: Optional. Returns tweets by users located within a given radius of the given latitude/longitude, where
+    * the user's location is taken from their Twitter profile. The parameter value is specified by "latitude,longitude,radius",
+    * where radius units must be specified as either "mi" (miles) or "km" (kilometers). Note that you cannot use the near operator
+    * via the API to geocode arbitrary locations; however you can use this geocode parameter to search near geocodes directly.
+    *
+    * @param searchTerm
+    * @param callback
+    *                an object whose process() method will be called on each new page of results.
+    * @param the
+    *                number of results to fetch per page
+    * @return search results - up to maxResults / rpp if maxResults is positive, or rpp if maxResults is negative.
+    */
+   public List<Status> search(final String searchTerm,
+                              final ICallback callback,
+                              final int rpp) {
+      Map<String, String> vars;
+      if ((maxResults < 100) && (maxResults > 0)) {
+         // Default: 1 page
+         vars = getSearchParams(searchTerm, maxResults);
+      }
+      else {
+         vars = getSearchParams(searchTerm, rpp);
+      }
+      // Fetch all pages until we run out
+      // -- or Twitter complains in which case you'll get an exception
+      pageNumber = 1;
+      final List<Status> allResults = new ArrayList<Status>(Math.max(maxResults, rpp));
+      final String url = "http://search.twitter.com/search.json";
+      pageNumber = 1; // pageNumber is nulled by getSearchParams
+      do {
+         vars.put("page", Integer.toString(pageNumber));
+         final String json = http.getPage(url, vars, false);
+         List<Status> stati = Status.getStatusesFromSearch(this, json);
+         final int numResults = stati.size();
+         stati = dateFilter(stati);
+         allResults.addAll(stati);
+         if (callback != null) {
+            // the callback may tell us to stop, by returning true
+            if (callback.process(stati)) {
+               break;
+            }
+         }
+         if (numResults < rpp) { // We've reached the end of the results
+            break;
+         }
+         pageNumber++;
+      }
+      while (allResults.size() < maxResults);
+      return allResults;
+   }
+
+
+   /**
+    * Retweet a tweet without any edits. You can also retweet by starting a status using the RT
+    *
+    * @username microformat (Twitter may not get it, but everyone else will).
+    *
+    * @param tweet
+    *                This must not be one of your own or Twitter will ignore it.
+    * @return your retweet
+    */
+   public Status retweet(final Status tweet) {
+      final String result = post(TWITTER_URL + "/statuses/retweet/" + tweet.getId() + ".json", null, true);
+      try {
+         return new Status(new JSONObject(result), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Wrapper for {@link #search(String, ICallback, int)} with no callback and fetching 100 results.
+    * <p>
+    * Perform a search of Twitter.
+    * <p>
+    * Warning: the User objects returned by a search (as part of the Status objects) are dummy-users. The only information that is
+    * set is the user's screen-name and a profile image url. This reflects the current behaviour of the Twitter API. If you need
+    * more info, call {@link #show(String)} with the screen name.
+    * <p>
+    * This supports {@link #maxResults} and pagination. A language filter can be set via {@link #setLanguage(String)} TODO
+    * parameters: geocode: Optional. Returns tweets by users located within a given radius of the given latitude/longitude, where
+    * the user's location is taken from their Twitter profile. The parameter value is specified by "latitude,longitude,radius",
+    * where radius units must be specified as either "mi" (miles) or "km" (kilometers). Note that you cannot use the near operator
+    * via the API to geocode arbitrary locations; however you can use this geocode parameter to search near geocodes directly.
+    *
+    * @param searchTerm
+    * @return search results - up to maxResults + rpp if maxResults is positive, or rpp if maxResults is negative.
+    */
+   public List<Status> search(final String searchTerm) {
+      return search(searchTerm, null, 100);
+   }
+
+
+   /**
+    * @param searchTerm
+    * @param rpp
+    * @return
+    */
+   private Map<String, String> getSearchParams(final String searchTerm,
+                                               final int rpp) {
+      final Map<String, String> vars = aMap("rpp", "" + rpp, "q", searchTerm);
+      if (sinceId != null) {
+         vars.put("since_id", sinceId.toString());
+      }
+      // dates are no longer supported
+      //		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+      //		if (sinceDate != null) vars.put("since", df.format(sinceDate));
+      //		if (untilDate != null) vars.put("until", df.format(untilDate));
+      if (lang != null) {
+         vars.put("lang", lang);
+      }
+      if (geocode != null) {
+         vars.put("geocode", geocode);
+      }
+      addStandardishParameters(vars);
+      return vars;
+   }
+
+   private String geocode;
+
+
+   /**
+    * Restricts {@link #search(String)} to tweets by users located within a given radius of the given latitude/longitude.
+    * <p>
+    * The location of a tweet is preferentially taked from the Geotagging API, but will fall back to the Twitter profile.
+    *
+    * @param latitude
+    * @param longitude
+    * @param radius
+    *                E.g. 3.5mi or 2km
+    */
+   public void setSearchLocation(final double latitude,
+                                 final double longitude,
+                                 final String radius) {
+      assert radius.endsWith("mi") || radius.endsWith("km") : radius;
+      geocode = latitude + "," + longitude + "," + radius;
+   }
+
+
+   /**
+    * Sends a new direct message to the specified user from the authenticating user.
+    *
+    * @param recipient
+    *                Required. The screen name of the recipient user.
+    * @param text
+    *                Required. The text of your direct message. Keep it under 140 characters! This should *not* include the "d
+    *                username" portion
+    * @return the sent message
+    * @throws TwitterException.E403
+    *                 if the recipient is not following you. (you can \@mention anyone but you can only dm people who follow you).
+    */
+   public Message sendMessage(final String recipient,
+                              final String text) throws TwitterException {
+      assert recipient != null;
+      assert !text.startsWith("d " + recipient);
+      if (text.length() > 140) {
+         throw new IllegalArgumentException("Message is too long.");
+      }
+      final Map<String, String> vars = asMap("user", recipient, "text", text);
+      final String result = post(TWITTER_URL + "/direct_messages/new.json", vars, true);
+      try {
+         return new Message(new JSONObject(result));
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * @param maxResults
+    *                if greater than zero, requests will attempt to fetch as many pages as are needed! -1 by default, in which
+    *                case most methods return the first 20 statuses/messages.
+    *                <p>
+    *                If setting a high figure, you should usually also set a sinceId or sinceDate to limit your Twitter usage.
+    *                Otherwise you can easily exceed your rate limit.
+    */
+   public void setMaxResults(final int maxResults) {
+      this.maxResults = maxResults;
+   }
+
+
+   /**
+    * @param pageNumber
+    *                null (the default) returns the first page. Pages are indexed from 1. This is used once only! Then it is reset
+    *                to null
+    */
+   public void setPageNumber(final Integer pageNumber) {
+      this.pageNumber = pageNumber;
+   }
+
+
+   /**
+    * Date based filter on statuses and messages. This is done client-side as Twitter have - for their own inscrutable reasons -
+    * pulled support for this feature.
+    * <p>
+    * If using this, you probably also want to increase {@link #setMaxResults(int)} - otherwise you get at most 20, and possibly
+    * less (since the filtering is done client side).
+    *
+    * @param sinceDate
+    */
+   public void setSinceDate(final Date sinceDate) {
+      this.sinceDate = sinceDate;
+   }
+
+
+   /**
+    * @param untilDate
+    *                the untilDate to set
+    */
+   public void setUntilDate(final Date untilDate) {
+      this.untilDate = untilDate;
+   }
+
+
+   /**
+    * TODO document this please - DBW
+    *
+    * @return the untilDate
+    */
+   public Date getUntilDate() {
+      return untilDate;
+   }
+
+
+   /**
+    * Narrows the returned results to just those statuses created after the specified status id. This will be used until it is set
+    * to null. Default is null.
+    * <p>
+    * If using this, you probably also want to increase {@link #setMaxResults(int)} (otherwise you just get the most recent 20).
+    *
+    * @param statusId
+    */
+   public void setSinceId(final Long statusId) {
+      sinceId = statusId;
+   }
+
+
+   /**
+    * Set the source application. This will be mentioned on Twitter alongside status updates (with a small label saying source:
+    * myapp).
+    *
+    * <i>In order for this to work, you must first register your app with Twitter and get a source name from them! You must also
+    * use OAuth to connect.</i>
+    *
+    * @param sourceApp
+    *                jtwitterlib by default. Set to null for no source.
+    */
+   public void setSource(final String sourceApp) {
+      this.sourceApp = sourceApp;
+   }
+
+
+   /**
+    * Sets the authenticating user's status.
+    * <p>
+    * Identical to {@link #updateStatus(String)}, but with a Java-style name (updateStatus is the Twitter API name for this
+    * method).
+    *
+    * @param statusText
+    *                The text of your status update. Must not be more than 160 characters and should not be more than 140
+    *                characters to ensure optimal display.
+    * @return The posted status when successful.
+    */
+   public Status setStatus(final String statusText) throws TwitterException {
+      return updateStatus(statusText);
+   }
+
+
+   /**
+    * Returns information of a given user, specified by screen name.
+    *
+    * @param screenName
+    *                The screen name of a user.
+    * @throws exception
+    *                 if the user does not exist - or has been terminated (as happens to spam bots).
+    * @see #show(long)
+    */
+   public User show(final String screenName) throws TwitterException {
+      final Map vars = newMap("screen_name", screenName);
+      final String json = http.getPage(TWITTER_URL + "/users/show.json", vars, http.canAuthenticate());
+      User user;
+      try {
+         user = new User(new JSONObject(json), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+      return user;
+   }
+
+
+   /**
+    * Returns information of a given user, specified by user-id.
+    *
+    * @param userId
+    *                The user-id of a user.
+    * @throws exception
+    *                 if the user does not exist - or has been terminated (as happens to spam bots).
+    */
+   public User show(final long userId) {
+      final Map<String, String> vars = asMap("user_id", "" + userId);
+      final String json = http.getPage(TWITTER_URL + "/users/show.json", vars, http.canAuthenticate());
+      User user;
+      try {
+         user = new User(new JSONObject(json), null);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+      return user;
+   }
+
+
+   /**
+    * Lookup user info. This is done in batches of 20. Users can look up at most 1000 users in an hour.
+    *
+    * @param screenNames
+    * @return user objects for screenNames. Warning 1: This may be less than the full set if Twitter returns an error part-way
+    *         through (e.g. you hit your rate limit). Warning 2: the ordering may be different from the screenNames parameter
+    */
+   public List<User> bulkShow(final List<String> screenNames) {
+      final int batchSize = 20;
+      final ArrayList<User> users = new ArrayList<Twitter.User>(screenNames.size());
+      for (int i = 0; i < screenNames.size(); i += batchSize) {
+         final StringBuilder names = new StringBuilder();
+         for (int si = i, n = Math.min(i + batchSize, screenNames.size()); si < n; si++) {
+            names.append(screenNames.get(si));
+            names.append(",");
+         }
+         // pop final ,
+         names.delete(names.length() - 1, names.length());
+         final Map<String, String> vars = asMap("screen_name", names);
+         try {
+            final String json = http.getPage(TWITTER_URL + "/users/lookup.json", vars, http.canAuthenticate());
+            final List<User> usersi = User.getUsers(json);
+            users.addAll(usersi);
+         }
+         catch (final TwitterException e) {
+            // stop here
+            break;
+         }
+      }
+      return users;
+   }
+
+
+   /**
+    * Synonym for {@link #show(String)}. show is the Twitter API name, getUser feels more Java-like.
+    *
+    * @param screenName
+    *                The screen name of a user.
+    * @return the user info
+    */
+   public User getUser(final String screenName) {
+      return show(screenName);
+   }
+
+
+   /**
+    * Synonym for {@link #show(long)}. show is the Twitter API name, getUser feels more Java-like.
+    *
+    * @param userId
+    *                The user-id of a user.
+    * @return the user info
+    * @see #getUser(String)
+    */
+   public User getUser(final long userId) {
+      return show(userId);
+   }
+
+
+   /**
+    * Split a long message up into shorter chunks suitable for use with {@link #setStatus(String)} or
+    * {@link #sendMessage(String, String)}.
+    *
+    * @param longStatus
+    * @return longStatus broken into a list of max 140 char strings
+    */
+   public List<String> splitMessage(final String longStatus) {
+      // Is it really long?
+      if (longStatus.length() <= 140) {
+         return Collections.singletonList(longStatus);
+      }
+      // Multiple tweets for a longer post
+      final List<String> sections = new ArrayList<String>(4);
+      StringBuilder tweet = new StringBuilder(140);
+      final String[] words = longStatus.split("\\s+");
+      for (final String w : words) {
+         // messages have a max length of 140
+         // plus the last bit of a long tweet tends to be hidden on
+         // twitter.com, so best to chop 'em short too
+         if (tweet.length() + w.length() + 1 > 140) {
+            // Emit
+            tweet.append("...");
+            sections.add(tweet.toString());
+            tweet = new StringBuilder(140);
+            tweet.append(w);
+         }
+         else {
+            if (tweet.length() != 0) {
+               tweet.append(" ");
+            }
+            tweet.append(w);
+         }
+      }
+      // Final bit
+      if (tweet.length() != 0) {
+         sections.add(tweet.toString());
+      }
+      return sections;
+   }
+
+
+   /**
+    * Map with since_id, page and count, if set. This is called by methods that return lists of statuses or messages.
+    */
+   private Map<String, String> standardishParameters() {
+      return addStandardishParameters(new HashMap<String, String>());
+   }
+
+
+   /**
+    * Destroy: Discontinues friendship with the user specified in the ID parameter as the authenticating user.
+    *
+    * @param username
+    *                The screen name of the user with whom to discontinue friendship.
+    * @return the un-friended user (if they were a friend), or null if the method fails because the specified user was not a
+    *         friend.
+    */
+   public User stopFollowing(final String username) {
+      assert getScreenName() != null;
+      try {
+         final Map<String, String> vars = newMap("screen_name", username);
+         final String page = post(TWITTER_URL + "/friendships/destroy.json", vars, true);
+         // ?? is this needed to make Twitter update its cache? doesn't seem to fix things
+         //			http.getPage(TWITTER_URL+"/friends", null, true);
+         User user;
+         try {
+            user = new User(new JSONObject(page), null);
+         }
+         catch (final JSONException e) {
+            throw new TwitterException(e);
+         }
+         return user;
+      }
+      catch (final TwitterException e) {
+         // were they a friend anyway?
+         if (!isFollower(getScreenName(), username)) {
+            return null;
+         }
+         // Something else went wrong
+         throw e;
+      }
+   }
+
+
+   /**
+    * Convenience for {@link #stopFollowing(String)}
+    *
+    * @param user
+    */
+   public void stopFollowing(final User user) {
+      stopFollowing(user.screenName);
+   }
+
+
+   /**
+    * Updates the authenticating user's status.
+    *
+    * @param statusText
+    *                The text of your status update. Must not be more than 160 characters and should not be more than 140
+    *                characters to ensure optimal display.
+    * @return The posted status when successful.
+    */
+   public Status updateStatus(final String statusText) {
+      return updateStatus(statusText, -1);
+   }
+
+
+   /**
+    * Updates the authenticating user's status and marks it as a reply to the tweet with the given ID.
+    *
+    * @param statusText
+    *                The text of your status update. Must not be more than 160 characters and should not be more than 140
+    *                characters to ensure optimal display.
+    *
+    *
+    * @param inReplyToStatusId
+    *                The ID of the tweet that this tweet is in response to. The statusText must contain the username (with an "@"
+    *                prefix) of the owner of the tweet being replied to for for Twitter to agree to mark the tweet as a reply. 0
+    *                or less to leave this unset.
+    *
+    * @return The posted status when successful.
+    *         <p>
+    *         Warning: the microformat for direct messages is supported. BUT: the return value from this method will be null, and
+    *         not the direct message. Other microformats (such as follow) may result in an exception being thrown.
+    *
+    * @throws TwitterException
+    *                 if something goes wrong. There is a rare (but not rare enough) bug whereby Twitter occasionally returns a
+    *                 success code but the wrong tweet. If this happens, the update may or may not have worked - wait a bit &
+    *                 check.
+    */
+   public Status updateStatus(final String statusText,
+                              final long inReplyToStatusId) throws TwitterException {
+      // should we trim statusText??
+      if (statusText.length() > 160) {
+         throw new IllegalArgumentException("Status text must be 160 characters or less: " + statusText.length());
+      }
+      final Map<String, String> vars = asMap("status", statusText);
+      if (sourceApp != null) {
+         vars.put("source", sourceApp);
+      }
+      if (inReplyToStatusId > 0) {
+         vars.put("in_reply_to_status_id", inReplyToStatusId + "");
+      }
+      final String result = post(TWITTER_URL + "/statuses/update.json", vars, true);
+      try {
+         final Status s = new Status(new JSONObject(result), null);
+         // sanity check
+         final String targetText = statusText.trim();
+         final String returnedStatusText = s.text.trim();
+         if (returnedStatusText.equals(targetText)) {
+            return s;
+         }
+         // weird bug: Twitter occasionally rejects tweets?
+         final String st = statusText.toLowerCase();
+         // is it a direct message? - which doesn't return the true status
+         if (st.startsWith("dm") || st.startsWith("d")) {
+            return null;
+         }
+         // try waiting and rechecking - maybe it did work after all
+         try {
+            Thread.sleep(500);
+         }
+         catch (final InterruptedException e) {
+            throw new RuntimeException(e);
+         }
+         final Status s2 = getStatus();
+         if ((s2 != null) && targetText.equals(s2.text)) {
+            //				Log.report("Weird transitory bug in Twitter update status with "+targetText);
+            return s2;
+         }
+         throw new TwitterException.Unexplained("Unexplained failure for tweet: expected \"" + statusText + "\" but got " + s2);
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Does a user with the specified name or id exist?
+    *
+    * @param screenName
+    *                The screen name or user id of the suspected user.
+    * @return False if the user doesn't exist or has been suspended, true otherwise.
+    */
+   public boolean userExists(final String screenName) {
+      try {
+         show(screenName);
+      }
+      catch (final TwitterException.E404 e) {
+         return false;
+      }
+      return true;
+   }
+
+
+   /**
+    * Set a language filter for search results. Note: This only applies to search results.
+    *
+    * @param language
+    *                ISO code for language. Can be null for all languages.
+    */
+   public void setLanguage(final String language) {
+      lang = language;
+   }
+
+
+   /**
+    * @return the latest trending topics on Twitter
+    */
+   public List<String> getTrends() {
+      final String jsonTrends = http.getPage("http://search.twitter.com/trends.json", null, false);
+      try {
+         final JSONObject json1 = new JSONObject(jsonTrends);
+         final JSONArray json2 = json1.getJSONArray("trends");
+         final List<String> trends = new ArrayList<String>();
+         for (int i = 0; i < json2.length(); i++) {
+            final JSONObject ti = json2.getJSONObject(i);
+            final String t = ti.getString("name");
+            trends.add(t);
+         }
+         return trends;
+      }
+      catch (final JSONException e) {
+         throw new TwitterException(e);
+      }
+   }
+
+
+   /**
+    * Provides access to the {@link IHttpClient} which manages the low-level authentication, posts and gets.
+    */
+   public IHttpClient getHttpClient() {
+      return http;
+   }
+
+
+   /**
+    * Provides support for fetching many pages. -1 indicates "give me as much as Twitter will let me have."
+    */
+   public int getMaxResults() {
+      return maxResults;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/src/main/java/winterwell/jtwitter/Twitter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/pom.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/pom.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/pom.xml	(revision 369)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<groupId>org.gvsig</groupId>
+	<artifactId>org.gvsig.toolbox.algorithm</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.toolbox</artifactId>
+		<version>1.0.65</version>
+	</parent>
+	
+	<!-- <build>
+	    <sourceDirectory>src</sourceDirectory>
+	    
+	    <pluginManagement>
+	       <plugins>
+	          <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <version>1.7</version>
+              </plugin>
+	       </plugins>
+	    </pluginManagement>
+	    
+	    <resources>
+			<resource>
+				<directory>resources</directory>
+				<includes>
+					<include>**/*</include>
+				</includes>
+			</resource>
+		</resources>
+		
+	    <plugins>
+        	<plugin>
+            	<groupId>org.apache.maven.plugins</groupId>
+            	<artifactId>maven-compiler-plugin</artifactId>
+            	<version>2.0.2</version>
+            	<configuration>
+                	<source>1.5</source>
+                	<target>1.5</target>
+                	<encoding>ISO-8859-1</encoding>
+            	</configuration>
+        	</plugin>
+        	
+        	<plugin>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>animal-sniffer-maven-plugin</artifactId>
+              <executions>
+                <execution>
+                    <id>check-java-api</id>
+                    <phase>test</phase>
+                    <goals>
+                        <goal>check</goal>
+                    </goals>
+                    <configuration>
+                        <signature>
+                            <groupId>org.codehaus.mojo.signature
+                            </groupId>
+                            <artifactId>java16</artifactId>
+                            <version>1.0</version>
+                        </signature>
+                    </configuration>
+                </execution>
+              </executions>
+             </plugin>
+    	  </plugins>
+    </build>-->
+	
+	<dependencies>
+		<dependency>
+			<groupId>gishur</groupId>
+			<artifactId>gishur_x</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>gishur</groupId>
+			<artifactId>gishur_core</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.vividsolutions</groupId>
+			<artifactId>jts</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.toolbox.gui</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>gnu.trove</groupId>
+			<artifactId>trove</artifactId>
+		</dependency>
+		<dependency>
+			  <groupId>org.gvsig.legacy</groupId>
+			  <artifactId>jama</artifactId>
+			  <scope>compile</scope>
+		</dependency>
+        <dependency>
+			<groupId>org.nfunk</groupId>
+			<artifactId>jep</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/build.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/build.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/build.xml	(revision 369)
@@ -0,0 +1,36 @@
+<project name="SEXTANTE_LIB" default="create-jar" basedir=".">
+    <description>
+        SEXTANTE_LIB
+    </description>
+	<property name="version.number" value="0.7"/>
+
+  <target name="create-jar">
+	   <tstamp>
+	     <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
+	   </tstamp>
+
+    <manifest file="MANIFEST.MF">
+        <attribute name="Implementation-Version"
+            value="${version.number}"/>
+        <attribute name="Built-Date" value="${TODAY}"/>
+   </manifest>
+
+  	<mkdir dir="../dist"/>
+    <jar jarfile="../dist/sextante_algorithms.jar" manifest="MANIFEST.MF">
+  		<fileset dir="bin">
+            <include name="**"/>
+ 		</fileset>
+ 	</jar>
+
+    <jar jarfile="../dist/sextante_algorithms.jar" update ="true">
+        <fileset dir=".">
+            <include name="i18n/**"/>
+        </fileset>
+    </jar>
+        <copy todir="../dist">
+            <fileset dir="lib" includes="**"/>
+        </copy>
+  </target>
+
+
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm/build.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.algorithm
___________________________________________________________________
Added: svn:ignore
   + .settings

target

.project

.classpath


Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/pom.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/pom.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/pom.xml	(revision 369)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.gvsig</groupId>
+    <artifactId>org.gvsig.toolbox.core</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+	
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.toolbox</artifactId>
+        <version>1.0.65</version>
+    </parent>
+	
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.toolbox.math</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jfree</groupId>
+            <artifactId>jfreechart</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.vividsolutions</groupId>
+            <artifactId>jts</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.kxml</groupId>
+            <artifactId>kxml2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.expressionevaluator.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/build.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/build.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/build.xml	(revision 369)
@@ -0,0 +1,43 @@
+<project name="SEXTANTE_LIB" default="create-jar" basedir=".">
+    <description>
+        SEXTANTE_LIB
+    </description>
+	<property name="version.number" value="0.7"/>
+
+  <target name="create-jar">
+
+	   <tstamp>
+	     <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
+	   </tstamp>
+
+    <manifest file="MANIFEST.MF">
+        <attribute name="Implementation-Version"
+            value="${version.number}"/>
+        <attribute name="Built-Date" value="${TODAY}"/>
+   </manifest>
+
+  	<delete dir="../dist"/>
+  	<mkdir dir="../dist/"/>
+    <jar jarfile="../dist/sextante.jar" manifest="MANIFEST.MF">
+  		<fileset dir="bin">
+            <include name="**"/>
+ 		</fileset>
+ 	</jar>
+
+    <jar jarfile="../dist/sextante.jar" update ="true">
+        <fileset dir=".">
+            <include name="i18n/**"/>
+        </fileset>
+    </jar>
+
+    <copy todir="../dist">
+    	<fileset dir="lib" includes="**"/>
+    </copy>
+
+  	<ant antfile="../libMath/build.xml" inheritall="no" />
+  	<ant antfile="../sextante_gui/build.xml" inheritall="no" />
+        <ant antfile="../algorithms/build.xml" inheritall="no" />
+
+  </target>
+
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/build.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jfreechart-1.0.11.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jfreechart-1.0.11.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/kxml2.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/kxml2.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jts-1.12.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jts-1.12.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jcommon-1.0.14.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/lib/jcommon-1.0.14.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/MANIFEST.MF
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/MANIFEST.MF	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/MANIFEST.MF	(revision 369)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.7.1
+Created-By: 16.0-b13 (Sun Microsystems Inc.)
+Implementation-Version: 0.7
+Built-Date: 2012-10-04 11:28:17
+

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tilecache/package.html
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tilecache/package.html	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tilecache/package.html	(revision 369)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>jaitools.tilecache</title>
+  </head>
+  <body>
+  An implementation of TileCache which can use disk caching to supplement
+  memory, allowing large volumes of image data to be handled
+  </body>
+</html>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tilecache/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tiledimage/package.html
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tiledimage/package.html	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tiledimage/package.html	(revision 369)
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>jaitools.tiledimage</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=MacRoman">
+  </head>
+  <body>
+  A writable tiled image class similar to JAI's TiledImage but backed
+  by disk as well as memory storage to handle very large images within
+  limited memory.
+  </body>
+</html>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/tiledimage/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/package.html
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/package.html	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/package.html	(revision 369)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>jaitools</title>
+  </head>
+  <body>
+    The JAITools and CollectionFactory helper classes
+  </body>
+</html>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/jaitools/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBand.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBand.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBand.java	(revision 369)
@@ -0,0 +1,61 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a parameter representing a band
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public class AdditionalInfoBand
+         implements
+            AdditionalInfo {
+
+   private String m_sParentParameterName;
+
+
+   /**
+    * Creates a new instance
+    * 
+    * @param sParentParameterName
+    *                the name of the parent parameter. This should be the name of a parameter representing a layer from which the
+    *                band should be taken
+    */
+   public AdditionalInfoBand(final String sParentParameterName) {
+
+      m_sParentParameterName = sParentParameterName;
+
+   }
+
+
+   /**
+    * Returns the name of the parent parameter
+    * 
+    * @return the name of the parent parameter
+    */
+   public String getParentParameterName() {
+
+      return m_sParentParameterName;
+
+   }
+
+
+   /**
+    * Sets the name of the parent parameter
+    * 
+    * @param sParentParameterName
+    *                the name of the parent parameter
+    */
+   public void setParentParameterName(final String sParentParameterName) {
+
+      m_sParentParameterName = sParentParameterName;
+
+   }
+
+
+   public String getTextDescription() {
+
+      return "Parent parameter:" + m_sParentParameterName;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoString.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoString.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoString.java	(revision 369)
@@ -0,0 +1,50 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoString
+         implements
+            AdditionalInfo {
+
+   private String  m_sDefaultString = "";
+
+
+   //set to true if it's an attribute table field name (GRASS)
+   private boolean m_bIsField       = false;
+
+
+   public AdditionalInfoString() {}
+
+
+   public String getDefaultString() {
+
+      return m_sDefaultString;
+
+   }
+
+
+   public void setDefaultString(final String sDefaultString) {
+
+      m_sDefaultString = sDefaultString;
+
+   }
+
+
+   public void setIsField(final boolean bIsField) {
+
+      m_bIsField = bIsField;
+
+   }
+
+
+   public boolean getIsField() {
+
+      return (m_bIsField);
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoString.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFixedTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFixedTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFixedTable.java	(revision 369)
@@ -0,0 +1,142 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional info for a parameter representing a fixed table
+ * 
+ * @author Victor Olaya volaya@unex.es
+ */
+public class AdditionalInfoFixedTable
+         implements
+            AdditionalInfo {
+
+   private boolean  m_bIsNumberOfRowsFixed = true;
+   private int      m_iRows                = 3;
+   private String[] m_sCols                = { "", "", "" };
+
+
+   /**
+    * Constructor
+    * 
+    * @param sCols
+    *                the number of columns
+    * @param iRows
+    *                the number of rows
+    * @param bIsNumberOfRowsFixed
+    *                true if the number of rows cannot be modified
+    */
+   public AdditionalInfoFixedTable(final String[] sCols,
+                                   final int iRows,
+                                   final boolean bIsNumberOfRowsFixed) {
+
+      m_iRows = iRows;
+      m_sCols = sCols;
+      m_bIsNumberOfRowsFixed = bIsNumberOfRowsFixed;
+   }
+
+
+   /**
+    * Returns the number of columns
+    * 
+    * @return the number of columns
+    */
+   public int getColsCount() {
+
+      return m_sCols.length;
+
+   }
+
+
+   /**
+    * Returns an array with column names
+    * 
+    * @return the names of the columns
+    */
+   public String[] getCols() {
+
+      return m_sCols;
+
+   }
+
+
+   /**
+    * Sets the name of the columns
+    * 
+    * @param sCols
+    *                an array with column names
+    */
+   public void setCols(final String[] sCols) {
+
+      m_sCols = sCols;
+
+   }
+
+
+   /**
+    * Returns the number of rows
+    * 
+    * @return the number of rows
+    */
+   public int getRowsCount() {
+
+      return m_iRows;
+
+   }
+
+
+   /**
+    * Sets the number of rows
+    * 
+    * @param iRows
+    *                the newn umber of rows
+    */
+   public void setRows(final int iRows) {
+
+      m_iRows = iRows;
+
+   }
+
+
+   /**
+    * Returns whether the number of rows is fixed or not
+    * 
+    * @return True if the number of rows cannot be modified
+    */
+   public boolean isNumberOfRowsFixed() {
+
+      return m_bIsNumberOfRowsFixed;
+
+   }
+
+
+   /**
+    * Sets whether the number of rows is fixed or not
+    * 
+    * @param bIsNumberOfRowsFixed
+    *                True if the number of rows cannot be modified
+    */
+   public void setIsNumberOfRowsFixed(final boolean bIsNumberOfRowsFixed) {
+
+      m_bIsNumberOfRowsFixed = bIsNumberOfRowsFixed;
+
+   }
+
+
+   public String getTextDescription() {
+
+      final StringBuffer sb = new StringBuffer();
+      if (m_bIsNumberOfRowsFixed) {
+         sb.append("Number of rows: fixed(" + Integer.toString(m_iRows) + ")\n");
+      }
+      else {
+         sb.append("Number of rows: variable\n");
+      }
+
+      sb.append("Cols: |");
+      for (final String element : m_sCols) {
+         sb.append(element + "|");
+      }
+      return sb.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFixedTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleTableField.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleTableField.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleTableField.java	(revision 369)
@@ -0,0 +1,84 @@
+
+
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoMultipleTableField
+         implements
+            AdditionalInfo {
+
+   private String  m_sParentParameterName;
+   private boolean m_bIsMandatory;
+
+
+   /**
+    * 
+    * @param sParentParameterName
+    *                The name of the parent parameter
+    * @param bIsMandatory
+    *                specifies whether the field is mandatory or not
+    */
+   public AdditionalInfoMultipleTableField(final String sParentParameterName,
+                                           final boolean bIsMandatory) {
+
+      m_sParentParameterName = sParentParameterName;
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns the name of the parent parameter
+    * 
+    * @return the name of the parent parameter
+    */
+   public String getParentParameterName() {
+
+      return m_sParentParameterName;
+
+   }
+
+
+   /**
+    * Sets the name of the parent parameter
+    * 
+    * @param sParentParameterName
+    *                The name of the parent parameter
+    */
+   public void setParentParameterName(final String sParentParameterName) {
+
+      m_sParentParameterName = sParentParameterName;
+
+   }
+
+
+   /**
+    * Sets whether the field is mandatory or not
+    * 
+    * @param bIsMandatory
+    *                indicates whether the field is mandatory or not
+    */
+   public void setIsMandatory(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns true if the field is mandatory
+    * 
+    * @return true if the field is mandatory
+    */
+   public boolean getIsMandatory() {
+
+      return m_bIsMandatory;
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleTableField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleInput.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleInput.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleInput.java	(revision 369)
@@ -0,0 +1,71 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a parameter representing a multiple input
+ * 
+ * @author user
+ * 
+ */
+public class AdditionalInfoMultipleInput
+         implements
+            AdditionalInfo {
+
+   //public static final int DATA_TYPE_UNDEFINED = 0;
+   public static final int DATA_TYPE_RASTER         = 1;
+   public static final int DATA_TYPE_VECTOR_POINT   = 2;
+   public static final int DATA_TYPE_VECTOR_LINE    = 3;
+   public static final int DATA_TYPE_VECTOR_POLYGON = 4;
+   public static final int DATA_TYPE_VECTOR_ANY     = 5;
+   public static final int DATA_TYPE_TABLE          = 6;
+   public static final int DATA_TYPE_BAND           = 7;
+   public static final int DATA_TYPE_RASTER_3D      = 8;
+   //public static final int DATA_TYPE_FIELD        = 9;
+
+   private int             m_iDataType              = 0;
+   private boolean         m_bIsMandatory           = false;
+
+
+   public AdditionalInfoMultipleInput(final int iDataType,
+                                      final boolean bIsMandatory) {
+
+      m_iDataType = iDataType;
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   public int getDataType() {
+
+      return m_iDataType;
+
+   }
+
+
+   public void setDataType(final int dataType) {
+
+      m_iDataType = dataType;
+
+   }
+
+
+   public void setIsMandatory(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   public boolean getIsMandatory() {
+
+      return m_bIsMandatory;
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoMultipleInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoNumericalValue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoNumericalValue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoNumericalValue.java	(revision 369)
@@ -0,0 +1,165 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a parameter representing a numerical value
+ * 
+ * @author volaya
+ * 
+ */
+public class AdditionalInfoNumericalValue
+         implements
+            AdditionalInfo {
+
+   public static final int NUMERICAL_VALUE_INTEGER = 1;
+   public static final int NUMERICAL_VALUE_DOUBLE  = 2;
+
+   private int             m_iType;
+   private double          m_dMinValue             = Double.NEGATIVE_INFINITY;
+   private double          m_dMaxValue             = Double.MAX_VALUE;
+   private double          m_dDefaultValue         = Double.MAX_VALUE;
+
+
+   /**
+    * Constructor
+    * 
+    * @param iType
+    *                the type of numerical value(integer or double)
+    * @param dDefaultValue
+    *                the default value
+    * @param dMinValue
+    *                the minimum value allowed for this parameter
+    * @param dMaxValue
+    *                the maximum value allowed for this parameter
+    */
+   public AdditionalInfoNumericalValue(final int iType,
+                                       final double dDefaultValue,
+                                       final double dMinValue,
+                                       final double dMaxValue) {
+
+      m_iType = iType;
+      m_dDefaultValue = dDefaultValue;
+      m_dMaxValue = dMaxValue;
+      m_dMinValue = dMinValue;
+
+   }
+
+
+   /**
+    * Returns the maximum value allowed for this parameter
+    * 
+    * @return the maximum value allowed for this parameter
+    */
+   public double getMaxValue() {
+
+      return m_dMaxValue;
+
+   }
+
+
+   /**
+    * Sets the maximum value allowed for this parameter
+    * 
+    * @param dMaxValue
+    *                the maximum value allowed for this parameter
+    */
+   public void setMaxValue(final double dMaxValue) {
+
+      m_dMaxValue = dMaxValue;
+
+   }
+
+
+   /**
+    * Returns the maximum value allowed for this parameter
+    * 
+    * @return the maximum value allowed for this parameter
+    */
+   public double getMinValue() {
+
+      return m_dMinValue;
+
+   }
+
+
+   /**
+    * Sets the minimum value allowed for this parameter
+    * 
+    * @param dMinValue
+    *                the minimum value allowed for this parameter
+    */
+   public void setMinValue(final double dMinValue) {
+
+      m_dMinValue = dMinValue;
+
+   }
+
+
+   /**
+    * Returns the type of numerical value (integer or double)
+    * 
+    * @return the type of numerical value (integer or double)
+    */
+   public int getType() {
+
+      return m_iType;
+
+   }
+
+
+   /**
+    * Sets the type of numerical value (integer or double)
+    * 
+    * @param iType
+    *                the type of numerical value (integer or double)
+    */
+   public void setType(final int iType) {
+
+      m_iType = iType;
+
+   }
+
+
+   /**
+    * Returns the default value
+    * 
+    * @return the default value
+    */
+   public double getDefaultValue() {
+
+      return m_dDefaultValue;
+
+   }
+
+
+   /**
+    * Sets the default value
+    * 
+    * @param defaultValue
+    *                the default value
+    */
+   public void setDefaultValue(final double defaultValue) {
+
+      m_dDefaultValue = defaultValue;
+
+   }
+
+
+   public String getTextDescription() {
+
+      final StringBuffer sb = new StringBuffer();
+      if (m_iType == NUMERICAL_VALUE_DOUBLE) {
+         sb.append("Value type: double\n");
+
+      }
+      else {
+         sb.append("Value type: integer\n");
+      }
+      sb.append("Max value: " + Double.toString(m_dMaxValue) + "\n");
+      sb.append("Min value: " + Double.toString(m_dMinValue) + "\n");
+      sb.append("Default value: " + Double.toString(m_dDefaultValue) + "\n");
+
+      return sb.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoNumericalValue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBoolean.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBoolean.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBoolean.java	(revision 369)
@@ -0,0 +1,60 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a parameter representing a boolean value
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public class AdditionalInfoBoolean
+         implements
+            AdditionalInfo {
+
+   private boolean m_bDefaultValue = false;
+
+
+   /**
+    * Creates a new instance
+    * 
+    * @param bDefault
+    *                the default value of the boolean parameter
+    */
+   public AdditionalInfoBoolean(final boolean bDefault) {
+
+      m_bDefaultValue = bDefault;
+
+   }
+
+
+   /**
+    * Sets a new default value for the associated boolean parameter
+    * 
+    * @param bDefault
+    *                the new default value
+    */
+   public void setDefaultValue(final boolean bDefault) {
+
+      m_bDefaultValue = bDefault;
+
+   }
+
+
+   /**
+    * Returns the current default value
+    * 
+    * @return the default value
+    */
+   public boolean getDefaultValue() {
+
+      return m_bDefaultValue;
+
+   }
+
+
+   public String getTextDescription() {
+
+      return "";
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoBoolean.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a {@link es.unex.sextante.parameters.Parameter} in a {@link es.unex.sextante.core.OutputObjectsSet}
+ * 
+ * This information includes all the necessary elements to fully define the parameter, like a default value, a range of possible
+ * values, or any other thing needed.
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public interface AdditionalInfo {
+
+   public String getTextDescription();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo3DRasterLayer.java	(revision 369)
@@ -0,0 +1,20 @@
+package es.unex.sextante.additionalInfo;
+
+
+public class AdditionalInfo3DRasterLayer
+         extends
+            AdditionalInfoDataObject {
+
+   public AdditionalInfo3DRasterLayer(final boolean bIsMandatory) {
+
+      super(bIsMandatory);
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfo3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoSelection.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoSelection.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoSelection.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoSelection
+implements
+AdditionalInfo {
+
+	private final String[] m_sValues;
+	private String m_sSelectionPath = "";
+
+
+	public AdditionalInfoSelection(final String[] sValues) {
+
+		m_sValues = sValues;
+	}
+
+
+	public String getSelectionPath() {
+
+		return m_sSelectionPath;
+
+	}
+
+
+	public void setSelectionPath(final String sSelectionPath) {
+
+		m_sSelectionPath = sSelectionPath;
+
+	}   
+
+	public String[] getValues() {
+
+		return m_sValues;
+
+	}
+
+
+	public String getTextDescription() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoSelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTable.java	(revision 369)
@@ -0,0 +1,19 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoTable
+         extends
+            AdditionalInfoDataObject {
+
+   public AdditionalInfoTable(final boolean bIsMandatory) {
+
+      super(bIsMandatory);
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoPoint.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoPoint.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoPoint.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoPoint
+         implements
+            AdditionalInfo {
+
+   public AdditionalInfoPoint() {}
+
+
+   public String getTextDescription() {
+
+      return "";
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoPoint.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableField.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableField.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableField.java	(revision 369)
@@ -0,0 +1,75 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoTableField
+         implements
+            AdditionalInfo {
+
+   private String m_sParentParameterName;
+   private boolean m_bIsMandatory;
+
+
+   /**
+    *
+    * @param sParentParameterName The name of the parent parameter
+    * @param bIsMandatory specifies whether the field is mandatory or not
+    */
+   public AdditionalInfoTableField(final String sParentParameterName, boolean bIsMandatory) {
+
+      m_sParentParameterName = sParentParameterName;
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns the name of the parent parameter
+    * @return the name of the parent parameter
+    */
+   public String getParentParameterName() {
+
+      return m_sParentParameterName;
+
+   }
+
+
+   /**
+    * Sets the name of the parent parameter
+    * @param sParentParameterName The name of the parent parameter
+    */
+   public void setParentParameterName(final String sParentParameterName) {
+
+      m_sParentParameterName = sParentParameterName;
+
+   }
+
+   /**
+    * Sets whether the field is mandatory or not
+    *
+    * @param bIsMandatory
+    *                indicates whether the field is mandatory or not
+    */
+   public void setIsMandatory(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns true if the field is mandatory
+    *
+    * @return true if the field is mandatory
+    */
+   public boolean getIsMandatory() {
+
+      return m_bIsMandatory;
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFilepath.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFilepath.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFilepath.java	(revision 369)
@@ -0,0 +1,171 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional info for a parameter representing a filepath
+ * 
+ * @author Victor Olaya volaya@unex.es
+ */
+public class AdditionalInfoFilepath
+         implements
+            AdditionalInfo {
+
+   private boolean  m_bFolder      = false;
+   private boolean  m_bOpenDialog  = false;
+   private boolean  m_bIsVoxelData = false; //true if the file is a voxel data file   
+   private String[] m_sExtensions  = null;
+
+
+   public AdditionalInfoFilepath() {}
+
+
+   /**
+    * 
+    * @param bFolder
+    *                true if the parameter contains a folder and not a file path
+    * @param bOpenDialog
+    *                true if it is a file to be opened. False if it is a filename to be used to save something. This will define
+    *                the type of file chooser dialog to show.
+    * @param sExtension
+    *                the allowed extensions extensions
+    */
+   public AdditionalInfoFilepath(final boolean bFolder,
+                                 final boolean bOpenDialog,
+                                 final boolean bIsVoxel,
+                                 final String[] sExtensions) {
+
+      m_bFolder = bFolder;
+      m_bOpenDialog = bOpenDialog;
+      m_bIsVoxelData = bIsVoxel;
+      m_sExtensions = sExtensions;
+
+   }
+
+
+   /**
+    * Returns the extensions that the file must have
+    * 
+    * @return the file extension
+    */
+   public String[] getExtensions() {
+
+      return m_sExtensions;
+
+   }
+
+
+   /**
+    * Sets a new mandatory extension for the filename
+    * 
+    * @param sExt
+    *                the new extension
+    */
+   public void setExtensions(final String[] sExt) {
+
+      m_sExtensions = sExt;
+
+   }
+
+
+   /**
+    * Return true if the parameter contains a folder and not a file path
+    * 
+    * @return whether the paramete contais a folder and not a file path
+    */
+   public boolean isFolder() {
+
+      return m_bFolder;
+
+   }
+
+
+   /**
+    * Sets whether the parameter contains a folder and not a file path
+    * 
+    * @param folder
+    */
+   public void setIsFolder(final boolean folder) {
+
+      m_bFolder = folder;
+
+   }
+
+
+   /**
+    * Returns whether a open file dialog or a save file dialog should be used to set the value of this parameter
+    * 
+    * @return whether a open file dialog or a save file dialog should be used to set the value of this parameter
+    */
+   public boolean isOpenDialog() {
+
+      return m_bOpenDialog;
+
+   }
+
+
+   /**
+    * Sets whether a open file dialog or a save file dialog should be used to set the value of this parameter
+    * 
+    * @param openDialog
+    *                true if a open file dialog should be used
+    */
+   public void setIsOpenDialog(final boolean openDialog) {
+
+      m_bOpenDialog = openDialog;
+
+   }
+
+
+   /**
+    * Sets whether the file is a voxel data file.
+    * 
+    * @param isVoxelData
+    *                true if it is a voxel data file.
+    */
+   public void setIsVoxelData(final boolean isVoxelData) {
+      m_bIsVoxelData = isVoxelData;
+   }
+
+
+   /**
+    * Checks whether the file is a voxel data file.
+    * 
+    * @return true if it is a voxel data file, false otherwise.
+    * 
+    */
+   public boolean getIsVoxelData() {
+      return (m_bIsVoxelData);
+   }
+
+
+   public String getTextDescription() {
+
+      final StringBuffer sb = new StringBuffer();
+      sb.append("Folder: " + new Boolean(m_bFolder).toString() + "\n");
+      String sOpen;
+      if (m_bOpenDialog) {
+         sOpen = "Open";
+      }
+      else {
+         sOpen = "Save";
+      }
+      sb.append("Open/Save: " + sOpen + "\n");
+      if (!m_bFolder) {
+         sb.append("Extensions: ");
+         for (int i = 0; i < m_sExtensions.length; i++) {
+            sb.append(m_sExtensions[i]);
+            if (i < m_sExtensions.length - 1) {
+               sb.append(",");
+            }
+         }
+         if ( m_bIsVoxelData ) {
+        	 sb.append("\n");
+        	 sb.append("(voxel data)");
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoFilepath.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableFilter.java	(revision 369)
@@ -0,0 +1,75 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoTableFilter
+         implements
+            AdditionalInfo {
+
+   private String m_sParentParameterName;
+   private boolean m_bIsMandatory;
+
+
+   /**
+    *
+    * @param sParentParameterName The name of the parent parameter
+    * @param bIsMandatory specifies whether the field is mandatory or not
+    */
+   public AdditionalInfoTableFilter(final String sParentParameterName, boolean bIsMandatory) {
+
+      m_sParentParameterName = sParentParameterName;
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns the name of the parent parameter
+    * @return the name of the parent parameter
+    */
+   public String getParentParameterName() {
+
+      return m_sParentParameterName;
+
+   }
+
+
+   /**
+    * Sets the name of the parent parameter
+    * @param sParentParameterName The name of the parent parameter
+    */
+   public void setParentParameterName(final String sParentParameterName) {
+
+      m_sParentParameterName = sParentParameterName;
+
+   }
+
+   /**
+    * Sets whether the field is mandatory or not
+    *
+    * @param bIsMandatory
+    *                indicates whether the field is mandatory or not
+    */
+   public void setIsMandatory(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns true if the field is mandatory
+    *
+    * @return true if the field is mandatory
+    */
+   public boolean getIsMandatory() {
+
+      return m_bIsMandatory;
+
+   }
+
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoTableFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoRasterLayer.java	(revision 369)
@@ -0,0 +1,44 @@
+package es.unex.sextante.additionalInfo;
+
+public class AdditionalInfoRasterLayer
+         extends
+            AdditionalInfoDataObject {
+
+
+   //true, if this is a 3D raster (=voxel data)
+   //private boolean m_bIs3d = false;
+
+
+   public AdditionalInfoRasterLayer(final boolean bIsMandatory) {
+
+      super(bIsMandatory);
+
+   }
+
+
+   /**
+    * Checks whether the raster layer is 3D.
+    * 
+    * @return true if it is a 3D layer.
+    * 
+    */
+   //   public boolean getIs3d() {
+   //     return m_bIs3d;
+   //   }
+
+   /**
+    * Sets whether the raster layer is 3D.
+    * 
+    * @param is3d
+    *                true if it is a 3D layer.
+    */
+   //   public void setIs3d(final boolean is3d) {
+   //      m_bIs3d = is3d;
+   //   }
+
+   public String getTextDescription() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoVectorLayer.java	(revision 369)
@@ -0,0 +1,145 @@
+package es.unex.sextante.additionalInfo;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class AdditionalInfoVectorLayer extends AdditionalInfoDataObject {
+
+    public static final int SHAPE_TYPE_POINT = 0;
+    public static final int SHAPE_TYPE_LINE = 1;
+    public static final int SHAPE_TYPE_POLYGON = 2;
+    public static final int SHAPE_TYPE_ANY = -1;
+
+    public static final int MASK_NOTAPPLY = 0;
+    public static final int MASK_SHAPE_TYPE_POINT = 1;
+    public static final int MASK_SHAPE_TYPE_LINE = 2;
+    public static final int MASK_SHAPE_TYPE_POLYGON = 4;
+    public static final int MASK_SHAPE_TYPE_ANY = 7;
+
+    private int m_iShapeType = SHAPE_TYPE_ANY;
+    private int m_maskShapeType = MASK_SHAPE_TYPE_ANY;
+    // true, if this is a 3D raster (=voxel data)
+    private boolean m_bIs3d = false;
+
+    public AdditionalInfoVectorLayer(final int iShapeType, final boolean bIsMandatory) {
+        this(iShapeType, bIsMandatory, MASK_NOTAPPLY);
+    }
+
+    public AdditionalInfoVectorLayer(final int iShapeType, final boolean bIsMandatory, int maskShapeType) {
+
+        super(bIsMandatory);
+
+        m_iShapeType = iShapeType;
+        m_maskShapeType = maskShapeType;
+
+    }
+
+    public AdditionalInfoVectorLayer(final boolean bIsMandatory, int maskShapeType) {
+        super(bIsMandatory);
+        m_maskShapeType = maskShapeType;
+
+        if(maskShapeType == MASK_SHAPE_TYPE_POINT){
+            m_iShapeType = SHAPE_TYPE_POINT;
+        } else if(maskShapeType == MASK_SHAPE_TYPE_LINE){
+            m_iShapeType = SHAPE_TYPE_LINE;
+        } else if(maskShapeType == MASK_SHAPE_TYPE_POLYGON){
+            m_iShapeType = SHAPE_TYPE_POLYGON;
+        } else {
+            m_iShapeType = SHAPE_TYPE_ANY;
+        }
+    }
+
+    /**
+     *
+     * @param shapeType of IVectorLayer
+     * @return
+     */
+    public boolean isAvailableForShapeType(int shapeType){
+        if(m_maskShapeType == MASK_NOTAPPLY){
+            return ((m_iShapeType == AdditionalInfoVectorLayer.SHAPE_TYPE_ANY) || (m_iShapeType == shapeType));
+        }
+
+        if((m_maskShapeType & MASK_SHAPE_TYPE_POINT) == MASK_SHAPE_TYPE_POINT && shapeType == IVectorLayer.SHAPE_TYPE_POINT){
+            return true;
+        }
+
+        if((m_maskShapeType & MASK_SHAPE_TYPE_LINE) == MASK_SHAPE_TYPE_LINE && shapeType == IVectorLayer.SHAPE_TYPE_LINE){
+            return true;
+        }
+        if((m_maskShapeType & MASK_SHAPE_TYPE_POLYGON) == MASK_SHAPE_TYPE_POLYGON && shapeType == IVectorLayer.SHAPE_TYPE_POLYGON){
+            return true;
+        }
+
+        return false;
+
+
+    }
+
+    /**
+     * Checks whether the vector layer is 3D.
+     *
+     * @return true if it is a 3D layer.
+     *
+     */
+    public boolean getIs3d() {
+        return m_bIs3d;
+    }
+
+    /**
+     * Sets whether the vector layer is 3D.
+     *
+     * @param is3d
+     *            true if it is a 3D layer.
+     */
+    public void setIs3d(final boolean is3d) {
+        m_bIs3d = is3d;
+    }
+
+    public void setShapeType(final int iShapeType) {
+
+        m_iShapeType = iShapeType;
+
+    }
+
+    public int getShapeType() {
+
+        return m_iShapeType;
+
+    }
+
+    public int[] getShapeTypes() {
+        List<Integer> types = new ArrayList();
+        if(isAvailableForShapeType(SHAPE_TYPE_ANY)){
+            types.add(SHAPE_TYPE_ANY);
+        } else {
+            if (isAvailableForShapeType(SHAPE_TYPE_POINT)) {
+                types.add(SHAPE_TYPE_POINT);
+            }
+            if (isAvailableForShapeType(SHAPE_TYPE_LINE)) {
+                types.add(SHAPE_TYPE_LINE);
+            }
+            if (isAvailableForShapeType(SHAPE_TYPE_POLYGON)) {
+                types.add(SHAPE_TYPE_POLYGON);
+            }
+        }
+        int[] shapeTypes = new int[types.size()];
+
+        int i=0;
+        for (Iterator iterator = types.iterator(); iterator.hasNext();) {
+            Integer integer = (Integer) iterator.next();
+            shapeTypes[i++]=integer.intValue();
+        }
+
+        return shapeTypes;
+    }
+
+
+    public String getTextDescription() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoDataObject.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoDataObject.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoDataObject.java	(revision 369)
@@ -0,0 +1,53 @@
+package es.unex.sextante.additionalInfo;
+
+/**
+ * Additional information for a parameter representing a data object (layer or table)
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public abstract class AdditionalInfoDataObject
+         implements
+            AdditionalInfo {
+
+   private boolean m_bIsMandatory = false;
+
+
+   /**
+    * Creates a new instance
+    * 
+    * @param bIsMandatory
+    *                indicates whether the data object is mandatory (is needed to run the algorithm) or not
+    */
+   public AdditionalInfoDataObject(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Sets whether the data object is mandatory or not
+    * 
+    * @param bIsMandatory
+    *                indicates wheteher the data object is mandatory or not
+    */
+   public void setIsMandatory(final boolean bIsMandatory) {
+
+      m_bIsMandatory = bIsMandatory;
+
+   }
+
+
+   /**
+    * Returns true if the data object is mandatory
+    * 
+    * @return true if the data object is mandatory
+    */
+   public boolean getIsMandatory() {
+
+      return m_bIsMandatory;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalInfo/AdditionalInfoDataObject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridCell.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridCell.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridCell.java	(revision 369)
@@ -0,0 +1,100 @@
+package es.unex.sextante.rasterWrappers;
+
+public class GridCell
+         implements
+            Comparable {
+
+   private int    m_iX, m_iY;
+   private double m_dValue;
+
+
+   public GridCell(final int iX,
+                   final int iY,
+                   final double dValue) {
+
+      m_iX = iX;
+      m_iY = iY;
+      m_dValue = dValue;
+
+   }
+
+
+   public double getValue() {
+
+      return m_dValue;
+
+   }
+
+
+   public void setValue(final double dValue) {
+
+      m_dValue = dValue;
+
+   }
+
+
+   public int getX() {
+
+      return m_iX;
+
+   }
+
+
+   public void setX(final int iX) {
+
+      m_iX = iX;
+
+   }
+
+
+   public int getY() {
+
+      return m_iY;
+
+   }
+
+
+   public void setY(final int iY) {
+
+      m_iY = iY;
+
+   }
+
+
+   public int compareTo(final Object cell) throws ClassCastException {
+
+      if (!(cell instanceof GridCell)) {
+         throw new ClassCastException();
+      }
+
+      final double dValue = ((GridCell) cell).getValue();
+      final double dDif = this.m_dValue - dValue;
+
+      if (dDif > 0.0) {
+         return 1;
+      }
+      else if (dDif < 0.0) {
+         return -1;
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+
+   @Override
+   public boolean equals(final Object obj) {
+
+      if (obj instanceof GridCell) {
+         final GridCell cell = (GridCell) obj;
+         return (m_iX == cell.getX() && m_iY == cell.getY() && m_dValue == cell.getValue());
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridCell.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapper.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapper.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapper.java	(revision 369)
@@ -0,0 +1,449 @@
+package es.unex.sextante.rasterWrappers;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+
+/**
+ * Abstract class for grip wrappers. Grid wrappers are used to get an easy way of accessing raster layers so different layers
+ * (i.e. with different extents and cellsizes) can be combined and analyzed together seamlessly, without having to worry about
+ * resampling or adjusting them.
+ * 
+ * @author Victor Olaya
+ * 
+ */
+
+public abstract class GridWrapper {
+
+   public static final int  INTERPOLATION_NearestNeighbour = 0;
+   public static final int  INTERPOLATION_Bilinear         = 1;
+   public static final int  INTERPOLATION_InverseDistance  = 2;
+   public static final int  INTERPOLATION_BicubicSpline    = 3;
+   public static final int  INTERPOLATION_BSpline          = 4;
+
+   protected IRasterLayer   m_Layer;
+
+   //this offsets are in cells, not in map units.
+   protected int            m_iOffsetX;
+   protected int            m_iOffsetY;
+
+   private int              m_iInterpolationMethod         = INTERPOLATION_BSpline;
+   private final double     m_dCellSize;                                           //cellsize of the layer, not the window
+
+   protected AnalysisExtent m_WindowExtent;
+
+   //rows and columns of the window
+   private final int        m_iNXLayer;
+   private final int        m_iNYLayer;
+
+
+   public GridWrapper(final IRasterLayer layer,
+                      final AnalysisExtent windowExtent) {
+
+      m_Layer = layer;
+      m_WindowExtent = windowExtent;
+      m_dCellSize = layer.getLayerCellSize();
+      final AnalysisExtent layerExtent = layer.getLayerGridExtent();
+      m_iNXLayer = layerExtent.getNX();
+      m_iNYLayer = layerExtent.getNY();
+
+   }
+
+
+   public abstract byte getCellValueAsByte(int x,
+                                           int y);
+
+
+   public abstract byte getCellValueAsByte(int x,
+                                           int y,
+                                           int band);
+
+
+   public abstract short getCellValueAsShort(int x,
+                                             int y);
+
+
+   public abstract short getCellValueAsShort(int x,
+                                             int y,
+                                             int band);
+
+
+   public abstract int getCellValueAsInt(int x,
+                                         int y);
+
+
+   public abstract int getCellValueAsInt(int x,
+                                         int y,
+                                         int band);
+
+
+   public abstract float getCellValueAsFloat(int x,
+                                             int y);
+
+
+   public abstract float getCellValueAsFloat(int x,
+                                             int y,
+                                             int band);
+
+
+   public abstract double getCellValueAsDouble(int x,
+                                               int y);
+
+
+   public abstract double getCellValueAsDouble(int x,
+                                               int y,
+                                               int band);
+
+
+   protected double getCellValueInLayerCoords(final int x,
+                                              final int y,
+                                              final int band) {
+
+      if (isInLayer(x, y, band)) {
+         return m_Layer.getCellValueInLayerCoords(x, y, band);
+      }
+      else {
+         return getNoDataValue();
+      }
+
+   }
+
+
+   public boolean isNoDataValue(final double dValue) {
+
+      return (dValue == m_Layer.getNoDataValue());
+
+   }
+
+
+   public double getNoDataValue() {
+
+      return m_Layer.getNoDataValue();
+
+   }
+
+
+   public int getNY() {
+
+      return m_WindowExtent.getNY();
+
+   }
+
+
+   public int getNX() {
+
+      return m_WindowExtent.getNX();
+
+   }
+
+
+   public double getCellSize() {
+
+      return m_WindowExtent.getCellSize();
+
+   }
+
+
+   public AnalysisExtent getGridExtent() {
+
+      return m_WindowExtent;
+
+   }
+
+
+   protected boolean isInLayer(final int x,
+                               final int y,
+                               final int iBand) {
+
+      return (x >= 0) && (x < m_iNXLayer) && (y >= 0) && (y < m_iNYLayer) && (iBand < m_Layer.getBandsCount());
+
+   }
+
+
+   public double getValueAt(double xPosition,
+                            double yPosition,
+                            final int band) {
+
+      int x, y;
+      double dx, dy;
+      double dValue;
+
+      x = (int) Math.floor(xPosition = (xPosition - m_Layer.getLayerGridExtent().getXMin()) / m_dCellSize);
+      y = (int) Math.floor(yPosition = (m_Layer.getLayerGridExtent().getYMax() - yPosition) / m_dCellSize);
+
+      dValue = getCellValueInLayerCoords(x, y, band);
+
+      if (!isNoDataValue(dValue)) {
+
+         dx = xPosition - x;
+         dy = yPosition - y;
+
+         switch (m_iInterpolationMethod) {
+            case INTERPOLATION_NearestNeighbour:
+               dValue = getValueNearestNeighbour(x, y, dx, dy, band);
+               break;
+
+            case INTERPOLATION_Bilinear:
+               dValue = getValueBiLinear(x, y, dx, dy, band);
+               break;
+
+            case INTERPOLATION_InverseDistance:
+               dValue = getValueInverseDistance(x, y, dx, dy, band);
+               break;
+
+            case INTERPOLATION_BicubicSpline:
+               dValue = getValueBiCubicSpline(x, y, dx, dy, band);
+               break;
+
+            case INTERPOLATION_BSpline:
+               dValue = getValueBSpline(x, y, dx, dy, band);
+               break;
+         }
+      }
+      else {
+         dValue = getNoDataValue();
+      }
+
+      return dValue;
+   }
+
+
+   private double getValueNearestNeighbour(final int x,
+                                           final int y,
+                                           final double dx,
+                                           final double dy,
+                                           final int band) {
+
+      return getCellValueInLayerCoords(x, y, band);
+
+   }
+
+
+   private double getValueBiLinear(final int x,
+                                   final int y,
+                                   final double dx,
+                                   final double dy,
+                                   final int band) {
+
+      double z = 0.0, n = 0.0, d;
+      double dValue;
+
+      dValue = getCellValueInLayerCoords(x, y, band);
+      if (!isNoDataValue(dValue)) {
+         d = (1.0 - dx) * (1.0 - dy);
+         z += d * dValue;
+         n += d;
+      }
+
+      dValue = getCellValueInLayerCoords(x + 1, y, band);
+      if (!isNoDataValue(dValue)) {
+         d = (dx) * (1.0 - dy);
+         z += d * dValue;
+         n += d;
+      }
+
+      dValue = getCellValueInLayerCoords(x, y + 1, band);
+      if (!isNoDataValue(dValue)) {
+         d = (1.0 - dx) * (dy);
+         z += d * dValue;
+         n += d;
+      }
+
+      dValue = getCellValueInLayerCoords(x + 1, y + 1, band);
+      if (!isNoDataValue(dValue)) {
+         d = (dx) * (dy);
+         z += d * dValue;
+         n += d;
+      }
+
+      if (n > 0.0) {
+         return (z / n);
+      }
+
+      return (getNoDataValue());
+   }
+
+
+   private double getValueInverseDistance(final int x,
+                                          final int y,
+                                          final double dx,
+                                          final double dy,
+                                          final int band) {
+
+      double z = 0.0, n = 0.0, d;
+      double dValue;
+
+      if ((dx > 0.0) || (dy > 0.0)) {
+
+         dValue = getCellValueInLayerCoords(x, y, band);
+         if (!isNoDataValue(dValue)) {
+            d = 1.0 / Math.sqrt(dx * dx + dy * dy);
+            z += d * dValue;
+            n += d;
+         }
+
+         dValue = getCellValueInLayerCoords(x + 1, y, band);
+         if (!isNoDataValue(dValue)) {
+            d = 1.0 / Math.sqrt((1.0 - dx) * (1.0 - dx) + dy * dy);
+            z += d * dValue;
+            n += d;
+         }
+
+         dValue = getCellValueInLayerCoords(x, y + 1, band);
+         if (!isNoDataValue(dValue)) {
+            d = 1.0 / Math.sqrt(dx * dx + (1.0 - dy) * (1.0 - dy));
+            z += d * dValue;
+            n += d;
+         }
+
+         dValue = getCellValueInLayerCoords(x + 1, y + 1, band);
+         if (!isNoDataValue(dValue)) {
+            d = 1.0 / Math.sqrt((1.0 - dx) * (1.0 - dx) + (1.0 - dy) * (1.0 - dy));
+            z += d * dValue;
+            n += d;
+         }
+
+         if (n > 0.0) {
+            return (z / n);
+         }
+      }
+      else {
+         return getCellValueInLayerCoords(x, y, band);
+      }
+
+      return (getNoDataValue());
+   }
+
+
+   private double getValueBiCubicSpline(final int x,
+                                        final int y,
+                                        final double dx,
+                                        final double dy,
+                                        final int band) {
+
+      int i;
+      double a0, a2, a3, b1, b2, b3, c[], z_xy[][];
+
+      c = new double[4];
+      z_xy = new double[4][4];
+
+      if (get4x4Submatrix(x, y, z_xy, band)) {
+
+         for (i = 0; i < 4; i++) {
+            a0 = z_xy[0][i] - z_xy[1][i];
+            a2 = z_xy[2][i] - z_xy[1][i];
+            a3 = z_xy[3][i] - z_xy[1][i];
+
+            b1 = -a0 / 3.0 + a2 - a3 / 6.0;
+            b2 = a0 / 2.0 + a2 / 2.0;
+            b3 = -a0 / 6.0 - a2 / 2.0 + a3 / 6.0;
+
+            c[i] = z_xy[1][i] + b1 * dx + b2 * dx * dx + b3 * dx * dx * dx;
+         }
+
+         a0 = c[0] - c[1];
+         a2 = c[2] - c[1];
+         a3 = c[3] - c[1];
+
+         b1 = -a0 / 3.0 + a2 - a3 / 6.0;
+         b2 = a0 / 2.0 + a2 / 2.0;
+         b3 = -a0 / 6.0 - a2 / 2.0 + a3 / 6.0;
+
+         return (c[1] + b1 * dy + b2 * dy * dy + b3 * dy * dy * dy);
+      }
+
+      return (getValueBiLinear(x, y, dx, dy, band));
+   }
+
+
+   private double getValueBSpline(final int x,
+                                  final int y,
+                                  final double dx,
+                                  final double dy,
+                                  final int band) {
+
+      int i, ix, iy;
+      double z, px, py, Rx[], Ry[], z_xy[][];
+
+      Rx = new double[4];
+      Ry = new double[4];
+      z_xy = new double[4][4];
+
+      if (get4x4Submatrix(x, y, z_xy, band)) {
+         for (i = 0, px = -1.0 - dx, py = -1.0 - dy; i < 4; i++, px++, py++) {
+            Rx[i] = 0.0;
+            Ry[i] = 0.0;
+
+            if ((z = px + 2.0) > 0.0) {
+               Rx[i] += z * z * z;
+            }
+            if ((z = px + 1.0) > 0.0) {
+               Rx[i] += -4.0 * z * z * z;
+            }
+            if ((z = px + 0.0) > 0.0) {
+               Rx[i] += 6.0 * z * z * z;
+            }
+            if ((z = px - 1.0) > 0.0) {
+               Rx[i] += -4.0 * z * z * z;
+            }
+            if ((z = py + 2.0) > 0.0) {
+               Ry[i] += z * z * z;
+            }
+            if ((z = py + 1.0) > 0.0) {
+               Ry[i] += -4.0 * z * z * z;
+            }
+            if ((z = py + 0.0) > 0.0) {
+               Ry[i] += 6.0 * z * z * z;
+            }
+            if ((z = py - 1.0) > 0.0) {
+               Ry[i] += -4.0 * z * z * z;
+            }
+
+            Rx[i] /= 6.0;
+            Ry[i] /= 6.0;
+         }
+
+         for (iy = 0, z = 0.0; iy < 4; iy++) {
+            for (ix = 0; ix < 4; ix++) {
+               z += z_xy[ix][iy] * Rx[ix] * Ry[iy];
+            }
+         }
+
+         return (z);
+      }
+
+      return (getValueBiLinear(x, y, dx, dy, band));
+   }
+
+
+   private boolean get4x4Submatrix(final int x,
+                                   final int y,
+                                   final double z_xy[][],
+                                   final int band) {
+
+      int ix, iy, px, py;
+      double dValue;
+
+      for (iy = 0, py = y - 1; iy < 4; iy++, py++) {
+         for (ix = 0, px = x - 1; ix < 4; ix++, px++) {
+            dValue = getCellValueInLayerCoords(px, py, band);
+            if (isNoDataValue(dValue)) {
+               return false;
+            }
+            else {
+               z_xy[ix][iy] = dValue;
+            }
+         }
+      }
+
+      return (true);
+   }
+
+
+   public void setInterpolationMethod(final int iMethod) {
+
+      m_iInterpolationMethod = iMethod;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapper.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/Grid3DCell.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/Grid3DCell.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/Grid3DCell.java	(revision 369)
@@ -0,0 +1,116 @@
+package es.unex.sextante.rasterWrappers;
+
+public class Grid3DCell
+         implements
+            Comparable {
+
+   private int    m_iX, m_iY, m_iZ;
+   private double m_dValue;
+
+
+   public Grid3DCell(final int iX,
+                     final int iY,
+                     final int iZ,
+                     final double dValue) {
+
+      m_iX = iX;
+      m_iY = iY;
+      m_iZ = iZ;
+      m_dValue = dValue;
+
+   }
+
+
+   public double getValue() {
+
+      return m_dValue;
+
+   }
+
+
+   public void setValue(final double dValue) {
+
+      m_dValue = dValue;
+
+   }
+
+
+   public int getX() {
+
+      return m_iX;
+
+   }
+
+
+   public void setX(final int iX) {
+
+      m_iX = iX;
+
+   }
+
+
+   public int getY() {
+
+      return m_iY;
+
+   }
+
+
+   public void setY(final int iY) {
+
+      m_iY = iY;
+
+   }
+
+
+   public int getZ() {
+
+      return m_iZ;
+
+   }
+
+
+   public void setZ(final int iZ) {
+
+      m_iZ = iZ;
+
+   }
+
+
+   public int compareTo(final Object cell) throws ClassCastException {
+
+      if (!(cell instanceof Grid3DCell)) {
+         throw new ClassCastException();
+      }
+
+      final double dValue = ((Grid3DCell) cell).getValue();
+      final double dDif = this.m_dValue - dValue;
+
+      if (dDif > 0.0) {
+         return 1;
+      }
+      else if (dDif < 0.0) {
+         return -1;
+      }
+      else {
+         return 0;
+      }
+
+   }
+
+
+   @Override
+   public boolean equals(final Object obj) {
+
+      if (obj instanceof Grid3DCell) {
+         final Grid3DCell cell = (Grid3DCell) obj;
+         return ((m_iX == cell.getX()) && (m_iY == cell.getY()) && (m_iZ == cell.getZ()) && (m_dValue == cell.getValue()));
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/Grid3DCell.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperInterpolated.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperInterpolated.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperInterpolated.java	(revision 369)
@@ -0,0 +1,140 @@
+package es.unex.sextante.rasterWrappers;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+/**
+ * A grid wrapper that performs interpolation to calculate cell values. This should be used when the window extent does not 'fit'
+ * into the structure (coordinates and cellsize) of the grid.
+ * 
+ * @author Victor Olaya
+ * 
+ */
+
+public class GridWrapperInterpolated
+         extends
+            GridWrapper {
+
+   public double m_dCellsize;
+
+
+   public GridWrapperInterpolated(final IRasterLayer layer,
+                                  final AnalysisExtent windowExtent) {
+
+      super(layer, windowExtent);
+
+      m_dCellsize = windowExtent.getCellSize();
+
+   }
+
+
+   @Override
+   public byte getCellValueAsByte(final int x,
+                                  final int y) {
+
+      return (byte) getCellValue(x, y, 0);
+
+   }
+
+
+   @Override
+   public byte getCellValueAsByte(final int x,
+                                  final int y,
+                                  final int band) {
+
+      return (byte) getCellValue(x, y, band);
+
+   }
+
+
+   @Override
+   public short getCellValueAsShort(final int x,
+                                    final int y) {
+
+      return (short) getCellValue(x, y, 0);
+
+   }
+
+
+   @Override
+   public short getCellValueAsShort(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return (short) getCellValue(x, y, band);
+
+   }
+
+
+   @Override
+   public int getCellValueAsInt(final int x,
+                                final int y) {
+
+      return (int) getCellValue(x, y, 0);
+
+   }
+
+
+   @Override
+   public int getCellValueAsInt(final int x,
+                                final int y,
+                                final int band) {
+
+      return (int) getCellValue(x, y, band);
+
+   }
+
+
+   @Override
+   public float getCellValueAsFloat(final int x,
+                                    final int y) {
+
+      return (float) getCellValue(x, y, 0);
+
+   }
+
+
+   @Override
+   public float getCellValueAsFloat(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return (float) getCellValue(x, y, band);
+
+   }
+
+
+   @Override
+   public double getCellValueAsDouble(final int x,
+                                      final int y) {
+
+      return getCellValue(x, y, 0);
+
+   }
+
+
+   @Override
+   public double getCellValueAsDouble(final int x,
+                                      final int y,
+                                      final int band) {
+
+      return getCellValue(x, y, band);
+
+   }
+
+
+   private double getCellValue(final int x,
+                               final int y,
+                               final int band) {
+
+      final double dX = m_WindowExtent.getXMin() + m_dCellsize * (x + 0.5);
+      final double dY = m_WindowExtent.getYMax() - m_dCellsize * (y + 0.5);
+
+      final double dValue = getValueAt(dX, dY, band);
+
+      return dValue;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperInterpolated.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperNotInterpolated.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperNotInterpolated.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperNotInterpolated.java	(revision 369)
@@ -0,0 +1,149 @@
+package es.unex.sextante.rasterWrappers;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+/**
+ * A grid wrapper that does not perform interpolation to calculate cell values. This should be used when the window extent 'fits'
+ * into the structure (coordinates and cellsize) of the grid, so it is faster than using a grid wrapper with interpolation
+ * 
+ * Upon construction, cellsizes are not checked, so they are assumed to be equal. Use a QueryableGridWindow to safely create a
+ * GridWrapper better than instantiating this class directly.
+ * 
+ * @author Victor Olaya
+ * 
+ */
+
+public class GridWrapperNotInterpolated
+         extends
+            GridWrapper {
+
+
+   public GridWrapperNotInterpolated(final IRasterLayer layer,
+                                     final AnalysisExtent windowExtent) {
+
+      super(layer, windowExtent);
+
+      calculateOffsets();
+
+   }
+
+
+   protected void calculateOffsets() {
+
+      //		double dMinX, dMaxY;
+      //		int iWindowMinX, iWindowMinY;
+
+      final AnalysisExtent layerExtent = m_Layer.getLayerGridExtent();
+
+      m_iOffsetX = (int) ((m_WindowExtent.getXMin() - layerExtent.getXMin()) / m_WindowExtent.getCellSize());
+      m_iOffsetY = (int) ((layerExtent.getYMax() - m_WindowExtent.getYMax()) / m_WindowExtent.getCellSize());
+
+      //		dMinX = Math.min(Math.max(m_WindowExtent.getXMin(), layerExtent.getXMin()), layerExtent.getXMax());
+      //		//dMinY = Math.min(Math.max(m_WindowExtent.getYMin(), layerExtent.getYMin()), layerExtent.getYMax());
+      //		dMaxY = Math.max(Math.min(m_WindowExtent.getYMax(), layerExtent.getYMax()), layerExtent.getYMin());
+      //
+      //		m_iMinX = (int) Math.floor((dMinX - layerExtent.getXMin()) / m_WindowExtent.getCellSize());
+      //		m_iMinY = (int) Math.floor((layerExtent.getYMax() - dMaxY) / m_WindowExtent.getCellSize());
+      //
+      //		m_iOffsetX = m_iMinX - iWindowMinX;
+      //		m_iOffsetY = m_iMinY - iWindowMinY;
+
+   }
+
+
+   @Override
+   public byte getCellValueAsByte(final int x,
+                                  final int y) {
+
+      return (byte) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, 0);
+
+   }
+
+
+   @Override
+   public byte getCellValueAsByte(final int x,
+                                  final int y,
+                                  final int band) {
+
+      return (byte) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, band);
+
+   }
+
+
+   @Override
+   public short getCellValueAsShort(final int x,
+                                    final int y) {
+
+      return (short) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, 0);
+
+   }
+
+
+   @Override
+   public short getCellValueAsShort(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return (short) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, band);
+
+   }
+
+
+   @Override
+   public int getCellValueAsInt(final int x,
+                                final int y) {
+
+      return (int) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, 0);
+
+   }
+
+
+   @Override
+   public int getCellValueAsInt(final int x,
+                                final int y,
+                                final int band) {
+
+      return (int) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, band);
+
+   }
+
+
+   @Override
+   public float getCellValueAsFloat(final int x,
+                                    final int y) {
+
+      return (float) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, 0);
+
+   }
+
+
+   @Override
+   public float getCellValueAsFloat(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return (float) getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, band);
+
+   }
+
+
+   @Override
+   public double getCellValueAsDouble(final int x,
+                                      final int y) {
+
+      return getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, 0);
+
+   }
+
+
+   @Override
+   public double getCellValueAsDouble(final int x,
+                                      final int y,
+                                      final int band) {
+
+      return getCellValueInLayerCoords(x + m_iOffsetX, y + m_iOffsetY, band);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/rasterWrappers/GridWrapperNotInterpolated.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/shapesTools/ShapesTools.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/shapesTools/ShapesTools.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/shapesTools/ShapesTools.java	(revision 369)
@@ -0,0 +1,196 @@
+package es.unex.sextante.shapesTools;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.LinearRing;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.core.OutputFactory;
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IFeatureIterator;
+import es.unex.sextante.dataObjects.IRecord;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.IteratorException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.outputs.IOutputChannel;
+
+/**
+ * Additional methods for working with vector layers
+ *
+ * @author Victor Olaya
+ *
+ */
+
+public class ShapesTools {
+
+   /**
+    * Returns a new vector layer identical to a given one but with additional fields in its attributes table
+    *
+    * @param outputFactory
+    *                the output factory to use to create the new layer
+    * @param layer
+    *                the base layer
+    * @param channel
+    *                the output channel for the resulting layer
+    * @param sFieldNames
+    *                an array with field names of the new fields to add
+    * @param addedValues
+    *                the values to add
+    * @param fieldTypes
+    *                an array with field types of the fields to add
+    * @return a new layer with added attributes
+    * @throws UnsupportedOutputChannelException
+    * @throws IteratorException
+    */
+   public static IVectorLayer addFields(final OutputFactory outputFactory,
+                                        final IVectorLayer layer,
+                                        final IOutputChannel channel,
+                                        final String[] sFieldNames,
+                                        final Object[][] addedValues,
+                                        final Class fieldTypes[]) throws UnsupportedOutputChannelException {
+
+      int i;
+      final String sOrgFields[] = layer.getFieldNames();
+      final String sFields[] = new String[sOrgFields.length + sFieldNames.length];
+      final Object values[] = new Object[sOrgFields.length + sFieldNames.length];
+      final Class[] orgTypes = layer.getFieldTypes();
+      final Class types[] = new Class[sOrgFields.length + sFieldNames.length];
+      for (i = 0; i < sOrgFields.length; i++) {
+         sFields[i] = sOrgFields[i];
+         types[i] = orgTypes[i];
+      }
+      for (i = 0; i < sFieldNames.length; i++) {
+         sFields[i + sOrgFields.length] = checkAttrName(sFieldNames[i], i + sOrgFields.length, sFields); // sFieldNames[i];
+         types[i + sOrgFields.length] = fieldTypes[i];
+      }
+
+      final IVectorLayer output = outputFactory.getNewVectorLayer(layer.getName(), layer.getShapeType(), types, sFields, channel,
+               layer.getCRS());
+
+        if (output != null) {
+            int j = 0;
+            final IFeatureIterator iter = layer.iterator();
+            while (iter.hasNext()) {
+                try {
+                    final IFeature feature = iter.next();
+                    final IRecord record = feature.getRecord();
+                    final Object[] orgValues = record.getValues();
+                    for (i = 0; i < orgValues.length; i++) {
+                        values[i] = orgValues[i];
+                    }
+                    for (i = 0; i < sFieldNames.length; i++) {
+                        values[i + orgValues.length] = addedValues[i][j];
+                    }
+                    output.addFeature(feature.getGeometry(), values);
+                } catch (final Exception e) {
+                    e.printStackTrace();
+                }
+                j++;
+            }
+            iter.close();
+            // layer.close();
+        }
+
+      return output;
+
+   }
+
+
+   /**
+    * Creates a circle
+    *
+    * @param x
+    *                the x coordinate of the center
+    * @param y
+    *                the y coordinate of the center
+    * @param radius
+    *                the radius of the circle
+    * @return a circle-shaped polygon
+    */
+   public static Geometry createCircle(final double x,
+                                       final double y,
+                                       final double radius) {
+
+      final int SIDES = 100;
+      final Coordinate coords[] = new Coordinate[SIDES];
+      for (int i = 0; i < SIDES; i++) {
+         final double angle = ((double) i / (double) SIDES) * 2 * Math.PI;
+         final double dx = Math.cos(angle) * radius;
+         final double dy = Math.sin(angle) * radius;
+         coords[i] = new Coordinate(x + dx, y + dy);
+      }
+      coords[coords.length - 1] = coords[0];
+
+      final GeometryFactory factory = new GeometryFactory();
+      final LinearRing ring = factory.createLinearRing(coords);
+      final Polygon polygon = factory.createPolygon(ring, null);
+
+      return polygon;
+
+   }
+
+   /**
+    * Changes the attribute name if this name is in the array.
+    *
+    * @param name
+    * @param size
+    * @param attrNames
+    * @return
+    */
+   public static String checkAttrName(String name, int size, String[] attrNames) {
+
+	   Collection<String> values = new ArrayList<String>();
+       for (int i = 0; i < size; i++){
+    	   values.add(attrNames[i].toLowerCase());
+       }
+
+		int len = name.length();
+
+		/*
+		 * GDAL field name truncation method (extended from 100 to 255)
+		 * THISISAVERYLONGNAME => THISISAVER, THISISAV_1 ... THISISAV_9,
+		 * THISISAV10 ... THISISAV99, THISISA100 ... THISISA255
+		 * (255 = max number of fields in a SHP)
+		 */
+		String resp = null;
+		for (int i=0; i<255; i++) {
+			if (i==0) {
+		    	if(len<=10){
+		    		resp = name;
+		    	} else {
+		    		resp = name.substring(0, 10);
+		    	}
+		    } else if (i<=9) {
+		    	if(len<=8){
+		    		resp = name + "_" + i;
+		    	} else {
+		    		resp = name.substring(0, 8) + "_" + i;
+		    	}
+		    } else if (i<=99) {
+		    	if(len<=8){
+		    		resp = name + i;
+		    	} else {
+		    	resp = name.substring(0, 8) + i;
+		    	}
+		    } else {
+		    	if(len<=7){
+		    		resp = name + i;
+		    	} else {
+		    		resp = name.substring(0, 7) + i;
+		    	}
+		    }
+		    if (!values.contains(resp.toLowerCase()))
+		        return resp;
+		}
+		/*
+		 * Should not get here
+		 */
+		return name.substring(0, 4) + "_" + (System.currentTimeMillis() % 1000000);
+	}
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/shapesTools/ShapesTools.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFactory.java	(revision 369)
@@ -0,0 +1,95 @@
+
+
+package es.unex.sextante.modeler.elements;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+
+public class ModelElementFactory {
+
+   public static IModelElement getParameterAsModelElement(final Parameter param) {
+
+      IModelElement element = null;
+
+      try {
+         if (param instanceof ParameterRasterLayer) {
+            element = new ModelElementRasterLayer();
+            ((ModelElementRasterLayer) element).setNumberOfBands(ModelElementRasterLayer.NUMBER_OF_BANDS_UNDEFINED);
+         }
+         if (param instanceof Parameter3DRasterLayer) {
+             element = new ModelElement3DRasterLayer();
+         }         
+         else if (param instanceof ParameterVectorLayer) {
+            element = new ModelElementVectorLayer();
+            final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) param.getParameterAdditionalInfo();
+            ((ModelElementVectorLayer) element).setShapeType(ai.getShapeType());
+         }
+         else if (param instanceof ParameterTable) {
+            element = new ModelElementTable();
+         }
+         else if (param instanceof ParameterPoint) {
+            element = new ModelElementPoint();
+         }
+         else if (param instanceof ParameterNumericalValue) {
+            element = new ModelElementNumericalValue();
+         }
+         else if (param instanceof ParameterString) {
+            element = new ModelElementString();
+         }
+         else if (param instanceof ParameterFilepath) {
+             element = new ModelElementFilepath();
+          }         
+         else if (param instanceof ParameterFixedTable) {
+            element = new ModelElementFixedTable();
+            final AdditionalInfoFixedTable aift = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+            ((ModelElementFixedTable) element).setRowsCount(aift.getRowsCount());
+            ((ModelElementFixedTable) element).setColsCount(aift.getColsCount());
+            ((ModelElementFixedTable) element).setIsNumberOfRowsFixed(aift.isNumberOfRowsFixed());
+         }
+         else if (param instanceof ParameterSelection) {
+            element = new ModelElementSelection();
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            element = new ModelElementInputArray();
+            final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+            ((ModelElementInputArray) element).setType(ai.getDataType());
+         }
+         else if (param instanceof ParameterBoolean) {
+            element = new ModelElementBoolean();
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            element = new ModelElementInputArray();
+         }
+         else if (param instanceof ParameterTableField) {
+            element = new ModelElementTableField();
+         }
+         else if (param instanceof ParameterBand) {
+            element = new ModelElementBand();
+         }
+      }
+      catch (final NullParameterAdditionalInfoException e) {
+      }
+
+      return element;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFixedTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFixedTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFixedTable.java	(revision 369)
@@ -0,0 +1,50 @@
+
+
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementFixedTable
+         implements
+            IModelElement {
+
+   private int     m_iRowsCount;
+   private int     m_iColsCount;
+   private boolean m_bIsNumberOfRowsFixed;
+
+
+   public void setRowsCount(final int rowsCount) {
+
+      m_iRowsCount = rowsCount;
+
+   }
+
+
+   public void setColsCount(final int colsCount) {
+
+      m_iColsCount = colsCount;
+
+   }
+
+
+   public void setIsNumberOfRowsFixed(final boolean isNumberOfRowsFixed) {
+
+      m_bIsNumberOfRowsFixed = isNumberOfRowsFixed;
+
+   }
+
+
+   public int getColsCount() {
+
+      return m_iColsCount;
+
+   }
+
+
+   public int getRowsCount() {
+
+      return m_iRowsCount;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFixedTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementNumericalValue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementNumericalValue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementNumericalValue.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementNumericalValue
+         implements
+            IModelElement {
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementNumericalValue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBoolean.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBoolean.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBoolean.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementBoolean
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBoolean.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElement3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElement3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElement3DRasterLayer.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElement3DRasterLayer
+         implements
+            IModelElement {
+
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElement3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementSelection.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementSelection.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementSelection.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementSelection
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementSelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTable.java	(revision 369)
@@ -0,0 +1,15 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementTable
+         implements
+            IModelElement {
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/IModelElement.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/IModelElement.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/IModelElement.java	(revision 369)
@@ -0,0 +1,5 @@
+package es.unex.sextante.modeler.elements;
+
+public interface IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/IModelElement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementPoint.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementPoint.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementPoint.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementPoint
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementPoint.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTableField.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTableField.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTableField.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementTableField
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementTableField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFilepath.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFilepath.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFilepath.java	(revision 369)
@@ -0,0 +1,16 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementFilepath
+         implements
+            IModelElement {
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString();
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementFilepath.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementRasterLayer.java	(revision 369)
@@ -0,0 +1,36 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementRasterLayer
+         implements
+            IModelElement {
+
+   public static final int NUMBER_OF_BANDS_UNDEFINED = -1;
+   private int             m_iNumberOfBands          = NUMBER_OF_BANDS_UNDEFINED;
+
+
+   public int getNumberOfBands() {
+
+      return m_iNumberOfBands;
+
+   }
+
+
+   public void setNumberOfBands(int numberOfBands) {
+
+      if (numberOfBands < 1) {
+         numberOfBands = NUMBER_OF_BANDS_UNDEFINED;
+      }
+      m_iNumberOfBands = numberOfBands;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString() + "," + Integer.toString(m_iNumberOfBands);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementInputArray.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementInputArray.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementInputArray.java	(revision 369)
@@ -0,0 +1,32 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementInputArray
+         implements
+            IModelElement {
+
+   private int             m_iType;
+
+   public static final int DATA_TYPE_RASTER         = 1;
+   public static final int DATA_TYPE_VECTOR_POINT   = 2;
+   public static final int DATA_TYPE_VECTOR_LINE    = 3;
+   public static final int DATA_TYPE_VECTOR_POLYGON = 4;
+   public static final int DATA_TYPE_VECTOR_ANY     = 5;
+   public static final int DATA_TYPE_TABLE          = 6;
+   public static final int DATA_TYPE_BAND           = 7;
+
+
+   public int getType() {
+
+      return m_iType;
+
+   }
+
+
+   public void setType(final int type) {
+
+      m_iType = type;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementInputArray.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementVectorLayer.java	(revision 369)
@@ -0,0 +1,39 @@
+package es.unex.sextante.modeler.elements;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class ModelElementVectorLayer
+         implements
+            IModelElement {
+
+   public static final int SHAPE_TYPE_POLYGON   = IVectorLayer.SHAPE_TYPE_POLYGON;
+   public static final int SHAPE_TYPE_POINT     = IVectorLayer.SHAPE_TYPE_POINT;
+   public static final int SHAPE_TYPE_LINE      = IVectorLayer.SHAPE_TYPE_LINE;
+   public static final int SHAPE_TYPE_UNDEFINED = -1;
+
+   private int             m_iShapeType;
+
+
+   public int getShapeType() {
+
+      return m_iShapeType;
+
+   }
+
+
+   public void setShapeType(final int shapeType) {
+
+      m_iShapeType = shapeType;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return this.getClass().toString() + "," + Integer.toString(m_iShapeType);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBand.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBand.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBand.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementBand
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementBand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementString.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementString.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementString.java	(revision 369)
@@ -0,0 +1,8 @@
+package es.unex.sextante.modeler.elements;
+
+
+public class ModelElementString
+         implements
+            IModelElement {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/modeler/elements/ModelElementString.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ITaskMonitor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ITaskMonitor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ITaskMonitor.java	(revision 369)
@@ -0,0 +1,85 @@
+package es.unex.sextante.core;
+
+/**
+ * This interface must be implemented by all classes used to monitor the execution of a GeoAlgorithm or any other process within
+ * SEXTANTE
+ * 
+ * @author volaya
+ * 
+ */
+public interface ITaskMonitor {
+
+   /**
+    * Sets the current progress
+    * 
+    * @param iStep
+    *                the current progress, in percentage (0-100)
+    */
+   public void setProgress(int iStep);
+
+
+   /**
+    * Sets the current progress
+    * 
+    * @param step
+    *                the current step
+    * @param totalNumberOfSteps
+    *                the total number of steps in the task
+    */
+   public void setProgress(int step,
+                           int totalNumberOfSteps);
+
+
+   /**
+    * Sets the current text to display by this task monitor
+    * 
+    * @param sText
+    *                The text to display
+    */
+   public void setProgressText(String sText);
+
+
+   /**
+    * Returns rue is the task that is being monitored has been canceled using this monitor
+    * 
+    * @return true is the task that is being monitored has been canceled using this monitor
+    */
+   public boolean isCanceled();
+
+
+   /**
+    * Closes the monitor. This is called once the task has been finished
+    */
+   public void close();
+
+
+   /**
+    * Set whether the process is determinate or not
+    * 
+    * @param bDeterminate
+    *                whether the process to monitor is determinate (the number of total steps to complete is known)
+    */
+   public void setDeterminate(boolean bDeterminate);
+
+
+   /**
+    * Sets the description of the process being monitored
+    * 
+    * @param sDescription
+    *                the description of the process being monitored
+    */
+   public void setProcessDescription(String sDescription);
+
+
+   /**
+    * sets a prefix to be prepended to the description title. This can be used for processes that include several algorithms, so
+    * when each algorithm sets its owns description, it will also contain a string indicating the part of the global process that
+    * it represents. This method should, therefore, not be called by simple algorithms, but just from complex processes
+    * 
+    * @param sPrefix
+    *                the prefix to prepend to the description title.
+    */
+   public void setDescriptionPrefix(String sPrefix);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ITaskMonitor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputObjectsSet.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputObjectsSet.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputObjectsSet.java	(revision 369)
@@ -0,0 +1,308 @@
+package es.unex.sextante.core;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.exceptions.WrongOutputIDException;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+public class OutputObjectsSet {
+
+   private final ArrayList m_Outputs;
+
+
+   public OutputObjectsSet() {
+
+      m_Outputs = new ArrayList();
+
+   }
+
+
+   /**
+    * adds a new output to the set. If an output with the same name exists, it will change its attributes
+    * 
+    * @param output
+    *                the output object
+    */
+   public void add(final Output output) {
+
+      try {
+         final Output out = getOutput(output.getName());
+         out.setObjectData(output);
+         //m_Outputs.remove(out);
+      }
+      catch (final WrongOutputIDException e) {
+         m_Outputs.add(output);
+      }
+
+
+   }
+
+
+   /**
+    * Returns an output of the set, identified by its name
+    * 
+    * @param sName
+    *                the name of the output object
+    * @return the output object
+    * @throws WrongOutputIDException
+    *                 if no output with the specified name exists in the set
+    */
+   public Output getOutput(final String sName) throws WrongOutputIDException {
+
+      int i;
+
+      for (i = 0; i < m_Outputs.size(); i++) {
+         if (((Output) m_Outputs.get(i)).getName().equals(sName)) {
+            return ((Output) m_Outputs.get(i));
+         }
+      }
+
+      throw new WrongOutputIDException();
+
+   }
+
+
+   /**
+    * Returns an output of the set, identified by its index in it
+    * 
+    * @param iIndex
+    *                the index of the output in the set
+    * @return the output object
+    * @throws ArrayIndexOutOfBoundsException
+    *                 if iIndex is not a valid array index
+    */
+   public Output getOutput(final int iIndex) throws ArrayIndexOutOfBoundsException {
+
+      if ((iIndex >= 0) && (iIndex < m_Outputs.size())) {
+         return (Output) m_Outputs.get(iIndex);
+      }
+      else {
+         throw new ArrayIndexOutOfBoundsException();
+      }
+
+   }
+
+
+   /**
+    * Returns the number of data objects (layers and tables) in the set
+    * 
+    * @return the number of data objects in the set
+    */
+   public int getOutputDataObjectsCount() {
+
+      int iCount = 0;
+
+      for (int i = 0; i < getOutputObjectsCount(); i++) {
+         final Output out = getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)
+             || (out instanceof Output3DRasterLayer)) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+
+   }
+
+
+   /**
+    * Returns true if the set contains output layers or tables
+    * 
+    * @return true if the set contains output layers or tables
+    */
+   public boolean hasDataObjects() {
+
+      return getOutputDataObjectsCount() != 0;
+
+   }
+
+
+   /**
+    * Return true if the set contains output layers
+    * 
+    * @return true if the set contains output layers
+    */
+   public boolean hasLayers() {
+
+      return getOutputLayersCount() != 0;
+
+   }
+
+
+   /**
+    * Returns the number of output layers in the set
+    * 
+    * @return the number of output layers in the set
+    */
+   public int getOutputLayersCount() {
+
+      int iCount = 0;
+
+      for (int i = 0; i < getOutputObjectsCount(); i++) {
+         final Output out = getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof Output3DRasterLayer)) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+
+   }
+
+
+   /**
+    * Returns the number of output raster layers in the set
+    * 
+    * @return the number of output raster layers in the set
+    */
+   public int getRasterLayersCount() {
+
+      int iCount = 0;
+
+      for (int i = 0; i < getOutputObjectsCount(); i++) {
+         final Output out = getOutput(i);
+         if (out instanceof OutputRasterLayer) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+
+   }
+
+
+   /**
+    * Returns the number of output 3D raster layers in the set
+    * 
+    * @return the number of output 3D raster layers in the set
+    */
+   public int get3DRasterLayersCount() {
+
+      int iCount = 0;
+
+      for (int i = 0; i < getOutputObjectsCount(); i++) {
+         final Output out = getOutput(i);
+         if (out instanceof Output3DRasterLayer) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+
+   }
+
+
+   /**
+    * Returns the number of output vector layers in the set
+    * 
+    * @return the number of output vector layers in the set
+    */
+   public int getVectorLayersCount() {
+
+      int iCount = 0;
+
+      for (int i = 0; i < getOutputObjectsCount(); i++) {
+         final Output out = getOutput(i);
+         if (out instanceof OutputVectorLayer) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+
+   }
+
+
+   /**
+    * Removes an output object from the set
+    * 
+    * @param out
+    *                the output to remove
+    * @return true if the given output was found in the set
+    */
+   public boolean remove(final Output out) {
+
+      return m_Outputs.remove(out);
+
+   }
+
+
+   /**
+    * Removes an output object from the set
+    * 
+    * @param sName
+    *                the name of output to remove
+    * @return true if the given output was found in the set
+    */
+   public boolean remove(final String sName) {
+
+      Output out;
+      try {
+         out = this.getOutput(sName);
+         return m_Outputs.remove(out);
+      }
+      catch (final WrongOutputIDException e) {
+         return false;
+      }
+
+   }
+
+
+   /**
+    * Returns a new instance of the set and all its elements
+    * 
+    * @return a new instance of the set
+    */
+   public OutputObjectsSet getNewInstance() {
+
+      final OutputObjectsSet oos = new OutputObjectsSet();
+
+      for (int i = 0; i < m_Outputs.size(); i++) {
+         final Output out = (Output) m_Outputs.get(i);
+         oos.add(out.getNewInstance());
+      }
+
+      return oos;
+   }
+
+
+   /**
+    * Returns the total number of output objects
+    * 
+    * @return the total number of output objects
+    */
+   public int getOutputObjectsCount() {
+
+      return m_Outputs.size();
+
+   }
+
+
+   /**
+    * Return true if the set contains an object associated to the passed key
+    * 
+    * @param key
+    *                a string key
+    * @return true if the set contains the key
+    */
+   public boolean containsKey(final String key) {
+
+      int i;
+
+      for (i = 0; i < m_Outputs.size(); i++) {
+         if (((Output) m_Outputs.get(i)).getName().equals(key)) {
+            return true;
+         }
+      }
+
+      return false;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputObjectsSet.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AlgorithmsAndResources.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AlgorithmsAndResources.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AlgorithmsAndResources.java	(revision 369)
@@ -0,0 +1,167 @@
+
+
+package es.unex.sextante.core;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+
+/**
+ * 
+ * Methods in this class act as entry points for algorithms and resource files.
+ * 
+ * Algorithms are loaded when the library is initialized. Adding new algorithms after calling {@link Sextante#initialize()} will
+ * not add them to the list of currently available ones, so all additional algorithms should be added before initializing the
+ * library
+ * 
+ */
+public class AlgorithmsAndResources {
+
+   private static ArrayList<String> m_ClassNames      = new ArrayList<String>();
+   private static ArrayList<String> m_PropertiesFiles = new ArrayList<String>();
+
+
+   /**
+    * Returns an array of class names of all the algorithms currently included in the library
+    * 
+    * @return an array of algorithm class names
+    */
+   public static String[] getAlgorithmClassNames() {
+      return m_ClassNames.toArray(new String[m_ClassNames.size()]);
+   }
+
+
+   /**
+    * Returns an array of names of properties files containing resource strings for i18N
+    * 
+    * @return an array of properties filenames
+    */
+   public static String[] getPropertiesFilenames() {
+      return m_PropertiesFiles.toArray(new String[m_PropertiesFiles.size()]);
+   }
+
+
+   /**
+    * Adds a new algorithm to the list or currently available ones
+    * 
+    * @param sAlgClassName
+    *                the name of the class representing the algorithm
+    */
+   public static void addAlgorithm(final String sAlgClassName) {
+      m_ClassNames.add(sAlgClassName);
+   }
+
+
+   /**
+    * Adds a new properties file to the list
+    * 
+    * @param sName
+    *                the base name of the properties file
+    */
+   public static void addPropertiesFile(final String sName) {
+      m_PropertiesFiles.add(sName);
+   }
+
+   /**
+    * Adds all sextante algorithms and properties files located in the jar files in the classpath.
+    */
+   public static void addAlgorithmsAndPropertiesFromClasspath() {
+      final StringTokenizer localTokenizer = new StringTokenizer(System.getProperty("java.class.path"), File.pathSeparator, false);
+
+      //final Set<String> filenames = new LinkedHashSet();
+
+      while (localTokenizer.hasMoreTokens()) {
+         final String classpathElement = localTokenizer.nextToken();
+         final File classpathFile = new File(classpathElement);
+         final String sFilename = classpathFile.getName();
+         if (classpathFile.exists() && classpathFile.canRead()) {
+            if (sFilename.toLowerCase().endsWith(".jar") && sFilename.toLowerCase().startsWith("org.gvsig.toolbox")) {
+               addAlgorithmsAndResourcesFromJarFile(classpathElement);
+            }
+
+         }
+      }
+
+      final ClassLoader classloader = AlgorithmsAndResources.class.getClassLoader();
+      URL[] webappClasses = new URL[0];
+      if (classloader instanceof URLClassLoader) {
+         final URLClassLoader urlClassLoader = (URLClassLoader) classloader;
+         webappClasses = urlClassLoader.getURLs();
+      }
+
+      addAlgorithmsAndPropertiesFromURLs(webappClasses);
+   }
+
+
+   public static void addAlgorithmsAndPropertiesFromURLs(final URL[] urls) {
+      for (final URL url : urls) {
+         final File classpathFile = new File(URLDecoder.decode(url.getFile()));
+         final String sFilename = classpathFile.getName();
+         if (classpathFile.exists() && classpathFile.canRead()) {
+            if (sFilename.toLowerCase().endsWith(".jar") && sFilename.toLowerCase().startsWith("org.gvsig.toolbox")) {
+               addAlgorithmsAndResourcesFromJarFile(classpathFile.getAbsolutePath());
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Adds all sextante algorithms and properties files located in the jar files of a given folder.
+    * 
+    * <b>NOTE:</b> i18n files must be named like 'nameOfPackage.properties' (without any '_' character on the name, except that
+    * files of other languages, e.g, nameOfPackage_es.properties
+    * 
+    * @param sFolder
+    *                the folder where jar files are located
+    */
+   public static void addAlgorithmsAndPropertiesFromFolder(final String sFolder) {
+      final File folder = new File(sFolder);
+      final File[] directoryFiles = folder.listFiles();
+      for (int i = 0; i < directoryFiles.length; i++) {
+         if (!directoryFiles[i].isDirectory()) {
+            final String sFilename = directoryFiles[i].getName();
+            if (sFilename.endsWith(".jar") && sFilename.startsWith("org.gvsig.toolbox")) {
+               addAlgorithmsAndResourcesFromJarFile(directoryFiles[i].getAbsolutePath());
+            }
+         }
+      }
+   }
+
+
+   /**
+    * Adds all sextante algorithms and properties files located in a given jar file
+    * 
+    * @param sFilename
+    *                the filename of the jar file
+    */
+   private static void addAlgorithmsAndResourcesFromJarFile(final String sFilename) {
+      try {
+         final ZipFile zip = new ZipFile(sFilename);
+         final Enumeration entries = zip.entries();
+         while (entries.hasMoreElements()) {
+            final ZipEntry entry = (ZipEntry) entries.nextElement();
+            final String sName = entry.getName();
+            if (!entry.isDirectory()) {
+               if (sName.toLowerCase().endsWith("algorithm.class")) {
+                  final String sClassName = sName.substring(0, sName.lastIndexOf('.')).replace('/', '.');
+                  addAlgorithm(sClassName);
+               }
+               else if (sName.endsWith(".properties") && (sName.indexOf("_") == -1)) {
+                  addPropertiesFile(sName.substring(0, sName.lastIndexOf('.')));
+               }
+            }
+         }
+      }
+      catch (final Exception e) {/*ignore file*/
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AlgorithmsAndResources.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputFactory.java	(revision 369)
@@ -0,0 +1,431 @@
+
+
+package es.unex.sextante.core;
+
+import java.io.File;
+
+import javax.swing.JDialog;
+
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.io3d.Default3DRasterLayer;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputVectorLayer;
+
+
+/**
+ * An OutputFactory defines how new data objects (layers and tables) are created. Method in this class are called from
+ * geoalgorithms to create output objects
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public abstract class OutputFactory {
+
+   private int    m_iCount       = 0;
+   private double m_dNoDataValue = -99999;
+
+
+   /**
+    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iShapeType
+    *                the type of shapes in the layer
+    * @param types
+    *                the data type of the fields
+    * @param sFields
+    *                the name of the fields in the attributes table
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @return an empty vector layer
+    */
+   public abstract IVectorLayer getNewVectorLayer(String sName,
+                                                  int iShapeType,
+                                                  Class[] types,
+                                                  String[] sFields,
+                                                  IOutputChannel channel,
+                                                  Object crs) throws UnsupportedOutputChannelException;
+
+   /**
+    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iShapeType
+    *                the type of shapes in the layer
+    * @param types
+    *                the data type of the fields
+    * @param sFields
+    *                the name of the fields in the attributes table
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @param subtype
+    *                the subtype of the geometries in the layer
+    * @return an empty vector layer
+ * @throws UnsupportedOutputChannelException
+    */
+   public abstract IVectorLayer getNewVectorLayer(String sName,
+                                                  int iShapeType,
+                                                  Class[] types,
+                                                  String[] sFields,
+                                                  IOutputChannel channel,
+                                                  Object crs, int subtype) throws UnsupportedOutputChannelException;
+
+
+   /**
+    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iShapeType
+    *                the type of shapes in the layer
+    * @param types
+    *                the data type of the fields
+    * @param sFields
+    *                the name of the fields in the attributes table
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @param fieldSize
+    *                A list of integers. Each value represents the size of a table field.
+    * @return an empty vector layer
+    */
+   public abstract IVectorLayer getNewVectorLayer(String sName,
+                                                  int iShapeType,
+                                                  Class[] types,
+                                                  String[] sFields,
+                                                  IOutputChannel channel,
+                                                  Object crs,
+                                                  int[] fieldSize) throws UnsupportedOutputChannelException;
+
+   /**
+    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iShapeType
+    *                the type of shapes in the layer
+    * @param types
+    *                the data type of the fields
+    * @param sFields
+    *                the name of the fields in the attributes table
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @param fieldSize
+    *                A list of integers. Each value represents the size of a table field.
+    * @param subtype
+    *                the subtype of the geometries in the layer
+    * @return an empty vector layer
+ * @throws UnsupportedOutputChannelException
+    */
+   public abstract IVectorLayer getNewVectorLayer(String sName,
+                                                  int iShapeType,
+                                                  Class[] types,
+                                                  String[] sFields,
+                                                  IOutputChannel channel,
+                                                  Object crs,
+                                                  int[] fieldSize, int subtype) throws UnsupportedOutputChannelException;
+
+   /**
+    * Use this method to create a new raster layer as output from the geo-algorithm. The characteristics of the raster layer
+    * (extent and cellsize) are taken from the extent parameter.
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iDataType
+    *                the type of data in the layer
+    * @param extent
+    *                the AnalysisExtent to use
+    * @param iBands
+    *                the number of bands of the new layer
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @return a raster layer
+    * @throws UnsupportedOutputChannelException
+    */
+   public abstract IRasterLayer getNewRasterLayer(String sName,
+                                                  int iDataType,
+                                                  AnalysisExtent extent,
+                                                  int iBands,
+                                                  IOutputChannel channel,
+                                                  Object crs) throws UnsupportedOutputChannelException;
+
+
+   /**
+    * Use this method to create a new 3D raster layer as output from the geo-algorithm. The characteristics of the raster layer
+    * (extent and cellsizes) are taken from the extent parameter.
+    *
+    * A default implementation is given, which uses the Default3dRasterLayer class. This way, 3D algorithms can be executed within
+    * the context of a GIS that does not support 3D layer, and there is no need to overwrite this method in the corresponding
+    * binding
+    *
+    * @param sName
+    *                the name of the layer
+    * @param iDataType
+    *                the type of data in the layer
+    * @param extent
+    *                the AnalysisExtent to use
+    * @param channel
+    *                the output channel associated to the output layer
+    * @param crs
+    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
+    * @return a 3D raster layer
+    */
+   public I3DRasterLayer getNew3DRasterLayer(final String sName,
+                                             final int iDataType,
+                                             final AnalysisExtent extent,
+                                             final IOutputChannel channel,
+                                             final Object crs) throws UnsupportedOutputChannelException {
+
+      if (channel instanceof FileOutputChannel) {
+         final String sFilename = ((FileOutputChannel) channel).getFilename();
+         final Default3DRasterLayer layer = new Default3DRasterLayer();
+         layer.create(sName, sFilename, extent, crs);
+         return layer;
+      }
+      else {
+         throw new UnsupportedOutputChannelException();
+      }
+
+
+   }
+
+
+   /**
+    * Use this method to create a new table.
+    *
+    * @param sName
+    *                the name of the table
+    * @param types
+    *                the data type of the fields
+    * @param sFields
+    *                The names of the fields in the table
+    * @param channel
+    *                the output channel associated to the output layer
+    * @return a new empty table object
+    */
+   public abstract ITable getNewTable(String sName,
+                                      Class[] types,
+                                      String[] sFields,
+                                      IOutputChannel channel) throws UnsupportedOutputChannelException;
+
+
+   /**
+    *
+    * @return A temporary filename with the default file extension for vector layers
+    */
+   public String getTempVectorLayerFilename() {
+
+      return getTempFilenameWithoutExtension() + "." + getVectorLayerOutputExtensions()[0];
+
+   }
+
+
+   /**
+    *
+    * @return A temporary filename with the default file extension for raster layers
+    */
+   public String getTempRasterLayerFilename() {
+
+      return getTempFilenameWithoutExtension() + "." + getRasterLayerOutputExtensions()[0];
+
+   }
+
+
+   /**
+    *
+    * @return A temporary filename with the default file extension for 3D raster layers
+    */
+   public String getTemp3DRasterLayerFilename() {
+
+      return getTempFilenameWithoutExtension() + "." + get3DRasterLayerOutputExtensions()[0];
+
+   }
+
+
+   /**
+    *
+    * @return A temporary filename with the default file extension for tables
+    */
+   public String getTempTableFilename() {
+
+      return getTempFilenameWithoutExtension() + "." + getTableOutputExtensions()[0];
+   }
+
+
+   /**
+    *
+    * @return A temporary folder name
+    */
+   public String getTempFoldername() {
+
+      return getTempFilenameWithoutExtension();
+   }
+
+
+   /**
+    *
+    * @param out
+    *                an Output object
+    * @return A temporary filename with the default file extension for the specified type of output
+    */
+   public String getTempFilename(final Output out) {
+
+      if (out instanceof OutputVectorLayer) {
+         return getTempVectorLayerFilename();
+      }
+      if (out instanceof OutputRasterLayer) {
+         return getTempRasterLayerFilename();
+      }
+      if (out instanceof OutputTable) {
+         return getTempTableFilename();
+      }
+      if (out instanceof Output3DRasterLayer) {
+         return getTemp3DRasterLayerFilename();
+      }
+
+      else {
+         return null;
+      }
+
+   }
+
+
+   /**
+    * Returns a temporary filename with no extension
+    *
+    * @returns a temporary filename with no extension.
+    */
+   public String getTempFilenameWithoutExtension() {
+
+      return getTempFolder() + File.separator + Long.toString(System.currentTimeMillis()) + Integer.toString(m_iCount++);
+
+   }
+
+
+   /**
+    * Returns the temporary folder. This will be used to store outputs when they do not have an associated filename an it is
+    * needed
+    *
+    * @return a temporary folder
+    */
+   public abstract String getTempFolder();
+
+
+   /**
+    * Returns the extensions supported by this factory for creating raster layers. If a filename with an extension not found in
+    * this list of extensions is used to create a raster layer, the default extension (the first one of the list) will be added to
+    * the filename when creating that layer.
+    *
+    * @return the list of supported extensions for raster layers
+    */
+   public abstract String[] getRasterLayerOutputExtensions();
+
+
+   /**
+    * Returns the extensions supported by this factory for creating 3d raster layers. If a filename with an extension not found in
+    * this list of extensions is used to create a 3d raster layer, the default extension (the first one of the list) will be added
+    * to the filename when creating that layer.
+    *
+    * A default implementation is given, which returns just the "asc" extension used by the default implementation of the
+    * getNew3DRasterLayer method, which uses the Default3DRasterLayer class
+    *
+    * @return the list of supported extensions for 3d raster layers
+    */
+   public String[] get3DRasterLayerOutputExtensions() {
+
+      return new String[] { "asc3d" };
+
+   }
+
+
+   /**
+    * Returns the extensions supported by this factory for creating vector layers. If a filename with an extension not found in
+    * this list of extensions is used to create a vector layer, the default extension (the first one of the list) will be added to
+    * the filename when creating that layer.
+    *
+    * @return the list of supported extensions for vector layers
+    */
+   public abstract String[] getVectorLayerOutputExtensions();
+
+
+   /**
+    * Returns the extensions supported by this factory for creating raster layers. If a filename with an extension not found in
+    * this list of extensions is used to create a raster layer, the default extension (the first one of the list) will be added to
+    * the filename when creating that layer.
+    *
+    * @return the list of supported extensions for raster layers
+    */
+   public abstract String[] getTableOutputExtensions();
+
+
+   /**
+    * Returns the task monitor that will be used to monitor algorithm execution
+    *
+    * @param sTitle
+    *                a String used to identify the monitor. This will be used, for instance, as the title string of a progress
+    *                dialog.
+    * @param bDeterminate
+    *                true if the task monitor will monitor a determinated process (i.e. number of steps to complete the process is
+    *                know)
+    * @return the task monitor used to monitor algorithm execution
+    */
+   public abstract ITaskMonitor getTaskMonitor(String sTitle,
+                                               boolean bDeterminate,
+                                               JDialog parent);
+
+
+   /**
+    * Returns the default CRS for new layers. This will be used when the geoalgorithm generates new layers but does not take any
+    * other layer as input, so the CRS cannot be defined from the inputs
+    *
+    * @return an object containing information about the default CRS (i.e. a String with the EPSG code of the CRS)
+    */
+   public abstract Object getDefaultCRS();
+
+
+   /**
+    * Returns the default no data value for raster layers created by this output factory
+    *
+    * @return the default no data value for raster layers created by this output factory
+    */
+   public double getDefaultNoDataValue() {
+
+      return m_dNoDataValue;
+
+   }
+
+
+   /**
+    * Sets the default no data value to use when this output factory cretes a new raster layer
+    *
+    * @param dValue
+    *                the default no data value to use when this output factory cretes a new raster layer
+    */
+   public void setDefaultNoDataValue(final double dValue) {
+
+      m_dNoDataValue = dValue;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SilentTaskMonitor.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SilentTaskMonitor.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SilentTaskMonitor.java	(revision 369)
@@ -0,0 +1,47 @@
+package es.unex.sextante.core;
+
+/**
+ * A task monitor that does not show task progress or allows for user interaction
+ * 
+ * @author volaya
+ * 
+ */
+public class SilentTaskMonitor
+         implements
+            ITaskMonitor {
+
+   /**
+    * Creates a new silent monitor
+    */
+   public SilentTaskMonitor() {}
+
+
+   public boolean isCanceled() {
+
+      return false;
+
+   }
+
+
+   public void setProgress(final int iStep) {}
+
+
+   public void setProgressText(final String sText) {}
+
+
+   public void close() {}
+
+
+   public void setProgress(final int step,
+                           final int totalNumberOfSteps) {}
+
+
+   public void setDeterminate(final boolean determinate) {}
+
+
+   public void setProcessDescription(final String description) {}
+
+
+   public void setDescriptionPrefix(final String prefix) {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SilentTaskMonitor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SextanteLogHandler.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SextanteLogHandler.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SextanteLogHandler.java	(revision 369)
@@ -0,0 +1,112 @@
+package es.unex.sextante.core;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A Handler that outputs to the SEXTANTE log file, and also provides some additional methods to access log messages.
+ */
+public class SextanteLogHandler {
+
+   private static final Logger m_Logger = LoggerFactory.getLogger(SextanteLogHandler.class);
+
+   ArrayList<LogElement> logElements = new ArrayList<LogElement>();
+
+
+   public SextanteLogHandler() {
+      super();
+
+   }
+
+   public void addError(final String sMessage) {
+
+	   m_Logger.warn(sMessage);
+
+      final Date todaysDate = new java.util.Date();
+      final LogElement le = new LogElement(todaysDate, sMessage, LogElement.ERROR);
+      logElements.add(le);
+
+   }
+
+
+   public void addError(final Throwable e) {
+
+	   m_Logger.warn("", e);
+
+      final StringBuffer sb = new StringBuffer(e.toString());
+      StackTraceElement[] trace = e.getStackTrace();
+      for (int i = 0; i < trace.length; i++) {
+         sb.append("\tat " + trace[i] + "\n");
+      }
+      final Throwable ourCause = e.getCause();
+      sb.append("Caused by: " + this);
+      if (ourCause != null) {
+         trace = ourCause.getStackTrace();
+         for (int i = 0; i < trace.length; i++) {
+            sb.append("\tat " + trace[i] + "\n");
+         }
+      }
+
+      final Date todaysDate = new java.util.Date();
+      final LogElement le = new LogElement(todaysDate, sb.toString(), e.toString(), LogElement.ERROR);
+      logElements.add(le);
+
+   }
+
+
+   public void addWarning(final String sMessage) {
+
+	  m_Logger.warn(sMessage);
+
+      final Date todaysDate = new java.util.Date();
+      final LogElement le = new LogElement(todaysDate, sMessage, LogElement.WARNING);
+      logElements.add(le);
+
+   }
+
+
+   public void addInfo(final String sMessage) {
+
+	   m_Logger.info(sMessage);
+
+      final Date todaysDate = new java.util.Date();
+      final LogElement le = new LogElement(todaysDate, sMessage, LogElement.INFO);
+      logElements.add(le);
+
+   }
+
+
+   public void close() throws SecurityException {
+   }
+
+
+   public ArrayList<LogElement> getLogElements() {
+
+      return logElements;
+
+   }
+
+
+   public void clear() {
+
+      logElements.clear();
+
+   }
+
+
+   public void addToLog(final String sMessage,
+                        final String sType,
+                        final String sShortMessage) {
+
+
+      final Date todaysDate = new java.util.Date();
+      final LogElement le = new LogElement(todaysDate, sMessage, sShortMessage, sType);
+      logElements.add(le);
+      m_Logger.info(le.getAsText());
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/SextanteLogHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/LogElement.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/LogElement.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/LogElement.java	(revision 369)
@@ -0,0 +1,91 @@
+package es.unex.sextante.core;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class LogElement {
+
+   public static final String ERROR   = "ERROR";
+   public static final String WARNING = "WARNING";
+   public static final String INFO    = "INFO";
+
+   private Date               date;
+   private String             text;
+   private String             type;
+   private final String       shortText;
+
+
+   public LogElement(final Date date,
+                     final String text,
+                     final String type) {
+
+      this.date = date;
+      this.text = text;
+      this.type = type;
+      this.shortText = text;
+
+   }
+
+
+   public LogElement(final Date date,
+                     final String text,
+                     final String shortText,
+                     final String type) {
+
+      this.date = date;
+      this.text = text;
+      this.type = type;
+      this.shortText = shortText;
+
+   }
+
+
+   public Date getDate() {
+      return date;
+   }
+
+
+   public void setDate(final Date date) {
+      this.date = date;
+   }
+
+
+   public String getText() {
+      return text;
+   }
+
+
+   public void setText(final String text) {
+      this.text = text;
+   }
+
+
+   public String getType() {
+      return type;
+   }
+
+
+   public void setType(final String type) {
+      this.type = type;
+   }
+
+
+   public String getAsText() {
+
+      final SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss");
+      final String sFormattedDate = formatter.format(date);
+      return "[" + sFormattedDate + "]-" + type + ":\n" + text + "\n\n";
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      final SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss");
+      final String sFormattedDate = formatter.format(date);
+      return "[" + sFormattedDate + "]-" + type + ":" + shortText;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/LogElement.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/Sextante.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/Sextante.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/Sextante.java	(revision 369)
@@ -0,0 +1,408 @@
+package es.unex.sextante.core;
+
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.gvsig.i18n.Messages;
+
+
+public class Sextante {
+
+   private static SextanteLogHandler m_Logger = new SextanteLogHandler();
+
+   private static HashMap<String, HashMap<String, GeoAlgorithm>> m_Algorithms;
+
+   // Default colors for modeler nodes:
+   public static int i_R_Input = 255;
+   public static int i_G_Input = 255;
+   public static int i_B_Input = 255;
+   public static int i_Alpha_Input = 255;
+
+   public static int i_R_Algorithm = 128;
+   public static int i_G_Algorithm = 128;
+   public static int i_B_Algorithm = 128;
+   public static int i_Alpha_Algorithm = 255;
+
+   public static int VERSION_MAJOR = 1;
+   public static int VERSION_MINOR = 0;
+   public static int VERSION_REVISION = 0;
+
+   public static String PORTABLE_R_FOLDER = "r";
+   public static String PORTABLE_R_SCRIPTS_FOLDER = "r_scripts";
+   public static String PORTABLE_GRASS_FOLDER = "grass";
+   public static String PORTABLE_MSYS_FILE = "msys" + File.separator + "bin" + File.separator + "sh.exe";
+   public static String PORTABLE_SAGA_FOLDER = "saga";
+   public static String PORTABLE_MODELS_FOLDER = "models";
+   public static String PORTABLE_SCRIPTS_FOLDER = "scripts";
+
+
+   /**
+    * initializes the library, loading algorithms and properties. Algorithms and properties are loaded from files in the
+    * classpath.
+    */
+   public static void initialize() {
+      AlgorithmsAndResources.addAlgorithmsAndPropertiesFromClasspath();
+
+      m_Algorithms = new HashMap<String, HashMap<String, GeoAlgorithm>>();
+
+      registeri18n();
+
+      loadLibraryAlgorithms();
+   }
+
+
+   /**
+    * Initializes the library loading algorithms and properties located inside the specified jar files
+    *
+    * @param jars
+    *                URLs of jar files containing algorithms and properties.
+    */
+   public static void initialize(final URL[] jars) {
+      AlgorithmsAndResources.addAlgorithmsAndPropertiesFromURLs(jars);
+
+      m_Algorithms = new HashMap<String, HashMap<String, GeoAlgorithm>>();
+
+      registeri18n();
+
+      loadLibraryAlgorithms();
+   }
+
+
+   /**
+    * initializes the library, loading algorithms and properties.
+    *
+    * @param sFolder
+    *                the folder where sextante jars are located. Algorithms and properties files are loaded from those jar files
+    *                prior to library initialization.
+    */
+   public static void initialize(final String sFolder) {
+      AlgorithmsAndResources.addAlgorithmsAndPropertiesFromFolder(sFolder);
+
+      m_Algorithms = new HashMap<String, HashMap<String, GeoAlgorithm>>();
+
+      registeri18n();
+
+      loadLibraryAlgorithms();
+   }
+
+   private static void registeri18n() {
+	   Messages.addResourceFamily("org.gvsig.toolbox.i18n.text",
+			   Sextante.class.getClassLoader(),
+			   Sextante.class.getClass().getName());
+   }
+
+
+   /**
+    * Adds a group of algorithms coming from the same algorithm provider. It will replace the previous group of algorithms from
+    * that provider (if it exists) in the collection of currently available algorithms
+    *
+    * @param sName
+    *                the name that identifies the provider of the algorithms to add
+    * @param algs
+    *                a map with algorithm command-line names as keys and geoalgorithms as values
+    */
+   public static void addAlgorithmsFromProvider(final String sName,
+                                                final HashMap<String, GeoAlgorithm> algs) {
+      m_Algorithms.put(sName, algs);
+   }
+
+
+   /**
+    * Adds an external geoprocess. An external algorithm is a GeoAlgorithm which has been created out of this library.
+    *
+    * @param sProviderGroup
+    *                the name of the provider group for the algorithm to add
+    * @param alg
+    *                the class of the algorithm to add
+    * @param text
+    *                HashMap which contains the properties
+    */
+   public static void addGeoalgorithm(final String sProviderGroup,
+                                      final Class<?> alg) {
+      if (alg != null) {
+         Object obj = null;
+         try {
+            obj = alg.newInstance();
+         }
+         catch (final InstantiationException e) {
+            Sextante.addErrorToLog(e);
+         }
+         catch (final IllegalAccessException e) {
+            Sextante.addErrorToLog(e);
+         }
+         if ((obj != null) && (obj instanceof GeoAlgorithm)) {
+            HashMap<String, GeoAlgorithm> group = m_Algorithms.get(sProviderGroup);
+            if (group == null) {
+               group = new HashMap<String, GeoAlgorithm>();
+               m_Algorithms.put(sProviderGroup, group);
+            }
+            group.put(((GeoAlgorithm) obj).getCommandLineName(), (GeoAlgorithm) obj);
+         }
+      }
+
+   }
+
+
+   /**
+    * Adds an external geoprocess. An external algorithm is a GeoAlgorithm which has been created outside of this library.
+    *
+    * @param sProviderGroup
+    *                the name of the provider group for the algorithm to add
+    *
+    * @param alg
+    *                External algorithm
+    */
+   public static void addGeoalgorithm(final String sProviderGroup,
+                                      final GeoAlgorithm alg) {
+      if (alg != null) {
+         HashMap<String, GeoAlgorithm> group = m_Algorithms.get(sProviderGroup);
+         if (group == null) {
+            group = new HashMap<String, GeoAlgorithm>();
+            m_Algorithms.put(sProviderGroup, group);
+         }
+         group.put(alg.getCommandLineName(), alg);
+      }
+   }
+
+   /**
+    * logs an error or exception to the SEXTANTE logger
+    *
+    * @param e
+    *                the throwable object to log
+    */
+   public static void addErrorToLog(final Throwable e) {
+      m_Logger.addError(e);
+   }
+
+
+   /**
+    * Adds an error message to the SEXTANTE logger
+    *
+    * @param sError
+    *                the error message
+    */
+   public static void addErrorToLog(final String sError) {
+      m_Logger.addError(sError);
+   }
+
+
+   /**
+    * Adds a warning message to the SEXTANTE logger
+    *
+    * @param sWarning
+    *                the warning message
+    */
+   public static void addWarningToLog(final String sWarning) {
+      m_Logger.addWarning(sWarning);
+   }
+
+
+   /**
+    * Adds an info message to the SEXTANTE logger
+    *
+    * @param sInfo
+    *                the info message
+    */
+   public static void addInfoToLog(final String sInfo) {
+      m_Logger.addInfo(sInfo);
+   }
+
+
+   /**
+    * Returns the logger to log SEXTANTE issues
+    *
+    * @return the logger to log SEXTANTE issues
+    */
+   public static SextanteLogHandler getLogger() {
+      return m_Logger;
+   }
+
+
+   /**
+    * Returns a map of all algorithms currently loaded. That includes algorithm in the library and all external algorithms added
+    * afterwards using the corresponding methods. The name of the provider of these algorithms ("SEXTANTE" for library algorithms)
+    * is used as key. Values are maps where command-line names (see {@link GeoAlgorithm#getCommandLineName()}) are used as keys
+    * and algorithms as values. The library must have been initialized before in order to contain library algorithms.
+    *
+    * @return a map of all algorithms in the library.
+    */
+   public static HashMap<String, HashMap<String, GeoAlgorithm>> getAlgorithms() {
+      return m_Algorithms;
+   }
+
+
+   /**
+    * Returns a filtered map of all algorithms currently loaded. That includes algorithm in the library and all external
+    * algorithms added afterwards using the corresponding methods. The name of the provider of these algorithms ("SEXTANTE" for
+    * library algorithms) is used as key. Values are maps where command-line names (see {@link GeoAlgorithm#getCommandLineName()})
+    * are used as keys and algorithms as values. The library must have been initialized before in order to contain library
+    * algorithms.
+    *
+    * @param filter
+    *                The filter to use
+    * @return a map of algorithms in the library filtered according to a given filter.
+    */
+   public static HashMap getAlgorithms(final IGeoAlgorithmFilter filter) {
+      final HashMap<String, HashMap<String, GeoAlgorithm>> algs = new HashMap<String, HashMap<String, GeoAlgorithm>>();
+
+      final Set<String> set = m_Algorithms.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String key = iter.next();
+         final HashMap<String, GeoAlgorithm> group = m_Algorithms.get(key);
+         final Set<String> set2 = group.keySet();
+         final Iterator<String> iter2 = set2.iterator();
+         while (iter2.hasNext()) {
+            final String key2 = iter.next();
+            final GeoAlgorithm alg = group.get(key2);
+            if (filter.accept(alg)) {
+               HashMap<String, GeoAlgorithm> returnGroup = algs.get(key);
+               if (returnGroup == null) {
+                  returnGroup = new HashMap<String, GeoAlgorithm>();
+                  algs.put(key, returnGroup);
+               }
+               returnGroup.put(key2, alg);
+            }
+         }
+      }
+
+      return algs;
+   }
+
+
+   /**
+    * returns an algorithm based on its command line name. (see {@link GeoAlgorithm#getCommandLineName()})
+    *
+    * @param sName
+    *                the command-line name
+    * @return an algorithm. null if there is no algorithm with that name
+    */
+   public static GeoAlgorithm getAlgorithmFromCommandLineName(final String sName) {
+      final Set<String> set = m_Algorithms.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String key = iter.next();
+         final GeoAlgorithm alg = m_Algorithms.get(key).get(sName);
+         if (alg != null) {
+            return alg;
+         }
+      }
+      return null;
+   }
+
+
+   public static String getAlgorithmProviderName(final GeoAlgorithm alg) {
+      final Set<String> set = m_Algorithms.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String key = iter.next();
+         final HashMap<String, GeoAlgorithm> algs = m_Algorithms.get(key);
+         final String sName = alg.getCommandLineName();
+         if (algs.containsKey(sName)) {
+            return key;
+         }
+      }
+      return "SEXTANTE";
+   }
+
+
+   /**
+    * Puts into the map of available algorithms those included in the SEXTANTE library and loaded from the corresponding jar files
+    */
+   private static void loadLibraryAlgorithms() {
+      final HashMap<String, GeoAlgorithm> algsMap = new HashMap<String, GeoAlgorithm>();
+
+      final String[] algs = AlgorithmsAndResources.getAlgorithmClassNames();
+
+      for (final String element : algs) {
+         try {
+            final Class clazz = Class.forName(element);
+            final Object obj = clazz.newInstance();
+            if (obj instanceof GeoAlgorithm) {
+               final GeoAlgorithm alg = (GeoAlgorithm) obj;
+               if (alg.getGroup() != null) { //to avoid loading base classes
+                  algsMap.put(alg.getCommandLineName(), alg);
+               }
+            }
+         }
+         catch (final Exception e) {}
+      }
+      if (algsMap.size()>0){
+    	  m_Algorithms.put("SEXTANTE", algsMap);
+      }
+   }
+
+
+   /**
+    * Returns an internationalized string based on a key value (i.e the string in the current language associated with the key
+    * value) Use this method to support internationalization. Resource strings are loaded when the library is initialized, so the
+    * initialize() method has to be called to use the corresponding translations.
+    *
+    * @param sKey
+    *                the key to search
+    * @return the corresponding string in the current language. If the key was not found, it returns that same key.
+    */
+   public static String getText(final String sKey) {
+	   return Messages.getText(sKey);
+   }
+
+
+   /**
+    * Returns "true" if the current operating system is a variant of Windows.
+    *
+    * @return "true", if we are running on Windows, "false" otherwise.
+    */
+   public static boolean isWindows() {
+      final String os = System.getProperty("os.name").toLowerCase();
+      return (os.indexOf("win") >= 0);
+   }
+
+
+   /**
+    * Returns "true" if the current operating system is Mac OS X.
+    *
+    * @return "true", if we are running on Mac OS X, "false" otherwise.
+    */
+   public static boolean isMacOSX() {
+      final String os = System.getProperty("os.name").toLowerCase();
+      return (os.indexOf("mac") >= 0);
+   }
+
+
+   /**
+    * Returns "true" if the current operating system is some Unix flavor (including Linux). Does not return true for Mac OS X.
+    *
+    * @return "true", if we are running on Unix/Linux, "false" otherwise.
+    */
+   public static boolean isUnix() {
+      final String os = System.getProperty("os.name").toLowerCase();
+      return ((os.indexOf("nix") >= 0) || (os.indexOf("nux") >= 0));
+   }
+
+
+   /**
+    * Returns the number of algorithms available
+    *
+    * @return the number of algorithms available
+    */
+   public static int getAlgorithmsCount() {
+      int iCount = 0;
+      final Set<String> set = m_Algorithms.keySet();
+      final Iterator<String> iter = set.iterator();
+      while (iter.hasNext()) {
+         final String key = iter.next();
+         iCount += m_Algorithms.get(key).size();
+
+      }
+      return iCount;
+   }
+
+
+   public static String getVersionNumber() {
+      return ( Sextante.VERSION_MAJOR + "." + Sextante.VERSION_MINOR + "." + Sextante.VERSION_REVISION );
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/Sextante.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ObjectAndDescription.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ObjectAndDescription.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ObjectAndDescription.java	(revision 369)
@@ -0,0 +1,120 @@
+package es.unex.sextante.core;
+
+import javax.swing.Icon;
+
+public class ObjectAndDescription
+         implements
+            Comparable {
+
+   private String m_sDescription;
+   private Object m_Object;
+   private Icon m_ObjectIcon;
+
+
+   public ObjectAndDescription(final String sDescription,
+                               final Object object) {
+
+      m_sDescription = sDescription;
+      m_Object = object;
+      m_ObjectIcon = null;
+
+   }
+
+   public ObjectAndDescription(final String sDescription,
+                               final Object object,
+                               final Icon objectIcon) {
+
+      m_sDescription = sDescription;
+      m_Object = object;
+      m_ObjectIcon = objectIcon;
+
+   }
+   
+   public Object getObject() {
+
+      return m_Object;
+
+   }
+
+
+   public void setObject(final Object object) {
+
+      m_Object = object;
+
+   }
+
+
+   public String getDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public void setDescription(final String sDescription) {
+
+      m_sDescription = sDescription;
+
+   }
+
+      public Icon getIcon() {
+
+      return m_ObjectIcon;
+
+   }
+
+
+   public void setIcon(final Icon objectIcon) {
+
+      m_ObjectIcon = objectIcon;
+
+   }
+
+   @Override
+   public String toString() {
+
+      return getDescription();
+
+   }
+
+
+   public int compareTo(final Object arg0) {
+
+      return getDescription().compareTo(((ObjectAndDescription) arg0).getDescription());
+
+   }
+
+
+   @Override
+   public boolean equals(final Object ob) {
+
+      if (ob == null) {
+         return false;
+      }
+
+      try {
+         final ObjectAndDescription oad = (ObjectAndDescription) ob;
+         boolean bObjsEqual;
+         boolean bDescsEqual;
+         if (oad.getObject() == null) {
+            bObjsEqual = m_Object == null;
+         }
+         else {
+            bObjsEqual = oad.getObject().equals(m_Object);
+         }
+         if (oad.getDescription() == null) {
+            bDescsEqual = m_sDescription == null;
+         }
+         else {
+            bDescsEqual = oad.getDescription().equals(m_sDescription);
+         }
+         return bObjsEqual && bDescsEqual;
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ObjectAndDescription.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IGeoAlgorithmFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IGeoAlgorithmFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IGeoAlgorithmFilter.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.core;
+
+/**
+ * This interface defines a filter to be applied to a set of GeoAlgorithms.
+ *
+ * @author volaya
+ *
+ */
+public interface IGeoAlgorithmFilter {
+
+   public boolean accept(GeoAlgorithm alg);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IGeoAlgorithmFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IInputFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IInputFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IInputFactory.java	(revision 369)
@@ -0,0 +1,181 @@
+package es.unex.sextante.core;
+
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+/**
+ * Interface to be implemented by all input factories An input factory is used by SEXTANTE to retrieve data objects from an
+ * application.
+ * 
+ * If you want to integrate SEXTANTE graphical elements into your GIS app, it will need to prompt the user to select elements such
+ * as layers or tables, so it needs to know which elements are available (ie. already opened in your application) The input
+ * factory will create objects that implement the needed SEXTANTE interfaces from objects currently available in your application
+ * 
+ * Apart from wrapping data objects from the application, an input factory must also be able to open files and create data objects
+ * from them. This will be used when calling the batch processing interface
+ * 
+ * Instead of implementing this interface, it is more convenient to extend
+ * 
+ * @see {@link AbstractInputFactory}
+ * 
+ * @author volaya
+ * 
+ */
+public interface IInputFactory {
+
+   /**
+    * Creates the SEXTANTE data objects
+    */
+   public void createDataObjects();
+
+
+   /**
+    * Clears the set of SEXTANTE data objects
+    */
+   public void clearDataObjects();
+
+
+   /**
+    * Returns all objects in the set(layers and tables)
+    * 
+    * @return all objects in the set(layers and tables)
+    */
+   public IDataObject[] getDataObjects();
+
+
+   /**
+    * Adds a new data object to the ones already existing. This method should be called from post-process tasks, to incorporate
+    * output object to the inputs list without having to create all the already existing objects again
+    * 
+    * @param obj
+    *                the data object to add
+    */
+   public void addDataObject(IDataObject obj);
+
+
+   /**
+    * Returns the raster layers in the set
+    * 
+    * @return an array of raster layers
+    */
+   public IRasterLayer[] getRasterLayers();
+
+
+   /**
+    * Returns the 3D raster layers in the set
+    * 
+    * @return an array of 3D raster layers
+    */
+   public I3DRasterLayer[] get3DRasterLayers();
+
+
+   /**
+    * Returns all the vector layers of a particular type currently in the set
+    * 
+    * @param shapeType
+    *                The type of vector layer. Use the constants defined in
+    * @see {@link IVectorLayer}
+    * @return an array of vector layers
+    */
+   public IVectorLayer[] getVectorLayers(int shapeType);
+
+
+   /**
+    * Returns the tables in the set
+    * 
+    * @return an array of tables
+    */
+   public ITable[] getTables();
+
+
+   /**
+    * Returns al the individual bands of the raster layers in the set
+    * 
+    * @return an array of bands
+    */
+   public RasterLayerAndBand[] getBands();
+
+
+   /**
+    * Returns the raster and vector layers in the set
+    * 
+    * @return an array of layers
+    */
+   public ILayer[] getLayers();
+
+
+   /**
+    * Returns the predefined extents available
+    * 
+    * @return an array of named extents
+    */
+   public NamedExtent[] getPredefinedExtents();
+
+
+   /**
+    * Returns an input object based on its name
+    * 
+    * @return the input object corresponding to the specified name. Returns null if no object with that name was found
+    */
+   public IDataObject getInputFromName(String value);
+
+
+   /**
+    * Returns an array of extensions that this InputFactory supports for opening raster layers
+    * 
+    * @return the supported extensions for raster layers
+    */
+   public abstract String[] getRasterLayerInputExtensions();
+
+
+   /**
+    * Returns an array of extensions that this InputFactory supports for opening vector layers
+    * 
+    * @return the supported extensions for vector layers
+    */
+   public abstract String[] getVectorLayerInputExtensions();
+
+
+   /**
+    * Returns an array of extensions that this InputFactory supports for opening tables
+    * 
+    * @return the supported extensions for tables
+    */
+   public abstract String[] getTableInputExtensions();
+
+
+   /**
+    * Returns an array of extensions that this InputFactory supports for opening 3D layers
+    * 
+    * @return the supported extensions for 3D layers
+    */
+   public String[] get3DRasterLayerInputExtensions();
+
+
+   /**
+    * Returns a data object created from the specified filename
+    * 
+    * @param filename
+    *                the filename
+    * @return a data object. null if could not create it from the specified file
+    */
+   public abstract IDataObject openDataObjectFromFile(String filename);
+
+
+   /**
+    * Closes (eliminates it from the application running SEXTANTE) a data object (table or layer) given its name. If it is not
+    * opened in the application (for example, not being shown in a view or map), but it is contained in the input factory list of
+    * objects (such as layers loaded using the open() method from the command-line interface), it should remove it from that list.
+    * 
+    * @param input
+    *                the name of the data object to close
+    */
+   public abstract void close(String input);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IInputFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ProcessTask.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ProcessTask.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ProcessTask.java	(revision 369)
@@ -0,0 +1,89 @@
+package es.unex.sextante.core;
+
+import java.util.concurrent.Callable;
+
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+
+/**
+ * This task processes a geoalgorithm
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public class ProcessTask
+         implements
+            IMonitorableTask,
+            Callable<Boolean> {
+
+   private final boolean       m_bFinished = false;
+   private final GeoAlgorithm  m_Algorithm;
+   private final ITaskMonitor  m_ProgressMonitor;
+   private final OutputFactory m_OutputFactory;
+
+
+   /**
+    * Creates a new process task
+    *
+    * @param algorithm
+    *                the algorithm to process
+    * @param outputFactory
+    *                the output factory to use for executing the algorithm
+    * @param taskMonitor
+    *                the task monitor to use for monitoring algorithm execution
+    */
+   public ProcessTask(final GeoAlgorithm algorithm,
+                      final OutputFactory outputFactory,
+                      final ITaskMonitor taskMonitor) {
+
+      m_Algorithm = algorithm;
+      m_OutputFactory = outputFactory;
+      m_ProgressMonitor = taskMonitor;
+
+      if (taskMonitor != null) {
+         m_ProgressMonitor.setProgress(0);
+      }
+
+   }
+
+
+   /**
+    * Starts the execution of the task
+    *
+    * @return true if the algorithm was executed completely, false if it was canceled
+    * @throws GeoAlgorithmExecutionException
+    *                 if there were problems during algorithm execution
+    *
+    */
+   public Boolean call() throws GeoAlgorithmExecutionException {
+
+      final boolean bReturn = m_Algorithm.execute(m_ProgressMonitor, m_OutputFactory);
+
+      return new Boolean(bReturn);
+
+   }
+
+
+   /**
+    * Returns true if the task has been canceled
+    *
+    * @return true if the algorithm has been canceled
+    */
+   public boolean isCanceled() {
+
+      return m_ProgressMonitor.isCanceled();
+
+   }
+
+
+   /**
+    * Returns true if the task has been finished
+    *
+    * @return true if the algorithm has been finished
+    */
+   public boolean isFinished() {
+
+      return m_bFinished;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ProcessTask.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IMonitorableTask.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IMonitorableTask.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IMonitorableTask.java	(revision 369)
@@ -0,0 +1,26 @@
+package es.unex.sextante.core;
+
+/**
+ * A task that can be monitored
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public interface IMonitorableTask {
+
+   /**
+    * Returns true if tha task has been canceled
+    *
+    * @return true if the task has been canceled
+    */
+   public boolean isCanceled();
+
+
+   /**
+    * Returns true is the task is finished and is not running anymore
+    *
+    * @return true is the task is finished and is not running anymore
+    */
+   public boolean isFinished();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/IMonitorableTask.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AbstractInputFactory.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AbstractInputFactory.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AbstractInputFactory.java	(revision 369)
@@ -0,0 +1,223 @@
+package es.unex.sextante.core;
+
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+
+public abstract class AbstractInputFactory
+         implements
+            IInputFactory {
+
+   public static final int SHAPE_TYPE_ANY = AdditionalInfoVectorLayer.SHAPE_TYPE_ANY;
+
+   protected IDataObject[] m_Objects;
+
+
+   public void clearDataObjects() {
+
+      m_Objects = null;
+
+   }
+
+
+   public void removeDataObject(final String sName) {
+
+      final ArrayList<IDataObject> list = new ArrayList<IDataObject>();
+      for (int i = 0; i < m_Objects.length; i++) {
+         if (!m_Objects[i].getName().equals(sName)) {
+            list.add(m_Objects[i]);
+         }
+      }
+
+      m_Objects = list.toArray(new IDataObject[0]);
+
+   }
+
+
+   public void addDataObject(final IDataObject obj) {
+
+      final IDataObject[] newObjects = new IDataObject[m_Objects.length + 1];
+      System.arraycopy(m_Objects, 0, newObjects, 0, m_Objects.length);
+      newObjects[m_Objects.length] = obj;
+      m_Objects = newObjects;
+
+   }
+
+
+   public void removeObject(final IDataObject obj) {
+
+      final ArrayList<IDataObject> list = new ArrayList();
+      for (int i = 0; i < m_Objects.length; i++) {
+         if (m_Objects[i] != obj) {
+            list.add(m_Objects[i]);
+         }
+      }
+      m_Objects = list.toArray(new IDataObject[0]);
+   }
+
+
+   public RasterLayerAndBand[] getBands() {
+
+      final ArrayList list = new ArrayList();
+
+      final IRasterLayer[] layers = getRasterLayers();
+
+      for (int i = 0; i < layers.length; i++) {
+         for (int j = 0; j < layers[i].getBandsCount(); j++) {
+            final RasterLayerAndBand rab = new RasterLayerAndBand(layers[i], j);
+            list.add(rab);
+         }
+      }
+
+      final RasterLayerAndBand[] bands = new RasterLayerAndBand[list.size()];
+      for (int i = 0; i < list.size(); i++) {
+         bands[i] = (RasterLayerAndBand) list.get(i);
+      }
+
+      return bands;
+
+   }
+
+
+   public ILayer[] getLayers() {
+
+      final ArrayList list = new ArrayList();
+
+      final Object[] objs = getDataObjects();
+
+      for (int i = 0; i < objs.length; i++) {
+         if (objs[i] instanceof ILayer) {
+            list.add(objs[i]);
+         }
+      }
+
+      final ILayer[] layers = new ILayer[list.size()];
+      for (int i = 0; i < layers.length; i++) {
+         layers[i] = (ILayer) list.get(i);
+      }
+
+      return layers;
+
+   }
+
+
+   public IRasterLayer[] getRasterLayers() {
+
+      final ArrayList list = new ArrayList();
+
+      final Object[] objs = getDataObjects();
+
+      for (int i = 0; i < objs.length; i++) {
+         if (objs[i] instanceof IRasterLayer) {
+            list.add(objs[i]);
+         }
+      }
+
+      final IRasterLayer[] layers = new IRasterLayer[list.size()];
+      for (int i = 0; i < layers.length; i++) {
+         layers[i] = (IRasterLayer) list.get(i);
+      }
+
+      return layers;
+
+   }
+
+
+   public I3DRasterLayer[] get3DRasterLayers() {
+
+      final ArrayList list = new ArrayList();
+
+      final Object[] objs = getDataObjects();
+
+      for (int i = 0; i < objs.length; i++) {
+         if (objs[i] instanceof I3DRasterLayer) {
+            list.add(objs[i]);
+         }
+      }
+
+      final I3DRasterLayer[] layers = new I3DRasterLayer[list.size()];
+      for (int i = 0; i < layers.length; i++) {
+         layers[i] = (I3DRasterLayer) list.get(i);
+      }
+
+      return layers;
+
+   }
+
+
+   public IVectorLayer[] getVectorLayers(final int shapeType) {
+
+      final ArrayList list = new ArrayList();
+
+      final Object[] objs = getDataObjects();
+
+      for (int i = 0; i < objs.length; i++) {
+         if (objs[i] instanceof IVectorLayer) {
+            final IVectorLayer layer = (IVectorLayer) objs[i];
+            if (layer.getShapeType() != IVectorLayer.SHAPE_TYPE_WRONG) {
+               if ((layer.getShapeType() == shapeType) || (shapeType == SHAPE_TYPE_ANY)) {
+                  list.add(objs[i]);
+               }
+            }
+         }
+      }
+
+      final IVectorLayer[] layers = new IVectorLayer[list.size()];
+      for (int i = 0; i < layers.length; i++) {
+         layers[i] = (IVectorLayer) list.get(i);
+      }
+
+      return layers;
+
+   }
+
+
+   public ITable[] getTables() {
+
+      final ArrayList list = new ArrayList();
+
+      final Object[] objs = getDataObjects();
+
+      for (int i = 0; i < objs.length; i++) {
+         if (objs[i] instanceof ITable) {
+            list.add(objs[i]);
+         }
+      }
+
+      final ITable[] tables = new ITable[list.size()];
+      for (int i = 0; i < tables.length; i++) {
+         tables[i] = (ITable) list.get(i);
+      }
+
+      return tables;
+
+   }
+
+
+   public IDataObject[] getDataObjects() {
+
+      return m_Objects;
+
+   }
+
+
+   public IDataObject getInputFromName(final String sName) {
+
+      for (int i = 0; i < m_Objects.length; i++) {
+         if (m_Objects[i].getName().equals(sName)) {
+            return m_Objects[i];
+         }
+      }
+
+      return null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AbstractInputFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AnalysisExtent.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AnalysisExtent.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AnalysisExtent.java	(revision 369)
@@ -0,0 +1,688 @@
+
+
+package es.unex.sextante.core;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.rasterWrappers.Grid3DCell;
+import es.unex.sextante.rasterWrappers.GridCell;
+
+
+/**
+ * This class defines an output region (extent coordinates and cellsize)
+ * 
+ * @author Victor Olaya
+ * 
+ */
+public class AnalysisExtent {
+
+   //these values are cell border coordinates, not centered ones
+   double m_dXMin      = 0;
+   double m_dYMin      = 0;
+   double m_dZMin      = 0;
+   double m_dXMax      = 0;
+   double m_dYMax      = 0;
+   double m_dZMax      = 0;
+   double m_dCellSize  = 1;
+   double m_dCellSizeZ = 1;
+   int    m_iNX;
+   int    m_iNY;
+   int    m_iNZ;
+
+   public AnalysisExtent() {
+   }
+
+
+   /**
+    * Creates a new grid extent using the extent of a layer. If it is a raster layer, it will also use its cellsize. If it is a 3d
+    * raster layer, it will use its z values
+    * 
+    * @param layer
+    *                a layer
+    */
+   public AnalysisExtent(final ILayer layer) {
+
+      m_dXMin = layer.getFullExtent().getMinX();
+      m_dXMax = layer.getFullExtent().getMaxX();
+      m_dYMin = layer.getFullExtent().getMinY();
+      m_dYMax = layer.getFullExtent().getMaxY();
+
+      if (layer instanceof IRasterLayer) {
+         final IRasterLayer rasterLayer = (IRasterLayer) layer;
+         m_dCellSize = rasterLayer.getLayerGridExtent().getCellSize();
+         recalculateNXAndNY();
+      }
+      else if (layer instanceof I3DRasterLayer) {
+         final I3DRasterLayer raster3DLayer = (I3DRasterLayer) layer;
+         m_dZMin = raster3DLayer.getLayerExtent().getZMin();
+         m_dZMax = raster3DLayer.getLayerExtent().getZMax();
+         m_dCellSizeZ = raster3DLayer.getCellSizeZ();
+         recalculateNZ();
+      }
+
+   }
+
+
+   /**
+    * Sets a new range for X coordinates. Coordinates are not center cell ones, but border ones
+    * 
+    * @param dXMin
+    *                the minimum x coordinate of the extent.
+    * @param dXMax
+    *                the maximum x coordinate of the extent
+    * @param bRecalculateWithCellsize
+    *                if this parameter is true, the range will be adapted to match the cellsize. Use this when you are working
+    *                with raster layers. Make sure that the cellsize has been set in advance.
+    */
+   public void setXRange(final double dXMin,
+                         final double dXMax,
+                         final boolean bRecalculateWithCellsize) {
+
+      m_dXMin = Math.min(dXMin, dXMax);
+      m_dXMax = Math.max(dXMin, dXMax);
+      if (bRecalculateWithCellsize) {
+         recalculateNXAndNY();
+      }
+
+   }
+
+
+   /**
+    * Sets a new range for Y coordinates. Coordinates are not center cell ones, but border ones
+    * 
+    * @param dYMin
+    *                the minimum Y coordinate of the extent.
+    * @param dYMax
+    *                the maximum Y coordinate of the extent
+    * @param bRecalculateWithCellsize
+    *                if this parameter is true, the range will be adapted to match the cellsize. Use this when you are working
+    *                with raster layers. Make sure that the cellsize has been set in advance.
+    */
+   public void setYRange(final double dYMin,
+                         final double dYMax,
+                         final boolean bRecalculateWithCellsize) {
+
+      m_dYMin = Math.min(dYMin, dYMax);
+      m_dYMax = Math.max(dYMin, dYMax);
+      if (bRecalculateWithCellsize) {
+         recalculateNXAndNY();
+      }
+
+   }
+
+
+   /**
+    * Sets a new range for Z coordinates. Coordinates are not center cell ones, but border ones
+    * 
+    * @param dZMin
+    *                the minimum z coordinate of the extent.
+    * @param dZMax
+    *                the maximum z coordinate of the extent
+    * @param bRecalculateWithCellsize
+    *                if this parameter is true, the range will be adapted to match the cellsize. Use this when you are working
+    *                with raster layers. Make sure that the cellsize has been set in advance.
+    */
+   public void setZRange(final double dZMin,
+                         final double dZMax,
+                         final boolean bRecalculateWithCellsize) {
+
+      m_dZMin = Math.min(dZMin, dZMax);
+      m_dZMax = Math.max(dZMin, dZMax);
+      if (bRecalculateWithCellsize) {
+         recalculateNZ();
+      }
+
+   }
+
+
+   /**
+    * Returns the cellsize of this extent
+    * 
+    * @return the cellsize of this extent
+    */
+   public double getCellSize() {
+
+      return m_dCellSize;
+
+   }
+
+
+   /**
+    * Sets a new cellsize for this extent
+    * 
+    * @param cellSize
+    *                the new cellsize
+    */
+   public void setCellSize(final double cellSize) {
+      if (cellSize <= 0) {
+        m_dCellSize = 1;
+      } else  {
+        m_dCellSize = cellSize;
+      }
+      recalculateNXAndNY();
+      
+   }
+
+
+   /**
+    * Returns the z cellsize of this extent
+    * 
+    * @return the z cellsize of this extent
+    */
+   public double getCellSizeZ() {
+
+      return m_dCellSizeZ;
+
+   }
+
+
+   /**
+    * Sets a new z cellsize for this extent
+    * 
+    * @param cellSize
+    *                the new cellsize
+    */
+   public void setCellSizeZ(final double cellSize) {
+
+      m_dCellSizeZ = cellSize;
+      recalculateNZ();
+
+   }
+
+
+   /**
+    * Returns the number of columns in the extent
+    * 
+    * @return the number of columns
+    */
+   public int getNX() {
+
+      return m_iNX;
+
+   }
+
+
+   /**
+    * Returns the number of rows in the extent
+    * 
+    * @return the number of rows
+    */
+   public int getNY() {
+
+      return m_iNY;
+
+   }
+
+
+   /**
+    * Returns the number of rows in the extent
+    * 
+    * @return the number of rows
+    */
+   public int getNZ() {
+
+      return m_iNZ;
+
+   }
+
+
+   private void recalculateNXAndNY() {
+
+      m_iNY = (int) Math.floor((m_dYMax - m_dYMin) / m_dCellSize);
+      m_iNX = (int) Math.floor((m_dXMax - m_dXMin) / m_dCellSize);
+      m_dXMax = m_dXMin + m_dCellSize * m_iNX;
+      m_dYMax = m_dYMin + m_dCellSize * m_iNY;
+
+   }
+
+
+   private void recalculateNZ() {
+
+      m_iNZ = (int) Math.floor((m_dZMax - m_dZMin) / m_dCellSizeZ);
+      m_dZMax = m_dZMin + m_dCellSizeZ * m_iNZ;
+
+   }
+
+
+   /**
+    * Return the minimum x coordinate of the extent. For raster layers, this is not the coordinate of the center of the left-most
+    * cell, but the the coordinate of its left border
+    * 
+    * @return the minimum x coordinate of the extent
+    */
+   public double getXMin() {
+
+      return m_dXMin;
+
+   }
+
+
+   /**
+    * Return the maximum x coordinate of the extent. For raster layers, this is not the coordinate of the center of the right-most
+    * cell, but the the coordinate of its right border
+    * 
+    * @return the maximum x coordinate of the extent
+    */
+   public double getXMax() {
+
+      return m_dXMax;
+
+   }
+
+
+   /**
+    * Return the minimum x coordinate of the extent. For raster layers, this is not the coordinate of the center of the lower
+    * cell, but the the coordinate of its lower border
+    * 
+    * @return the minimum y coordinate of the extent
+    */
+   public double getYMin() {
+
+      return m_dYMin;
+
+   }
+
+
+   /**
+    * Return the maximum y coordinate of the extent. For raster layers, this is not the coordinate of the center of the upper
+    * cell, but the the coordinate of its upper border
+    * 
+    * @return the maximum y coordinate of the extent
+    */
+   public double getYMax() {
+
+      return m_dYMax;
+
+   }
+
+
+   /**
+    * Return the minimum z coordinate of the extent. For raster layers, this is not the coordinate of the center of the lower
+    * cell, but the the coordinate of its lower border
+    * 
+    * @return the minimum y coordinate of the extent
+    */
+   public double getZMin() {
+
+      return m_dZMin;
+
+   }
+
+
+   /**
+    * Return the maximum z coordinate of the extent. For raster layers, this is not the coordinate of the center of the upper
+    * cell, but the the coordinate of its upper border
+    * 
+    * @return the maximum z coordinate of the extent
+    */
+   public double getZMax() {
+
+      return m_dZMax;
+
+   }
+
+
+   /**
+    * Returns the real X distance spanned by this extent
+    * 
+    * @return the real X distance spanned by this extent
+    */
+   public double getWidth() {
+
+      return m_dXMax - m_dXMin;
+
+   }
+
+
+   /**
+    * Returns the real Y distance spanned by this extent
+    * 
+    * @return the real Y distance spanned by this extent
+    */
+   public double getLength() {
+
+      return m_dYMax - m_dYMin;
+
+   }
+
+
+   /**
+    * Returns the real Z distance spanned by this extent
+    * 
+    * @return the real Z distance spanned by this extent
+    */
+   public double getHeight() {
+
+      return m_dZMax - m_dZMin;
+
+   }
+
+
+   /**
+    * Returns true if the given point falls within the area covered by this extent
+    * 
+    * @param x
+    *                the x coordinate of the point
+    * @param y
+    *                the y coordinate of the point
+    * @return whether the given point falls within the XY area covered by this extent
+    */
+   public boolean contains(final double x,
+                           final double y) {
+
+      return ((x >= m_dXMin) && (x <= m_dXMax) && (y >= m_dYMin) && (y <= m_dYMax));
+
+   }
+
+
+   /**
+    * Returns true if the given point falls within the area covered by this extent
+    * 
+    * @param x
+    *                the x coordinate of the point
+    * @param y
+    *                the y coordinate of the point
+    * @param z
+    *                the z coordinate of the point
+    * 
+    * @return whether the given point falls within the volume covered by this extent
+    */
+   public boolean contains(final double x,
+                           final double y,
+                           final double z) {
+
+      return ((x >= m_dXMin) && (x <= m_dXMax) && (y >= m_dYMin) && (y <= m_dYMax) && (x >= m_dZMin) && (x <= m_dZMax));
+
+   }
+
+
+   /**
+    * Returns true if the given extent matches the grid defined by this extent extent (has same size and cell boundaries match)
+    * 
+    * @param extent
+    * @return whether the passed extent fits into this extent
+    */
+   public boolean fitsIn(final AnalysisExtent extent) {
+
+      boolean bFitsX, bFitsY, bFitsZ;
+      double dOffset;
+      double dOffsetCols;
+      double dOffsetRows;
+      double dOffsetZ;
+      final double MIN_DIF = 0.00001;
+
+      if (extent.getCellSize() != this.getCellSize()) {
+         return false;
+      }
+      dOffset = Math.abs(extent.getXMin() - this.getXMin());
+      dOffsetCols = dOffset / this.getCellSize();
+      bFitsX = (dOffsetCols - Math.floor(dOffsetCols + 0.5) < MIN_DIF);
+
+      dOffset = Math.abs(extent.getYMax() - this.getYMax());
+      dOffsetRows = dOffset / this.getCellSize();
+      bFitsY = (Math.abs(dOffsetRows - Math.floor(dOffsetRows + 0.5)) < MIN_DIF);
+
+      dOffset = Math.abs(extent.getZMax() - this.getZMax());
+      dOffsetZ = dOffset / this.getCellSizeZ();
+      bFitsZ = (Math.abs(dOffsetZ - Math.floor(dOffsetZ + 0.5)) < MIN_DIF);
+
+      return bFitsX && bFitsY && bFitsZ;
+
+   }
+
+
+   /**
+    * Returns true if this extent has the same characteristics as a given one
+    * 
+    * @param extent
+    * @return whether this extent equals the given extent
+    */
+   public boolean equals(final AnalysisExtent extent) {
+
+      return (m_dXMin == extent.getXMin()) && (m_dXMax == extent.getXMax()) && (m_dYMin == extent.getYMin())
+             && (m_dYMax == extent.getYMax()) && (m_dCellSize == extent.getCellSize()) && (m_dZMin == extent.getZMin())
+             && (m_dZMax == extent.getZMax()) && (m_dCellSizeZ == extent.getCellSizeZ());
+
+   }
+
+
+   /**
+    * Modifies this extent to incorporate another one into its boundaries
+    * 
+    * @param extent
+    *                the extent to add
+    */
+   public void addExtent(final AnalysisExtent extent) {
+
+      m_dXMin = Math.min(extent.getXMin(), m_dXMin);
+      m_dXMax = Math.max(extent.getXMax(), m_dXMax);
+      m_dYMin = Math.min(extent.getYMin(), m_dYMin);
+      m_dYMax = Math.max(extent.getYMax(), m_dYMax);
+      m_dZMin = Math.min(extent.getZMin(), m_dZMin);
+      m_dZMax = Math.max(extent.getZMax(), m_dZMax);
+      m_dCellSize = Math.min(extent.getCellSize(), m_dCellSize);
+      m_dCellSizeZ = Math.min(extent.getCellSizeZ(), m_dCellSizeZ);
+      recalculateNXAndNY();
+      recalculateNZ();
+
+   }
+
+
+   /**
+    * Modifies this extent to incorporate another one into its boundaries
+    * 
+    * @param extent
+    *                the extent to add
+    */
+   public void addExtent(final Rectangle2D extent) {
+
+      m_dXMin = Math.min(extent.getMinX(), m_dXMin);
+      m_dXMax = Math.max(extent.getMaxX(), m_dXMax);
+      m_dYMin = Math.min(extent.getMinY(), m_dYMin);
+      m_dYMax = Math.max(extent.getMaxY(), m_dYMax);
+      recalculateNXAndNY();
+
+   }
+
+
+   /**
+    * Converts a world coordinate to grid coordinates
+    * 
+    * @param pt
+    *                a point in world coordinates
+    * @return a grid cell with coordinates of the given point in grid coordinates referred to this grid extent
+    */
+   public GridCell getGridCoordsFromWorldCoords(final Point2D pt) {
+
+      final int x = (int) Math.floor((pt.getX() - m_dXMin) / m_dCellSize);
+      final int y = (int) Math.floor((m_dYMax - pt.getY()) / m_dCellSize);
+
+      final GridCell cell = new GridCell(x, y, 0.0);
+
+      return cell;
+
+   }
+
+
+   /**
+    * Converts a world coordinate to grid coordinates
+    * 
+    * @param x
+    *                the x coordinate of the point
+    * @param y
+    *                the y coordinate of the point
+    * @return a grid cell representing the given point in grid coordinates referred to this grid extent
+    */
+   public GridCell getGridCoordsFromWorldCoords(final double x,
+                                                final double y) {
+
+      return getGridCoordsFromWorldCoords(new Point2D.Double(x, y));
+
+   }
+
+
+   public Grid3DCell getGridCoordsFromWorldCoords(final double x,
+                                                  final double y,
+                                                  final double z) {
+
+      final int iX = (int) Math.floor((x - m_dXMin) / m_dCellSize);
+      final int iY = (int) Math.floor((m_dYMax - y) / m_dCellSize);
+      final int iZ = (int) Math.floor((z - m_dZMin) / m_dCellSizeZ);
+
+      final Grid3DCell cell = new Grid3DCell(iX, iY, iZ, 0.0);
+
+      return cell;
+
+   }
+
+
+   /**
+    * /** Converts a grid cell into a world coordinate representing the center of that cell
+    * 
+    * @param cell
+    *                the cell to convert
+    * @return a point representing the given cell in world coordinates
+    */
+   public Point2D getWorldCoordsFromGridCoords(final GridCell cell) {
+
+      final double x = m_dXMin + (cell.getX() + 0.5) * m_dCellSize;
+      final double y = m_dYMax - (cell.getY() + 0.5) * m_dCellSize;
+
+      final Point2D pt = new Point2D.Double(x, y);
+
+      return pt;
+
+   }
+
+
+   /**
+    * Converts a grid cell into a world coordinate representing the center of that cell
+    * 
+    * @param x
+    *                the x coordinate (col) of the cell
+    * @param y
+    *                the y coordinate (row) of the cell
+    * @return a point representing the given cell in world coordinates
+    */
+   public Point2D getWorldCoordsFromGridCoords(final int x,
+                                               final int y) {
+
+      return getWorldCoordsFromGridCoords(new GridCell(x, y, 0));
+
+   }
+
+
+   /**
+    * Converts a grid cell into a world coordinate representing the center of that cell
+    * 
+    * @param x
+    *                the x coordinate of the cell
+    * @param y
+    *                the y coordinate of the cell
+    * @param z
+    *                the z coordinate of the cell
+    * 
+    * @return a coordinate representing the given cell in world coordinates
+    */
+   public Coordinate getWorldCoordsFromGridCoords(final int x,
+                                                  final int y,
+                                                  final int z) {
+
+      final double dX = m_dXMin + (x + 0.5) * m_dCellSize;
+      final double dY = m_dYMax - (y + 0.5) * m_dCellSize;
+      final double dZ = m_dZMin + (y + 0.5) * m_dCellSizeZ;
+
+      final Coordinate coord = new Coordinate(dX, dY, dZ);
+
+      return coord;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      final String s = Double.toString(m_dXMin) + ", " + Double.toString(m_dYMin) + ", " + Double.toString(m_dZMin) + ", "
+                       + Double.toString(m_dXMax) + ", " + Double.toString(m_dYMax) + ", " + Double.toString(m_dZMax) + ", "
+                       + Double.toString(m_dCellSize) + ", " + Double.toString(m_dCellSizeZ);
+
+      return s;
+
+   }
+
+
+   /**
+    * Enlarges this grid extent one cell in each direction (only X and Y)
+    */
+   public void enlargeOneCell() {
+
+      m_dYMin = m_dYMin - m_dCellSize;
+      m_dXMin = m_dXMin - m_dCellSize;
+      m_dXMax = m_dXMax + m_dCellSize;
+      m_dYMax = m_dYMax + m_dCellSize;
+      this.recalculateNXAndNY();
+
+   }
+
+
+   /**
+    * Returns this extent as a Java Rectangle2D. Z coordinates are neglected
+    * 
+    * @return the boundary of this extent a Java Rectangle2D
+    */
+   public Rectangle2D getAsRectangle2D() {
+
+      final Rectangle2D rect = new Rectangle2D.Double();
+      rect.setRect(m_dXMin, m_dYMin, m_dXMax - m_dXMin, m_dYMax - m_dYMin);
+
+      return rect;
+
+   }
+
+
+   /**
+    * Returns true if the cell is within the limits of this grid extent
+    * 
+    * @param x
+    *                the x coordinate (col) of the cell
+    * @param y
+    *                the y coordinate (row) of the cell
+    * @return whether the cell is within the limits of this grid extent
+    */
+   public boolean containsCell(final int x,
+                               final int y) {
+
+      return (x >= 0) && (x < m_iNX) && (y >= 0) && (y < m_iNY);
+
+   }
+
+
+   /**
+    * Return this extent as a JTS Polygon
+    * 
+    * @return this extent as a JTS polygon
+    */
+   public Geometry getAsJTSGeometry() {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final Coordinate[] coords = new Coordinate[5];
+      coords[0] = new Coordinate(m_dXMin, m_dYMin);
+      coords[1] = new Coordinate(m_dXMax, m_dYMin);
+      coords[2] = new Coordinate(m_dXMax, m_dYMax);
+      coords[3] = new Coordinate(m_dXMin, m_dYMax);
+      coords[4] = new Coordinate(m_dXMin, m_dYMin);
+      final Geometry geom = gf.createPolygon(gf.createLinearRing(coords), null);
+
+      return geom;
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/AnalysisExtent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/NamedExtent.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/NamedExtent.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/NamedExtent.java	(revision 369)
@@ -0,0 +1,61 @@
+package es.unex.sextante.core;
+
+import java.awt.geom.Rectangle2D;
+
+/**
+ * A class representing an extent with an associated description
+ *
+ * @author volaya
+ *
+ */
+public class NamedExtent {
+
+   private Rectangle2D m_Extent;
+   private String      m_sName;
+
+
+   public NamedExtent(final String sName,
+                      final Rectangle2D extent) {
+
+      m_sName = sName;
+      m_Extent = extent;
+
+   }
+
+
+   public Rectangle2D getExtent() {
+
+      return m_Extent;
+
+   }
+
+
+   public void setExtent(final Rectangle2D extent) {
+
+      m_Extent = extent;
+
+   }
+
+
+   public String getsName() {
+
+      return m_sName;
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sName;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/NamedExtent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ParametersSet.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ParametersSet.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ParametersSet.java	(revision 369)
@@ -0,0 +1,1800 @@
+package es.unex.sextante.core;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo3DRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.additionalInfo.AdditionalInfoPoint;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableFilter;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.OptionalParentParameterException;
+import es.unex.sextante.exceptions.RepeatedParameterNameException;
+import es.unex.sextante.exceptions.UndefinedParentParameterNameException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.Parameter3DRasterLayer;
+import es.unex.sextante.parameters.ParameterBand;
+import es.unex.sextante.parameters.ParameterBoolean;
+import es.unex.sextante.parameters.ParameterFilepath;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterNumericalValue;
+import es.unex.sextante.parameters.ParameterPoint;
+import es.unex.sextante.parameters.ParameterRasterLayer;
+import es.unex.sextante.parameters.ParameterSelection;
+import es.unex.sextante.parameters.ParameterString;
+import es.unex.sextante.parameters.ParameterTable;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.ParameterTableFilter;
+import es.unex.sextante.parameters.ParameterVectorLayer;
+
+/**
+ * Set of parameters needed by a GeoAlgorithm. This set is used to specify the requirements of the algorithm and to create a
+ * suitable GUI to get the required information from the user, among other tasks.
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public class ParametersSet {
+
+   private final ArrayList m_Parameters;
+
+
+   public ParametersSet() {
+
+      m_Parameters = new ArrayList();
+   }
+
+
+   /**
+    *
+    * @return the number of parameters in the set
+    */
+   public int getNumberOfParameters() {
+
+      return m_Parameters.size();
+
+   }
+
+
+   /**
+    * Returns the number of parameters of type raster layer. This does not include multiple inputs of this same type
+    *
+    * @return the number of parameters requiring raster layers
+    *
+    */
+
+   public int getNumberOfRasterLayers() {
+
+      return getNumberOfRasterLayers(false);
+
+   }
+
+
+   /**
+    *
+    * @return the number of parameters requiring raster layers
+    *
+    */
+   public int getNumberOfRasterLayers(final boolean includeMultipleInputs) {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Parameter parameter = (Parameter) m_Parameters.get(i);
+
+         if (parameter.getParameterTypeName().equals("Raster Layer")) {
+            iCount++;
+            continue;
+         }
+         // Also counts Multiples Raster Inputs (for GUI representation)
+         if (includeMultipleInputs && (parameter instanceof ParameterMultipleInput)) {
+            final ParameterMultipleInput param = ((ParameterMultipleInput) parameter);
+            try {
+               final int ai = ((AdditionalInfoMultipleInput) param.getParameterAdditionalInfo()).getDataType();
+               if (ai == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+                  iCount++;
+                  continue;
+               }
+               if (ai == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+                  iCount++;
+                  continue;
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               // TODO Auto-generated catch block
+               e.printStackTrace();
+            }
+         }
+      }
+
+      return iCount;
+   }
+
+
+   /**
+    * Returns the number of parameters of type vector layer. This does not include multiple inputs of this same type
+    *
+    * @return the number of parameters requiring vector layers
+    *
+    */
+   public int getNumberOfVectorLayers() {
+
+      return getNumberOfVectorLayers(false);
+
+   }
+
+
+   /**
+    * Returns the number of parameters of type vector layer.
+    *
+    * @return the number of parameters requiring vector layers
+    *
+    */
+   public int getNumberOfVectorLayers(final boolean includeMultiInputs) {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Parameter parameter = (Parameter) m_Parameters.get(i);
+         if (parameter.getParameterTypeName().equals("Vector Layer")) {
+            iCount++;
+            continue;
+         }
+
+         if (includeMultiInputs && (parameter instanceof ParameterMultipleInput)) {
+            final ParameterMultipleInput param = ((ParameterMultipleInput) parameter);
+            try {
+               final int ai = ((AdditionalInfoMultipleInput) param.getParameterAdditionalInfo()).getDataType();
+               if ((ai == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)
+                   || (ai == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE)
+                   || (ai == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT)
+                   || (ai == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON)) {
+                  iCount++;
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               // TODO Auto-generated catch block
+               e.printStackTrace();
+            }
+         }
+      }
+      return iCount;
+   }
+
+
+   /**
+    *
+    * @param shapeType
+    *                the type of shape for single input parameter
+    * @param dataType
+    *                the type of shape for multiple input parameters
+    * @return the number of mandatory parameters including a specific kind of vector layers
+    */
+   private int getNumberOfSpecificVectorLayers(final int shapeType,
+                                               final int dataType) {
+
+      int iCount = 0;
+      boolean bMandatory;
+      int iDataType;
+      int iShapeType;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Vector Layer")) {
+            try {
+               iShapeType = ((AdditionalInfoVectorLayer) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo()).getShapeType();
+               bMandatory = ((AdditionalInfoVectorLayer) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo()).getIsMandatory();
+               if ((iShapeType == shapeType) && bMandatory) {
+                  iCount++;
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+         else if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Multiple Input")) {
+            try {
+               iDataType = ((AdditionalInfoMultipleInput) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo()).getDataType();
+               bMandatory = ((AdditionalInfoMultipleInput) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo()).getIsMandatory();
+               if ((iDataType == dataType) && bMandatory) {
+                  iCount++;
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+      return iCount;
+   }
+
+
+   /**
+    *
+    * @return the number of mandatory parameters requiring point vector layers
+    */
+   public int getNumberOfPointVectorLayers() {
+
+      return getNumberOfSpecificVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POINT,
+               AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT);
+
+   }
+
+
+   /**
+    *
+    * @return the number of mandatory parameters requiring line vector layers
+    */
+   public int getNumberOfLineVectorLayers() {
+
+      return getNumberOfSpecificVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_LINE,
+               AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE);
+
+   }
+
+
+   /**
+    *
+    * @return the number of mandatory parameters requiring polygon vector layers
+    */
+   public int getNumberOfPolygonVectorLayers() {
+
+      return getNumberOfSpecificVectorLayers(AdditionalInfoVectorLayer.SHAPE_TYPE_POLYGON,
+               AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON);
+
+   }
+
+
+   /**
+    * Returns the number of parameters of type table. This does not include multiple inputs of this same type
+    *
+    * @return the number of parameters of type table
+    */
+   public int getNumberOfTables() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table")) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+   }
+
+
+   /**
+    * Returns the number of parameters of type 3D raster layer
+    *
+    * @return the number of parameters of type 3D raster layer
+    */
+   public int getNumberOf3DRasterLayers() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("3D Raster Layer")) {
+            iCount++;
+         }
+      }
+
+      return iCount;
+   }
+
+
+   /**
+    * Returns the number of parameters of type different of Table, Vector or Raster.
+    *
+    * @return the number of parameters of type different of Table, Vector or Raster.
+    */
+   public int getNumberOfNoDataParameters() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Object parameter = m_Parameters.get(i);
+         if (parameter instanceof ParameterNumericalValue) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterString) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterSelection) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterFixedTable) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterPoint) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterBoolean) {
+            iCount++;
+            continue;
+         }
+         if (parameter instanceof ParameterFilepath) {
+            iCount++;
+            continue;
+         }
+      }
+      return iCount;
+   }
+
+
+   /**
+    * Returns the number of TableFields Parameters
+    *
+    * @return the number of parameters of TableFields.
+    */
+   public int getNumberOfTableFieldsParameters() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Object parameter = m_Parameters.get(i);
+         if (parameter instanceof ParameterTableField) {
+            iCount++;
+            continue;
+         }
+      }
+      return iCount;
+   }
+
+   /**
+    * Returns the number of TableFilter Parameters
+    *
+    * @return the number of parameters of TableFilter.
+    */
+   public int getNumberOfTableFilterParameters() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Object parameter = m_Parameters.get(i);
+         if (parameter instanceof ParameterTableFilter) {
+            iCount++;
+            continue;
+         }
+      }
+      return iCount;
+   }
+   
+   /**
+    * Returns the number of Bands Parameters
+    *
+    * @return the number of parameters of Bands.
+    */
+   public int getNumberOfBandsParameters() {
+
+      int iCount = 0;
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Object parameter = m_Parameters.get(i);
+         if (parameter instanceof ParameterBand) {
+            iCount++;
+            continue;
+         }
+      }
+      return iCount;
+   }
+
+
+   /**
+    * Returns true if the set contains parameters other than tables or layers
+    *
+    * @return true if the set contains parameters other than tables or layers (vector or raster)
+    */
+   public boolean requiresNonDataObjects() {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Vector Layer")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Raster Layer")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Multiple Input")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table Field")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("3D Raster Layer")
+             || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Band")) {}
+         else {
+            return true;
+         }
+      }
+
+      return false;
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring raster layers
+    *
+    * @return true if the set contains parameters requiring raster layers
+    */
+   public boolean requiresRasterLayers() {
+
+      if (getNumberOfRasterLayers() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_RASTER, true)
+          || requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_BAND, true)) {
+         return true;
+      }
+
+      return false;
+
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring 3D raster layers
+    *
+    * @return true if the set contains parameters requiring 3D raster layers
+    */
+   public boolean requires3DRasterLayers() {
+
+      return (getNumberOf3DRasterLayers() > 0);
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring multiple raster layers
+    *
+    * @return true if the set contains parameters requiring multiple raster layers
+    */
+   public boolean requiresMultipleRasterLayers() {
+
+      return requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_RASTER, false);
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring multiple vector layers
+    *
+    * @return true if the set contains parameters requiring multiple vector layers
+    */
+   public boolean requiresMultipleVectorLayers() {
+
+      return requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY, false)
+             || requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE, false)
+             || requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT, false)
+             || requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON, false);
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring multiple tables
+    *
+    * @return true if the set contains parameters requiring multiple tables
+    */
+   public boolean requiresMultipleTables() {
+
+      return requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_TABLE, false);
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring multiple raster bands
+    *
+    * @return true if the set contains parameters requiring multiple raster bands
+    */
+   public boolean requiresMultipleRasterBands() {
+
+      return requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_BAND, false);
+
+   }
+
+
+   /**
+    *
+    * @param iType
+    *                the type of multiple input to check, as defined in
+    * @see {@link AdditionalInfoMultipleInput}.
+    * @param bOnlyMandatory
+    *                true if should consider only mandatory inputs
+    * @return returns true if the set contain parameters requiring multiple inputs of the specified type.
+    */
+   private boolean requiresMultipleInputOfType(final int iType,
+                                               boolean bOnlyMandatory) {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Multiple Input")) {
+            try {
+               final AdditionalInfoMultipleInput ai = (AdditionalInfoMultipleInput) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo();
+               if (ai.getDataType() == iType) {
+                  if (ai.getIsMandatory() || !bOnlyMandatory) {
+                     return true;
+                  }
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if there is any parameter in the set requiring a single raster band
+    *
+    * @return true if there is any parameter in the set requiring a single raster band
+    */
+   public boolean requiresRasterBands() {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Band")) {
+            return true;
+         }
+      }
+
+      return false;
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring vector layers
+    *
+    * @return true if the set contains parameters requiring vector layers
+    */
+   public boolean requiresVectorLayers() {
+
+      if (getNumberOfVectorLayers() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY, true)) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring point vector layers
+    *
+    * @return true if the set contains parameters requiring point vector layers
+    */
+   public boolean requiresPointVectorLayers() {
+
+      if (getNumberOfPointVectorLayers() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT, true)) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring line vector layers
+    *
+    * @return true if the set contains parameters requiring line vector layers
+    */
+   public boolean requiresLineVectorLayers() {
+
+      if (getNumberOfLineVectorLayers() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE, true)) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring polygon vector layers
+    *
+    * @return true if the set contains parameters requiring polygon vector layers
+    */
+   public boolean requiresPolygonVectorLayers() {
+
+      if (getNumberOfPolygonVectorLayers() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON, true)) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains parameters requiring tables
+    *
+    * @return true if the set contains parameters requiring tables
+    */
+   public boolean requiresTables() {
+
+      if (getNumberOfTables() > 0) {
+         return true;
+      }
+
+      if (requiresMultipleInputOfType(AdditionalInfoMultipleInput.DATA_TYPE_TABLE, true)) {
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains fixed table parameters
+    *
+    * @return true if the set contains parameters requiring fixed tables
+    */
+   public boolean requiresFixedTables() {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Fixed Table")) {
+            return true;
+         }
+      }
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains table fields parameters
+    *
+    * @return true if the set contains table fields that depend on other fields.
+    */
+   public boolean requiresTableFields() {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table Field")) {
+            return true;
+         }
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Returns true if the set contains point parameters.
+    *
+    * @return true if the set contains point parameters.
+    */
+   public boolean requiresPoints() {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Point")) {
+            return true;
+         }
+      }
+
+      return false;
+
+   }
+
+
+   /**
+    * Adds a new parameter to the set
+    *
+    * @param parameter
+    *                a parameter
+    * @return true if the parameter was added
+    * @throws RepeatedParameterNameException
+    *                 if already exists a parameter in the set with the same name
+    */
+   public boolean addParameter(final Parameter parameter) throws RepeatedParameterNameException {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Parameter param = (Parameter) m_Parameters.get(i);
+         if (param.getParameterName().equals(parameter.getParameterName())) {
+            throw new RepeatedParameterNameException();
+         }
+      }
+
+      return m_Parameters.add(parameter);
+
+   }
+
+
+   /**
+    *
+    * @param parameter
+    *                a parameter
+    * @throws WrongParameterIDException
+    *                 if the parameter does not exist in the set
+    */
+   public void removeParameter(final Parameter parameter) throws WrongParameterIDException {
+
+
+      removeParameter(parameter.getParameterName());
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the parameter name
+    * @throws WrongParameterIDException
+    *                 if no parameter with the specified name exists in the set
+    */
+   public void removeParameter(final String sParameterName) throws WrongParameterIDException {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterName().equals(sParameterName)) {
+            m_Parameters.remove(i);
+            return;
+         }
+      }
+
+      throw new WrongParameterIDException();
+
+   }
+
+
+   /**
+    *
+    * @param paramClass
+    *                the class of the parameters to retrieve
+    * @return an arrayList with all parameters of the given class
+    */
+   public ArrayList getParametersOfType(final Class paramClass) {
+
+      int i;
+      final ArrayList list = new ArrayList();
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         final Parameter param = (Parameter) m_Parameters.get(i);
+         if (param.getClass().equals(paramClass)) {
+            list.add(param);
+         }
+      }
+
+      return list;
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the parameter
+    * @throws WrongParameterIDException
+    *                 if no parameter with the specified name exists in the set
+    */
+   public Parameter getParameter(final String sParameterName) throws WrongParameterIDException {
+
+      int i;
+
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterName().equals(sParameterName)) {
+            return ((Parameter) m_Parameters.get(i));
+         }
+      }
+
+      throw new WrongParameterIDException();
+
+   }
+
+
+   /**
+    *
+    * @param iIndex
+    *                the index of the parameter in the set
+    * @return the parameter
+    * @throws ArrayIndexOutOfBoundsException
+    *                 if iIndex is not a valid array index
+    */
+   public Parameter getParameter(final int iIndex) throws ArrayIndexOutOfBoundsException {
+
+      if ((iIndex >= 0) && (iIndex < m_Parameters.size())) {
+         return (Parameter) m_Parameters.get(iIndex);
+      }
+      else {
+         throw new ArrayIndexOutOfBoundsException();
+      }
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the parameter as an object
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public Object getParameterValueAsObject(final String sParameterName) throws WrongParameterTypeException,
+                                                                       WrongParameterIDException, NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsObject();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the int value of the parameter
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to an int value
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public int getParameterValueAsInt(final String sParameterName) throws WrongParameterTypeException, WrongParameterIDException,
+                                                                 NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsInt();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as double
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to a double value
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public double getParameterValueAsDouble(final String sParameterName) throws WrongParameterTypeException,
+                                                                       WrongParameterIDException, NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsDouble();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a Point2D object
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to a Point2D value
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public Point2D getParameterValueAsPoint(final String sParameterName) throws WrongParameterTypeException,
+                                                                       WrongParameterIDException, NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsPoint();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the boolean value of the parameter
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to a boolean value
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public boolean getParameterValueAsBoolean(final String sParameterName) throws WrongParameterTypeException,
+                                                                         WrongParameterIDException, NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsBoolean();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return an array with the value(s) of the parameter
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to an ArrayList
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public ArrayList getParameterValueAsArrayList(final String sParameterName) throws WrongParameterTypeException,
+                                                                             WrongParameterIDException,
+                                                                             NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsArrayList();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a string
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be cast to a string
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public String getParameterValueAsString(final String sParameterName) throws WrongParameterTypeException,
+                                                                       WrongParameterIDException, NullParameterValueException,
+                                                                       NullParameterAdditionalInfoException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsString();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a vector layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be converted to a vector layer
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public IVectorLayer getParameterValueAsVectorLayer(final String sParameterName) throws WrongParameterTypeException,
+                                                                                  WrongParameterIDException,
+                                                                                  NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsVectorLayer();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a raster layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be converted to a raster layer
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public IRasterLayer getParameterValueAsRasterLayer(final String sParameterName) throws WrongParameterTypeException,
+                                                                                  WrongParameterIDException,
+                                                                                  NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsRasterLayer();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a 3D raster layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be converted to a 3D raster layer
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public I3DRasterLayer getParameterValueAs3DRasterLayer(final String sParameterName) throws WrongParameterTypeException,
+                                                                                      WrongParameterIDException,
+                                                                                      NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAs3DRasterLayer();
+
+   }
+
+
+   /**
+    *
+    * @param sParameterName
+    *                the name of the parameter
+    * @return the value of the parameter as a table
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be converted to a table
+    * @throws WrongParameterIDException
+    *                 if no parameter with that name exists in the set
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public ITable getParameterValueAsTable(final String sParameterName) throws WrongParameterTypeException,
+                                                                      WrongParameterIDException, NullParameterValueException {
+
+      Parameter parameter;
+      parameter = getParameter(sParameterName);
+
+      return parameter.getParameterValueAsTable();
+
+   }
+
+
+   /**
+    * Adds a vector layer to the parameter set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param iShapeType
+    *                the type of shapes
+    * @param bIsMandatory
+    *                true if it is not an optional layer
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addInputVectorLayer(final String sName,
+                                   final String sDescription,
+                                   final int iShapeType,
+                                   final boolean bIsMandatory) throws RepeatedParameterNameException {
+
+      final AdditionalInfoVectorLayer additionalInfo = new AdditionalInfoVectorLayer(iShapeType, bIsMandatory);
+      this.addInputVectorLayer(sName, sDescription, additionalInfo);
+    }
+
+    /**
+     * Adds a vector layer to the parameter set
+     *
+     * @param sName
+     *            the name of the parameter
+     * @param sDescription
+     *            the description of the parameter
+     * @param additionalInfo
+     * @throws RepeatedParameterNameException
+     *             if a parameter with the same name already exists in the set
+     */
+    public void addInputVectorLayer(final String sName, final String sDescription,
+        final AdditionalInfoVectorLayer additionalInfo) throws RepeatedParameterNameException {
+
+        final ParameterVectorLayer parameter = new ParameterVectorLayer();
+        parameter.setParameterName(sName);
+        parameter.setParameterDescription(sDescription);
+        parameter.setParameterAdditionalInfo(additionalInfo);
+        addParameter(parameter);
+
+    }
+
+
+   /*public void addOutputVectorLayer(String sName,
+   								 String sDescription,
+   								 int iShapeType)
+   		throws RepeatedParameterNameException{
+
+   	AdditionalInfoVectorLayer additionalInfo = new AdditionalInfoVectorLayer(iShapeType,
+   														 					true,
+   														 					true);
+
+   	StdExtParameterVectorLayer parameter = new StdExtParameterVectorLayer();
+   	parameter.setParameterName(sName);
+   	parameter.setParameterDescription(sDescription);
+   	parameter.setParameterAdditionalInfo(additionalInfo);
+
+   	_AddParameter(parameter);
+
+   }*/
+
+   /**
+    * Adds a raster layer to the parameter set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param bIsMandatory
+    *                true if it is not an optional layer
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addInputRasterLayer(final String sName,
+                                   final String sDescription,
+                                   final boolean bIsMandatory) throws RepeatedParameterNameException {
+
+      final AdditionalInfoRasterLayer additionalInfo = new AdditionalInfoRasterLayer(bIsMandatory);
+
+      final ParameterRasterLayer parameter = new ParameterRasterLayer();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a 3D raster layer to the parameter set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param bIsMandatory
+    *                true if it is not an optional layer
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addInput3DRasterLayer(final String sName,
+                                     final String sDescription,
+                                     final boolean bIsMandatory) throws RepeatedParameterNameException {
+
+      final AdditionalInfo3DRasterLayer additionalInfo = new AdditionalInfo3DRasterLayer(bIsMandatory);
+
+      final Parameter3DRasterLayer parameter = new Parameter3DRasterLayer();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a table to the parameter set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param bIsMandatory
+    *                true if it is not an optional table
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addInputTable(final String sName,
+                             final String sDescription,
+                             final boolean bIsMandatory) throws RepeatedParameterNameException {
+
+      final AdditionalInfoTable additionalInfo = new AdditionalInfoTable(bIsMandatory);
+
+      final ParameterTable parameter = new ParameterTable();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a multiple input the parameter set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param iDataType
+    *                the type of data required
+    * @param bIsMandatory
+    *                true if the number of selected elements cannot be zero
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addMultipleInput(final String sName,
+                                final String sDescription,
+                                final int iDataType,
+                                final boolean bIsMandatory) throws RepeatedParameterNameException {
+
+      final AdditionalInfoMultipleInput additionalInfo = new AdditionalInfoMultipleInput(iDataType, bIsMandatory);
+      final ParameterMultipleInput parameter = new ParameterMultipleInput();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a table field to the set. The table field is set as mandatory by default
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sParentParameterName
+    *                the name of the parent parameter (vector layer or table) to which this parameter is linked
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addTableField(final String sName,
+                             final String sDescription,
+                             final String sParentParameterName) throws RepeatedParameterNameException,
+                                                               UndefinedParentParameterNameException,
+                                                               OptionalParentParameterException {
+
+      addTableField(sName, sDescription, sParentParameterName, true);
+
+   }
+
+   public void addTableFilter(final String sName,
+                             final String sDescription,
+                             final String sParentParameterName,
+                             final boolean bIsMandatory) throws RepeatedParameterNameException,
+                                                        UndefinedParentParameterNameException, OptionalParentParameterException {
+
+      int i;
+      boolean bParentParameterFound = false;
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterName().equals(sParentParameterName)) {
+            if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table")
+                || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Vector Layer")) {
+               try {
+                  final AdditionalInfoDataObject parentAdditionalInfo = (AdditionalInfoDataObject) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo();
+                  if (parentAdditionalInfo.getIsMandatory()) {
+                     final AdditionalInfoTableFilter additionalInfo = new AdditionalInfoTableFilter(sParentParameterName,
+                              bIsMandatory);
+                     final ParameterTableFilter parameter = new ParameterTableFilter();
+                     parameter.setParameterName(sName);
+                     parameter.setParameterDescription(sDescription);
+                     parameter.setParameterAdditionalInfo(additionalInfo);
+                     addParameter(parameter);
+                     bParentParameterFound = true;
+                  }
+                  else {
+                     throw new OptionalParentParameterException();
+                  }
+               }
+               catch (final NullParameterAdditionalInfoException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+      }
+
+      if (!bParentParameterFound) {
+         throw new UndefinedParentParameterNameException();
+      }
+
+   }
+
+   /**
+    * Adds a table field to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sParentParameterName
+    *                the name of the parent parameter (vector layer or table) to which this parameter is linked
+    * @param bIsMandatory
+    *                true if the user must select a field. False if this is not necessary to execute the corresponding algorithm
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addTableField(final String sName,
+                             final String sDescription,
+                             final String sParentParameterName,
+                             final boolean bIsMandatory) throws RepeatedParameterNameException,
+                                                        UndefinedParentParameterNameException, OptionalParentParameterException {
+
+      int i;
+      boolean bParentParameterFound = false;
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterName().equals(sParentParameterName)) {
+            if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Table")
+                || ((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Vector Layer")) {
+               try {
+                  final AdditionalInfoDataObject parentAdditionalInfo = (AdditionalInfoDataObject) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo();
+                  if (parentAdditionalInfo.getIsMandatory()) {
+                     final AdditionalInfoTableField additionalInfo = new AdditionalInfoTableField(sParentParameterName,
+                              bIsMandatory);
+                     final ParameterTableField parameter = new ParameterTableField();
+                     parameter.setParameterName(sName);
+                     parameter.setParameterDescription(sDescription);
+                     parameter.setParameterAdditionalInfo(additionalInfo);
+                     addParameter(parameter);
+                     bParentParameterFound = true;
+                  }
+                  else {
+                     throw new OptionalParentParameterException();
+                  }
+               }
+               catch (final NullParameterAdditionalInfoException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+      }
+
+      if (!bParentParameterFound) {
+         throw new UndefinedParentParameterNameException();
+      }
+
+   }
+
+
+   /**
+    * Adds a band to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sParentParameterName
+    *                the name of the parent parameter (raster layer) to which this parameter is linked
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addBand(final String sName,
+                       final String sDescription,
+                       final String sParentParameterName) throws RepeatedParameterNameException,
+                                                         UndefinedParentParameterNameException, OptionalParentParameterException {
+
+      int i;
+      boolean bParentParameterFound = false;
+      for (i = 0; i < m_Parameters.size(); i++) {
+         if (((Parameter) m_Parameters.get(i)).getParameterName().equals(sParentParameterName)) {
+            if (((Parameter) m_Parameters.get(i)).getParameterTypeName().equals("Raster Layer")) {
+               try {
+                  final AdditionalInfoDataObject parentAdditionalInfo = (AdditionalInfoDataObject) ((Parameter) m_Parameters.get(i)).getParameterAdditionalInfo();
+                  if (parentAdditionalInfo.getIsMandatory()) {
+                     final AdditionalInfoBand additionalInfo = new AdditionalInfoBand(sParentParameterName);
+                     final ParameterBand parameter = new ParameterBand();
+                     parameter.setParameterName(sName);
+                     parameter.setParameterDescription(sDescription);
+                     parameter.setParameterAdditionalInfo(additionalInfo);
+                     addParameter(parameter);
+                     bParentParameterFound = true;
+                  }
+                  else {
+                     throw new OptionalParentParameterException();
+                  }
+               }
+               catch (final NullParameterAdditionalInfoException e) {
+                  Sextante.addErrorToLog(e);
+               }
+            }
+         }
+      }
+
+      if (!bParentParameterFound) {
+         throw new UndefinedParentParameterNameException();
+      }
+
+   }
+
+
+   /**
+    * Adds a numerical value to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param iType
+    *                the type of numerical value (integer or double)
+    * @param dDefaultValue
+    *                the default value to use (or show)
+    * @param dMinValue
+    *                the min value admitted
+    * @param dMaxValue
+    *                the max value admitted
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addNumericalValue(final String sName,
+                                 final String sDescription,
+                                 final int iType,
+                                 final double dDefaultValue,
+                                 final double dMinValue,
+                                 final double dMaxValue) throws RepeatedParameterNameException {
+
+      final AdditionalInfoNumericalValue additionalInfo = new AdditionalInfoNumericalValue(iType, dDefaultValue, dMinValue,
+               dMaxValue);
+
+      final ParameterNumericalValue parameter = new ParameterNumericalValue();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      parameter.setParameterValue(new Double(dDefaultValue));
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a numerical value to the set. No min or max values are defined, so the parameter can take any value
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param dDefaultValue
+    *                the default value to use (or show)
+    * @param iType
+    *                the type of numerical value (integer or double)
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addNumericalValue(final String sName,
+                                 final String sDescription,
+                                 final double dDefaultValue,
+                                 final int iType) throws RepeatedParameterNameException {
+
+      addNumericalValue(sName, sDescription, iType, dDefaultValue, Double.NEGATIVE_INFINITY, Double.MAX_VALUE);
+
+   }
+
+
+   /**
+    * Add a string to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addString(final String sName,
+                         final String sDescription) throws RepeatedParameterNameException {
+
+      addString(sName, sDescription, "");
+
+   }
+
+
+   /**
+    * Add a string to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sDefaultString
+    *                the default value
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addString(final String sName,
+                         final String sDescription,
+                         final String sDefaultString) throws RepeatedParameterNameException {
+
+      final AdditionalInfoString additionalInfo = new AdditionalInfoString();
+      additionalInfo.setDefaultString(sDefaultString);
+
+      final ParameterString parameter = new ParameterString();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      parameter.setParameterValue(sDefaultString);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a filepath to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param bFolder
+    *                true if it is a folder dialog
+    * @param bOpenDialog
+    *                true if it is an open file dialog, false if it's a save file dialog
+    * @param sExt
+    *                the extensions allowed
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    *
+    */
+   public void addFilepath(final String sName,
+                           final String sDescription,
+                           final boolean bFolder,
+                           final boolean bOpenDialog,
+                           final boolean bIsVoxel,
+                           final String[] sExt) throws RepeatedParameterNameException {
+
+      final AdditionalInfoFilepath additionalInfo = new AdditionalInfoFilepath(bFolder, bOpenDialog, bIsVoxel, sExt);
+
+      final ParameterFilepath parameter = new ParameterFilepath();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a filepath to the set. This version accepts only a single user-defined
+    * File extension (primarily for simplified use in the graphical modeler).
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param bFolder
+    *                true if it is a folder dialog
+    * @param bOpenDialog
+    *                true if it is an open file dialog, false if it's a save file dialog
+    * @param sExt
+    *                the extension allowed
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    *
+    */
+   public void addFilepath(final String sName,
+                           final String sDescription,
+                           final boolean bFolder,
+                           final boolean bOpenDialog,
+                           final boolean bIsVoxel,
+                           final String sExt) throws RepeatedParameterNameException {
+
+      final AdditionalInfoFilepath additionalInfo = new AdditionalInfoFilepath(bFolder, bOpenDialog, bIsVoxel, new String[] { sExt });
+
+      final ParameterFilepath parameter = new ParameterFilepath();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a boolean value to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the descripion of the parameter
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addBoolean(final String sName,
+                          final String sDescription,
+                          final boolean bDefault) throws RepeatedParameterNameException {
+
+      final AdditionalInfoBoolean additionalInfo = new AdditionalInfoBoolean(bDefault);
+
+      final ParameterBoolean parameter = new ParameterBoolean();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      parameter.setParameterValue(Boolean.valueOf(bDefault));
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Add a selection index (to choose from a list) to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sValues
+    *                the values to choose from
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addSelection(final String sName,
+                            final String sDescription,
+                            final String[] sValues) throws RepeatedParameterNameException {
+
+      final AdditionalInfoSelection additionalInfo = new AdditionalInfoSelection(sValues);
+
+      final ParameterSelection parameter = new ParameterSelection();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      parameter.setParameterValue(new Integer(0));
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Adds a fixed table to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @param sColumnNames
+    *                names of columns(fields) in the table
+    * @param iRows
+    *                number of rows in the table
+    * @param bIsNumberOfRowsFixed
+    *                true if the number of rows cannot be modified
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addFixedTable(final String sName,
+                             final String sDescription,
+                             final String[] sColumnNames,
+                             final int iRows,
+                             final boolean bIsNumberOfRowsFixed) throws RepeatedParameterNameException {
+
+      final AdditionalInfoFixedTable additionalInfo = new AdditionalInfoFixedTable(sColumnNames, iRows, bIsNumberOfRowsFixed);
+
+      final ParameterFixedTable parameter = new ParameterFixedTable();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Add a point to the set
+    *
+    * @param sName
+    *                the name of the parameter
+    * @param sDescription
+    *                the description of the parameter
+    * @throws RepeatedParameterNameException
+    *                 if a parameter with the same name already exists in the set
+    */
+   public void addPoint(final String sName,
+                        final String sDescription) throws RepeatedParameterNameException {
+
+      final AdditionalInfoPoint additionalInfo = new AdditionalInfoPoint();
+
+      final ParameterPoint parameter = new ParameterPoint();
+      parameter.setParameterName(sName);
+      parameter.setParameterDescription(sDescription);
+      parameter.setParameterAdditionalInfo(additionalInfo);
+      addParameter(parameter);
+
+   }
+
+
+   /**
+    * Returns a new instance of the parameter set
+    *
+    * @return a new instance of the parameter set
+    */
+   public ParametersSet getNewInstance() {
+
+      final ParametersSet set = new ParametersSet();
+
+      for (int i = 0; i < m_Parameters.size(); i++) {
+         try {
+            final Parameter param = (Parameter) m_Parameters.get(i);
+            set.addParameter(param.getNewInstance());
+         }
+         catch (final RepeatedParameterNameException e) {}
+      }
+      return set;
+   }
+
+
+   /**
+    * Returns true if all parameters in the set have valid values
+    *
+    * @return true if all parameters in the set have valid values
+    */
+   public boolean areParameterValuesCorrect() {
+
+      for (int i = 0; i < m_Parameters.size(); i++) {
+         final Parameter param = (Parameter) m_Parameters.get(i);
+         if (!param.isParameterValueCorrect()) {
+            return false;
+         }
+      }
+
+      return true;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/ParametersSet.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/GeoAlgorithm.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/GeoAlgorithm.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/GeoAlgorithm.java	(revision 369)
@@ -0,0 +1,2746 @@
+package es.unex.sextante.core;
+
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IDataObject;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.GeoAlgorithmExecutionException;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.UnsupportedOutputChannelException;
+import es.unex.sextante.exceptions.WrongAnalysisExtentException;
+import es.unex.sextante.exceptions.WrongParameterIDException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.outputs.Output;
+import es.unex.sextante.outputs.Output3DRasterLayer;
+import es.unex.sextante.outputs.OutputChart;
+import es.unex.sextante.outputs.OutputImage;
+import es.unex.sextante.outputs.OutputNumericalValue;
+import es.unex.sextante.outputs.OutputRasterLayer;
+import es.unex.sextante.outputs.OutputTable;
+import es.unex.sextante.outputs.OutputText;
+import es.unex.sextante.outputs.OutputVectorLayer;
+import es.unex.sextante.parameters.Parameter;
+import es.unex.sextante.parameters.ParameterDataObject;
+import es.unex.sextante.parameters.ParameterFixedTable;
+import es.unex.sextante.parameters.ParameterMultipleInput;
+import es.unex.sextante.parameters.ParameterTableField;
+import es.unex.sextante.parameters.RasterLayerAndBand;
+import es.unex.sextante.shapesTools.ShapesTools;
+import java.io.File;
+
+import org.jfree.chart.ChartPanel;
+
+import org.gvsig.fmap.geom.Geometry;
+
+
+/**
+ * A class defining a geo-algorithm
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public abstract class GeoAlgorithm {
+
+   /**
+    * The set of input parameters and their values
+    */
+   protected ParametersSet         m_Parameters;
+
+   /**
+    * The set of output objects. Results will be stored in this set once the execution is finished
+    */
+   protected OutputObjectsSet      m_OutputObjects;
+
+   /**
+    * A task to track progress of the algorithm
+    */
+   protected ITaskMonitor          m_Task;
+
+   /**
+    * The extent will be used to analyze layers and create create new output layers
+    */
+   protected AnalysisExtent        m_AnalysisExtent;
+
+   /**
+    * True if the algorithm generates output layers and its extent can be defined by the user
+    */
+   protected boolean               m_bUserCanDefineAnalysisExtent = true;
+
+   /**
+    * true if the number of steps needed to execute the algorithm can be known in advance
+    */
+   protected boolean               m_bIsDeterminatedProcess       = true;
+
+   /**
+    * The name of the algorithm
+    */
+   private String                  m_sName;
+
+   /**
+    * The name of the group this algorithm belongs to
+    */
+   private String                  m_sGroup;
+
+   /**
+    * A description string for misc. use
+    */
+   private String                  m_sDescription					= null;
+
+
+   /**
+    * Color values useful for e.g. coloring algorithm nodes in the modeler
+    */
+   private int                  i_R									= Sextante.i_R_Algorithm;
+   private int                  i_G									= Sextante.i_G_Algorithm;
+   private int                  i_B									= Sextante.i_B_Algorithm;
+   private int                  i_Alpha								= Sextante.i_Alpha_Algorithm;
+
+   /**
+    * Process metadata
+    */
+   private HashMap                 m_ProcessMetadata;
+
+   /**
+    * Used to indicate if the extent has been set by the user or automatically by the algorithm
+    */
+   protected boolean               m_bIsAutoExtent;
+
+   /**
+    * The CRS to use if the algorithm generates new layers
+    */
+   protected Object                m_CRS;
+
+   private long                    m_lInitTime;
+   private long                    m_lEndTime;
+
+   /**
+    * The output factory to use for generating new data objects from this algorithm
+    */
+   protected OutputFactory         m_OutputFactory;
+
+   /**
+    * Alternative names for outputs
+    */
+   private HashMap<String, String> m_OutputMap;
+   
+   /**
+    * 
+    */
+   protected boolean m_RecalculateForCell = true; 
+
+   public GeoAlgorithm() {
+
+      m_Parameters = new ParametersSet();
+      m_OutputObjects = new OutputObjectsSet();
+
+      defineCharacteristics();
+
+   }
+
+   public boolean getRecalculateForCell() {
+       return m_RecalculateForCell;
+   } 
+   public void setRecalculateForCell(boolean recalculate) {
+       m_RecalculateForCell = recalculate;
+   }
+   /**
+    * This method should be overridden and used to specify the parameters needed by the GeoAlgorithm, using the corresponding
+    * methods of the ParametersSet object.
+    *
+    * Also, output objects must be added, so SEXTANTE knows in advance which outputs will be generated by the algorithm. See the
+    * addOutputXXXX family of methods ({@link #addOutputRasterLayer}, {@link #addOutputVectorLayer}, etc.)
+    *
+    */
+   public abstract void defineCharacteristics();
+
+
+   /**
+    * This method should be used to execute the algorithm once the parameters have been assigned.
+    *
+    * @param task
+    *                a ITaskMonitor to track the progress of the execution. If is null, a
+    * @see {@link SilentTaskMonitor} will be used.
+    * @param outputFactory
+    *                The output factory to use to generate new data objects
+    * @return true if the algorithm was correctly executed. False if it was canceled
+    * @throws GeoAlgorithmExecutionException
+    */
+   public boolean execute(final ITaskMonitor task,
+                          final OutputFactory outputFactory) throws GeoAlgorithmExecutionException {
+      return execute(task, outputFactory, null);
+   }
+
+
+   /**
+    * This method should be used to execute the algorithm once the parameters have been assigned.
+    *
+    * @param task
+    *                a ITaskMonitor to track the progress of the execution. If is null, a
+    * @see {@link SilentTaskMonitor} will be used.
+    * @param outputFactory
+    *                The output factory to use to generate new data objects
+    * @param outputMap
+    *                Maps {@link IDataObject} algorithm output names to the desired output name. At IDataObject output creation,
+    *                {@link OutputFactory} implementations will receive the values in this map as names.
+    * @return true if the algorithm was correctly executed. False if it was canceled
+    * @throws GeoAlgorithmExecutionException
+    */
+   public boolean execute(final ITaskMonitor task,
+                          final OutputFactory outputFactory,
+                          final HashMap<String, String> outputMap) throws GeoAlgorithmExecutionException {
+
+      final StringBuffer sb = new StringBuffer();
+
+      if (task == null) {
+         m_Task = new SilentTaskMonitor();
+      }
+      else {
+         m_Task = task;
+         m_Task.setProgressText("");
+      }
+      m_OutputFactory = outputFactory;
+
+      initInputDataObjects();
+
+      if (!adjustOutputExtent()) {
+         throw new WrongAnalysisExtentException();
+      }
+
+      final DateFormat formatter = DateFormat.getDateTimeInstance();
+
+      final String[] cmd = this.getAlgorithmAsCommandLineSentences();
+
+      if (cmd != null) {
+         for (final String element : cmd) {
+            sb.append("Executing command: " + element + "\n");
+         }
+      }
+
+      m_OutputMap = outputMap;
+
+      m_lInitTime = System.currentTimeMillis();
+      sb.append("Starting algorithm execution...:" + formatter.format(new Date(m_lInitTime)) + "\n");
+
+      final boolean bReturn = processAlgorithm();
+
+      m_lEndTime = System.currentTimeMillis();
+      sb.append("Finished algorithm execution:" + formatter.format(new Date(m_lEndTime)) + "\n");
+      sb.append("Execution time (millisecs):" + Long.toString(m_lEndTime - m_lInitTime) + "\n");
+
+      Sextante.addInfoToLog(sb.toString());
+
+      closeInputDataObjects();
+      createProcessMetadata();
+
+      if (bReturn) {
+         postProcessOutputDataObjects();
+      }
+      else {
+         sb.append("Algorithm was canceled!!\n");
+      }
+
+      return bReturn;
+
+   }
+
+
+   /**
+    * Creates metadata for the process once it has been executed
+    */
+   private void createProcessMetadata() {
+
+      m_ProcessMetadata = new HashMap();
+
+      m_ProcessMetadata.put("PROCESS_DATE", new Date(m_lInitTime));
+      m_ProcessMetadata.put("PROCESS_DURATION", new Long(m_lEndTime - m_lInitTime));
+
+      //TODO: add more metadata
+
+   }
+
+
+   /**
+    * Returns a map with metadata entries. It will return an empty map if the process has not been executed yet.
+    *
+    * @return the metadata of the process.
+    */
+   public HashMap getProcessMetadata() {
+
+      return m_ProcessMetadata;
+
+   }
+
+
+   /**
+    * post-processes all output objects
+    *
+    */
+   private void postProcessOutputDataObjects() throws GeoAlgorithmExecutionException {
+
+      try {
+         for (int i = 0; i < m_OutputObjects.getOutputObjectsCount(); i++) {
+            final Output out = m_OutputObjects.getOutput(i);
+            final Object obj = out.getOutputObject();
+            if (obj instanceof IDataObject) {
+               final IDataObject dataObject = (IDataObject) obj;
+               dataObject.postProcess();
+            }
+         }
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+
+   /**
+    * Closes all input data objects when they are not needed anymore
+    */
+   private void closeInputDataObjects() {
+
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         try {
+            final Parameter param = m_Parameters.getParameter(i);
+            final Object obj = param.getParameterValueAsObject();
+            if (obj instanceof ILayer) {
+               final ILayer layer = (ILayer) obj;
+               layer.close();
+            }
+            else if (obj instanceof ITable) {
+               final ITable table = (ITable) obj;
+               table.close();
+            }
+            else if (obj instanceof ArrayList) {
+               final ArrayList list = (ArrayList) obj;
+               for (int j = 0; j < list.size(); j++) {
+                  closeInputDataObject(list.get(j));
+               }
+            }
+         }
+         catch (final Exception e) {
+            Sextante.addErrorToLog(e);
+         }
+      }
+
+   }
+
+
+   /**
+    * Closes an input object
+    *
+    * @param obj
+    *                the input object to close
+    */
+   private void closeInputDataObject(final Object obj) {
+
+      if (obj instanceof ILayer) {
+         final ILayer layer = (ILayer) obj;
+         layer.close();
+      }
+      else if (obj instanceof ITable) {
+         final ITable table = (ITable) obj;
+         table.close();
+      }
+      else if (obj instanceof RasterLayerAndBand) {
+         final RasterLayerAndBand rab = (RasterLayerAndBand) obj;
+         final IRasterLayer layer = rab.getRasterLayer();
+         layer.close();
+      }
+
+   }
+
+
+   /**
+    * Opens data objects before using them. It also sets the CRS for output layers as the CRS of the first valid input layers, or
+    * the default one if no layer is used. (see {@link OuputFactory#getDefualtCRS}). Sextante does not perform any coordinate
+    * transformation, and all input layers are assumed to have the same CRS, which will be the one assigned to all output layers.
+    */
+   private void initInputDataObjects() {
+
+      for (int i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         final Object obj = param.getParameterValueAsObject();
+         initInputDataObject(obj);
+      }
+
+      if (m_CRS == null) {
+         m_CRS = m_OutputFactory.getDefaultCRS();
+      }
+   }
+
+
+   /**
+    * Opens a single data objects before using it. It also sets the CRS for output layers if a layer is passed and the current
+    * output CRS is not set.
+    */
+   private void initInputDataObject(final Object obj) {
+
+      if (obj instanceof ILayer) {
+         final ILayer layer = (ILayer) obj;
+         layer.open();
+         if (m_CRS == null) {
+            m_CRS = layer.getCRS();
+         }
+         else {
+            if ((layer.getCRS() == null) || !layer.getCRS().equals(m_CRS)) {
+               Sextante.addWarningToLog("Distintos_CRS");
+            }
+         }
+      }
+      else if (obj instanceof ITable) {
+         final ITable table = (ITable) obj;
+         table.open();
+      }
+      else if (obj instanceof RasterLayerAndBand) {
+         final RasterLayerAndBand rlab = (RasterLayerAndBand) obj;
+         final IRasterLayer layer = rlab.getRasterLayer();
+         layer.open();
+         if (m_CRS == null) {
+            m_CRS = layer.getCRS();
+         }
+      }
+      else if (obj instanceof ArrayList) {
+         final ArrayList list = (ArrayList) obj;
+         for (int j = 0; j < list.size(); j++) {
+            initInputDataObject(list.get(j));
+         }
+      }
+
+   }
+
+
+   /**
+    * This method should implement the algorithm itself, using the values of the parameters and processing them.
+    *
+    * @return true if the algorithm was correctly executed. False if it was canceled.
+    * @throws GeoAlgorithmExecutionException
+    *                 if there were problems during algorithm execution
+    */
+   public abstract boolean processAlgorithm() throws GeoAlgorithmExecutionException;
+
+
+   /**
+    * This method sets the output extent according to input layers, in case it hasn't been set.
+    *
+    * To do so, it takes the minimum extent that covers all input layers, and the minimum cellsize in case there are input raster
+    * layers.
+    *
+    * @return false if there are not enough layers to adjust the output extent for running this algorithm
+    */
+   public boolean adjustOutputExtent() {
+
+      boolean bRasterLayers = false;
+      boolean bLayers = false;
+      boolean bOK = true;
+      IRasterLayer rasterLayer;
+      RasterLayerAndBand rlab;
+      IVectorLayer vectorLayer;
+      ArrayList layers;
+      int i, j;
+
+      if (!getUserCanDefineAnalysisExtent()) {
+         m_bIsAutoExtent = false;
+         return true;
+      }
+
+      if (m_bIsAutoExtent && (m_AnalysisExtent != null)) {
+         return true;
+      }
+
+      if (m_AnalysisExtent == null) {
+         m_bIsAutoExtent = true;
+         for (i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+            try {
+               if (m_Parameters.getParameter(i).getParameterTypeName().equals("Raster Layer")) {
+                  rasterLayer = m_Parameters.getParameterValueAsRasterLayer(m_Parameters.getParameter(i).getParameterName());
+                  if (rasterLayer != null) {
+                     if (!bRasterLayers) {
+                        bLayers = true;
+                        bRasterLayers = true;
+                        m_AnalysisExtent = new AnalysisExtent(rasterLayer);
+                     }
+                     else {
+                        if (!bRasterLayers) {
+                           m_AnalysisExtent.setCellSize(rasterLayer.getLayerGridExtent().getCellSize());
+                        }
+                        m_AnalysisExtent.addExtent(rasterLayer.getLayerGridExtent());
+                     }
+                  }
+               }
+               else if (m_Parameters.getParameter(i).getParameterTypeName().equals("Vector Layer")) {
+                  vectorLayer = m_Parameters.getParameterValueAsVectorLayer(m_Parameters.getParameter(i).getParameterName());
+                  if (vectorLayer != null) {
+                     if (!bLayers) {
+                        bLayers = true;
+                        m_AnalysisExtent = new AnalysisExtent(vectorLayer);
+                     }
+                     else {
+                        m_AnalysisExtent.addExtent(vectorLayer.getFullExtent());
+                     }
+                  }
+               }
+               else if (m_Parameters.getParameter(i).getParameterTypeName().equals("Multiple Input")) {
+                  final AdditionalInfoMultipleInput additionalInfo = (AdditionalInfoMultipleInput) m_Parameters.getParameter(i).getParameterAdditionalInfo();
+                  if (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_RASTER) {
+                     layers = m_Parameters.getParameterValueAsArrayList(m_Parameters.getParameter(i).getParameterName());
+                     for (j = 0; j < layers.size(); j++) {
+                        rasterLayer = (IRasterLayer) layers.get(j);
+                        if (!bLayers) {
+                           bLayers = true;
+                           bRasterLayers = true;
+                           m_AnalysisExtent = new AnalysisExtent(rasterLayer);
+                        }
+                        else {
+                           m_AnalysisExtent.addExtent(rasterLayer.getLayerGridExtent());
+                        }
+                     }
+                  }
+                  if (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_BAND) {
+                     layers = m_Parameters.getParameterValueAsArrayList(m_Parameters.getParameter(i).getParameterName());
+                     for (j = 0; j < layers.size(); j++) {
+                        rlab = (RasterLayerAndBand) layers.get(j);
+                        rasterLayer = rlab.getRasterLayer();
+                        if (!bRasterLayers) {
+                           bLayers = true;
+                           bRasterLayers = true;
+                           m_AnalysisExtent = new AnalysisExtent(rasterLayer);
+                        }
+                        else {
+                           m_AnalysisExtent.addExtent(rasterLayer.getLayerGridExtent());
+                        }
+                     }
+                  }
+                  if ((additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY)
+                      || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT)
+                      || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE)
+                      || (additionalInfo.getDataType() == AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON)) {
+                     layers = m_Parameters.getParameterValueAsArrayList(m_Parameters.getParameter(i).getParameterName());
+                     for (j = 0; j < layers.size(); j++) {
+                        vectorLayer = (IVectorLayer) layers.get(j);
+                        if (!bLayers) {
+                           bLayers = true;
+                           m_AnalysisExtent = new AnalysisExtent(vectorLayer);
+                        }
+                        else {
+                           m_AnalysisExtent.addExtent(vectorLayer.getFullExtent());
+                        }
+                     }
+                  }
+               }
+            }
+            catch (final ArrayIndexOutOfBoundsException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final WrongParameterTypeException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final WrongParameterIDException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final NullParameterValueException e) {
+               Sextante.addErrorToLog(e);
+            }
+            catch (final NullParameterAdditionalInfoException e) {
+               Sextante.addErrorToLog(e);
+            }
+         }
+         if (m_OutputObjects.getOutputLayersCount() != 0) {
+            bOK = bOK && bLayers;
+         }
+         if (m_OutputObjects.getRasterLayersCount() != 0) {
+            bOK = bOK && bRasterLayers;
+         }
+      }
+      else {
+         bOK = true;
+         m_bIsAutoExtent = false;
+      }
+
+      return bOK;
+
+   }
+
+
+   /**
+    * Returns the name of the algorithm
+    *
+    * @return The algorithm name. Might return different strings depending on the current SEXTANTE language
+    */
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+   /**
+    * Sets the algorithm name. Use this in the defineCharacteristics() method Use
+    *
+    * @see {@link Sextante#getText(String)} to support internationalization
+    * @param sName
+    *                the name of the algorithm
+    */
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   /**
+    * Returns the group this algorithm belongs to
+    *
+    * @return The group to which the algorithm belongs. Might return different strings depending on the current SEXTANTE language
+    */
+   public String getGroup() {
+
+      return m_sGroup;
+
+   }
+
+
+   /**
+    * Sets the name of the group this algorithm belongs to. Use this in the defineCharacteristics() method Use
+    *
+    * @see {@link Sextante#getText(String)} to support internationalization
+    * @param sGroup
+    *                the name of the group
+    */
+   public void setGroup(final String sGroup) {
+
+      m_sGroup = sGroup;
+
+   }
+
+
+   /**
+    * Returns the description string of the algorithm
+    *
+    * @return The description. This string is user-definable and e.g. used by the graphical modeler to label processing nodes.
+    */
+   public String getDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public int getColorR() {
+	   return(i_R);
+   }
+
+   public int getColorG() {
+	   return(i_G);
+   }
+
+   public int getColorB() {
+	   return(i_B);
+   }
+
+   public int getColorAlpha() {
+	   return(i_Alpha);
+   }
+
+
+   /**
+    * Sets the algorithm's description string. null by default.
+    * This string is e.g. used by the graphical modeler to label processing nodes.
+    *
+    * @param sDescription
+    *                description string to be associated with this algorithm
+    */
+   public void setDescription(final String sDescription) {
+
+      m_sDescription = sDescription;
+
+   }
+
+   public void setColorR(final int red) {
+	   i_R = red;
+   }
+
+   public void setColorG(final int green) {
+	   i_G = green;
+   }
+
+   public void setColorB(final int blue) {
+	   i_B = blue;
+   }
+
+   public void setColorAlpha(final int alpha) {
+	   i_Alpha = alpha;
+   }
+
+   /**
+    *
+    * @return the set of parameters needed to run the algorithm
+    */
+   public ParametersSet getParameters() {
+
+      return m_Parameters;
+
+   }
+
+
+   /**
+    * sets a new set of parameters for the algorithm
+    *
+    * @param parameters
+    *                the new set of parameters
+    */
+   public void setParameters(final ParametersSet parameters) {
+
+      m_Parameters = parameters;
+
+   }
+
+
+   /**
+    * Returns the extent that will be used to analyse layers and create create new output layers
+    *
+    * @return The extent that will be used to analyse layers and create create new output layers
+    */
+   public AnalysisExtent getAnalysisExtent() {
+
+      return m_AnalysisExtent;
+
+   }
+
+
+   /**
+    * Sets a new extent will be used to analyse layers and create create new output layers
+    *
+    * @param extent
+    *                the new extent that will be used to analyse layers and create create new output layers
+    */
+   public void setAnalysisExtent(final AnalysisExtent extent) {
+
+      m_AnalysisExtent = extent;
+
+   }
+
+
+   /**
+    * Sets the current step in the progress bar, based on the ratio between the current task step and the total number of steps
+    * needed to complete the task
+    *
+    * @param iStep
+    *                the current step
+    * @param iTotalNumberOfSteps
+    *                the total number of steps
+    * @return true if the task hasn't been canceled
+    */
+   protected boolean setProgress(final int iStep,
+                                 final int iTotalNumberOfSteps) {
+
+      m_Task.setProgress(iStep, iTotalNumberOfSteps);
+      return !m_Task.isCanceled();
+
+   }
+
+
+   /**
+    * Sets the current progress text. Use this to inform the user about the work that the algorithm is currently doing.
+    *
+    * @param sText
+    *                the new progress text
+    */
+   protected void setProgressText(final String sText) {
+
+      m_Task.setProgressText(sText);
+
+   }
+
+
+   /**
+    *
+    * @return true if the algorithm requires parameters other than input layers or tables
+    */
+   public boolean requiresNonDataObjects() {
+
+      return m_Parameters.requiresNonDataObjects();
+
+   }
+
+
+   /**
+    * @return The number of parameters needed to run the algorithm
+    */
+   public int getNumberOfParameters() {
+
+      return m_Parameters.getNumberOfParameters();
+
+   }
+
+
+   /**
+    * @return The number of raster layers needed to run the algorithm
+    */
+   public int getNumberOfRasterLayers(final boolean includeMultipleInputs) {
+
+      return m_Parameters.getNumberOfRasterLayers(includeMultipleInputs);
+
+   }
+
+
+   /**
+    * @return The number of vector layer needed to run the algorithm
+    */
+   public int getNumberOfVectorLayers(final boolean includeMultipleInputs) {
+
+      return m_Parameters.getNumberOfVectorLayers(includeMultipleInputs);
+
+   }
+
+
+   /**
+    * @return The number of point vector layer needed to run the algorithm
+    */
+   public int getNumberOfPointVectorLayers() {
+
+      return m_Parameters.getNumberOfPointVectorLayers();
+
+   }
+
+
+   /**
+    * @return The number of line layer needed to run the algorithm
+    */
+   public int getNumberOfLineVectorLayers() {
+
+      return m_Parameters.getNumberOfLineVectorLayers();
+
+   }
+
+
+   /**
+    * @return The number of polygon vector layer needed to run the algorithm
+    */
+   public int getNumberOfPolygonLayers() {
+
+      return m_Parameters.getNumberOfPolygonVectorLayers();
+
+   }
+
+
+   /**
+    * @return The number of tables needed to run the algorithm
+    */
+   public int getNumberOfTables() {
+
+      return m_Parameters.getNumberOfTables();
+
+   }
+
+
+   /**
+    * @return The number of tables needed to run the algorithm
+    */
+   public int getNumberOfNoDataParameters() {
+
+      return m_Parameters.getNumberOfNoDataParameters();
+
+   }
+
+
+   /**
+    * @return The number of TableFields needed to run the algorithm
+    */
+   public int getNumberOfTableFieldsParameters() {
+
+      return m_Parameters.getNumberOfTableFieldsParameters();
+
+   }
+
+   /**
+    * @return The number of TableFields needed to run the algorithm
+    */
+   public int getNumberOfTableFilterParameters() {
+
+      return m_Parameters.getNumberOfTableFilterParameters();
+
+   }
+   /**
+    * @return The number of TableFields needed to run the algorithm
+    */
+   public int getNumberOfBandsParameters() {
+
+      return m_Parameters.getNumberOfBandsParameters();
+
+   }
+
+
+   /**
+    *
+    * @return true if the user can define the analysis region to be used by the algorithm
+    */
+   public boolean getUserCanDefineAnalysisExtent() {
+
+      return m_bUserCanDefineAnalysisExtent;
+
+   }
+
+
+   /**
+    * Use this method to indicate that the user can define the analysis region extent. When creating the corresponding panel for
+    * the algorithm, it will contain a "Output region" tab, so the user can define the extent he prefers
+    *
+    * @param bUserCanDefineAnalysisExtent
+    *                true if the algorithm generates new raster layers
+    */
+   public void setUserCanDefineAnalysisExtent(final boolean bUserCanDefineAnalysisExtent) {
+
+      m_bUserCanDefineAnalysisExtent = bUserCanDefineAnalysisExtent;
+
+   }
+
+
+   /**
+    * Use this method to indicate that the algorithm is determinated (i.e. the number of steps to complete it is known)
+    *
+    * @param bDeterminated
+    *                true if it is a determinated algorithm
+    */
+   public void setIsDeterminatedProcess(final boolean bDeterminated) {
+
+      m_bIsDeterminatedProcess = bDeterminated;
+
+   }
+
+
+   /**
+    *
+    * @return true if the algorithm is determinated (i.e. the number of steps to complete it is known)
+    */
+   public boolean isDeterminatedProcess() {
+
+      return m_bIsDeterminatedProcess;
+
+   }
+
+
+   //** Methods for creating and handling output objects (tables and layers) **/
+
+
+   /**
+    * @return the set of output objects generated by the algorithm
+    */
+   public OutputObjectsSet getOutputObjects() {
+
+      return m_OutputObjects;
+
+   }
+
+
+   /**
+    * sets a new set of output objects
+    *
+    * @param ooSet
+    *                the new set of output objects
+    */
+   public void setOutputObjects(final OutputObjectsSet ooSet) {
+
+      m_OutputObjects = ooSet;
+
+   }
+
+
+   /**
+    * Use this method to add a new output object. Use it if, for instance, you have a layer created not within the geoalgorithm
+    * using a getNewXXXX method, but in a different place, like, for example, calling another method.
+    *
+    * @param output
+    *                The output object to add
+    */
+   protected void addOutputObject(final Output output) {
+
+      m_OutputObjects.add(output);
+
+   }
+
+
+   /**
+    *
+    * Use this method to add a new output object. Use it if, for instance, you have a layer created not within the geoalgorithm
+    * using a getNewXXXX method, but in a different place, like, for example, calling another method.
+    *
+    * @param sName
+    *                the name of the output
+    * @param sDescription
+    *                the description (human-readable) of the output
+    * @param channel
+    *                the output channel to use in this output
+    * @param obj
+    *                the value of the output
+    */
+   protected void addOutputObject(final String sName,
+                                  final String sDescription,
+                                  final IOutputChannel channel,
+                                  final Object obj) {
+      Output out;
+      if (obj instanceof IRasterLayer) {
+         out = new OutputRasterLayer();
+      }
+      else if (obj instanceof IVectorLayer) {
+         out = new OutputVectorLayer();
+      }
+      else if (obj instanceof ITable) {
+         out = new OutputTable();
+      }
+      else if (obj instanceof String) {
+         out = new OutputText();
+      }
+      else if (obj instanceof ChartPanel) {
+         out = new OutputChart();
+      }
+      else {
+         return;
+      }
+
+      out.setOutputChannel(channel);
+      out.setDescription(sDescription);
+      out.setName(sName);
+      out.setOutputObject(obj);
+      m_OutputObjects.add(out);
+
+   }
+
+
+   //------------ methods for creating layers and output objects-------------
+
+   /**
+    * Returns the output channel associated with the given output. If it is null, it returns a temporary output channel, which is
+    * a {@link es.unex.sextante.dataObjects.FileOutputChannel} with a temporary filename. Returns null if no output with that name
+    * exists.
+    *
+    * @param sName
+    *                the name of the output from which to retrieve the output channel
+    * @return the output channel associated with the given output
+    */
+   protected IOutputChannel getOutputChannel(final String sName) {
+
+      Output out;
+      IOutputChannel channel;
+      try {
+         out = m_OutputObjects.getOutput(sName);
+         channel = out.getOutputChannel();
+         if (channel == null) {
+            channel = new FileOutputChannel(m_OutputFactory.getTempFilename(out));
+            out.setOutputChannel(channel);
+            return channel;
+         }
+         else if (channel instanceof FileOutputChannel) {
+            final String sFilename = getOutputFilename(out);
+            if (sFilename == null) {
+               ((FileOutputChannel) channel).setFilename(m_OutputFactory.getTempFilename(out));
+               ((FileOutputChannel) channel).setTemporary(true);
+               return channel;
+            } else {
+               ((FileOutputChannel) channel).setFilename(sFilename);
+               ((FileOutputChannel) channel).setTemporary(false);
+               return channel;
+            }
+         }
+         else {
+            return channel;
+         }
+
+
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+         return null;
+      }
+
+   }
+
+
+   /**
+    * Returns the filename associated with a given output, which must have a file-based output channel. If the output filename
+    * matches any of the valid extensions for the type of output (from the ones obtained from the current output factory), it
+    * returns that filename. Otherwise, it adds the default extension for the type of output. If the filename is null, it returns
+    * null.
+    *
+    * @param out
+    *                an output object
+    * @return a checked filename for the passed output object. returns null if the output object filename is null or the output
+    *         channel associated with the output is not file-based
+    */
+   protected String getOutputFilename(final Output out) {
+
+      final IOutputChannel channel = out.getOutputChannel();
+
+      if (!(channel instanceof FileOutputChannel)) {
+         return null;
+      }
+      final String sFilename = ((FileOutputChannel) channel).getFilename();
+      if (sFilename == null) {
+         return null;
+      }
+      String[] exts = null;
+      if (out instanceof OutputRasterLayer) {
+         exts = m_OutputFactory.getRasterLayerOutputExtensions();
+      }
+      else if (out instanceof OutputVectorLayer) {
+         exts = m_OutputFactory.getVectorLayerOutputExtensions();
+      }
+      else if (out instanceof OutputTable) {
+         exts = m_OutputFactory.getTableOutputExtensions();
+      }
+      else if (out instanceof Output3DRasterLayer) {
+         exts = m_OutputFactory.get3DRasterLayerOutputExtensions();
+      }
+      else {
+         return null;
+      }
+
+      for (final String element : exts) {
+         if (sFilename.endsWith(element)) {
+            return sFilename;
+         }
+      }
+      return sFilename + "." + exts[0];
+   }
+
+   /**
+    * This method creates a new vector layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new vector layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iShapeType
+    *                The shape type. See
+    * @see {@link IVectorLayer} for more info about valid values
+    * @param types
+    *                an array of classes indicating data types for each field
+    * @param sFields
+    *                an array of field names
+    * @return a new vector layer
+    * @throws GeoAlgorithmExecutionException
+    */
+   protected IVectorLayer getNewVectorLayer(final String sName,
+                                            final String sDescription,
+                                            final int iShapeType,
+                                            final Class[] types,
+                                            final String[] sFields, final int subtype) throws GeoAlgorithmExecutionException {
+
+      try {
+         final OutputVectorLayer out = (OutputVectorLayer) m_OutputObjects.getOutput(sName);
+         IVectorLayer layer;
+         final IOutputChannel channel = getOutputChannel(sName);
+         layer = m_OutputFactory.getNewVectorLayer(getLayerName(sName, sDescription), iShapeType, types, sFields, channel, m_CRS, subtype);
+         if(layer!=null){
+             addOutputVectorLayer(sName, sDescription, iShapeType, channel, layer, out.getInputLayerToOverwrite(), subtype);
+         }
+         return layer;
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+   /**
+    * This method creates a new vector layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new vector layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iShapeType
+    *                The shape type. See
+    * @see {@link IVectorLayer} for more info about valid values
+    * @param types
+    *                an array of classes indicating data types for each field
+    * @param sFields
+    *                an array of field names
+    * @return a new vector layer
+    * @throws GeoAlgorithmExecutionException
+    */
+   protected IVectorLayer getNewVectorLayer(final String sName,
+                                            final String sDescription,
+                                            final int iShapeType,
+                                            final Class[] types,
+                                            final String[] sFields) throws GeoAlgorithmExecutionException {
+
+       return getNewVectorLayer(sName,
+           sDescription,
+           iShapeType,
+           types,
+           sFields, Geometry.SUBTYPES.UNKNOWN);
+
+   }
+
+   /**
+    * This method creates a new vector layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new vector layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iShapeType
+    *                The shape type. See
+    * @see {@link IVectorLayer} for more info about valid values
+    * @param types
+    *                an array of classes indicating data types for each field
+    * @param sFields
+    *                an array of field names
+    * @param fieldSize
+    *                An array of field sizes
+    * @return a new vector layer
+    * @throws GeoAlgorithmExecutionException
+    */
+   protected IVectorLayer getNewVectorLayer(final String sName,
+                                            final String sDescription,
+                                            final int iShapeType,
+                                            final Class[] types,
+                                            final String[] sFields,
+                                            final int[] fieldSize) throws GeoAlgorithmExecutionException {
+
+       return getNewVectorLayer(sName, sDescription, iShapeType, types, sFields, fieldSize, Geometry.SUBTYPES.UNKNOWN);
+   }
+   /**
+    * This method creates a new vector layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new vector layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iShapeType
+    *                The shape type. See
+    * @see {@link IVectorLayer} for more info about valid values
+    * @param types
+    *                an array of classes indicating data types for each field
+    * @param sFields
+    *                an array of field names
+    * @param fieldSize
+    *                An array of field sizes
+    * @return a new vector layer
+    * @throws GeoAlgorithmExecutionException
+    */
+   protected IVectorLayer getNewVectorLayer(final String sName,
+                                            final String sDescription,
+                                            final int iShapeType,
+                                            final Class[] types,
+                                            final String[] sFields,
+                                            final int[] fieldSize, final int subtype) throws GeoAlgorithmExecutionException {
+
+      try {
+         final OutputVectorLayer out = (OutputVectorLayer) m_OutputObjects.getOutput(sName);
+         IVectorLayer layer;
+         final IOutputChannel channel = getOutputChannel(sName);
+         layer = m_OutputFactory.getNewVectorLayer(getLayerName(sName, sDescription), iShapeType, types, sFields, channel, m_CRS,
+                  fieldSize, subtype);
+         addOutputVectorLayer(sName, sDescription, iShapeType, channel, layer, out.getInputLayerToOverwrite());
+         return layer;
+      }
+      catch (final Exception e) {
+         throw new GeoAlgorithmExecutionException(e.getMessage());
+      }
+
+   }
+
+
+   private String getLayerName(final String sName,
+                               final String sDescription) {
+
+      if (m_OutputMap != null) {
+         final String mappedName = m_OutputMap.get(sName);
+         if (mappedName == null) {
+            return sName;
+         }
+         else {
+            return mappedName;
+         }
+      }
+      else {
+         return sDescription;
+      }
+
+   }
+
+
+   /**
+    * This method creates a new vector layer but does not add it to the set of output objects of the algorithm. If you are going
+    * to read data from this layer, it is recommended to close the layer, call the postProcess() method and then open it again,
+    * since some implementations might not support reading and writing features at the same time.
+    *
+    * @param iShapeType
+    *                The shape type. See
+    * @see {@link IVectorLayer} for more info about valid values
+    * @param types
+    *                an array of classes indicating data types for each field
+    * @param sFields
+    *                an array of field names
+    * @return a new vector layer
+    * @throws UnsupportedOutputChannelException
+    */
+   protected IVectorLayer getTempVectorLayer(final int iShapeType,
+                                             final Class[] types,
+                                             final String[] sFields) throws UnsupportedOutputChannelException {
+
+      final String sFilename = m_OutputFactory.getTempVectorLayerFilename();
+      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
+
+      return m_OutputFactory.getNewVectorLayer("", iShapeType, types, sFields, channel, m_CRS);
+   }
+
+
+   /**
+    * This method creates a new raster layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new raster layer and you have to create it. The grid extent is taken from the algorithm analysis
+    * extent (@see {@link #getAnalysisExtent()}
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iDataType
+    *                The data type. See
+    * @see {@link IRasterLayer} for more info about valid values
+    * @param iBands
+    *                the number of bands of the new layer
+    * @return a new raster layer
+    * @throws UnsupportedOutputChannelException
+    */
+   protected IRasterLayer getNewRasterLayer(final String sName,
+                                            final String sDescription,
+                                            final int iDataType,
+                                            final int iBands) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer(getLayerName(sName, sDescription), iDataType,
+               m_AnalysisExtent, iBands, channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      addOutputRasterLayer(sName, sDescription, iBands, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   /**
+    * This method creates a new monoband raster layer and adds it to the set of output objects of the algorithm. Use this when
+    * your algorithm generates a new raster layer and you have to create it. The grid extent is taken from the algorithm analysis
+    * extent (@see {@link #getAnalysisExtent()}
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iDataType
+    *                The data type. See
+    * @see {@link IRasterLayer} for more info about valid values
+    * @return a new raster layer
+    * @throws UnsupportedOutputChannelException
+    */
+   protected IRasterLayer getNewRasterLayer(final String sName,
+                                            final String sDescription,
+                                            final int iDataType) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer(getLayerName(sName, sDescription), iDataType,
+               m_AnalysisExtent, 1, channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      addOutputRasterLayer(sName, sDescription, 1, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   /**
+    * This method creates a new raster layer and adds it to the set of output objects of the algorithm. Use this when your
+    * algorithm generates a new raster layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iDataType
+    *                The data type. See
+    * @see {@link IRasterLayer} for more info about valid values
+    * @param extent
+    *                The grid extent of the layer to create
+    * @param iBands
+    *                the number of bands of the new layer
+    * @return a new raster layer
+    * @throws UnsupportedOutputChannelException
+    */
+   protected IRasterLayer getNewRasterLayer(final String sName,
+                                            final String sDescription,
+                                            final int iDataType,
+                                            final AnalysisExtent extent,
+                                            final int iBands) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer(getLayerName(sName, sDescription), iDataType, extent,
+               iBands, channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      addOutputRasterLayer(sName, sDescription, iBands, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   /**
+    * This method creates a new monoband raster layer and adds it to the set of output objects of the algorithm. Use this when
+    * your algorithm generates a new raster layer and you have to create it.
+    *
+    * @param sName
+    *                The name of the layer. Has to be the same that you used to define this output in the
+    * @see {@link #defineCharacteristics()} method.
+    * @param sDescription
+    *                the long description of the output. This is the one usually used to describe the layer when added to a GIS
+    *                GUI
+    * @param iDataType
+    *                The data type. See
+    * @see {@link IRasterLayer} for more info about valid values
+    * @param extent
+    *                The grid extent of the layer to create
+    * @return a new raster layer
+    * @throws UnsupportedOutputChannelException
+    */
+   protected IRasterLayer getNewRasterLayer(final String sName,
+                                            final String sDescription,
+                                            final int iDataType,
+                                            final AnalysisExtent extent) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer(getLayerName(sName, sDescription), iDataType, extent, 1,
+               channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      addOutputRasterLayer(sName, sDescription, 1, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   protected IRasterLayer getTempRasterLayer(final int iDataType,
+                                             final AnalysisExtent extent,
+                                             final int iBands) throws UnsupportedOutputChannelException {
+
+      final String sFilename = m_OutputFactory.getTempRasterLayerFilename();
+      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer("", iDataType, extent, iBands, channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      return newLayer;
+
+   }
+
+
+   protected IRasterLayer getTempRasterLayer(final int iDataType,
+                                             final AnalysisExtent extent) throws UnsupportedOutputChannelException {
+
+      final String sFilename = m_OutputFactory.getTempRasterLayerFilename();
+      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
+
+      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer("", iDataType, extent, 1, channel, m_CRS);
+
+      newLayer.setFullExtent();
+
+      return newLayer;
+
+   }
+
+
+   protected I3DRasterLayer getNew3DRasterLayer(final String sName,
+                                                final String sDescription,
+                                                final int iDataType,
+                                                final AnalysisExtent extent) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final I3DRasterLayer newLayer = m_OutputFactory.getNew3DRasterLayer(getLayerName(sName, sDescription), iDataType, extent,
+               channel, m_CRS);
+
+      addOutput3DRasterLayer(sName, sDescription, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   protected I3DRasterLayer getNew3DRasterLayer(final String sName,
+                                                final String sDescription,
+                                                final int iDataType) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final I3DRasterLayer newLayer = m_OutputFactory.getNew3DRasterLayer(getLayerName(sName, sDescription), iDataType,
+               m_AnalysisExtent, channel, m_CRS);
+
+      addOutput3DRasterLayer(sName, sDescription, channel, newLayer);
+
+      return newLayer;
+
+   }
+
+
+   protected ITable getNewTable(final String sName,
+                                final String sDescription,
+                                final Class[] types,
+                                final String[] sFields) throws UnsupportedOutputChannelException {
+
+      final IOutputChannel channel = getOutputChannel(sName);
+
+      final ITable table = m_OutputFactory.getNewTable(getLayerName(sName, sDescription), types, sFields, channel);
+
+      addOutputTable(sName, sDescription, channel, table);
+
+      return table;
+
+   }
+
+
+   /////////////////////////////////////////////////////////////////////////////////////
+
+   /**
+    * Adds a new raster layer to the output set
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iBands
+    *                The number of bands the output layer will have
+    * @param channel
+    *                the output channel associated to the output
+    * @param layer
+    *                the layer itself
+    */
+   protected void addOutputRasterLayer(final String sName,
+                                       final String sDescription,
+                                       final int iBands,
+                                       final IOutputChannel channel,
+                                       final IRasterLayer layer) {
+
+      final OutputRasterLayer out = new OutputRasterLayer();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(layer);
+      out.setOutputChannel(channel);
+      out.setNumberOfBands(iBands);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new raster layer to the output set. The value of the output is null, and so is the filename. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iBands
+    *                The number of bands the output layer will have
+    */
+   protected void addOutputRasterLayer(final String sName,
+                                       final String sDescription,
+                                       final int iBands) {
+
+      addOutputRasterLayer(sName, sDescription, iBands, null, null);
+
+   }
+
+
+   /**
+    * Adds a new monoband raster layer to the output set. The value of the output is null, and so is the filename. Use this method
+    * in the DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    */
+   protected void addOutputRasterLayer(final String sName,
+                                       final String sDescription) {
+
+      addOutputRasterLayer(sName, sDescription, 1, null, null);
+
+   }
+
+
+   /**
+    * Adds a new 3D raster layer to the output set. The value of the output is null, and so is the filename. Use this method in
+    * the DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    */
+
+   protected void addOutput3DRasterLayer(final String sName,
+                                         final String sDescription) {
+
+      addOutput3DRasterLayer(sName, sDescription, null, null);
+
+   }
+
+
+   /**
+    * Adds a new 3D raster layer to the output set
+    *
+    * @param sName
+    *                the name to identify the layer in the set
+    * @param sDescription
+    *                the description of the layer
+    * @param channel
+    *                the output channel associated to the output
+    * @param layer
+    *                the layer itself
+    */
+   protected void addOutput3DRasterLayer(final String sName,
+                                         final String sDescription,
+                                         final IOutputChannel channel,
+                                         final I3DRasterLayer layer) {
+
+      final Output3DRasterLayer out = new Output3DRasterLayer();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(layer);
+      out.setOutputChannel(channel);
+
+      m_OutputObjects.add(out);
+
+   }
+
+   /**
+    * Adds a new vector layer to the output set
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iType
+    *                the shape type of the layer
+    * @param channel
+    *                the output channel associated to the output
+    * @param layer
+    *                the layer itself
+    * @param sInputLayerToOverwrite
+    *                the name of the input param (another vector layer) that this output can overwrite
+    *
+    */
+   protected void addOutputVectorLayer(final String sName,
+                                       final String sDescription,
+                                       final int iType,
+                                       final IOutputChannel channel,
+                                       final IVectorLayer layer,
+                                       final String sInputLayerToOverwrite,
+                                       final int subtype) {
+
+      final OutputVectorLayer out = new OutputVectorLayer();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(layer);
+      out.setOutputChannel(channel);
+      out.setShapeType(iType);
+      out.setInputLayerToOverwrite(sInputLayerToOverwrite);
+      out.setSubType(subtype);
+
+      m_OutputObjects.add(out);
+
+   }
+
+   /**
+    * Adds a new vector layer to the output set
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iType
+    *                the shape type of the layer
+    * @param channel
+    *                the output channel associated to the output
+    * @param layer
+    *                the layer itself
+    * @param sInputLayerToOverwrite
+    *                the name of the input param (another vector layer) that this output can overwrite
+    *
+    */
+   protected void addOutputVectorLayer(final String sName,
+                                       final String sDescription,
+                                       final int iType,
+                                       final IOutputChannel channel,
+                                       final IVectorLayer layer,
+                                       final String sInputLayerToOverwrite) {
+
+       addOutputVectorLayer(sName, sDescription, iType, null, null, sInputLayerToOverwrite, Geometry.SUBTYPES.UNKNOWN);
+   }
+
+
+   /**
+    * Adds a new vector layer to the output set. The value of the output is null, and so is the filename. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iType
+    *                the shape type of the layer
+    * @param sInputLayerToOverwrite
+    *                the name of the input param (another vector layer) that this output can overwrite
+    */
+   protected void addOutputVectorLayer(final String sName,
+                                       final String sDescription,
+                                       final int iType,
+                                       final String sInputLayerToOverwrite) {
+
+      addOutputVectorLayer(sName, sDescription, iType, null, null, sInputLayerToOverwrite);
+
+   }
+
+
+   /**
+    * Adds a new vector layer to the output set. The value of the output is null, and so is the filename. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param iType
+    *                the shape type of the layer
+    */
+   protected void addOutputVectorLayer(final String sName,
+                                       final String sDescription,
+                                       final int iType) {
+
+      addOutputVectorLayer(sName, sDescription, iType, null, null, null);
+
+   }
+
+
+   /**
+    * Adds a new vector layer to the output set. The value of the output is null, and so is the filename. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected. The shape type is set to undefined
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    */
+   protected void addOutputVectorLayer(final String sName,
+                                       final String sDescription) {
+
+      addOutputVectorLayer(sName, sDescription, OutputVectorLayer.SHAPE_TYPE_UNDEFINED, null, null, null);
+
+   }
+
+
+   /**
+    * Adds a new table to the output set
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param channel
+    *                the output channel associated to the output
+    * @param table
+    *                the table itself
+    */
+   protected void addOutputTable(final String sName,
+                                 final String sDescription,
+                                 final IOutputChannel channel,
+                                 final ITable table) {
+
+      final Output out = new OutputTable();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(table);
+      out.setOutputChannel(channel);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new table to the output set. The value of the output is null, and so is the filename. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    */
+   protected void addOutputTable(final String sName,
+                                 final String sDescription) {
+
+      addOutputTable(sName, sDescription, null, null);
+
+   }
+
+
+   /**
+    * Adds a new chart panel to the output set
+    *
+    * @param sName
+    *                The name to identify the layer in the set
+    * @param sDescription
+    *                The description of the layer
+    * @param chart
+    *                a chart panel
+    */
+   protected void addOutputChart(final String sName,
+                                 final String sDescription,
+                                 final ChartPanel chart) {
+
+      final Output out = new OutputChart();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(chart);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new chart to the output set. The value of the output is null. Use this method in the DefineCharacteristics() method
+    * of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the output in the set
+    * @param sDescription
+    *                The description of the output
+    */
+   protected void addOutputChart(final String sName,
+                                 final String sDescription) {
+
+      addOutputChart(sName, sDescription, null);
+
+   }
+
+
+   /**
+    * Adds a new image to the output set. The value of the output is null. Use this method in the DefineCharacteristics() method
+    * of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the output in the set
+    * @param sDescription
+    *                The description of the output
+    */
+   protected void addOutputImage(final String sName,
+                                 final String sDescription) {
+
+      final Output out = new OutputImage();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(null);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new text string to the output set
+    *
+    * @param sName
+    *                The name to identify the string in the set
+    * @param sDescription
+    *                The description of the string
+    * @param sText
+    *                the text to add (HTML formatted text)
+    */
+   protected void addOutputText(final String sName,
+                                final String sDescription,
+                                final String sText) {
+
+      final Output out = new OutputText();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(sText);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new text numerical value to the output set. The value of the output is null. Use this method in the
+    * DefineCharacteristics() method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the output in the set
+    * @param sDescription
+    *                The description of the output
+    */
+   protected void addOutputNumericalValue(final String sName,
+                                          final String sDescription) {
+
+      final Output out = new OutputNumericalValue();
+      out.setName(sName);
+      out.setDescription(sDescription);
+      out.setOutputObject(null);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new numerical value to the output set
+    *
+    * @param sName
+    *                The name to identify the value in the set
+    * @param number
+    *                the value of the output
+    */
+   protected void addOutputNumericalValue(final String sName,
+                                          final Number number) {
+
+      final Output out = new OutputNumericalValue();
+      out.setName(sName);
+      out.setDescription(sName);
+      out.setOutputObject(number);
+
+      m_OutputObjects.add(out);
+
+   }
+
+
+   /**
+    * Adds a new text string to the output set. The value of the output is null. Use this method in the DefineCharacteristics()
+    * method of the algorithm, to define the outputs expected.
+    *
+    * @param sName
+    *                The name to identify the output in the set
+    * @param sDescription
+    *                The description of the output
+    */
+   protected void addOutputText(final String sName,
+                                final String sDescription) {
+
+      addOutputText(sName, sDescription, null);
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sName;
+
+   }
+
+
+   /**
+    *
+    * @return the command line name of the algorithm
+    */
+   public String getCommandLineName() {
+
+      final String sClass = this.getClass().getName();
+      final int iLast = sClass.lastIndexOf(".");
+      final String sCommandName = sClass.substring(iLast + 1, sClass.length() - "Algorithm".length());
+
+      return sCommandName.toLowerCase();
+
+   }
+
+
+   /**
+    *
+    * @return a new instance of the algorithm
+    * @throws InstantiationException
+    * @throws IllegalAccessException
+    */
+   public GeoAlgorithm getNewInstance() throws InstantiationException, IllegalAccessException {
+
+      final GeoAlgorithm alg = this.getClass().newInstance();
+
+      alg.setName(m_sName);
+      alg.setGroup(m_sGroup);
+
+      alg.setParameters(m_Parameters.getNewInstance());
+      alg.setOutputObjects(m_OutputObjects.getNewInstance());
+
+      if (m_bIsAutoExtent) {
+         alg.setAnalysisExtent(null);
+         alg.m_bIsAutoExtent = true;
+      }
+
+      return alg;
+
+   }
+
+
+   /**
+    *
+    * @return true if the algorithm is suitable for a modeling process. This should be based on how well-defined the outputs are.
+    *         If, for instance, the number of output layers cannot be known in advance, then this method should return false
+    */
+   public boolean isSuitableForModelling() {
+
+      return true;
+
+   }
+
+
+   /**
+    * Any preprocessing needed before executing the algorithm as part of a model should be carried on in this method. Also, this
+    * method should be used to do any extra checking, to ensure that parameter values are correct. If not, an exception should be
+    * thrown. If data are not yet available (another algorithm in the model has to be run before this one), this method should
+    * return false. Otherwise, should return true if the algorithm can be run after being preprocessed.
+    *
+    * @param model
+    *                the model from which the algorithm is being executed
+    * @throws GeoAlgorithmExecutionException
+    *                 if the parameters are not correct and the algorithm cannot be executed
+    * @returns true if the algorithm can be executed after being preprocessed
+    */
+   public boolean preprocessForModeller(final Object model) throws GeoAlgorithmExecutionException {
+
+      //By default it does nothing, since most algorithms
+      //do not need preprocessing or checking at all.
+
+      return true;
+
+   }
+
+
+   /**
+    * Returns true if the algorithms generates new layers
+    *
+    * @return true if the algorithms generates new layers
+    */
+   public boolean generatesLayers() {
+
+      return m_OutputObjects.hasLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithms generates new layers or tables
+    *
+    * @return true if the algorithms generates new layers or tables
+    */
+   public boolean generatesLayersOrTables() {
+
+      return m_OutputObjects.hasDataObjects();
+
+   }
+
+
+   /**
+    * Returns the number of new objects (layers and tables) generated by the algorithm
+    *
+    * @return the number of new objects (layers and tables) generated by the algorithm
+    */
+   public int getNumberOfOutputObjects() {
+
+      return m_OutputObjects.getOutputDataObjectsCount();
+
+   }
+
+
+   /**
+    * Returns a string containing the command line usage of the algorithm
+    *
+    * @return a string containing the command line usage of the algorithm
+    */
+   public String getCommandLineHelp() {
+
+      final String sFirstLine = "Usage: runalg( \"" + getCommandLineName() + "\",\n";
+
+      return getCommandLineParametersHelp(sFirstLine);
+
+   }
+
+
+   protected String getCommandLineParametersHelp(final String sFirstLine) {
+
+      int i;
+      final ParametersSet params = getParameters();
+      final StringBuffer sb = new StringBuffer(sFirstLine);
+      sb.append(getfixedLengthBlankLine(sFirstLine.length()));
+
+      for (i = 0; i < params.getNumberOfParameters(); i++) {
+         final Parameter param = params.getParameter(i);
+         sb.append(param.getParameterName() + "[");
+         if (param instanceof ParameterDataObject) {
+            AdditionalInfoDataObject ai;
+            try {
+               ai = (AdditionalInfoDataObject) param.getParameterAdditionalInfo();
+               if (!ai.getIsMandatory()) {
+                  sb.append("Optional ");
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+
+         }
+         sb.append(param.getParameterTypeName());
+         if (param instanceof ParameterTableField) {
+            AdditionalInfoTableField ai;
+            try {
+               ai = (AdditionalInfoTableField) param.getParameterAdditionalInfo();
+               sb.append(" from " + ai.getParentParameterName());
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         if (param instanceof ParameterFixedTable) {
+            AdditionalInfoFixedTable ai;
+            try {
+               ai = (AdditionalInfoFixedTable) param.getParameterAdditionalInfo();
+               final String sCols[] = ai.getCols();
+               sb.append(" (Cols:");
+               for (final String element : sCols) {
+                  sb.append(" | " + element);
+               }
+               sb.append(" | ). (Rows: ");
+               if (ai.isNumberOfRowsFixed()) {
+                  sb.append(ai.getRowsCount() + ")");
+               }
+               else {
+                  sb.append("any)");
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         else if (param instanceof ParameterMultipleInput) {
+            AdditionalInfoMultipleInput ai;
+            try {
+               ai = (AdditionalInfoMultipleInput) param.getParameterAdditionalInfo();
+               switch (ai.getDataType()) {
+                  case AdditionalInfoMultipleInput.DATA_TYPE_BAND:
+                     sb.append(" - Band");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_RASTER:
+                     sb.append(" - Raster Layer");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_ANY:
+                     sb.append(" - Vector Layer");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POINT:
+                     sb.append(" - Points Layer");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_LINE:
+                     sb.append(" - Lines Layer");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_VECTOR_POLYGON:
+                     sb.append(" - Polygons Layer");
+                     break;
+                  case AdditionalInfoMultipleInput.DATA_TYPE_TABLE:
+                     sb.append(" - Table");
+                     break;
+               }
+            }
+            catch (final NullParameterAdditionalInfoException e) {}
+         }
+         sb.append("]");
+         sb.append(",\n" + getfixedLengthBlankLine(sFirstLine.length()));
+      }
+
+      for (i = 0; i < m_OutputObjects.getOutputObjectsCount(); i++) {
+         final Output out = m_OutputObjects.getOutput(i);
+         if ((out instanceof OutputRasterLayer) || (out instanceof OutputVectorLayer) || (out instanceof OutputTable)) {
+            //i++;
+            sb.append(out.getName() + "[output ");
+            if (out instanceof OutputRasterLayer) {
+               sb.append("raster layer");
+            }
+            else if (out instanceof OutputVectorLayer) {
+               sb.append("vector layer");
+            }
+            else if (out instanceof OutputTable) {
+               sb.append("table");
+            }
+            sb.append("]");
+            sb.append(",\n" + getfixedLengthBlankLine(sFirstLine.length()));
+         }
+      }
+
+      sb.append(");");
+
+      return sb.toString();
+
+   }
+
+
+   private String getfixedLengthBlankLine(final int iLength) {
+
+      final String sResult = "                                                                     ";
+
+      return sResult.substring(0, iLength);
+
+   }
+
+   public File getHelpFile() {
+       return null;
+   }
+
+   /**
+    * Returns the command line expression that would create this instance of the algorithm
+    *
+    * @return A command line expression representing this algorithm
+    */
+   public String[] getAlgorithmAsCommandLineSentences() {
+
+      int i;
+      String[] sReturn;
+      final String sFirstLine = "runalg(\"" + getCommandLineName() + "\", ";
+      final StringBuffer sb = new StringBuffer(sFirstLine);
+
+      for (i = 0; i < m_Parameters.getNumberOfParameters(); i++) {
+         final Parameter param = m_Parameters.getParameter(i);
+         sb.append(param.getCommandLineParameter() + ", ");
+      }
+
+      for (int j = 0; j < m_OutputObjects.getOutputObjectsCount(); j++) {
+         final Output out = m_OutputObjects.getOutput(j);
+         if ((out instanceof OutputRasterLayer) || (out instanceof Output3DRasterLayer) || (out instanceof OutputVectorLayer)
+             || (out instanceof OutputTable)) {
+            sb.append(out.getCommandLineParameter() + ", ");
+         }
+      }
+
+      final String sAlg = sb.substring(0, sb.length() - 2) + ")";
+
+      if (getUserCanDefineAnalysisExtent()) {
+         sReturn = new String[2];
+         if (m_bIsAutoExtent) {
+            sReturn[0] = "autoextent(\"true\")";
+         }
+         else {
+            final AnalysisExtent ge = getAnalysisExtent();
+            sReturn[0] = "extent( " + ge.toString() + ")";
+         }
+         sReturn[1] = sAlg;
+      }
+      else {
+         sReturn = new String[1];
+         sReturn[0] = sAlg;
+      }
+
+      return sReturn;
+
+   }
+
+
+   ////////////////////////Requirements/////////////////////////////
+
+   /**
+    * Returns true if the algorithm requires vector layers to run
+    *
+    * @see ParametersSet#requiresVectorLayers()
+    * @return true if the algorithm requires vector layers to run
+    */
+   public boolean requiresVectorLayers() {
+
+      return m_Parameters.requiresVectorLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires vector layers as individual input (i.e. not as a multiple input)
+    *
+    * @return true if the algorithm requires vector layers as individual input
+    */
+   public boolean requiresIndividualVectorLayers() {
+
+      return m_Parameters.getNumberOfVectorLayers() > 0;
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires polygon vector layers to run
+    *
+    * @see ParametersSet#requiresPolygonVectorLayers()
+    * @return true if the algorithm requires polygon vector layers to run
+    */
+   public boolean requiresPolygonVectorLayers() {
+
+      return m_Parameters.requiresPolygonVectorLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires line vector layers to run
+    *
+    * @see ParametersSet#requiresLineVectorLayers()
+    * @return true if the algorithm requires line vector layers to run
+    */
+   public boolean requiresLineVectorLayers() {
+
+      return m_Parameters.requiresLineVectorLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires point vector layers to run
+    *
+    * @see ParametersSet#requiresVectorLayers()
+    * @return true if the algorithm requires point vector layers to run
+    */
+   public boolean requiresPointVectorLayers() {
+
+      return m_Parameters.requiresPointVectorLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires raster layers to run
+    *
+    * @see ParametersSet#requiresVectorLayers()
+    * @return true if the algorithm requires raster layers to run
+    */
+   public boolean requiresRasterLayers() {
+
+      return m_Parameters.requiresRasterLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires 3D raster layers to run
+    *
+    * @see ParametersSet#requiresVectorLayers()
+    * @return true if the algorithm requires raster layers to run
+    */
+   public boolean requires3DRasterLayers() {
+
+      return m_Parameters.requires3DRasterLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires raster layers as individual input (i.e. not as a multiple input)
+    *
+    * @return true if the algorithm requires raster layers as individual input
+    */
+   public boolean requiresIndividualRasterLayers() {
+
+      return m_Parameters.getNumberOfRasterLayers() > 0;
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires raster layers as multiple input
+    *
+    * @return true if the algorithm requires raster layers as multiple input
+    */
+   public boolean requiresMultipleRasterLayers() {
+
+      return m_Parameters.requiresMultipleRasterLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires vector layers as multiple input
+    *
+    * @return true if the algorithm requires vector layers as multiple input
+    */
+   public boolean requiresMultipleVectorLayers() {
+
+      return m_Parameters.requiresMultipleVectorLayers();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires tables layers as multiple input
+    *
+    * @return true if the algorithm requires tables layers as multiple input
+    */
+   public boolean requiresMultipleTables() {
+
+      return m_Parameters.requiresMultipleTables();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires raster bands as multiple input (i.e. the parameter set contains a multiple input
+    * parameter of type band)
+    *
+    * @return true if the algorithm requires raster bands as multiple input
+    */
+   public boolean requiresMultipleRasterBands() {
+
+      return m_Parameters.requiresMultipleRasterBands();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires raster layers to run
+    *
+    * @see ParametersSet#requiresVectorLayers()
+    * @return true if the algorithm requires raster layers to run
+    */
+   public boolean requiresTables() {
+
+      return m_Parameters.requiresTables();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires table field layers to run
+    *
+    * @see ParametersSet#requiresTableFields()
+    * @return true if the algorithm requires table fields to run
+    */
+   public boolean requiresTableFields() {
+
+      return m_Parameters.requiresTableFields();
+
+   }
+
+
+   /**
+    * Returns true if the algorithm requires point coordinates to run
+    *
+    * @see ParametersSet#requiresPoints()
+    * @return true if the algorithm requires point coordinates to run
+    */
+   public boolean requiresPoints() {
+
+      return m_Parameters.requiresPoints();
+
+   }
+
+
+   /**
+    * Returns false if there are not enough raster data in the given array to run the algorithm
+    *
+    * @param objs
+    *                an array of available data objects
+    * @return false if the algorithm requires more raster layers than the ones in the data objects array. True if they suffice
+    */
+   public boolean meetsRasterRequirements(final Object[] objs) {
+
+      if (objs == null) {
+         return false;
+      }
+
+      if (requiresRasterLayers()) {
+         for (final Object element : objs) {
+            if (element instanceof IRasterLayer) {
+               return true;
+            }
+         }
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   /**
+    * Returns false if there are not enough 3D raster data in the given array to run the algorithm
+    *
+    * @param objs
+    *                an array of available data objects
+    * @return false if the algorithm requires more raster layers than the ones in the data objects array. True if they suffice
+    */
+   public boolean meets3DRasterRequirements(final Object[] objs) {
+
+      if (objs == null) {
+         return false;
+      }
+
+      if (requires3DRasterLayers()) {
+         for (final Object element : objs) {
+            if (element instanceof I3DRasterLayer) {
+               return true;
+            }
+         }
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   /**
+    * Returns false if there are not enough vector data in the given array to run the algorithm
+    *
+    * @param objs
+    *                an array of available data objects
+    * @return false if the algorithm requires more (or different, i.e other shape type) vector layers than the ones in the data
+    *         objects array. True if they suffice
+    */
+   public boolean meetsVectorRequirements(final Object[] objs) {
+
+      boolean bPolygonLayers = false;
+      boolean bLineLayers = false;
+      boolean bPointLayers = false;
+      boolean bVectorLayers = false;
+
+      if (objs == null) {
+         return false;
+      }
+
+      if (requiresVectorLayers()) {
+         for (final Object element : objs) {
+            if (element instanceof IVectorLayer) {
+               switch (((IVectorLayer) element).getShapeType()) {
+                  case IVectorLayer.SHAPE_TYPE_POINT:
+                     bPointLayers = true;
+                     bVectorLayers = true;
+                     break;
+                  case IVectorLayer.SHAPE_TYPE_LINE:
+                     bLineLayers = true;
+                     bVectorLayers = true;
+                     break;
+                  case IVectorLayer.SHAPE_TYPE_POLYGON:
+                     bPolygonLayers = true;
+                     bVectorLayers = true;
+                     break;
+               }
+            }
+         }
+
+         if ((requiresPointVectorLayers() && !bPointLayers) || (requiresLineVectorLayers() && !bLineLayers)
+             || (requiresPolygonVectorLayers() && !bPolygonLayers)) {
+            return false;
+         }
+         else {
+            return bVectorLayers;
+         }
+      }
+      else {
+         return true;
+
+      }
+
+
+   }
+
+
+   /**
+    * Returns false if there are not enough table objects in the given array to run the algorithm
+    *
+    * @param objs
+    *                an array of available data objects
+    * @return false if the algorithm requires more tables than the ones in the data objects array. True if they suffice
+    */
+   public boolean meetsTableRequirements(final Object[] objs) {
+
+      if (objs == null) {
+         return false;
+      }
+
+      if (requiresTables()) {
+         for (final Object element : objs) {
+            if (element instanceof ITable) {
+               return true;
+            }
+         }
+         return false;
+      }
+      else {
+         return true;
+      }
+
+   }
+
+
+   /**
+    * Returns true if the algorithm could be executed with the given data objects.
+    *
+    * @param objs
+    *                an array of available data objects
+    * @return true if the algorithm could be executed with the given data objects.
+    */
+   public boolean meetsDataRequirements(final Object[] objs) {
+
+      if (objs == null) {
+         return false;
+      }
+
+      return meets3DRasterRequirements(objs) && meetsRasterRequirements(objs) && meetsVectorRequirements(objs)
+             && meetsTableRequirements(objs);
+
+   }
+
+
+   /**
+    * Returns true if the algorithm parameters have correct values.
+    *
+    * @return true if the algorithm parameters have correct values
+    */
+   public boolean hasCorrectParameterValues() {
+
+      return m_Parameters.areParameterValuesCorrect();
+   }
+
+
+   /**
+    * Returns true if the extent has been set automatically by the algorithm, false if it was introduced by the user
+    *
+    * @return true if the extent has been set automatically by the algorithm, false if it was introduced by the user
+    */
+   public boolean isAutoExtent() {
+      return m_bIsAutoExtent;
+   }
+
+
+   /**
+    * Return true if the algorithm can define the output extent from its required input layers. False otherwise.
+    *
+    * @return true if the algorithm can define the output extent from its required input layers. False otherwise.
+    */
+   public boolean canDefineOutputExtentFromInput() {
+
+      if (m_OutputObjects.get3DRasterLayersCount() != 0) {
+         return requires3DRasterLayers();
+      }
+
+      if (m_OutputObjects.getRasterLayersCount() != 0) {
+         return requiresRasterLayers() || requires3DRasterLayers();
+      }
+
+      if (m_OutputObjects.getVectorLayersCount() != 0) {
+         return requiresRasterLayers() || requires3DRasterLayers() || requiresVectorLayers();
+      }
+
+      return true;
+
+   }
+
+
+   /**
+    * Until we find a way of automating this, 3d algorithms should overwrite this method to return true. Otherwise, it will return
+    * false by default. This method is used to know whether to show a 3D Analysis Extent definition panel in the algorithm dialog
+    * or a regular 2D one
+    *
+    * @return true if the algorithm takes 3D inputs or produces 3D output
+    */
+   public boolean is3D() {
+
+      return false;
+
+   }
+
+
+   /**
+    * returns the crs used by the algorithm to produces its outputs
+    *
+    * @return the crs used by the algorithm to produces its outputs;
+    */
+   public Object getOutputCRS() {
+
+      return m_CRS;
+
+   }
+
+
+   /**
+    * Returns true if the algorithm should be shown in a SEXTANTE component, false otherwise. Use this to programatically hide
+    * algorithms if you do not want them to be shown and used for some reason.
+    *
+    * @return true if the algorithm should be shown in a SEXTANTE component, false otherwise.
+    */
+   public boolean isActive() {
+
+      return true;
+
+   }
+
+
+   /**
+    * Changes the attribute name if this name is in the array.
+    *
+    * @param name
+    * @param size
+    * @param attrNames
+    * @return
+    */
+   protected String checkAttrName(String name, int size, String[] attrNames) {
+	   return ShapesTools.checkAttrName(name, size, attrNames);
+	}
+
+	protected void initializeDefaultValues(final Class<?>[] types,
+			final Object[] resultValues) {
+		for (int j = 0; j < types.length; j++) {
+			if (String.class.isAssignableFrom(types[j])){
+				resultValues[j] = "";
+			} else if (Number.class.isAssignableFrom(types[j])){
+				resultValues[j] = 0;
+			} else if (Boolean.class.isAssignableFrom(types[j])){
+				resultValues[j] = false;
+			}
+		}
+	}
+
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/GeoAlgorithm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalResults/CorrelationGraphCreator.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalResults/CorrelationGraphCreator.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalResults/CorrelationGraphCreator.java	(revision 369)
@@ -0,0 +1,146 @@
+package es.unex.sextante.additionalResults;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.Plot;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.renderer.xy.StandardXYItemRenderer;
+import org.jfree.chart.renderer.xy.XYDotRenderer;
+import org.jfree.chart.renderer.xy.XYItemRenderer;
+import org.jfree.data.xy.XYDataset;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import es.unex.sextante.math.regression.Regression;
+
+/**
+ * This class creates a graph representing a regression analysis, with a cloud of points and an adjusted function
+ * 
+ * @author volaya
+ * 
+ */
+public class CorrelationGraphCreator {
+
+   private JFreeChart       chart;
+   private ChartPanel       jPanelChart = null;
+   private final Regression regression;
+
+
+   /**
+    * Constructs the graph based on a given regression
+    * 
+    * @param reg
+    *                the regression
+    */
+   public CorrelationGraphCreator(final Regression reg) {
+
+      regression = reg;
+
+      createChart();
+
+      final Plot plot = chart.getPlot();
+      plot.setOutlineStroke(new BasicStroke(1));
+      plot.setOutlinePaint(Color.blue);
+
+   }
+
+
+   /**
+    * Returns a panel containing the chart
+    * 
+    * @return a panel containing the chart
+    */
+   public ChartPanel getChartPanel() {
+
+      if (jPanelChart == null) {
+         jPanelChart = new ChartPanel(chart);
+      }
+      return jPanelChart;
+   }
+
+
+   /**
+    * Returns the regression chart
+    * 
+    * @return the regression chart
+    */
+   public JFreeChart getChart() {
+
+      return chart;
+
+   }
+
+
+   private void createChart() {
+
+      final XYDataset data1 = getOriginalDataset();
+      chart = ChartFactory.createScatterPlot(null, null, null, data1, PlotOrientation.VERTICAL, false, true, true);
+
+      final XYPlot plot = chart.getXYPlot();
+      plot.setRenderer(new XYDotRenderer());
+      plot.setDomainCrosshairVisible(true);
+      plot.setRangeCrosshairVisible(true);
+      plot.getRenderer().setSeriesPaint(0, Color.blue);
+
+      final XYDataset data2 = getDatasetFromFitting();
+      final XYItemRenderer renderer = new StandardXYItemRenderer();
+      renderer.setSeriesPaint(0, Color.red);
+
+      plot.setDataset(1, data2);
+      plot.setRenderer(1, renderer);
+
+   }
+
+
+   private XYDataset getOriginalDataset() {
+
+      int i;
+      final XYSeries series = new XYSeries("");
+      final int NUM_POINTS_FOR_GRAPH = 2000;
+
+      final double cellValue1[] = new double[NUM_POINTS_FOR_GRAPH];
+      final double cellValue2[] = new double[NUM_POINTS_FOR_GRAPH];
+      regression.getRestrictedSample(cellValue1, cellValue2, NUM_POINTS_FOR_GRAPH);
+      for (i = 0; i < cellValue1.length; i++) {
+         series.add(cellValue1[i], cellValue2[i]);
+      }
+
+      XYSeriesCollection dataset;
+
+      dataset = new XYSeriesCollection();
+      dataset.addSeries(series);
+
+      return dataset;
+
+   }
+
+
+   private XYDataset getDatasetFromFitting() {
+
+      int i;
+      final int STEPS = 200;
+      double x, y;
+      final XYSeries series = new XYSeries("");
+      XYSeriesCollection dataset;
+
+      final double dStep = (regression.getXMax() - regression.getXMin()) / STEPS;
+
+      for (i = 0; i < STEPS; i++) {
+         x = regression.getXMin() + dStep * i;
+         y = regression.getY(x);
+         series.add(x, y);
+      }
+
+      dataset = new XYSeriesCollection();
+      dataset.addSeries(series);
+
+      return dataset;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/additionalResults/CorrelationGraphCreator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/docEngines/html/HTMLDoc.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/docEngines/html/HTMLDoc.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/docEngines/html/HTMLDoc.java	(revision 369)
@@ -0,0 +1,389 @@
+package es.unex.sextante.docEngines.html;
+
+/**
+ * A class to create simple HTML-formatted texts. Use this to create HTML results from SEXTANTE algorithms
+ * 
+ * @author volaya
+ * 
+ */
+public class HTMLDoc {
+
+   private final String OPENING_HTML_CODE_1 = "<html>\n" + "<head>" + "<title>";
+
+   private final String OPENING_HTML_CODE_2 = "</title>\n" + "</head>\n" + "<body bgcolor=\"#FFFFFF\" text=\"#000000\">\n";
+
+   private final String CLOSING_HTML_CODE   = "</body>\n" + "</html>";
+
+   private StringBuffer m_sHTMLCode;
+
+
+   /**
+    * Opens the HTML page with the given title
+    * 
+    * @param sTitle
+    *                the title of the page
+    */
+   public void open(final String sTitle) {
+
+      m_sHTMLCode = new StringBuffer("");
+
+      m_sHTMLCode.append(OPENING_HTML_CODE_1);
+      m_sHTMLCode.append(sTitle);
+      m_sHTMLCode.append(OPENING_HTML_CODE_2);
+
+   }
+
+
+   /**
+    * Closes the HTML page
+    */
+   public void close() {
+
+      m_sHTMLCode.append(CLOSING_HTML_CODE);
+
+   }
+
+
+   /**
+    * Returns the page as a HTML-formatted string
+    * 
+    * @return the page as a HTML-formatted string
+    */
+   public String getHTMLCode() {
+
+      return m_sHTMLCode.toString();
+
+   }
+
+
+   /**
+    * adds the given text. HTML tags can be included
+    * 
+    * @param sText
+    *                the text to add
+    */
+   public void addText(final String sText) {
+
+      m_sHTMLCode.append(sText);
+
+   }
+
+
+   /**
+    * Adds the given text in bold font
+    * 
+    * @param sText
+    *                the text to add
+    */
+   public void addBoldText(final String sText) {
+
+      m_sHTMLCode.append("<b>");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("</b>");
+
+   }
+
+
+   /**
+    * Adds a new paragraph
+    * 
+    * @param sText
+    *                the text of the paragraph
+    */
+   public void addParagraph(final String sText) {
+
+      m_sHTMLCode.append("<p align=\"left\">");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("</p>\n");
+
+   }
+
+
+   /**
+    * Adds a line break
+    */
+   public void addLineBreak() {
+
+      m_sHTMLCode.append("</br>");
+
+   }
+
+
+   /**
+    * Adds a header
+    * 
+    * @param sText
+    *                the text of the header
+    * @param iOrder
+    *                the order (importance) of the header (1,2,3...)
+    */
+   public void addHeader(final String sText,
+                         final int iOrder) {
+
+      m_sHTMLCode.append("<h");
+      m_sHTMLCode.append(iOrder);
+      m_sHTMLCode.append(" align=\"left\">");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("</h");
+      m_sHTMLCode.append(iOrder);
+      m_sHTMLCode.append(">\n");
+
+   }
+
+
+   /**
+    * Adds a hyperlink
+    * 
+    * @param sText
+    *                the text of the link
+    * @param sURL
+    *                the URL to link to
+    */
+   public void addHyperlink(final String sText,
+                            final String sURL) {
+
+      m_sHTMLCode.append("<a href=\"");
+      m_sHTMLCode.append(sURL);
+      m_sHTMLCode.append("\">\n");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("\n</a>");
+
+   }
+
+
+   /**
+    * Adds a horizontal separator
+    */
+   public void addHorizontalSeparator() {
+
+      m_sHTMLCode.append("<p><hr width=\"80%\"></p>");
+
+   }
+
+
+   /**
+    * Adds an image
+    * 
+    * @param sFilename
+    *                the filename of the image
+    */
+   public void addImage(final String sFilename) {
+
+      m_sHTMLCode.append("<img src=\"");
+      m_sHTMLCode.append(sFilename);
+      m_sHTMLCode.append("\">\n");
+
+   }
+
+
+   public void addThumbnail(final String sFilename,
+                            final int iWidth,
+                            final boolean bIsPercent) {
+
+      m_sHTMLCode.append("<a href=\"");
+      m_sHTMLCode.append(sFilename);
+      m_sHTMLCode.append("\">\n");
+      m_sHTMLCode.append("<img src=\"");
+      m_sHTMLCode.append(sFilename);
+      m_sHTMLCode.append("\" width=");
+      m_sHTMLCode.append(iWidth);
+      if (bIsPercent) {
+         m_sHTMLCode.append("%");
+      }
+      m_sHTMLCode.append("></a><br><br>\n");
+
+   }
+
+
+   /**
+    * Starts an unordered list
+    */
+   public void startUnorderedList() {
+
+      m_sHTMLCode.append("<ul>\n");
+
+   }
+
+
+   /**
+    * Starts an ordered list
+    */
+   public void startOrderedList() {
+
+      m_sHTMLCode.append("<ol>\n");
+
+   }
+
+
+   /**
+    * Closes an unordered list
+    */
+   public void closeUnorderedList() {
+
+      m_sHTMLCode.append("</ul>\n");
+
+   }
+
+
+   /**
+    * Closes an ordered list
+    */
+   public void closeOrderedList() {
+
+      m_sHTMLCode.append("</ol>\n");
+
+   }
+
+
+   /**
+    * Adds an element to the last opened list (ordered or unordered)
+    * 
+    * @param sText
+    *                the text of the element
+    */
+   public void addListElement(final String sText) {
+
+      m_sHTMLCode.append("<li>");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("</li>\n");
+
+   }
+
+
+   /**
+    * Creates an ordered list from a set of elements
+    * 
+    * @param sText
+    *                an array of string, each of them representing one element of the list
+    */
+   public void addOrderedList(final String[] sText) {
+
+      startOrderedList();
+      for (int i = 0; i < sText.length; i++) {
+         addListElement(sText[i]);
+      }
+      closeOrderedList();
+
+   }
+
+
+   /**
+    * Creates an unordered list from a set of elements
+    * 
+    * @param sText
+    *                an array of string, each of them representing one element of the list
+    */
+   public void addUnorderedList(final String[] sText) {
+
+      startUnorderedList();
+      for (int i = 0; i < sText.length; i++) {
+         addListElement(sText[i]);
+      }
+      closeUnorderedList();
+
+   }
+
+
+   /**
+    * Adds a table
+    * 
+    * @param Table
+    *                The table as a 2D array of strings
+    * @param sDescription
+    *                The description of the table
+    * @param bColorFirstRow
+    *                true if should give a different color to the first row
+    * @param bColorFirstCol
+    *                true if should give a different color to the first columns
+    */
+   public void addTable(final String[][] Table,
+                        final String sDescription,
+                        final boolean bColorFirstRow,
+                        final boolean bColorFirstCol) {
+
+      int i, j;
+      int iRows, iCols;
+      int iWidth;
+
+      iRows = Table.length;
+      if (iRows > 0) {
+         iCols = Table[0].length;
+      }
+      else {
+         return;
+      }
+
+      iWidth = (100 / iCols);
+
+      m_sHTMLCode.append("<table width=\"99%\" style=\"background-color:transparent;\" "
+                         + "border=0 cellspacing=0 cellpadding=2 >\n");
+
+      for (i = 0; i < iRows; i++) {
+         if ((i == 0) && bColorFirstRow) {
+            m_sHTMLCode.append("<tr bgcolor=\"#CCCCCC\">\n");
+         }
+         else {
+            m_sHTMLCode.append("<tr>\n");
+         }
+         for (j = 0; j < iCols; j++) {
+            m_sHTMLCode.append("<td width=\"");
+            m_sHTMLCode.append(iWidth);
+            m_sHTMLCode.append("%\"");
+            if ((j == 0) & bColorFirstCol) {
+               m_sHTMLCode.append("bgcolor=\"#CCCCCC\"");
+            }
+            m_sHTMLCode.append("align=\"center\">");
+            try {
+               m_sHTMLCode.append(Table[i][j]);
+            }
+            catch (final Exception e) {}
+            m_sHTMLCode.append("</td>");
+         }
+         m_sHTMLCode.append("\n</tr>\n");
+      }
+
+      m_sHTMLCode.append("\n</table>\n");
+      m_sHTMLCode.append("<p align=\"center\"><i>");
+      m_sHTMLCode.append(sDescription);
+      m_sHTMLCode.append("</i></p>\n");
+
+   }
+
+
+   /**
+    * Adds an image an a caption describing it
+    * 
+    * @param sImageFile
+    *                the image file
+    * @param sDescription
+    *                the caption
+    */
+   public void addImageAndDescription(final String sImageFile,
+                                      final String sDescription) {
+
+      m_sHTMLCode.append("<p><center>\n");
+      m_sHTMLCode.append("<img src=\"");
+      m_sHTMLCode.append(sImageFile);
+      m_sHTMLCode.append("\"><br>\n");
+      m_sHTMLCode.append(sDescription);
+      m_sHTMLCode.append("\n</center></p>\n");
+
+   }
+
+
+   /**
+    * Adds text in courier font
+    * 
+    * @param sText
+    *                the text to add
+    */
+   public void addCourierText(final String sText) {
+
+      m_sHTMLCode.append("<font face=\"courier\">");
+      m_sHTMLCode.append(sText);
+      m_sHTMLCode.append("</font>");
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/docEngines/html/HTMLDoc.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/ASCII3DFileTools.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/ASCII3DFileTools.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/ASCII3DFileTools.java	(revision 369)
@@ -0,0 +1,98 @@
+package es.unex.sextante.io3d;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+
+
+public class ASCII3DFileTools {
+
+   public static I3DRasterLayer readFile(final File file) throws IOException, NumberFormatException {
+
+      String s = new String();
+      int iX, iY, iZ;
+      double dCellsize, dCellsizeZ;
+      double dX, dY, dZ;
+      final BufferedReader fin = new BufferedReader(new FileReader(file));
+
+      s = fin.readLine();
+      String[] sTokens = s.split(" ");
+      iX = Integer.parseInt(sTokens[0]);
+      iY = Integer.parseInt(sTokens[1]);
+      iZ = Integer.parseInt(sTokens[2]);
+      s = fin.readLine();
+      sTokens = s.split(" ");
+      dX = Double.parseDouble(sTokens[0]);
+      dY = Double.parseDouble(sTokens[1]);
+      dZ = Double.parseDouble(sTokens[2]);
+      s = fin.readLine();
+      sTokens = s.split(" ");
+      dCellsize = Double.parseDouble(sTokens[0]);
+      dCellsizeZ = Double.parseDouble(sTokens[1]);
+
+      final AnalysisExtent ae = new AnalysisExtent();
+      ae.setCellSize(dCellsize);
+      ae.setCellSizeZ(dCellsizeZ);
+      ae.setXRange(dX, dX + iX * dCellsize, true);
+      ae.setYRange(dY, dY + iY * dCellsize, true);
+      ae.setZRange(dZ, dZ + iZ * dCellsizeZ, true);
+
+      final Default3DRasterLayer layer = new Default3DRasterLayer();
+      layer.create("", file.getAbsolutePath(), ae, null);
+
+      for (int z = 0; z < iZ; z++) {
+         for (int y = 0; y < iY; y++) {
+            s = fin.readLine();
+            sTokens = s.split(" ");
+            for (int x = 0; x < iX; x++) {
+               layer.setCellValue(x, y, z, Double.parseDouble(sTokens[x]));
+            }
+         }
+      }
+      fin.close();
+
+      return layer;
+
+   }
+
+
+   public static boolean writeFile(final I3DRasterLayer layer,
+                                   final File file) {
+
+      int x;
+      try {
+         final FileWriter writer = new FileWriter(file);
+         final BufferedWriter out = new BufferedWriter(writer);
+         final AnalysisExtent extent = layer.getLayerExtent();
+         out.write(Integer.toString(extent.getNX()) + " " + Integer.toString(extent.getNY()) + " "
+                   + Integer.toString(extent.getNZ()) + "\n");
+         out.write(Double.toString(extent.getXMin()) + " " + Double.toString(extent.getYMin()) + " "
+                   + Double.toString(extent.getZMin()) + "\n");
+         out.write(Double.toString(layer.getCellSize()) + " " + Double.toString(layer.getCellSizeZ()) + "\n");
+         for (int z = 0; z < layer.getNZ(); z++) {
+            for (int y = 0; y < layer.getNY(); y++) {
+               for (x = 0; x < layer.getNX() - 1; x++) {
+                  out.write(Double.toString(layer.getCellValueAsDouble(x, y, z)) + " ");
+               }
+               out.write(Double.toString(layer.getCellValueAsDouble(x, y, z)) + "\n");
+            }
+         }
+         out.close();
+         writer.close();
+      }
+      catch (final Exception e) {
+         e.printStackTrace();
+         return false;
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/ASCII3DFileTools.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/Default3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/Default3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/Default3DRasterLayer.java	(revision 369)
@@ -0,0 +1,267 @@
+package es.unex.sextante.io3d;
+
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.outputs.FileOutputChannel;
+import es.unex.sextante.outputs.IOutputChannel;
+import es.unex.sextante.rasterWrappers.Grid3DCell;
+
+public class Default3DRasterLayer
+         implements
+            I3DRasterLayer {
+
+   private AnalysisExtent m_Extent;
+   private double         m_dData[][][];
+   private double         m_dNoDataValue = -99999d;
+   private String         m_sFilename;
+   private String         m_sName;
+   private Object         m_CRS;
+
+
+   public void create(final String sName,
+                      final String sFilename,
+                      final AnalysisExtent ae,
+                      final Object crs) {
+
+      m_CRS = crs;
+      m_sName = sName;
+      m_sFilename = sFilename;
+      m_Extent = ae;
+      m_dData = new double[ae.getNX()][ae.getNY()][ae.getNZ()];
+
+
+   }
+
+
+   public byte getCellValueAsByte(final int x,
+                                  final int y,
+                                  final int z) {
+
+      return (byte) getCellValueAsDouble(x, y, z);
+
+   }
+
+
+   public double getCellValueAsDouble(final int x,
+                                      final int y,
+                                      final int z) {
+
+      try {
+         return m_dData[x][y][z];
+      }
+      catch (final Exception e) {
+         return m_dNoDataValue;
+      }
+
+   }
+
+
+   public float getCellValueAsFloat(final int x,
+                                    final int y,
+                                    final int z) {
+
+      return (float) getCellValueAsDouble(x, y, z);
+
+   }
+
+
+   public int getCellValueAsInt(final int x,
+                                final int y,
+                                final int z) {
+
+      return (int) getCellValueAsDouble(x, y, z);
+
+   }
+
+
+   public short getCellValueAsShort(final int x,
+                                    final int y,
+                                    final int z) {
+
+      return (short) getCellValueAsDouble(x, y, z);
+
+   }
+
+
+   public int getDataType() {
+
+      return RASTER_DATA_TYPE_DOUBLE;
+
+   }
+
+
+   public double getCellSize() {
+
+      return m_Extent.getCellSize();
+
+   }
+
+
+   public double getCellSizeZ() {
+
+      return m_Extent.getCellSizeZ();
+
+   }
+
+
+   public AnalysisExtent getLayerExtent() {
+
+      return m_Extent;
+
+   }
+
+
+   public int getNX() {
+
+      return m_dData.length;
+
+   }
+
+
+   public int getNY() {
+
+      return m_dData[0].length;
+   }
+
+
+   public int getNZ() {
+
+      return m_dData[0][0].length;
+
+   }
+
+
+   public double getNoDataValue() {
+
+      return m_dNoDataValue;
+
+   }
+
+
+   public double getValueAt(final double x,
+                            final double y,
+                            final double z) {
+
+      final Grid3DCell cell = m_Extent.getGridCoordsFromWorldCoords(x, y, z);
+      return getCellValueAsDouble(cell.getX(), cell.getY(), cell.getZ());
+
+   }
+
+
+   public boolean isInWindow(final int x,
+                             final int y,
+                             final int z) {
+
+      return (x >= 0) && (y >= 0) && (z >= 0) && (x < getNX()) && (y < getNY()) && (z < getNZ());
+
+   }
+
+
+   public boolean isNoDataValue(final double dNoDataValue) {
+
+      return dNoDataValue == m_dNoDataValue;
+   }
+
+
+   public void setCellValue(final int x,
+                            final int y,
+                            final int z,
+                            final double dValue) {
+
+      try {
+         m_dData[x][y][z] = dValue;
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   public void setNoData(final int x,
+                         final int y,
+                         final int z) {
+
+      try {
+         m_dData[x][y][z] = m_dNoDataValue;
+      }
+      catch (final Exception e) {}
+
+   }
+
+
+   public void setNoDataValue(final double dNoDataValue) {
+
+      m_dNoDataValue = dNoDataValue;
+
+   }
+
+
+   public Object getCRS() {
+
+      return m_CRS;
+
+   }
+
+
+   public Rectangle2D getFullExtent() {
+
+      return m_Extent.getAsRectangle2D();
+
+   }
+
+
+   public void close() {}
+
+
+   public Object getBaseDataObject() {
+
+      return m_dData;
+
+   }
+
+
+   public IOutputChannel getOutputChannel() {
+
+      return new FileOutputChannel(m_sFilename);
+
+   }
+
+
+   public String getName() {
+
+      return m_sName;
+
+   }
+
+
+   public void open() {}
+
+
+   public void postProcess() throws Exception {
+
+      ASCII3DFileTools.writeFile(this, new File(m_sFilename));
+
+   }
+
+
+   public void setName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   public void free() {
+
+      m_dData = null;
+
+   }
+
+    @Override
+    public String getContextName() {
+        return null;
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/io3d/Default3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputIDException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputIDException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputIDException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class WrongOutputIDException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public WrongOutputIDException() {
+
+      super("Wrong uoutput ID exception");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputIDException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterValueException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterValueException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterValueException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class WrongParameterValueException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public WrongParameterValueException() {
+
+      super("Wrong parameter value exception");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterValueException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/RepeatedParameterNameException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/RepeatedParameterNameException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/RepeatedParameterNameException.java	(revision 369)
@@ -0,0 +1,9 @@
+package es.unex.sextante.exceptions;
+
+public class RepeatedParameterNameException
+         extends
+            Exception {
+
+   public RepeatedParameterNameException() {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/RepeatedParameterNameException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongSerializedStringParameterValueException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongSerializedStringParameterValueException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongSerializedStringParameterValueException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.exceptions;
+
+public class WrongSerializedStringParameterValueException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongSerializedStringParameterValueException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterTypeException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterTypeException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterTypeException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class WrongParameterTypeException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public WrongParameterTypeException() {
+
+      super("Wrong parameter type execption");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterTypeException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/OptionalParentParameterException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/OptionalParentParameterException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/OptionalParentParameterException.java	(revision 369)
@@ -0,0 +1,9 @@
+package es.unex.sextante.exceptions;
+
+public class OptionalParentParameterException
+         extends
+            Exception {
+
+   public OptionalParentParameterException() {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/OptionalParentParameterException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputChannelDataException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputChannelDataException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputChannelDataException.java	(revision 369)
@@ -0,0 +1,7 @@
+package es.unex.sextante.exceptions;
+
+public class WrongOutputChannelDataException
+         extends
+            Exception {
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongOutputChannelDataException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UnsupportedOutputChannelException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UnsupportedOutputChannelException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UnsupportedOutputChannelException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class UnsupportedOutputChannelException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public UnsupportedOutputChannelException() {
+
+      super("Unsupported output channel");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UnsupportedOutputChannelException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/GeoAlgorithmExecutionException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/GeoAlgorithmExecutionException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/GeoAlgorithmExecutionException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class GeoAlgorithmExecutionException
+         extends
+            Exception {
+
+   public GeoAlgorithmExecutionException(final String s) {
+
+      super(s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/GeoAlgorithmExecutionException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterValueException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterValueException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterValueException.java	(revision 369)
@@ -0,0 +1,12 @@
+package es.unex.sextante.exceptions;
+
+public class NullParameterValueException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public NullParameterValueException() {
+
+      super("Null parameter value exception");
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterValueException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterIDException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterIDException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterIDException.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.exceptions;
+
+public class WrongParameterIDException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public WrongParameterIDException() {
+
+      super("Wrong parameter ID exception");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongParameterIDException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongInputException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongInputException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongInputException.java	(revision 369)
@@ -0,0 +1,22 @@
+package es.unex.sextante.exceptions;
+
+import es.unex.sextante.core.Sextante;
+
+public class WrongInputException
+         extends
+            Exception {
+
+   public WrongInputException() {
+
+      super(Sextante.getText("Wrong_or_missing_parameters_definition"));
+
+   }
+
+
+   public WrongInputException(final String s) {
+
+      super(s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongInputException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UndefinedParentParameterNameException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UndefinedParentParameterNameException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UndefinedParentParameterNameException.java	(revision 369)
@@ -0,0 +1,9 @@
+package es.unex.sextante.exceptions;
+
+public class UndefinedParentParameterNameException
+         extends
+            Exception {
+
+   public UndefinedParentParameterNameException() {}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/UndefinedParentParameterNameException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterAdditionalInfoException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterAdditionalInfoException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterAdditionalInfoException.java	(revision 369)
@@ -0,0 +1,12 @@
+package es.unex.sextante.exceptions;
+
+public class NullParameterAdditionalInfoException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public NullParameterAdditionalInfoException() {
+
+      super("Null parameter additional info exception");
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/NullParameterAdditionalInfoException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongAnalysisExtentException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongAnalysisExtentException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongAnalysisExtentException.java	(revision 369)
@@ -0,0 +1,20 @@
+package es.unex.sextante.exceptions;
+
+public class WrongAnalysisExtentException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public WrongAnalysisExtentException(final String s) {
+
+      super(s);
+
+   }
+
+
+   public WrongAnalysisExtentException() {
+
+      super("Wrong raster extension exception");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/WrongAnalysisExtentException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/IteratorException.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/IteratorException.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/IteratorException.java	(revision 369)
@@ -0,0 +1,20 @@
+package es.unex.sextante.exceptions;
+
+public class IteratorException
+         extends
+            GeoAlgorithmExecutionException {
+
+   public IteratorException() {
+
+      super("Iterator exception");
+
+   }
+
+
+   public IteratorException(final String s) {
+
+      super(s);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/exceptions/IteratorException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ITable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ITable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ITable.java	(revision 369)
@@ -0,0 +1,112 @@
+package es.unex.sextante.dataObjects;
+
+import org.gvsig.fmap.dal.feature.FeatureStore;
+
+/**
+ * This is the base interface that all table objects have to implement to be able to be used by SEXTANTE algorithms.
+ *
+ * Instead of implementing this class directly, it is recommended to extend {@link AbstractTable}
+ *
+ * @author Victor Olaya. volaya@unex.es
+ *
+ */
+public interface ITable
+         extends
+            IDataObject {
+
+   /**
+    * Creates a new table
+    *
+    * @param sName
+    *                The name of the table
+    * @param sFilename
+    *                The filename associated with the table
+    * @param types
+    *                an array with attributes data types
+    * @param sFields
+    *                an array with attributes names
+    */
+   //	public void create(String sName,
+   //						String sFilename,
+   //						Class[] types,
+   //						String[] sFields);
+   /**
+    * adds a new record to the table
+    *
+    * @param attributes
+    *                the values of the record
+    */
+   public void addRecord(Object[] attributes);
+
+
+   /**
+    * Returns an iterator to iterate the table
+    *
+    * @return an iterator to iterate the table
+    */
+   public IRecordsetIterator iterator();
+
+
+   /**
+    * Returns the name of a field
+    *
+    * @param i
+    *                the field. zero-based
+    * @return The name of the specified field
+    */
+   public String getFieldName(int i);
+
+
+   /**
+    * Returns the data type of a field
+    *
+    * @param i
+    *                the field. zero-based
+    * @return The data type of the specified field
+    */
+   public Class getFieldType(int i);
+
+
+   /**
+    * Returns the total number of fields
+    *
+    * @return the total number of fields
+    */
+   public int getFieldCount();
+
+
+   /**
+    * Returns an array with data types of all the fields in the table
+    *
+    * @return an array with data types of all the fields in the table
+    */
+   public Class[] getFieldTypes();
+
+
+   /**
+    * Returns an array with the names of all the fields in the table
+    *
+    * @return an array with the names of all the fields in the table
+    */
+   public String[] getFieldNames();
+
+
+   /**
+    * Returns the total number of records(rows) in the table
+    *
+    * @return the total number of records(rows) in the table
+    */
+   public long getRecordCount();
+
+
+   /**
+    * Returns the index of a field from its name. Returns -1 if there is not a field with that name.
+    *
+    * @param fieldName
+    *                the name of the field
+    * @return the index of the given field
+    */
+   public int getFieldIndexByName(String fieldName);
+
+   public FeatureStore getFeatureStore();
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ITable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/RecordImpl.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/RecordImpl.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/RecordImpl.java	(revision 369)
@@ -0,0 +1,42 @@
+package es.unex.sextante.dataObjects;
+
+/**
+ * A simple implementation of the IRecord interface
+ *
+ * @author volaya
+ *
+ */
+public class RecordImpl
+         implements
+            IRecord {
+
+   private final Object m_Values[];
+
+
+   /**
+    * Creates a new record from an array of values
+    *
+    * @param values
+    *                an array of values
+    */
+   public RecordImpl(final Object[] values) {
+
+      m_Values = values;
+
+   }
+
+
+   public Object getValue(final int field) {
+
+      return m_Values[field];
+
+   }
+
+
+   public Object[] getValues() {
+
+      return m_Values;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/RecordImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeature.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeature.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeature.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.dataObjects;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+/**
+ * A generic interface for features, to be used by SEXTANTE algorithms
+ *
+ * @author Victor Olaya volaya@unex.es
+ *
+ */
+public interface IFeature {
+
+   /**
+    * Returns the geometry of the feature
+    *
+    * @return the geometry of the feature
+    */
+   public Geometry getGeometry();
+
+
+   /**
+    * Returns the set of attributes of the feature
+    *
+    * @return the attributes of the feature
+    */
+   public IRecord getRecord();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeature.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRasterLayer.java	(revision 369)
@@ -0,0 +1,508 @@
+package es.unex.sextante.dataObjects;
+
+import java.awt.image.DataBuffer;
+
+import es.unex.sextante.core.AnalysisExtent;
+
+/**
+ * This is the base interface that all raster object have to implement to be able to be used by SEXTANTE algorithms.
+ * 
+ * Instead of implementing this class directly, it is recommended to extend {@link AbstractRasterLayer}, since it solves some of
+ * the most complex methods, such as grid window definition and resampling methods
+ * 
+ * @author Victor Olaya. volaya@unex.es
+ * 
+ */
+public interface IRasterLayer
+         extends
+            ILayer {
+
+   public static final int RASTER_DATA_TYPE_FLOAT         = DataBuffer.TYPE_FLOAT;
+   public static final int RASTER_DATA_TYPE_DOUBLE        = DataBuffer.TYPE_DOUBLE;
+   public static final int RASTER_DATA_TYPE_INT           = DataBuffer.TYPE_INT;
+   public static final int RASTER_DATA_TYPE_SHORT         = DataBuffer.TYPE_SHORT;
+   public static final int RASTER_DATA_TYPE_BYTE          = DataBuffer.TYPE_BYTE;
+
+   public static final int INTERPOLATION_NearestNeighbour = 0;
+   public static final int INTERPOLATION_Bilinear         = 1;
+   public static final int INTERPOLATION_InverseDistance  = 2;
+   public static final int INTERPOLATION_BicubicSpline    = 3;
+   public static final int INTERPOLATION_BSpline          = 4;
+
+
+   /**
+    * Returns the data type of the layer
+    * 
+    * @return the data type of the layer
+    */
+   public int getDataType();
+
+
+   /**
+    * Returns the extent of the query window of this layer. Each layer can have a query window, which makes it easier to
+    * seamlessly combine several layers.
+    * 
+    * @return the window grid extent
+    */
+   public AnalysisExtent getWindowGridExtent();
+
+
+   /**
+    * Returns the extent of the whole layer
+    * 
+    * @return the extent of the whole layer
+    */
+   public AnalysisExtent getLayerGridExtent();
+
+
+   /**
+    * Return the cellsize of the query window. X and Y cellsizes are assumed to be equal
+    * 
+    * @return the cellsize of the query window
+    */
+   public double getWindowCellSize();
+
+
+   /**
+    * Return the original cellsize of the layer. X and Y cellsizes are assumed to be equal
+    * 
+    * @return the original cellsize of the layer
+    */
+   public double getLayerCellSize();
+
+
+   public void assign(double dValue);
+
+
+   public void assign(IRasterLayer layer);
+
+
+   public void assignNoData();
+
+
+   /**
+    * Sets the value at a cell, in the first band of the layer
+    * 
+    * @param x
+    *                the x coordinate (cols)
+    * @param y
+    *                the y coordinate (rows)
+    * @param dValue
+    *                the new value
+    */
+   public void setCellValue(int x,
+                            int y,
+                            double dValue);
+
+
+   /**
+    * Sets the value at a cell
+    * 
+    * @param x
+    *                the x coordinate (cols)
+    * @param y
+    *                the y coordinate (rows)
+    * @param iBand
+    *                the band (zero-based)
+    * @param dValue
+    *                the new value
+    */
+   public void setCellValue(int x,
+                            int y,
+                            int iBand,
+                            double dValue);
+
+
+   /**
+    * Adds a value to the current value of a cell in the first band of the layer in the first band of the layer
+    * 
+    * @param x
+    *                the x coordinate (cols)
+    * @param y
+    *                the y coordinate (rows)
+    * @param dValue
+    *                the value to sum
+    */
+   public void addToCellValue(int x,
+                              int y,
+                              double dValue);
+
+
+   /**
+    * Adds a value to the current value of a cell
+    * 
+    * @param x
+    *                the x coordinate (cols)
+    * @param y
+    *                the y coordinate (rows)
+    * @param iBand
+    *                the band (zero-based)
+    * @param dValue
+    *                the value to sum
+    */
+   public void addToCellValue(int x,
+                              int y,
+                              int iBand,
+                              double dValue);
+
+
+   /**
+    * adds the value of another raster layer to this one. Both layers must have the same window This is supposed to be used with
+    * monoband layers, so only the first band of each one is used.
+    */
+   public void add(IRasterLayer layer);
+
+
+   /**
+    * Multiplies all the values of a layer by a fixed value
+    * 
+    * @param d
+    *                the value to multiply
+    */
+   public void multiply(double d);
+
+
+   /**
+    * Gets the no-data value of the layer
+    * 
+    * @return the no-data value of the layer
+    */
+   public double getNoDataValue();
+
+
+   /**
+    * Sets the no-data value of the layer
+    * 
+    * @param dNoDataValue
+    *                the new no-data value
+    */
+   public void setNoDataValue(double dNoDataValue);
+
+
+   /**
+    * Set the value of a cell to the no-data value
+    * 
+    * @param x
+    *                the x coordinate(col) of the cell to set to no-data
+    * @param y
+    *                the y coordinate(row) of the cell to set to no-data
+    * @param iBand
+    *                the band to set to no-data
+    */
+   public void setNoData(int x,
+                         int y,
+                         int iBand);
+
+
+   /**
+    * Set the value of a cell in the first band of a layer to the no-data value
+    * 
+    * @param x
+    *                the x coordinate(col) of the cell to set to no-data
+    * @param y
+    *                the y coordinate(row) of the cell to set to no-data
+    */
+   public void setNoData(int x,
+                         int y);
+
+
+   /**
+    * Checks if the given value equals the no-data value of the layer
+    * 
+    * @param dNoDataValue
+    *                a value to check
+    * @return true if the given value equals the no-data value of the layer
+    */
+   public boolean isNoDataValue(double dNoDataValue);
+
+
+   //coordinates in the following methods are coordinates of the query window.
+
+   public byte getCellValueAsByte(int x,
+                                  int y,
+                                  int iBand);
+
+
+   public byte getCellValueAsByte(int x,
+                                  int y);
+
+
+   public short getCellValueAsShort(int x,
+                                    int y,
+                                    int iBand);
+
+
+   public short getCellValueAsShort(int x,
+                                    int y);
+
+
+   public int getCellValueAsInt(int x,
+                                int y,
+                                int iBand);
+
+
+   public int getCellValueAsInt(int x,
+                                int y);
+
+
+   public float getCellValueAsFloat(int x,
+                                    int y,
+                                    int iBand);
+
+
+   public float getCellValueAsFloat(int x,
+                                    int y);
+
+
+   public double getCellValueAsDouble(int x,
+                                      int y,
+                                      int iBand);
+
+
+   public double getCellValueAsDouble(int x,
+                                      int y);
+
+
+   /**
+    * Returns the value of a cell in the original image coords, that is, not using the query window. Ckecking that coordinates are
+    * within bounds is not needed, and is assumed to be done by methods calling this method.
+    * 
+    * @param x
+    *                the x coordinate(col) of the cell
+    * @param y
+    *                the y coordinate(row) of the cell
+    * @param band
+    *                the band to be queried
+    * @return the value of a cell in the original image coords.
+    */
+   public double getCellValueInLayerCoords(int x,
+                                           int y,
+                                           int band);
+
+
+   /**
+    * Returns the value at a given world coordinate. The current interpolation method is used if the coordinate does not fall on
+    * the exact center of a cell.
+    * 
+    * @param x
+    *                the x coordinate
+    * @param y
+    *                the y coordinate
+    * @param iBand
+    *                the band to query
+    * @return the value at the given world coordinate
+    */
+   public double getValueAt(double x,
+                            double y,
+                            int iBand);
+
+
+   /**
+    * Returns the value of the first band of this layer, at a given world coordinate. The current interpolation method is used if
+    * the coordinate does not fall on the exact center of a cell.
+    * 
+    * @param x
+    *                the x coordinate
+    * @param y
+    *                the y coordinate
+    * @return the value at the given coordinate. If it falls outside of the layer, the current no-data value of the layer is
+    *         returned
+    */
+   public double getValueAt(double x,
+                            double y);
+
+
+   /**
+    * 
+    * @param x
+    *                the x coordinate(col) of the cell
+    * @param y
+    *                the y coordinate(row) of the cell
+    * @return true if the given ccell is within the query window extent
+    */
+   public boolean isInWindow(int x,
+                             int y);
+
+
+   /**
+    * Returns the number of columns in the query window of this layer
+    * 
+    * @return the number of columns in the query window
+    */
+   public int getNX();
+
+
+   /**
+    * Returns the number of rows in the query window of this layer
+    * 
+    * @return the number of rows in the query window
+    */
+   public int getNY();
+
+
+   /**
+    * Returns the number of bands of the layer
+    * 
+    * @return the number of bands of the layer
+    */
+   public int getBandsCount();
+
+
+   /**
+    * Sets the extent of the query window using the full extent of another layer
+    * 
+    * @param layer
+    *                the layer from which to take the extent
+    */
+   public void setWindowExtent(IRasterLayer layer);
+
+
+   /**
+    * Sets a new query window extent
+    * 
+    * @param gridExtent
+    *                the new grid extent to set fro this layer
+    */
+   public void setWindowExtent(AnalysisExtent gridExtent);
+
+
+   /**
+    * Sets the query window extent to the full extent of the layer
+    */
+   public void setFullExtent();
+
+
+   /**
+    * Resamples the layer so the new full extent is the same as a given gridExtent. This method is called before calling
+    * postProcess, once a GeoAlgorithm is finished
+    * 
+    * @param gridExtent
+    *                the reference gridExtent
+    */
+   //public void fitToGridExtent(AnalysisExtent gridExtent);
+   /**
+    * Sets the interpolation method to use for calculating value in points other than cell centers
+    * 
+    * @param iMethod
+    */
+   public void setInterpolationMethod(int iMethod);
+
+
+   /**
+    * Returns the mean value in the first band of the layer
+    * 
+    * @return the mean value of the first band of this layer
+    */
+   public double getMeanValue();
+
+
+   /**
+    * Returns the min value in the first band of the layer
+    * 
+    * @return the min value of the first band of this layer
+    */
+   public double getMinValue();
+
+
+   /**
+    * Returns the max value in the first band of the layer
+    * 
+    * @return the max value of the first band of this layer
+    */
+   public double getMaxValue();
+
+
+   /**
+    * Returns the variance in the first band of the layer
+    * 
+    * @return the variance of the first band of this layer
+    */
+   public double getVariance();
+
+
+   /**
+    * Returns the mean value in the given band of the layer
+    * 
+    * @param iBand
+    *                the index of the band (zero-based)
+    * @return the mean value of the given band of this layer
+    */
+   public double getMeanValue(int iBand);
+
+
+   /**
+    * Returns the min value in the given band of the layer
+    * 
+    * @param iBand
+    *                the index of the band (zero-based)
+    * @return the min value of the given band of this layer
+    */
+   public double getMinValue(int iBand);
+
+
+   /**
+    * Returns the max value in the given band of the layer
+    * 
+    * @param iBand
+    *                the index of the band (zero-based)
+    * @return the max value of the given band of this layer
+    */
+   public double getMaxValue(int iBand);
+
+
+   /**
+    * Returns the variance in the given band of the layer
+    * 
+    * @param iBand
+    *                the index of the band (zero-based)
+    * @return the variance of the given band of this layer
+    */
+   public double getVariance(int iBand);
+
+
+   public double getSlope(int x,
+                          int y);
+
+
+   public double getDistToNeighborInDir(int i);
+
+
+   public double getAspect(int i,
+                           int j);
+
+
+   public int getDirToNextDownslopeCell(int x,
+                                        int y);
+
+
+   public int getDirToNextDownslopeCell(int x,
+                                        int y,
+                                        boolean b);
+
+
+   /**
+    * Returns the histogram of the first band of this layer
+    * 
+    * @return a histogram of the first band of this layer
+    */
+   public int[] getHistogram();
+
+
+   /**
+    * Returns a histogram of a given band of this layer
+    * 
+    * @param iBand
+    *                the index of the band (zero-based)
+    * @return a histogram of the given band of this layer
+    */
+   public int[] getHistogram(int iBand);
+
+
+   /**
+    * Returns an accumulated histogram of the first band of this layer
+    * 
+    * @return an accumulated histogram of the first band of this layer
+    */
+   public int[] getAccumulatedHistogram();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IVectorLayer.java	(revision 369)
@@ -0,0 +1,182 @@
+package es.unex.sextante.dataObjects;
+
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.dataObjects.vectorFilters.IVectorLayerFilter;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+
+/**
+ * This is the base interface that all vector layers have to implement to be able to be used by SEXTANTE algorithms.
+ *
+ * Instead of implementing this class directly, it is recommended to extend {@link AbstractVectorLayer}.
+ *
+ * @author Victor Olaya. volaya@unex.es
+ *
+ */
+public interface IVectorLayer
+         extends
+            ILayer {
+
+   public static final int SHAPE_TYPE_POINT        = 0;
+   public static final int SHAPE_TYPE_LINE         = 1;
+   public static final int SHAPE_TYPE_POLYGON      = 2;
+   public static final int SHAPE_TYPE_MIXED        = 3;
+
+   //Types to create a multilayer in gvSIG. Don't use for anything more
+   public static final int SHAPE_TYPE_MULTIPOINT   = 4;
+   public static final int SHAPE_TYPE_MULTILINE    = 5;
+   public static final int SHAPE_TYPE_MULTIPOLYGON = 6;
+
+   /**
+    * this constant indicates that the shape type is not compatible with SEXTANTE (for example a layer with multiple types if that
+    * is not supported), and should be used to filter out layers
+    */
+   public static final int SHAPE_TYPE_WRONG   = -1;
+
+
+   /**
+    * Adds a new feature to the layer
+    *
+    * @param geometry
+    *                the geometry
+    * @param attributes
+    *                the attributes associated with the geometry
+    */
+   public void addFeature(Geometry geometry,
+                          Object[] attributes);
+
+
+   /**
+    * Adds a new feature to the layer
+    *
+    * @param feature
+    *                the feature to add
+    */
+   public void addFeature(IFeature feature);
+
+
+   /**
+    * Returns an iterator to iterate through the entities of this layer
+    *
+    * @return an iterator to iterate the layer
+    */
+   public IFeatureIterator iterator();
+
+
+   /**
+    * Returns the name of a given field in the attributes table
+    *
+    * @param index
+    *                the zero-based field index
+    * @return the name of the selected attribute field
+    */
+   public String getFieldName(int index);
+
+
+   /**
+    * Return a class representing the data type of a given field
+    *
+    * @param index
+    *                the zero-based field index
+    * @return the data type of the selected attribute field
+    */
+   public Class getFieldType(int index);
+
+
+   /**
+    *
+    * @return the number of attributes associates to each geometry
+    */
+   public int getFieldCount();
+
+
+   /**
+    * Returns an array of classes representing the data types of the fields in the attributes table
+    *
+    * @return the data types of attribute fields
+    */
+   public Class[] getFieldTypes();
+
+
+   /**
+    * Returns the names of the fields in the attributes table
+    *
+    * @return the names of the attribute fields
+    */
+   public String[] getFieldNames();
+
+
+   /**
+    * Returns the number of features in this layer
+    *
+    * @return the number of features in this layer
+    */
+   public int getShapesCount();
+
+
+   /**
+    * Returns the type of geometries in this layer
+    *
+    * @return the type of geometries in this layer
+    */
+   public int getShapeType();
+
+   /**
+    * Returns the subtype of geometries in this layer
+    *
+    * @return the subtype of geometries in this layer
+ * @throws ReadException
+    */
+   public int getSubType() throws BaseException;
+
+
+   /**
+    * Returns the index of a field from its name. Returns -1 if there is not a field with that name.
+    *
+    * @param fieldName
+    *                the name of the field
+    * @return the index of the given field
+    */
+   public int getFieldIndexByName(String fieldName);
+
+
+   /**
+    * Adds a new filter to this layer. When iterating the features in this layer, only those that pass the filter will be
+    * returned.
+    *
+    * @param filter
+    *                the filter to add
+    */
+   public void addFilter(IVectorLayerFilter filter);
+
+
+   /**
+    * Removes all filters previously added to this layer
+    */
+   public void removeFilters();
+
+
+   /**
+    * Returns a list of all the filters currently added to this layer
+    *
+    * @return a list of all the filters currently added to this layer
+    */
+   public List<IVectorLayerFilter> getFilters();
+
+
+   /**
+    * Returns true if the layer can be edited. This includes editing while the layer is being read, so it can be overwritten by
+    * algorithms that allow overwriting of input layers
+    *
+    * @return true if the layer can be edited
+    */
+   public boolean canBeEdited();
+   
+   public boolean hasSelection();
+
+   public FeatureStore getFeatureStore();
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IDataObject.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IDataObject.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IDataObject.java	(revision 369)
@@ -0,0 +1,72 @@
+package es.unex.sextante.dataObjects;
+
+import es.unex.sextante.outputs.IOutputChannel;
+
+/**
+ * Interface for data objects (layers and tables). This interface should be used to wrap other data objects, so they are
+ * compatible with SEXTANTE and thus can be used as inputs to geoalgorithms
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public interface IDataObject {
+
+   /**
+    * Returns the base data object (i.e. the object that this class wraps, which contains the data itself)
+    * 
+    * @return the base data object
+    */
+   public Object getBaseDataObject();
+
+
+   /**
+    * Returns the name of this data object
+    * 
+    * @return the name of this data object
+    */
+   public String getName();
+
+
+   /**
+    * Sets a new name for this object
+    * 
+    * @param sName
+    *                the new name
+    */
+   public void setName(String sName);
+
+
+   /**
+    * Returns the channel associated to this data object.
+    * 
+    * @return the channel associated to this data object.
+    */
+   public IOutputChannel getOutputChannel();
+
+
+   /**
+    * This method post-processes the object after it has been created. If, for instance, data are kept in memory before they are
+    * dumped to file, this method should write that file.
+    */
+   public void postProcess() throws Exception;
+
+
+   /**
+    * This methods initialize the data object, so it is ready to be accessed
+    */
+   public void open();
+
+
+   /**
+    * This method closes the data object, which was opened using the open() method.
+    */
+   public void close();
+
+
+   /**
+    * This method deallocates memory used by the data object. Calling this method might render the object unusable for querying,
+    * even if the open() method is called again, so call it it use only if you are sure that the object will no longer be used.
+    */
+   public void free();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IDataObject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractTable.java	(revision 369)
@@ -0,0 +1,69 @@
+package es.unex.sextante.dataObjects;
+
+import org.gvsig.fmap.dal.feature.FeatureStore;
+
+/**
+ * A convenience class which implements some of the methods of the ITable interface. Extending this class is recommended instead
+ * of implementing the interface directly
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class AbstractTable
+         implements
+            ITable {
+
+
+   public String[] getFieldNames() {
+
+      final String[] names = new String[getFieldCount()];
+
+      for (int i = 0; i < names.length; i++) {
+         names[i] = getFieldName(i);
+      }
+
+      return names;
+
+   }
+
+
+   public Class[] getFieldTypes() {
+
+      final Class[] types = new Class[getFieldCount()];
+
+      for (int i = 0; i < types.length; i++) {
+         types[i] = getFieldType(i);
+      }
+
+      return types;
+
+   }
+
+
+   public int getFieldIndexByName(final String sFieldName) {
+
+      for (int i = 0; i < this.getFieldCount(); i++) {
+         final String sName = getFieldName(i);
+         if (sName.equals(sFieldName)) {
+            return i;
+         }
+      }
+
+      return -1;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return this.getName();
+
+   }
+
+    @Override
+    public FeatureStore getFeatureStore() {
+        return null;
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/SelectionFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/SelectionFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/SelectionFilter.java	(revision 369)
@@ -0,0 +1,49 @@
+package es.unex.sextante.dataObjects.vectorFilters;
+
+import java.util.BitSet;
+
+import es.unex.sextante.dataObjects.IFeature;
+
+/**
+ * A filter to use only selected features, in case the underlying library supports selection (usually graphical selection from a
+ * GIS)
+ * 
+ * @author volaya
+ * 
+ */
+public class SelectionFilter
+         implements
+            IVectorLayerFilter {
+
+   private final BitSet m_BitSet;
+
+
+   public SelectionFilter(final BitSet bitset) {
+
+      m_BitSet = bitset;
+
+   }
+
+
+
+   /**
+    * Returns the ID of the last feature in the dataset for which this filter is "true"
+    */
+   public int getLast() {
+	      return ( m_BitSet.length() );
+   }   
+
+   
+
+   public boolean accept(final IFeature feature,
+                         final int iIndex) {
+
+      if (m_BitSet.cardinality() == 0) {
+         return true;
+      }
+      return m_BitSet.get(iIndex);
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/SelectionFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/VectorShapeTypeFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/VectorShapeTypeFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/VectorShapeTypeFilter.java	(revision 369)
@@ -0,0 +1,59 @@
+package es.unex.sextante.dataObjects.vectorFilters;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
+import com.vividsolutions.jts.geom.MultiPoint;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.Polygon;
+
+import es.unex.sextante.dataObjects.IFeature;
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class VectorShapeTypeFilter
+         implements
+            IVectorLayerFilter {
+
+   private final int m_iShapeType;
+
+
+   /**
+    * Creates a new filter
+    * 
+    * @param iShapeType
+    *                the type of shape that passes the filter. Use the constants defined in IVectorLayer
+    */
+   public VectorShapeTypeFilter(final int iShapeType) {
+
+      m_iShapeType = iShapeType;
+
+   }
+
+
+   public int getShapeType() {
+
+      return m_iShapeType;
+
+   }
+
+
+   public boolean accept(final IFeature feature,
+                         final int index) {
+
+      final Geometry geom = feature.getGeometry();
+      switch (m_iShapeType) {
+         case IVectorLayer.SHAPE_TYPE_LINE:
+            return (geom instanceof MultiLineString) || (geom instanceof LineString);
+         case IVectorLayer.SHAPE_TYPE_POINT:
+            return (geom instanceof Point) || (geom instanceof MultiPoint);
+         case IVectorLayer.SHAPE_TYPE_POLYGON:
+            return (geom instanceof Polygon) || (geom instanceof MultiPolygon);
+         default:
+            return false;
+      }
+
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/VectorShapeTypeFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/IVectorLayerFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/IVectorLayerFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/IVectorLayerFilter.java	(revision 369)
@@ -0,0 +1,18 @@
+package es.unex.sextante.dataObjects.vectorFilters;
+
+import es.unex.sextante.dataObjects.IFeature;
+
+
+/**
+ * A filter to apply to a vector layer.
+ * 
+ * @author volaya
+ * 
+ */
+public interface IVectorLayerFilter {
+
+   public boolean accept(IFeature feature,
+                         int iIndex);
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/IVectorLayerFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/BoundingBoxFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/BoundingBoxFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/BoundingBoxFilter.java	(revision 369)
@@ -0,0 +1,52 @@
+package es.unex.sextante.dataObjects.vectorFilters;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.dataObjects.IFeature;
+
+public class BoundingBoxFilter
+         implements
+            IVectorLayerFilter {
+
+   private final Geometry m_Rect;
+
+
+   public BoundingBoxFilter(final Geometry rect) {
+
+      m_Rect = rect;
+
+   }
+
+
+   public BoundingBoxFilter(final AnalysisExtent extent) {
+
+      final GeometryFactory gf = new GeometryFactory();
+      final Coordinate coords[] = new Coordinate[5];
+      coords[0] = new Coordinate(extent.getXMin(), extent.getYMin());
+      coords[1] = new Coordinate(extent.getXMin(), extent.getYMax());
+      coords[2] = new Coordinate(extent.getXMax(), extent.getYMax());
+      coords[3] = new Coordinate(extent.getXMax(), extent.getYMin());
+      coords[4] = coords[0];
+      m_Rect = gf.createPolygon(gf.createLinearRing(coords), null);
+
+   }
+
+
+   public Geometry getBoundingBox() {
+
+      return m_Rect;
+
+   }
+
+
+   public boolean accept(final IFeature feature,
+                         final int iIndex) {
+
+      return (feature.getGeometry().intersects(m_Rect));
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/BoundingBoxFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/GenericVectorFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/GenericVectorFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/GenericVectorFilter.java	(revision 369)
@@ -0,0 +1,25 @@
+package es.unex.sextante.dataObjects.vectorFilters;
+
+import es.unex.sextante.dataObjects.IFeature;
+
+/**
+ * A generic filter to apply to a vector layer. It just filters features one by one according to any implemented rule.
+ *
+ * @author volaya
+ *
+ */
+
+public interface GenericVectorFilter
+         extends
+            IVectorLayerFilter {
+
+   /**
+    * Returns true if the feature passes the filter. False otherwise
+    *
+    * @param feature
+    *                the feature to filter
+    * @return true if the feature passes the filter. False otherwise
+    */
+   public boolean accept(IFeature feature);
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/vectorFilters/GenericVectorFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/FeatureImpl.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/FeatureImpl.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/FeatureImpl.java	(revision 369)
@@ -0,0 +1,50 @@
+package es.unex.sextante.dataObjects;
+
+import com.vividsolutions.jts.geom.Geometry;
+
+/**
+ * A simple implementation of the IFeature interface
+ *
+ * @author volaya
+ *
+ */
+public class FeatureImpl
+         implements
+            IFeature {
+
+   private final Geometry m_Geometry;
+   private final IRecord  m_Record;
+
+
+   /**
+    * Creates a new feature
+    *
+    * @param geom
+    *                the geometry of the feature
+    * @param values
+    *                the set of associated attributes
+    */
+   public FeatureImpl(final Geometry geom,
+                      final Object values[]) {
+
+      m_Geometry = geom;
+      m_Record = new RecordImpl(values);
+
+
+   }
+
+
+   public Geometry getGeometry() {
+
+      return m_Geometry;
+
+   }
+
+
+   public IRecord getRecord() {
+
+      return m_Record;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/FeatureImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecordsetIterator.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecordsetIterator.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecordsetIterator.java	(revision 369)
@@ -0,0 +1,21 @@
+package es.unex.sextante.dataObjects;
+
+import es.unex.sextante.exceptions.IteratorException;
+
+/**
+ * Interface for iterators used to iterate a database or table
+ *
+ * @author volaya
+ *
+ */
+public interface IRecordsetIterator {
+
+   public boolean hasNext();
+
+
+   public IRecord next() throws IteratorException;
+
+
+   public void close();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecordsetIterator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeatureIterator.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeatureIterator.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeatureIterator.java	(revision 369)
@@ -0,0 +1,38 @@
+package es.unex.sextante.dataObjects;
+
+import es.unex.sextante.exceptions.IteratorException;
+
+/**
+ * Interface for feature iterators
+ * 
+ * @author volaya volaya@unex.es
+ * 
+ */
+public interface IFeatureIterator {
+
+   public boolean hasNext();
+
+
+   public IFeature next() throws IteratorException;
+
+
+   public void close();
+
+
+   /**
+    * returns the number of features that the iterator will return
+    * 
+    * @return the number of features that the iterator will return
+    * 
+    * public int getFeatureCount();
+    * 
+    * 
+    * /** this method is here for performance reasons. Returns the minimum extent that covers all the features returned by the
+    * iterator
+    * 
+    * @return Returns the minimum extent that covers all the features returned by the iterator
+    * 
+    * public Rectangle2D getExtent();/* }
+    */
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IFeatureIterator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractRasterLayer.java	(revision 369)
@@ -0,0 +1,771 @@
+
+
+package es.unex.sextante.dataObjects;
+
+import java.util.Arrays;
+
+import es.unex.sextante.core.AnalysisExtent;
+import es.unex.sextante.rasterWrappers.GridWrapper;
+import es.unex.sextante.rasterWrappers.GridWrapperInterpolated;
+import es.unex.sextante.rasterWrappers.GridWrapperNotInterpolated;
+
+
+/**
+ * A convenience class which implements some of the methods of the IRasterLayer interface. Extending this class is recommended
+ * instead of implementing the interface directly
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class AbstractRasterLayer
+         implements
+            IRasterLayer {
+
+   private final static int    m_iOffsetX[]            = { 0, 1, 1, 1, 0, -1, -1, -1 };
+   private final static int    m_iOffsetY[]            = { 1, 1, 0, -1, -1, -1, 0, 1 };
+
+   private final static double DEG_90_IN_RAD           = Math.PI / 180. * 90.;
+   private final static double DEG_180_IN_RAD          = Math.PI;
+   private final static double DEG_270_IN_RAD          = Math.PI / 180. * 270.;
+
+   private GridWrapper         m_GridWrapper;
+
+   private double              m_dDist[];
+
+   private double              _2DX;
+
+   private int[][]             m_Histogram;
+   private double[]            m_dMax;
+   private double[]            m_dMin;
+   private double[]            m_dMean;
+   private double[]            m_dVariance;
+   private boolean             m_bStatisticsCalculated = false;
+   private boolean             m_bHistogramCalculated  = false;
+    private String viewName;
+
+
+   public void setInterpolationMethod(final int iMethod) {
+
+      m_GridWrapper.setInterpolationMethod(iMethod);
+
+   }
+
+
+   public byte getCellValueAsByte(final int x,
+                                  final int y) {
+
+      return m_GridWrapper.getCellValueAsByte(x, y);
+
+   }
+
+
+   public byte getCellValueAsByte(final int x,
+                                  final int y,
+                                  final int band) {
+
+      return m_GridWrapper.getCellValueAsByte(x, y, band);
+
+   }
+
+
+   public short getCellValueAsShort(final int x,
+                                    final int y) {
+
+      return m_GridWrapper.getCellValueAsShort(x, y);
+
+   }
+
+
+   public short getCellValueAsShort(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return m_GridWrapper.getCellValueAsShort(x, y, band);
+
+   }
+
+
+   public int getCellValueAsInt(final int x,
+                                final int y) {
+
+      return m_GridWrapper.getCellValueAsInt(x, y);
+
+   }
+
+
+   public int getCellValueAsInt(final int x,
+                                final int y,
+                                final int band) {
+
+      return m_GridWrapper.getCellValueAsInt(x, y, band);
+
+   }
+
+
+   public float getCellValueAsFloat(final int x,
+                                    final int y) {
+
+      return m_GridWrapper.getCellValueAsFloat(x, y);
+
+   }
+
+
+   public float getCellValueAsFloat(final int x,
+                                    final int y,
+                                    final int band) {
+
+      return m_GridWrapper.getCellValueAsFloat(x, y, band);
+
+   }
+
+
+   public double getCellValueAsDouble(final int x,
+                                      final int y) {
+
+      return m_GridWrapper.getCellValueAsDouble(x, y);
+
+   }
+
+
+   public double getCellValueAsDouble(final int x,
+                                      final int y,
+                                      final int band) {
+
+      return m_GridWrapper.getCellValueAsDouble(x, y, band);
+
+   }
+
+
+   public double getValueAt(final double x,
+                            final double y) {
+
+      return m_GridWrapper.getValueAt(x, y, 0);
+
+   }
+
+
+   public double getValueAt(final double x,
+                            final double y,
+                            final int band) {
+
+      return m_GridWrapper.getValueAt(x, y, band);
+
+   }
+
+
+   public boolean isNoDataValue(final double dValue) {
+
+      return dValue == getNoDataValue();
+
+   }
+
+
+   public boolean isInWindow(final int x,
+                             final int y) {
+
+      if ((x < 0) || (y < 0)) {
+         return false;
+      }
+
+      if ((x >= m_GridWrapper.getNX()) || (y >= m_GridWrapper.getNY())) {
+         return false;
+      }
+
+      return true;
+
+   }
+
+
+   public int getNX() {
+
+      return m_GridWrapper.getNX();
+
+   }
+
+
+   public int getNY() {
+
+      return m_GridWrapper.getNY();
+
+   }
+
+
+   public double getWindowCellSize() {
+
+      return m_GridWrapper.getCellSize();
+
+   }
+
+
+   public AnalysisExtent getWindowGridExtent() {
+
+      return m_GridWrapper.getGridExtent();
+
+   }
+
+
+   public void assign(final double dValue) {
+
+      int iBand;
+      int x, y;
+
+      for (iBand = 0; iBand < this.getBandsCount(); iBand++) {
+         for (y = 0; y < getNY(); y++) {
+            for (x = 0; x < getNX(); x++) {
+               setCellValue(x, y, iBand, dValue);
+            }
+         }
+      }
+
+   }
+
+
+   public void assign(final IRasterLayer layer) {
+
+      double dValue;
+
+      layer.setWindowExtent(getWindowGridExtent());
+
+      final int iNX = layer.getNX();
+      final int iNY = layer.getNY();
+
+      for (int y = 0; y < iNY; y++) {
+         for (int x = 0; x < iNX; x++) {
+            dValue = layer.getCellValueAsDouble(x, y);
+            setCellValue(x, y, dValue);
+         }
+      }
+
+      setNoDataValue(layer.getNoDataValue());
+
+   }
+
+
+   public void add(final IRasterLayer driver) {
+
+      double dValue;
+
+      if (driver.getWindowGridExtent().equals(getWindowGridExtent())) {
+         for (int y = 0; y < getWindowGridExtent().getNY(); y++) {
+            for (int x = 0; x < getWindowGridExtent().getNX(); x++) {
+               dValue = driver.getCellValueAsDouble(x, y) + getCellValueAsDouble(x, y);
+               setCellValue(x, y, dValue);
+            }
+         }
+         setNoDataValue(driver.getNoDataValue());
+      }
+
+   }
+
+
+   public void assignNoData() {
+
+      assign(getNoDataValue());
+
+   }
+
+
+   public void setCellValue(final int x,
+                            final int y,
+                            final double dValue) {
+
+      setCellValue(x, y, 0, dValue);
+
+   }
+
+
+   public void setNoData(final int x,
+                         final int y) {
+
+      setCellValue(x, y, getNoDataValue());
+
+   }
+
+
+   public void setNoData(final int x,
+                         final int y,
+                         final int iBand) {
+
+      setCellValue(x, y, iBand, getNoDataValue());
+
+   }
+
+
+   public void addToCellValue(final int x,
+                              final int y,
+                              final int iBand,
+                              final double dValue) {
+
+      double dCellValue = getCellValueAsDouble(x, y, iBand);
+
+      if (!isNoDataValue(dCellValue)) {
+         dCellValue += dValue;
+         setCellValue(x, y, iBand, dCellValue);
+      }
+
+   }
+
+
+   public void addToCellValue(final int x,
+                              final int y,
+                              final double dValue) {
+
+      addToCellValue(x, y, 0, dValue);
+
+   }
+
+
+   public void multiply(final double dValue) {
+
+      int iBand;
+      int x, y;
+
+      for (iBand = 0; iBand < this.getBandsCount(); iBand++) {
+         for (y = 0; y < getNY(); y++) {
+            for (x = 0; x < getNX(); x++) {
+               final double dVal = getCellValueAsDouble(x, y, iBand);
+               setCellValue(x, y, iBand, dValue * dVal);
+            }
+         }
+      }
+
+   }
+
+
+   public void setWindowExtent(final IRasterLayer layer) {
+
+      final AnalysisExtent layerExtent = new AnalysisExtent(layer);
+
+      setWindowExtent(layerExtent);
+
+   }
+
+
+   public void setWindowExtent(final AnalysisExtent extent) {
+
+
+      if (extent.fitsIn(this.getLayerGridExtent())) {
+         m_GridWrapper = new GridWrapperNotInterpolated(this, extent);
+      }
+      else {
+         m_GridWrapper = new GridWrapperInterpolated(this, extent);
+      }
+
+      setConstants();
+
+      m_bHistogramCalculated = false;
+      m_bStatisticsCalculated = false;
+
+   }
+
+
+   public void setFullExtent() {
+
+      m_GridWrapper = new GridWrapperNotInterpolated(this, getLayerGridExtent());
+
+      setConstants();
+
+      m_bHistogramCalculated = false;
+      m_bStatisticsCalculated = false;
+
+   }
+
+
+   ///////////////////////////////////Statistical stuff//////////////////////
+
+   protected void setConstants() {
+
+      int i;
+      final double dCellSize = getWindowCellSize();
+
+      m_dDist = new double[8];
+
+      for (i = 0; i < 8; i++) {
+         m_dDist[i] = Math.sqrt(m_iOffsetX[i] * dCellSize * m_iOffsetX[i] * dCellSize + m_iOffsetY[i] * dCellSize * m_iOffsetY[i]
+                                * dCellSize);
+      }
+
+      _2DX = dCellSize * 2;
+
+   }
+
+
+   protected void calculateStatistics() {
+
+
+      int x, y;
+      double z;
+      int iValues;
+
+      final int iBands = getBandsCount();
+
+      m_dMean = new double[iBands];
+      m_dVariance = new double[iBands];
+      m_dMin = new double[iBands];
+      m_dMax = new double[iBands];
+
+      for (int i = 0; i < this.getBandsCount(); i++) {
+         m_dMean[i] = 0.0;
+         m_dVariance[i] = 0.0;
+      }
+
+      if (m_GridWrapper == null) {
+         this.setFullExtent();
+      }
+
+      for (int i = 0; i < this.getBandsCount(); i++) {
+         iValues = 0;
+         for (y = 0; y < getNY(); y++) {
+            for (x = 0; x < getNX(); x++) {
+               z = getCellValueAsDouble(x, y, i);
+               if (!isNoDataValue(z)) {
+                  if (iValues == 0) {
+                     m_dMin[i] = m_dMax[i] = z;
+                  }
+                  else if (m_dMin[i] > z) {
+                     m_dMin[i] = z;
+                  }
+                  else if (m_dMax[i] < z) {
+                     m_dMax[i] = z;
+                  }
+
+                  m_dMean[i] += z;
+                  m_dVariance[i] += z * z;
+                  iValues++;
+               }
+            }
+         }
+
+         if (iValues > 0) {
+            m_dMean[i] /= iValues;
+            m_dVariance[i] = m_dVariance[i] / iValues - m_dMean[i] * m_dMean[i];
+         }
+      }
+
+      m_bStatisticsCalculated = true;
+
+   }
+
+
+   protected void calculateHistogram() {
+
+      int x, y;
+      int iClass;
+      double dValue;
+      double dRange;
+
+      if (!m_bStatisticsCalculated) {
+         calculateStatistics();
+      }
+
+      final int iBands = getBandsCount();
+
+      m_Histogram = new int[iBands][256];
+
+      for (int i = 0; i < m_Histogram.length; i++) {
+         Arrays.fill(m_Histogram[i], 0);
+      }
+
+      for (int i = 0; i < iBands; i++) {
+         dRange = m_dMax[i] - m_dMin[i];
+         for (y = 0; y < getNY(); y++) {
+            for (x = 0; x < getNX(); x++) {
+               dValue = getCellValueAsDouble(x, y, i);
+               if (!isNoDataValue(dValue)) {
+                  iClass = (int) ((dValue - m_dMin[i]) / dRange * 255.);
+                  m_Histogram[i][iClass]++;
+               }
+            }
+         }
+      }
+
+      m_bHistogramCalculated = true;
+
+
+   }
+
+
+   public int[] getHistogram(final int iBand) {
+
+      if (!m_bHistogramCalculated) {
+         calculateHistogram();
+      }
+
+      return m_Histogram[iBand];
+
+   }
+
+
+   public int[] getHistogram() {
+
+      return getHistogram(0);
+
+   }
+
+
+   public int[] getAccumulatedHistogram(final int iBand) {
+
+      final int[] accHistogram = new int[256];
+
+      Arrays.fill(accHistogram, 0);
+
+      if (!m_bHistogramCalculated) {
+         calculateHistogram();
+      }
+
+      for (int i = 1; i < 256; i++) {
+         accHistogram[i] = m_Histogram[iBand][i] + accHistogram[i - 1];
+      }
+
+      return accHistogram;
+
+   }
+
+
+   public int[] getAccumulatedHistogram() {
+
+      return getAccumulatedHistogram(0);
+
+   }
+
+
+   public double getMinValue(final int iBand) {
+
+      if (!m_bStatisticsCalculated) {
+         calculateStatistics();
+      }
+
+      return m_dMin[iBand];
+
+   }
+
+
+   public double getMaxValue(final int iBand) {
+
+      if (!m_bStatisticsCalculated) {
+         calculateStatistics();
+      }
+
+      return m_dMax[iBand];
+
+   }
+
+
+   public double getMeanValue(final int iBand) {
+
+      if (!m_bStatisticsCalculated) {
+         calculateStatistics();
+      }
+
+      return m_dMean[iBand];
+
+   }
+
+
+   public double getVariance(final int iBand) {
+
+      if (!m_bStatisticsCalculated) {
+         calculateStatistics();
+      }
+
+      return m_dVariance[iBand];
+
+   }
+
+
+   public double getMeanValue() {
+
+      return getMeanValue(0);
+
+   }
+
+
+   public double getMinValue() {
+
+      return getMinValue(0);
+
+   }
+
+
+   public double getMaxValue() {
+
+      return getMaxValue(0);
+
+   }
+
+
+   public double getVariance() {
+
+      return getVariance(0);
+
+   }
+
+
+   //////////////////////////////Additional methods for DEM analysis//////
+
+
+   protected boolean getSubMatrix3x3(final int x,
+                                     final int y,
+                                     final double SubMatrix[]) {
+
+      int i;
+      int iDir;
+      double z, z2;
+
+      z = getCellValueAsDouble(x, y);
+
+      if (isNoDataValue(z)) {
+         return false;
+      }
+      else {
+         //SubMatrix[4]	= 0.0;
+         for (i = 0; i < 4; i++) {
+
+            iDir = 2 * i;
+            z2 = getCellValueAsDouble(x + m_iOffsetX[iDir], y + m_iOffsetY[iDir]);
+            if (!isNoDataValue(z2)) {
+               SubMatrix[i] = z2 - z;
+            }
+            else {
+               z2 = getCellValueAsDouble(x + m_iOffsetX[(iDir + 4) % 8], y + m_iOffsetY[(iDir + 4) % 8]);
+               if (!isNoDataValue(z2)) {
+                  SubMatrix[i] = z - z2;
+               }
+               else {
+                  SubMatrix[i] = 0.0;
+               }
+            }
+         }
+
+         return true;
+      }
+
+   }
+
+
+   public double getSlope(final int x,
+                          final int y) {
+
+      double zm[], G, H;
+
+      zm = new double[4];
+
+      if (getSubMatrix3x3(x, y, zm)) {
+         G = (zm[0] - zm[2]) / _2DX;
+         H = (zm[1] - zm[3]) / _2DX;
+         return Math.atan(Math.sqrt(G * G + H * H));
+      }
+      else {
+         return getNoDataValue();
+      }
+   }
+
+
+   public double getAspect(final int x,
+                           final int y) {
+
+      double zm[], G, H, dAspect;
+
+      zm = new double[4];
+
+      if (getSubMatrix3x3(x, y, zm)) {
+         G = (zm[0] - zm[2]) / _2DX;
+         H = (zm[1] - zm[3]) / _2DX;
+         if (G != 0.0) {
+            dAspect = DEG_180_IN_RAD + Math.atan2(H, G);
+         }
+         else {
+            dAspect = H > 0.0 ? DEG_270_IN_RAD : (H < 0.0 ? DEG_90_IN_RAD : -1.0);
+         }
+         return dAspect;
+      }
+      else {
+         return getNoDataValue();
+      }
+   }
+
+
+   public double getDistToNeighborInDir(final int iDir) {
+
+      return m_dDist[iDir];
+
+   }
+
+
+   public static double getUnitDistToNeighborInDir(final int iDir) {
+
+      return ((iDir % 2 != 0) ? Math.sqrt(2.0) : 1.0);
+
+   }
+
+
+   public int getDirToNextDownslopeCell(final int x,
+                                        final int y) {
+
+      return getDirToNextDownslopeCell(x, y, true);
+
+   }
+
+
+   public int getDirToNextDownslopeCell(final int x,
+                                        final int y,
+                                        final boolean bForceDirToNoDataCell) {
+
+      int i, iDir;
+      double z, z2, dSlope, dMaxSlope;
+
+      z = getCellValueAsDouble(x, y);
+
+      if (isNoDataValue(z)) {
+         return -1;
+      }
+
+      dMaxSlope = 0.0;
+      for (iDir = -1, i = 0; i < 8; i++) {
+         z2 = getCellValueAsDouble(x + m_iOffsetX[i], y + m_iOffsetY[i]);
+         if (isNoDataValue(z2)) {
+            if (bForceDirToNoDataCell) {
+               return i;
+            }
+            /*else {
+               return -1;
+            }*/
+         }
+         else {
+            dSlope = (z - z2) / getDistToNeighborInDir(i);
+            if (dSlope > dMaxSlope) {
+               iDir = i;
+               dMaxSlope = dSlope;
+            }
+         }
+      }
+
+      return iDir;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return this.getName();
+
+   }
+
+
+   public void setStatisticsHaveToBeCalculated() {
+
+      m_bHistogramCalculated = false;
+      m_bStatisticsCalculated = false;
+
+   }
+
+    public void setViewName(String viewName) {
+        this.viewName = viewName;
+    }
+    
+    @Override
+    public String getContextName() {
+        return this.viewName;
+    }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractVectorLayer.java	(revision 369)
@@ -0,0 +1,185 @@
+
+
+package es.unex.sextante.dataObjects;
+
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.vividsolutions.jts.geom.Envelope;
+
+import es.unex.sextante.dataObjects.vectorFilters.IVectorLayerFilter;
+import es.unex.sextante.exceptions.IteratorException;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+
+
+/**
+ * A convenience class which implements some of the methods of the IVectorLayer interface. Extending this class is recommended
+ * instead of implementing the interface directly
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class AbstractVectorLayer
+         implements
+            IVectorLayer {
+
+   private int                                 m_iShapesCount;
+   private boolean                             m_bShapesCountAndExtentCalculated = false;
+   private Rectangle2D                         m_Extent;
+   private final ArrayList<IVectorLayerFilter> m_Filters                         = new ArrayList<IVectorLayerFilter>();
+
+
+   @Override
+   public abstract Object getBaseDataObject();
+
+
+   @Override
+   public String[] getFieldNames() {
+
+      final String[] names = new String[getFieldCount()];
+
+      for (int i = 0; i < names.length; i++) {
+         names[i] = getFieldName(i);
+      }
+
+      return names;
+
+   }
+
+
+   @Override
+   public int getFieldIndexByName(final String sFieldName) {
+
+      for (int i = 0; i < this.getFieldCount(); i++) {
+         final String sName = getFieldName(i);
+         if (sName.equalsIgnoreCase(sFieldName)) {
+            return i;
+         }
+      }
+
+      return -1;
+
+   }
+
+
+   @Override
+   public Class[] getFieldTypes() {
+
+      final Class[] types = new Class[getFieldCount()];
+
+      for (int i = 0; i < types.length; i++) {
+         types[i] = getFieldType(i);
+      }
+
+      return types;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return this.getName();
+
+   }
+
+
+   @Override
+   public void addFeature(final IFeature feature) {
+
+      addFeature(feature.getGeometry(), feature.getRecord().getValues());
+
+   }
+
+
+   @Override
+   public int getShapesCount() {
+
+      if (!m_bShapesCountAndExtentCalculated) {
+         calculateShapesCountAndExtent();
+      }
+      return m_iShapesCount;
+
+   }
+
+
+   @Override
+   public Rectangle2D getFullExtent() {
+
+      if (!m_bShapesCountAndExtentCalculated) {
+         calculateShapesCountAndExtent();
+      }
+      return m_Extent;
+
+   }
+
+
+   private void calculateShapesCountAndExtent() {
+
+      Envelope envelope = null;
+      final IFeatureIterator iter = iterator();
+      m_iShapesCount = 0;
+
+      while (iter.hasNext()) {
+         IFeature feature;
+         try {
+            feature = iter.next();
+         }
+         catch (final IteratorException e) {
+            m_Extent = new Rectangle2D.Double(0, 0, 0, 0);
+            m_iShapesCount = 0;
+            return;
+         }
+         if (m_iShapesCount == 0) {
+            envelope = feature.getGeometry().getEnvelopeInternal();
+         }
+         else {
+            envelope.expandToInclude(feature.getGeometry().getEnvelopeInternal());
+         }
+         m_iShapesCount++;
+      }
+
+      if (m_iShapesCount == 0) {
+         m_Extent = new Rectangle2D.Double();
+      }
+      else {
+         m_Extent = new Rectangle2D.Double(envelope.getMinX(), envelope.getMinY(), envelope.getWidth(), envelope.getHeight());
+      }
+
+      m_bShapesCountAndExtentCalculated = true;
+
+   }
+
+
+   @Override
+   public void addFilter(final IVectorLayerFilter filter) {
+
+      m_Filters.add(filter);
+      m_bShapesCountAndExtentCalculated = false;
+
+   }
+
+
+   @Override
+   public void removeFilters() {
+
+      m_Filters.clear();
+      m_bShapesCountAndExtentCalculated = false;
+
+   }
+
+
+   @Override
+   public List<IVectorLayerFilter> getFilters() {
+
+      return m_Filters;
+
+   }
+
+    @Override
+    public FeatureStore getFeatureStore() {
+        return null;
+    }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/AbstractVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ILayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ILayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ILayer.java	(revision 369)
@@ -0,0 +1,32 @@
+package es.unex.sextante.dataObjects;
+
+import java.awt.geom.Rectangle2D;
+
+/**
+ * Interface for layers
+ * 
+ * @author volaya
+ * 
+ */
+public interface ILayer
+         extends
+            IDataObject {
+
+   /**
+    * Returns the extent covered by the layer
+    * 
+    * @return the extent of the layer
+    */
+   public Rectangle2D getFullExtent();
+
+
+   /**
+    * Returns an object with information about the CRS associated to this layer. The class of this object depends on the
+    * implementation of this interface
+    * 
+    * @return An object with information about the CRS used for this layer (i.e. a string with a EPSG code)
+    */
+   public Object getCRS();
+
+   public String getContextName();
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/ILayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecord.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecord.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecord.java	(revision 369)
@@ -0,0 +1,28 @@
+package es.unex.sextante.dataObjects;
+
+/**
+ * A simple interface for a database record.
+ *
+ * @author volaya
+ *
+ */
+public interface IRecord {
+
+   /**
+    * Returns the value at a field
+    *
+    * @param iField
+    *                the index of the field. zero-based
+    * @return The value at the specified field
+    */
+   public Object getValue(int iField);
+
+
+   /**
+    * Returns an array with all the values of the record
+    *
+    * @return an array with all the values of the record
+    */
+   public Object[] getValues();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/IRecord.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/I3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/I3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/I3DRasterLayer.java	(revision 369)
@@ -0,0 +1,196 @@
+package es.unex.sextante.dataObjects;
+
+import java.awt.image.DataBuffer;
+
+import es.unex.sextante.core.AnalysisExtent;
+
+/**
+ * This is the base interface that all 3D raster object have to implement to be able to be used by SEXTANTE algorithms.
+ * 
+ * @author Victor Olaya. volaya@unex.es
+ * 
+ */
+public interface I3DRasterLayer
+         extends
+            ILayer {
+
+   public static final int RASTER_DATA_TYPE_FLOAT  = DataBuffer.TYPE_FLOAT;
+   public static final int RASTER_DATA_TYPE_DOUBLE = DataBuffer.TYPE_DOUBLE;
+   public static final int RASTER_DATA_TYPE_INT    = DataBuffer.TYPE_INT;
+   public static final int RASTER_DATA_TYPE_SHORT  = DataBuffer.TYPE_SHORT;
+   public static final int RASTER_DATA_TYPE_BYTE   = DataBuffer.TYPE_BYTE;
+
+
+   /**
+    * Returns the data type of the layer
+    * 
+    * @return the data type of the layer
+    */
+   public int getDataType();
+
+
+   /**
+    * Returns the extent of the whole layer
+    * 
+    * @return the extent of the whole layer
+    */
+   public AnalysisExtent getLayerExtent();
+
+
+   /**
+    * Return the original cellsize of the layer. X and Y cellsizes are assumed to be equal
+    * 
+    * @return the original cellsize of the layer
+    */
+   public double getCellSize();
+
+
+   /**
+    * Return the original vertical cellsize (Z) of the layer.
+    * 
+    * @return the original vertical cellsize (Z) of the layer
+    */
+   public double getCellSizeZ();
+
+
+   /**
+    * Sets the value at a cell
+    * 
+    * @param x
+    *                the x coordinate
+    * @param y
+    *                the y coordinate
+    * @param z
+    *                the z coordinate
+    * @param dValue
+    *                the new value
+    */
+   public void setCellValue(int x,
+                            int y,
+                            int z,
+                            double dValue);
+
+
+   /**
+    * Gets the no-data value of the layer
+    * 
+    * @return the no-data value of the layer
+    */
+   public double getNoDataValue();
+
+
+   /**
+    * Sets the no-data value of the layer
+    * 
+    * @param dNoDataValue
+    *                the new no-data value
+    */
+   public void setNoDataValue(double dNoDataValue);
+
+
+   /**
+    * Set the value of a cell to the no-data value
+    * 
+    * @param x
+    *                the x coordinate of the cell to set to no-data
+    * @param y
+    *                the y coordinate of the cell to set to no-data
+    * @param z
+    *                the z coordinate of the cell to set to no-data
+    */
+   public void setNoData(int x,
+                         int y,
+                         int z);
+
+
+   /**
+    * Checks if the given value equals the no-data value of the layer
+    * 
+    * @param dNoDataValue
+    *                a value to check
+    * @return true if the given value equals the no-data value of the layer
+    */
+   public boolean isNoDataValue(double dNoDataValue);
+
+
+   public byte getCellValueAsByte(int x,
+                                  int y,
+                                  int z);
+
+
+   public short getCellValueAsShort(int x,
+                                    int y,
+                                    int z);
+
+
+   public int getCellValueAsInt(int x,
+                                int y,
+                                int z);
+
+
+   public float getCellValueAsFloat(int x,
+                                    int y,
+                                    int z);
+
+
+   public double getCellValueAsDouble(int x,
+                                      int y,
+                                      int z);
+
+
+   /**
+    * Returns the value at a given world coordinate.
+    * 
+    * @param x
+    *                the x coordinate
+    * @param y
+    *                the y coordinate
+    * @param z
+    *                the y coordinate
+    * @return the value at the given world coordinate
+    */
+   public double getValueAt(double x,
+                            double y,
+                            double z);
+
+
+   /**
+    * 
+    * @param x
+    *                the x coordinate(col) of the cell
+    * @param y
+    *                the y coordinate(row) of the cell
+    * @param z
+    *                the z coordinate of the cell
+    * 
+    * @return true if the given cell is within the query window extent
+    */
+   public boolean isInWindow(int x,
+                             int y,
+                             int z);
+
+
+   /**
+    * Returns the number of columns in the query window of this layer
+    * 
+    * @return the number of columns in the query window
+    */
+   public int getNX();
+
+
+   /**
+    * Returns the number of rows in the query window of this layer
+    * 
+    * @return the number of rows in the query window
+    */
+   public int getNY();
+
+
+   /**
+    * Returns the number of vertical (z) cols in the query window
+    * 
+    * @return the number of vertical (z) cols in the query window
+    */
+   public int getNZ();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/dataObjects/I3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/FileOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/FileOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/FileOutputChannel.java	(revision 369)
@@ -0,0 +1,60 @@
+package es.unex.sextante.outputs;
+
+public class FileOutputChannel
+         implements
+            IOutputChannel {
+
+   private String m_sFilename;
+   private boolean temporary = false;
+
+   public FileOutputChannel(final String sFilename, boolean temporary) {
+     this.m_sFilename = sFilename;
+     this.temporary = temporary;
+   }
+   
+   public FileOutputChannel(final String sFilename) {
+       this(sFilename,false);
+   }
+
+   public boolean isTemporary() {
+       return this.temporary;
+   }
+   
+   public void setTemporary(boolean temporary ) {
+       this.temporary = temporary;
+   }
+   
+   public String getAsCommandLineParameter() {
+
+      if (m_sFilename == null) {
+         return "#";
+      }
+      else {
+         return m_sFilename;
+      }
+
+   }
+
+
+   public String getFilename() {
+
+      return m_sFilename;
+
+   }
+
+
+   public void setFilename(final String filename) {
+
+      m_sFilename = filename;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_sFilename;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/FileOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputNumericalValue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputNumericalValue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputNumericalValue.java	(revision 369)
@@ -0,0 +1,38 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * An output representing a numerical value
+ * 
+ * @author volaya
+ * 
+ */
+public class OutputNumericalValue
+         extends
+            Output {
+
+   @Override
+   public String getCommandLineParameter() {
+      return null;
+   }
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if (obj instanceof Number) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("Numerical_value");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputNumericalValue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output.java	(revision 369)
@@ -0,0 +1,175 @@
+package es.unex.sextante.outputs;
+
+/**
+ * This class defines a generic output object Output objects are contained in an {@link es.unex.sextante.core.OutputObjectsSet}
+ * and used to define the outputs generated by a geoalgorithm, and also to hold them once the algorithm has created them
+ * 
+ * @author Victor Olaya volaya@unex.es
+ * 
+ */
+public abstract class Output {
+
+   /**
+    * the name of the output, used to identify it internally
+    */
+   private String           m_sName;
+
+   /**
+    * a description of the output
+    */
+   private String           m_sDescription;
+
+   /**
+    * the filename associated with this output. Not all outputs must, however, use this
+    */
+   protected IOutputChannel m_OutputChannel;
+
+   /**
+    * The output value itself
+    */
+   protected Object         m_Object;
+
+
+   /**
+    * 
+    * @return a new instance of the output object
+    */
+   public Output getNewInstance() {
+
+      final Class cl = this.getClass();
+      Output ret;
+
+      try {
+         ret = (Output) cl.newInstance();
+
+         ret.setName(m_sName);
+         ret.setDescription(m_sDescription);
+         ret.setOutputObject(m_Object);
+         ret.setOutputChannel(m_OutputChannel);
+
+         return ret;
+      }
+      catch (final Exception e) {
+         return null;
+      }
+
+   }
+
+
+   /**
+    * Returns the name of the object
+    * 
+    * @return the name of the object
+    */
+   public String getName() {
+      return m_sName;
+   }
+
+
+   /**
+    * Sets a new name for the output object
+    * 
+    * @param name
+    *                the new name for the output object
+    */
+   public void setName(final String name) {
+      m_sName = name;
+   }
+
+
+   /**
+    * Returns the description of the output object
+    * 
+    * @return the description of the output object
+    */
+   public String getDescription() {
+      return m_sDescription;
+   }
+
+
+   /**
+    * Sets a new description for the output object
+    * 
+    * @param description
+    *                the new description for the output object
+    */
+   public void setDescription(final String description) {
+      m_sDescription = description;
+   }
+
+
+   /**
+    * Returns the value of the output object
+    * 
+    * @return the value of the output object
+    */
+   public Object getOutputObject() {
+      return m_Object;
+   }
+
+
+   /**
+    * Sets a new value for the output object
+    * 
+    * @param object
+    *                the new value for the output object
+    */
+   public abstract void setOutputObject(Object object);
+
+
+   /**
+    * Returns the output channel associated with the output object
+    * 
+    * @return the output channel associated with the output object
+    */
+   public IOutputChannel getOutputChannel() {
+
+      return m_OutputChannel;
+
+   }
+
+
+   /**
+    * Sets a new output channel associated with this output object
+    * 
+    * @param channel
+    *                the new output channel associated with this output object
+    */
+   public void setOutputChannel(final IOutputChannel channel) {
+
+      m_OutputChannel = channel;
+
+   }
+
+
+   /**
+    * Returns the output as a command-line parameter
+    * 
+    * @return the output as a string, to save it as a command-line parameter
+    */
+   public abstract String getCommandLineParameter();
+
+
+   /**
+    * Sets the data objects (output channel, name, output object, etc) of this objects from another Output object
+    * 
+    * @param output
+    *                the Output object to take data from
+    */
+   public void setObjectData(final Output output) {
+
+      setDescription(output.getDescription());
+      setOutputChannel(output.getOutputChannel());
+      setOutputObject(output.getOutputObject());
+
+   }
+
+
+   /**
+    * returns a human-readable description of the type of output
+    * 
+    * @return a human-readable description of the type of output
+    */
+   public abstract String getTypeDescription();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OverwriteOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OverwriteOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OverwriteOutputChannel.java	(revision 369)
@@ -0,0 +1,32 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+public class OverwriteOutputChannel
+         implements
+            IOutputChannel {
+
+   private final IVectorLayer m_Layer;
+
+
+   public OverwriteOutputChannel(final IVectorLayer layer) {
+
+      m_Layer = layer;
+
+   }
+
+
+   public IVectorLayer getLayer() {
+
+      return m_Layer;
+
+   }
+
+
+   public String getAsCommandLineParameter() {
+
+      return "@";
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OverwriteOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/IOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/IOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/IOutputChannel.java	(revision 369)
@@ -0,0 +1,9 @@
+package es.unex.sextante.outputs;
+
+
+public interface IOutputChannel {
+
+   public String getAsCommandLineParameter();
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/IOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputImage.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputImage.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputImage.java	(revision 369)
@@ -0,0 +1,41 @@
+
+
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+
+
+/**
+ * An output representing a chart
+ * 
+ * @author volaya
+ * 
+ */
+public class OutputImage
+         extends
+            Output {
+
+   @Override
+   public String getCommandLineParameter() {
+      return null;
+   }
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if (obj instanceof ImageContainer) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("image");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputImage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output3DRasterLayer.java	(revision 369)
@@ -0,0 +1,66 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+
+/**
+ * An output representing a 3D raster layer
+ * 
+ * @author volaya
+ * 
+ */
+public class Output3DRasterLayer
+         extends
+            Output {
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if ((obj instanceof I3DRasterLayer) || (obj == null)) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      if (m_OutputChannel == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + m_OutputChannel.getAsCommandLineParameter() + "\"";
+      }
+
+   }
+
+
+   @Override
+   public Output getNewInstance() {
+
+      final Output out = super.getNewInstance();
+      //((Output3DRasterLayer) out).setNumberOfBands(m_iNumberOfBands);
+
+      return out;
+
+   }
+
+
+   @Override
+   public void setObjectData(final Output output) {
+
+      super.setObjectData(output);
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("3Draster");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/Output3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputText.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputText.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputText.java	(revision 369)
@@ -0,0 +1,38 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * An output representing a HTML-formatted text
+ *
+ * @author volaya
+ *
+ */
+public class OutputText
+         extends
+            Output {
+
+   @Override
+   public String getCommandLineParameter() {
+      return null;
+   }
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if (obj instanceof String) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("text");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/StreamOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/StreamOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/StreamOutputChannel.java	(revision 369)
@@ -0,0 +1,33 @@
+package es.unex.sextante.outputs;
+
+import java.io.PrintStream;
+
+
+public class StreamOutputChannel
+         implements
+            IOutputChannel {
+
+   private PrintStream m_Stream;
+
+
+   public String getAsCommandLineParameter() {
+
+      return null;
+
+   }
+
+
+   public PrintStream getStream() {
+
+      return m_Stream;
+
+   }
+
+
+   public void setStream(final PrintStream stream) {
+
+      m_Stream = stream;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/StreamOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputTable.java	(revision 369)
@@ -0,0 +1,46 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.ITable;
+
+/**
+ * An output representing a table
+ *
+ * @author volaya
+ *
+ */
+public class OutputTable
+         extends
+            Output {
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if (obj instanceof ITable || obj == null) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      if (m_OutputChannel == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + m_OutputChannel.getAsCommandLineParameter() + "\"";
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("table");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/DatabaseOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/DatabaseOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/DatabaseOutputChannel.java	(revision 369)
@@ -0,0 +1,19 @@
+package es.unex.sextante.outputs;
+
+public class DatabaseOutputChannel
+         implements
+            IOutputChannel {
+
+   public String getAsCommandLineParameter() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+
+   public static IOutputChannel getFromString(final String s) {
+
+      return null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/DatabaseOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputRasterLayer.java	(revision 369)
@@ -0,0 +1,102 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+/**
+ * An output representing a raster layer
+ * 
+ * @author volaya
+ * 
+ */
+public class OutputRasterLayer
+         extends
+            Output {
+
+   public static final int NUMBER_OF_BANDS_UNDEFINED = -1;
+
+   private int             m_iNumberOfBands          = NUMBER_OF_BANDS_UNDEFINED;
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if ((obj instanceof IRasterLayer) || (obj == null)) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      if (m_OutputChannel == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + m_OutputChannel.getAsCommandLineParameter() + "\"";
+      }
+
+   }
+
+
+   /**
+    * Returns the number of bands that this output raster layer will have
+    * 
+    * @return the number of layers of the output raster layer
+    */
+   public int getNumberOfBands() {
+
+      return m_iNumberOfBands;
+
+   }
+
+
+   /**
+    * Set the number of bands of this output raster layer. If the number is lower that one, the number of bands is set to
+    * undefined.
+    * 
+    * @param numberOfBands
+    *                the number of bands this output raster layer will have
+    */
+   public void setNumberOfBands(int numberOfBands) {
+
+      if (numberOfBands < 1) {
+         numberOfBands = NUMBER_OF_BANDS_UNDEFINED;
+      }
+      m_iNumberOfBands = numberOfBands;
+
+   }
+
+
+   @Override
+   public Output getNewInstance() {
+
+      final Output out = super.getNewInstance();
+      ((OutputRasterLayer) out).setNumberOfBands(m_iNumberOfBands);
+
+      return out;
+
+   }
+
+
+   @Override
+   public void setObjectData(final Output output) {
+
+      super.setObjectData(output);
+      if (output instanceof OutputRasterLayer) {
+         this.setNumberOfBands(((OutputRasterLayer) output).getNumberOfBands());
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("raster");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputVectorLayer.java	(revision 369)
@@ -0,0 +1,155 @@
+package es.unex.sextante.outputs;
+
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.IVectorLayer;
+
+/**
+ * An output representing a vector layer
+ *
+ * @author volaya
+ *
+ */
+public class OutputVectorLayer
+         extends
+            Output {
+
+   public static final int SHAPE_TYPE_POLYGON   = IVectorLayer.SHAPE_TYPE_POLYGON;
+   public static final int SHAPE_TYPE_POINT     = IVectorLayer.SHAPE_TYPE_POINT;
+   public static final int SHAPE_TYPE_LINE      = IVectorLayer.SHAPE_TYPE_LINE;
+   public static final int SHAPE_TYPE_UNDEFINED = -1;
+
+   private int             m_iShapeType;
+   private int             m_subType;
+   private String          m_sInputLayerToOverwrite;
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if ((obj instanceof IVectorLayer) || (obj == null)) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      if (m_OutputChannel == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + m_OutputChannel.getAsCommandLineParameter() + "\"";
+      }
+
+   }
+
+
+   /**
+    * Returns the shape type of this output vector layer
+    *
+    * @return the shape type of this output vector layer
+    */
+   public int getShapeType() {
+
+      return m_iShapeType;
+
+   }
+
+
+   /**
+    * Sets the shape type of this output vector layer
+    *
+    * @param shapeType
+    *                The shape type of this output
+    */
+   public void setShapeType(final int shapeType) {
+
+      m_iShapeType = shapeType;
+
+   }
+
+
+   @Override
+   public Output getNewInstance() {
+
+      final Output out = super.getNewInstance();
+      ((OutputVectorLayer) out).setShapeType(m_iShapeType);
+      ((OutputVectorLayer) out).setInputLayerToOverwrite(m_sInputLayerToOverwrite);
+      ((OutputVectorLayer) out).setSubType(m_subType);
+
+      return out;
+
+   }
+
+
+   @Override
+   public void setObjectData(final Output output) {
+
+      super.setObjectData(output);
+      if (output instanceof OutputVectorLayer) {
+         this.setShapeType(((OutputVectorLayer) output).getShapeType());
+         this.setSubType(((OutputVectorLayer) output).getSubType());
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("vector");
+
+   }
+
+
+   /**
+    * Returns the name of the input parameter that this output can overwrite
+    *
+    * @return the name of the input parameter that this output can overwrite
+    */
+   public String getInputLayerToOverwrite() {
+
+      return m_sInputLayerToOverwrite;
+
+   }
+
+
+   /**
+    * Sets the name of the input parameter that this output can overwrite. Returns null if it cannot overwrite.
+    *
+    * @param inputLayerToOverwrite
+    *                the name of the input parameter that this output can overwrite
+    */
+   public void setInputLayerToOverwrite(final String inputLayerToOverwrite) {
+
+      m_sInputLayerToOverwrite = inputLayerToOverwrite;
+
+   }
+
+
+   public boolean canOverwrite() {
+
+      return m_sInputLayerToOverwrite != null;
+
+   }
+
+
+/**
+ * @return the m_subType
+ */
+public int getSubType() {
+    return m_subType;
+}
+
+
+/**
+ * @param m_subType the m_subType to set
+ */
+public void setSubType(int m_subType) {
+    this.m_subType = m_subType;
+}
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputChart.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputChart.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputChart.java	(revision 369)
@@ -0,0 +1,40 @@
+package es.unex.sextante.outputs;
+
+import org.jfree.chart.ChartPanel;
+
+import es.unex.sextante.core.Sextante;
+
+/**
+ * An output representing a chart
+ *
+ * @author volaya
+ *
+ */
+public class OutputChart
+         extends
+            Output {
+
+   @Override
+   public String getCommandLineParameter() {
+      return null;
+   }
+
+
+   @Override
+   public void setOutputObject(final Object obj) {
+
+      if (obj instanceof ChartPanel) {
+         m_Object = obj;
+      }
+
+   }
+
+
+   @Override
+   public String getTypeDescription() {
+
+      return Sextante.getText("chart");
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/OutputChart.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/NullOutputChannel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/NullOutputChannel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/NullOutputChannel.java	(revision 369)
@@ -0,0 +1,13 @@
+package es.unex.sextante.outputs;
+
+public class NullOutputChannel
+         implements
+            IOutputChannel {
+
+   public String getAsCommandLineParameter() {
+
+      return "!";
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/NullOutputChannel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/ImageContainer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/ImageContainer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/ImageContainer.java	(revision 369)
@@ -0,0 +1,48 @@
+
+
+package es.unex.sextante.outputs;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+
+public class ImageContainer
+         extends
+            Component {
+
+   BufferedImage img;
+
+
+   @Override
+   public void paint(final Graphics g) {
+      g.drawImage(img, 0, 0, null);
+   }
+
+
+   public ImageContainer(final String sFilepath) {
+      try {
+         img = ImageIO.read(new File(sFilepath));
+      }
+      catch (final IOException e) {
+      }
+
+   }
+
+
+   @Override
+   public Dimension getPreferredSize() {
+      if (img == null) {
+         return new Dimension(100, 100);
+      }
+      else {
+         return new Dimension(img.getWidth(null), img.getHeight(null));
+      }
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/ImageContainer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterDataObject.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterDataObject.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterDataObject.java	(revision 369)
@@ -0,0 +1,96 @@
+package es.unex.sextante.parameters;
+
+/**
+ * A parameter representing a layer or a table
+ * @author volaya
+ *
+ */
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlSerializer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+public abstract class ParameterDataObject
+         extends
+            Parameter {
+
+   protected static final String MANDATORY = "mandatory";
+
+
+   @Override
+   public abstract String getParameterTypeName();
+
+
+   @Override
+   public abstract boolean setParameterValue(Object value);
+
+
+   @Override
+   public abstract boolean setParameterAdditionalInfo(AdditionalInfo additionalInfo);
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoDataObject aido = (AdditionalInfoDataObject) m_ParameterAdditionalInfo;
+      if (aido != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MANDATORY);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aido.getIsMandatory()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterDataObject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBand.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBand.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBand.java	(revision 369)
@@ -0,0 +1,266 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoBand;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a band in a raster layer
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterBand
+         extends
+            Parameter {
+
+   private static final String PARENT = "parent";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Band";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).intValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).toString();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoBand) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Integer) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   public boolean setParameterValue(final int iValue) {
+
+      final Integer Value = new Integer(iValue);
+      m_ParameterValue = Value;
+      return true;
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Integer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoBand aib = (AdditionalInfoBand) m_ParameterAdditionalInfo;
+      if (aib != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, PARENT);
+         serializer.attribute(null, VALUE, aib.getParentParameterName());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sParent = null;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(PARENT) == 0) {
+                     sParent = parser.getAttributeValue("", VALUE);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterBand param = new ParameterBand();
+      final AdditionalInfoBand ai = new AdditionalInfoBand(sParent);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Integer I = (Integer) m_ParameterValue;
+
+      final int i = I.intValue() + 1;
+
+      return Integer.toString(i);
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return (m_ParameterValue != null);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/RasterLayerAndBand.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/RasterLayerAndBand.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/RasterLayerAndBand.java	(revision 369)
@@ -0,0 +1,60 @@
+package es.unex.sextante.parameters;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+
+/**
+ * This class represents a raster layer and one of its bands
+ *
+ * @author volaya
+ *
+ */
+public class RasterLayerAndBand {
+
+   private IRasterLayer m_RasterLayer;
+   private int          m_iBand;
+
+
+   public RasterLayerAndBand(final IRasterLayer layer,
+                             final int iBand) {
+
+      m_RasterLayer = layer;
+      m_iBand = iBand;
+
+   }
+
+
+   public int getBand() {
+
+      return m_iBand;
+
+   }
+
+
+   public void setBand(final int band) {
+
+      m_iBand = band;
+
+   }
+
+
+   public IRasterLayer getRasterLayer() {
+
+      return m_RasterLayer;
+   }
+
+
+   public void setRasterLayer(final IRasterLayer rasterLayer) {
+
+      m_RasterLayer = rasterLayer;
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      return m_RasterLayer.getName() + "," + Integer.toString(m_iBand + 1);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/RasterLayerAndBand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterString.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterString.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterString.java	(revision 369)
@@ -0,0 +1,228 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoString;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a String
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterString
+         extends
+            Parameter {
+
+   private static final String DEFAULT = "default";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "String";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (String) m_ParameterValue;
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoString) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof String) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return String.class;
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoString ais = (AdditionalInfoString) m_ParameterAdditionalInfo;
+      if (ais != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, DEFAULT);
+         serializer.attribute(null, VALUE, ais.getDefaultString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sDefault = null;
+
+      int tag = parser.nextTag();      
+      
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(DEFAULT) == 0) {
+                     sDefault = parser.getAttributeValue("", VALUE);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterString param = new ParameterString();
+      final AdditionalInfoString ai = new AdditionalInfoString();
+      ai.setDefaultString(sDefault);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      return "\"" + (String) m_ParameterValue + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterString.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFixedTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFixedTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFixedTable.java	(revision 369)
@@ -0,0 +1,297 @@
+
+
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoFixedTable;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+
+/**
+ * A parameter representing a fixed table
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterFixedTable
+         extends
+            Parameter {
+
+   private static final String ROWS      = "rows";
+   private static final String FIXED     = "fixed";
+   private static final String COL_NAMES = "col_names";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Fixed Table";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoFixedTable) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof FixedTableModel) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else if (value instanceof String) {
+         final AdditionalInfoFixedTable ai = (AdditionalInfoFixedTable) m_ParameterAdditionalInfo;
+         final int iCols = ai.getColsCount();
+         final String string = (String) value;
+         final String[] tokens = string.split(",");
+         final boolean bFixed = ai.isNumberOfRowsFixed();
+         final int iRows = tokens.length / iCols;
+         if (tokens.length % iCols != 0) {
+            return false;
+         }
+         if (bFixed && (tokens.length != iCols * iRows)) {
+            return false;
+         }
+         final ArrayList[] list = new ArrayList[iCols];
+         for (int i = 0; i < list.length; i++) {
+            list[i] = new ArrayList();
+         }
+         for (int i = 0; i < iRows; i++) {
+            for (int j = 0; j < iCols; j++) {
+               list[j].add(new Double(tokens[j + i * iCols].trim()));
+            }
+         }
+         final FixedTableModel ftm = new FixedTableModel(ai.getCols(), iRows, bFixed);
+         ftm.setData(list);
+         m_ParameterValue = ftm;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return FixedTableModel.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoFixedTable aift = (AdditionalInfoFixedTable) m_ParameterAdditionalInfo;
+      if (aift != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, ROWS);
+         serializer.attribute(null, VALUE, new Integer(aift.getRowsCount()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, FIXED);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aift.isNumberOfRowsFixed()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         final String[] sFields = aift.getCols();
+         String s = sFields[0];
+         for (int i = 1; i < sFields.length; i++) {
+            s = s + ";" + sFields[i];
+         }
+         serializer.attribute(null, NAME, COL_NAMES);
+         serializer.attribute(null, VALUE, s);
+         serializer.text("\n");
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bFixed = false;
+      int iRows = 0;
+      String sColNames = null;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(ROWS) == 0) {
+                     iRows = Integer.parseInt(parser.getAttributeValue("", VALUE));
+                  }
+                  if (sName.compareTo(FIXED) == 0) {
+                     bFixed = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+                  if (sName.compareTo(COL_NAMES) == 0) {
+                     sColNames = parser.getAttributeValue("", VALUE);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterFixedTable param = new ParameterFixedTable();
+      final AdditionalInfoFixedTable ai = new AdditionalInfoFixedTable(sColNames.split("\\;"), iRows, bFixed);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final FixedTableModel model = (FixedTableModel) m_ParameterValue;
+
+      int i, j;
+      final StringBuffer sb = new StringBuffer("\"");
+
+      for (i = 0; i < model.getRowCount(); i++) {
+         for (j = 0; j < model.getColumnCount(); j++) {
+            sb.append(model.getValueAt(i, j) + ",");
+         }
+      }
+      sb.deleteCharAt(sb.length() - 1);
+      sb.append("\"");
+
+      return sb.toString();
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return (m_ParameterValue != null);
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFixedTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleTableField.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleTableField.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleTableField.java	(revision 369)
@@ -0,0 +1,277 @@
+
+
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleTableField;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+
+/**
+ * A parameter representing a field in a table or in the attributes table of a vector layer
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterMultipleTableField
+         extends
+            Parameter {
+
+   private static final String PARENT    = "parent";
+   private static final String MANDATORY = "mandatory";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Multiple Table Field";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).toString();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoMultipleTableField) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof ArrayList) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   public boolean setParameterValue(final int iValue) {
+
+      final Integer Value = new Integer(iValue);
+      m_ParameterValue = Value;
+      return true;
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Integer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoTableField aitf = (AdditionalInfoTableField) m_ParameterAdditionalInfo;
+      if (aitf != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, PARENT);
+         serializer.attribute(null, VALUE, aitf.getParentParameterName());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MANDATORY);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aitf.getIsMandatory()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sParent = null;
+      boolean bMandatory = true;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(PARENT) == 0) {
+                     sParent = parser.getAttributeValue("", VALUE);
+                  }
+                  else if (sName.compareTo(PARENT) == 0) {
+                     final String sMandatory = parser.getAttributeValue("", VALUE);
+                     bMandatory = Boolean.parseBoolean(sMandatory);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterMultipleTableField param = new ParameterMultipleTableField();
+      final AdditionalInfoTableField ai = new AdditionalInfoTableField(sParent, bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Integer i = (Integer) m_ParameterValue;
+
+      return "\"" + i.toString() + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return m_ParameterValue != null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleTableField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleInput.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleInput.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleInput.java	(revision 369)
@@ -0,0 +1,284 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoMultipleInput;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.ILayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a multiple input
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterMultipleInput
+         extends
+            Parameter {
+
+   private static final String TYPE      = "type";
+   private static final String MANDATORY = "mandatory";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Multiple Input";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ArrayList getParameterValueAsArrayList() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((ArrayList) m_ParameterValue);
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((ArrayList) m_ParameterValue).size();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoMultipleInput) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof ArrayList) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return ArrayList.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoMultipleInput aimi = (AdditionalInfoMultipleInput) m_ParameterAdditionalInfo;
+      if (aimi != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, TYPE);
+         serializer.attribute(null, VALUE, new Integer(aimi.getDataType()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MANDATORY);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aimi.getIsMandatory()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      int iType = 0;
+      boolean bMandatory = false;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(TYPE) == 0) {
+                     iType = Integer.parseInt(parser.getAttributeValue("", VALUE));
+                  }
+                  else if (sName.compareTo(MANDATORY) == 0) {
+                     bMandatory = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterMultipleInput param = new ParameterMultipleInput();
+      final AdditionalInfoMultipleInput ai = new AdditionalInfoMultipleInput(iType, bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      Object obj;
+      final ArrayList list = (ArrayList) m_ParameterValue;
+
+      if (list.size() > 0) {
+         final StringBuffer sb = new StringBuffer("\"");
+         for (int i = 0; i < list.size(); i++) {
+            obj = list.get(i);
+            if (obj instanceof ILayer) {
+               sb.append(((ILayer) obj).getName());
+            }
+            else if (obj instanceof ITable) {
+               sb.append(((ITable) obj).getName());
+            }
+            else {
+               sb.append(obj.toString());
+            }
+            if (i < list.size() - 1) {
+               sb.append(", ");
+            }
+         }
+         sb.append("\"");
+
+         return sb.toString();
+      }
+      else {
+         return "\"#\"";
+      }
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      final AdditionalInfoMultipleInput aimi = (AdditionalInfoMultipleInput) m_ParameterAdditionalInfo;
+      if (m_ParameterValue == null) {
+         return !aimi.getIsMandatory();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterMultipleInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterNumericalValue.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterNumericalValue.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterNumericalValue.java	(revision 369)
@@ -0,0 +1,288 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a numerical value
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterNumericalValue
+         extends
+            Parameter {
+
+   private static final String MAX     = "max";
+   private static final String TYPE    = "type";
+   private static final String DEFAULT = "default";
+   private static final String MIN     = "min";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Numerical Value";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Number) m_ParameterValue).intValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Number) m_ParameterValue).doubleValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         final Number n = (Number) m_ParameterValue;
+         if (((AdditionalInfoNumericalValue) m_ParameterAdditionalInfo).getType() == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER) {
+            return Integer.toString(n.intValue());
+         }
+         else {
+            return n.toString();
+         }
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoNumericalValue) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Number) {
+         final Number number = (Number) value;
+         final double dValue = number.doubleValue();
+         final AdditionalInfoNumericalValue ainv = (AdditionalInfoNumericalValue) m_ParameterAdditionalInfo;
+         if ((dValue >= ainv.getMinValue()) && (dValue <= ainv.getMaxValue())) {
+            m_ParameterValue = value;
+            return true;
+         }
+         else {
+            return false;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Number.class;
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoNumericalValue ainv = (AdditionalInfoNumericalValue) m_ParameterAdditionalInfo;
+      if (ainv != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MIN);
+         serializer.attribute(null, VALUE, new Double(ainv.getMinValue()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MAX);
+         serializer.attribute(null, VALUE, new Double(ainv.getMaxValue()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, DEFAULT);
+         serializer.attribute(null, VALUE, new Double(ainv.getDefaultValue()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, TYPE);
+         serializer.attribute(null, VALUE, new Integer(ainv.getType()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      int iType = 0;
+      double dMin = Double.MAX_VALUE;
+      double dMax = Double.NEGATIVE_INFINITY;
+      double dDefault = 0;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(TYPE) == 0) {
+                     iType = Integer.parseInt(parser.getAttributeValue("", VALUE));
+                  }
+                  if (sName.compareTo(MIN) == 0) {
+                     dMin = Double.parseDouble(parser.getAttributeValue("", VALUE));
+                  }
+                  if (sName.compareTo(MAX) == 0) {
+                     dMax = Double.parseDouble(parser.getAttributeValue("", VALUE));
+                  }
+                  if (sName.compareTo(DEFAULT) == 0) {
+                     dDefault = Double.parseDouble(parser.getAttributeValue("", VALUE));
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterNumericalValue param = new ParameterNumericalValue();
+      final AdditionalInfoNumericalValue ai = new AdditionalInfoNumericalValue(iType, dDefault, dMin, dMax);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Number n = (Number) m_ParameterValue;
+
+      if (((AdditionalInfoNumericalValue) m_ParameterAdditionalInfo).getType() == AdditionalInfoNumericalValue.NUMERICAL_VALUE_INTEGER) {
+         return "\"" + Integer.toString(n.intValue()) + "\"";
+      }
+      else {
+         return "\"" + n.toString() + "\"";
+      }
+
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterNumericalValue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter.java	(revision 369)
@@ -0,0 +1,548 @@
+
+
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.core.GeoAlgorithm;
+import es.unex.sextante.core.ParametersSet;
+import es.unex.sextante.core.Sextante;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+
+/**
+ * A parameter in a {@link ParametersSet}, needed to run a {@link GeoAlgorithm}
+ * 
+ * @author volaya
+ * 
+ */
+public abstract class Parameter {
+
+   private static final String   CLASS                     = "class";
+   private static final String   DESCRIPTION               = "description";
+   private static final String   TOOLTIP                   = "tooltip";
+   private static final String   COORDS                    = "coords";
+   private static final String   RED                       = "red";
+   private static final String   GREEN                     = "green";
+   private static final String   BLUE                      = "blue";
+   private static final String   ALPHA                     = "alpha";
+
+   protected static final String INPUT                     = "input";
+   protected static final String ATTRIBUTE                 = "attribute";
+   protected static final String VALUE                     = "value";
+   protected static final String NAME                      = "name";
+
+   private String                m_sName                   = "";
+   private String                m_sDescription            = "";
+   private String                m_sTooltip                = "";
+   protected Object              m_ParameterValue          = null;
+   protected AdditionalInfo      m_ParameterAdditionalInfo = null;
+   
+   /**
+    * Color values useful for e.g. coloring algorithm nodes in the modeler
+    */
+   private int                  i_R									= Sextante.i_R_Input;
+   private int                  i_G									= Sextante.i_G_Input;
+   private int                  i_B									= Sextante.i_B_Input;
+   private int                  i_Alpha								= Sextante.i_Alpha_Input;
+
+
+   /**
+    * Returns the name used to identify the parameter in the parameters set
+    * 
+    * @return the name of the parameter
+    */
+   public abstract String getParameterTypeName();
+
+
+   /**
+    * Sets the value of the parameter
+    * 
+    * @param value
+    *                the new value of the parameter
+    * @return true if the value is a correct one and could be assigned
+    */
+   public abstract boolean setParameterValue(Object value);
+
+
+   /**
+    * Set the additional information for this parameter
+    * 
+    * @see AdditionalInfo
+    * @param additionalInfo
+    *                the additional info for this parameter
+    * @return true it the passed additional info can be assigned to this parameter
+    */
+   public abstract boolean setParameterAdditionalInfo(AdditionalInfo additionalInfo);
+
+
+   /**
+    * Returns the value of the parameter as an integer
+    * 
+    * @return the value of the parameter as an integer
+    * @throws WrongParameterTypeException
+    *                 if the value cannot be returned as an integer
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public abstract int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a double
+    * 
+    * @return the value of the parameter as a double
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as an double
+    * @throws NullParameterValueException
+    *                 if the value is null
+    */
+   public abstract double getParameterValueAsDouble() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a boolean value
+    * 
+    * @return the value of the parameter as a boolean value
+    * @throws WrongParameterTypeException
+    *                 if the value cannot be returned as a boolean value
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public abstract boolean getParameterValueAsBoolean() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a string
+    * 
+    * @return the value of the parameter as a string
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a string
+    * @throws NullParameterValueException
+    *                 if the value is null
+    * @throws NullParameterAdditionalInfoException
+    *                 if the additional info of the parameter is null
+    */
+   public abstract String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException,
+                                                     NullParameterAdditionalInfoException;
+
+
+   /**
+    * Returns the value of the parameter as a vector layer
+    * 
+    * @return the value of the parameter as a vector layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a vector layer
+    * @throws NullParameterValueException
+    *                 if the value is null and it is a mandatory vector layer
+    * @throws NullParameterAdditionalInfoException
+    *                 if the additional info of the parameter is null
+    */
+   public abstract IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a 3D raster layer
+    * 
+    * @return the value of the parameter as a 3D raster layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a 3D raster layer
+    * @throws NullParameterValueException
+    *                 if the value is null and it is a mandatory 3D raster layer
+    * @throws NullParameterAdditionalInfoException
+    *                 if the additional info of the parameter is null
+    */
+   public abstract I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException,
+                                                                    NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a raster layer
+    * 
+    * @return the value of the parameter as a raster layer
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a raster layer
+    * @throws NullParameterValueException
+    *                 if the value is null and it is a mandatory raster layer
+    * @throws NullParameterAdditionalInfoException
+    *                 if the additional info of the parameter is null
+    */
+   public abstract IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a table
+    * 
+    * @return the value of the parameter as a table
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a table
+    * @throws NullParameterValueException
+    *                 if the value is null and it is a mandatory table
+    * @throws NullParameterAdditionalInfoException
+    *                 if the additional info of the parameter is null
+    */
+   public abstract ITable getParameterValueAsTable() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the value of the parameter as a point
+    * 
+    * @return the value of the parameter as a point
+    * @throws WrongParameterTypeException
+    *                 if the parameter cannot be returned as a point
+    * @throws NullParameterValueException
+    *                 if the parameter is null
+    */
+   public abstract Point2D getParameterValueAsPoint() throws WrongParameterTypeException, NullParameterValueException;
+
+
+   /**
+    * Returns the class of the value represented by this parameter
+    * 
+    * @return the class of the value represented by this parameter
+    */
+   public abstract Class getParameterClass();
+
+
+   /**
+    * Returns the value of the parameter as a command-line parameter
+    * 
+    * @return then value of the parameter as a command-line parameter
+    */
+   public abstract String getCommandLineParameter();
+
+
+   /**
+    * Serializes the attributes of the parameter that are specific to this kind of parameter
+    * 
+    * @param serializer
+    *                a serializer
+    * @throws NullParameterAdditionalInfoException
+    * @throws IOException
+    */
+   protected abstract void serializeAttributes(KXmlSerializer serializer) throws NullParameterAdditionalInfoException,
+                                                                         IOException;
+
+
+   /**
+    * Returns the additional information of this parameter
+    * 
+    * @return the additional information of this parameter
+    * @throws NullParameterAdditionalInfoException
+    *                 if there is no additional information
+    */
+   public AdditionalInfo getParameterAdditionalInfo() throws NullParameterAdditionalInfoException {
+
+      if (m_ParameterAdditionalInfo == null) {
+         throw new NullParameterAdditionalInfoException();
+      }
+      else {
+         return m_ParameterAdditionalInfo;
+      }
+
+   }
+
+
+   /**
+    * Returns the name of the parameter
+    * 
+    * @return the name (machine-readable) of the parameter
+    */
+   public String getParameterName() {
+
+      return m_sName;
+
+   }
+
+
+   /**
+    * Returns the description of the parameter
+    * 
+    * @return the description(human-readable) of the parameter
+    */
+   public String getParameterDescription() {
+
+      return m_sDescription;
+
+   }
+
+
+   public int getColorR() {
+	   return(i_R);
+   }
+   
+   public int getColorG() {
+	   return(i_G);
+   }
+  
+   public int getColorB() {
+	   return(i_B);
+   }
+   
+   public int getColorAlpha() {
+	   return(i_Alpha);
+   }   
+   
+   
+   /**
+    * Sets a new description of the parameter
+    * 
+    * @param sDescription
+    *                the description of the parameter
+    */
+   public void setParameterDescription(final String sDescription) {
+
+      m_sDescription = sDescription;
+
+   }
+
+   
+   public void setColorR(final int red) {
+	   i_R = red;
+   }
+   
+   public void setColorG(final int green) {
+	   i_G = green;
+   }   
+   
+   public void setColorB(final int blue) {
+	   i_B = blue;
+   }   
+   
+   public void setColorAlpha(final int alpha) {
+	   i_Alpha = alpha;
+   }  
+
+   
+   /**
+    * Returns a string that can be used as a tooltip.
+    * 
+    * @return the tooltip string
+    */
+   public String getParameterTooltip() {
+
+      return m_sTooltip;
+
+   }
+
+
+   /**
+    * Returns a string that can be used as a tooltip.
+    * 
+    * param the tooltip string
+    */
+   public void setParameterTooltip(final String sTooltip) {
+
+      m_sTooltip = sTooltip;
+
+   }
+
+
+   /**
+    * Sets a new name for this parameter
+    * 
+    * @param sName
+    *                the name of the parameter
+    */
+   public void setParameterName(final String sName) {
+
+      m_sName = sName;
+
+   }
+
+
+   /**
+    * Returns the value of the parameter, not casting it to any particular type
+    * 
+    * @return the value of the parameter
+    */
+   public Object getParameterValueAsObject() {
+
+      return m_ParameterValue;
+
+   }
+
+
+   /**
+    * Returns the value of the parameter as an array list. This is a generic implementation, which simply returns an ArrayList
+    * with a single object
+    * 
+    * @return the value of the a parameter as an array list
+    * @throws NullParameterValueException
+    */
+   public ArrayList getParameterValueAsArrayList() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         final ArrayList array = new ArrayList();
+         array.add(m_ParameterValue);
+
+         return array;
+      }
+      throw new NullParameterValueException();
+   }
+
+
+   /**
+    * Returns a text description of the parameter
+    * 
+    * @see #getParameterTypeName()
+    */
+   @Override
+   public String toString() {
+
+      return getParameterTypeName();
+
+   }
+
+
+   /**
+    * Creates an instance of a parameter from an XML string
+    * 
+    * @param parser
+    *                a parser to take the parameter data from
+    * @return a new instance of a parameter
+    * @throws XmlPullParserException
+    * @throws IOException
+    */
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      Parameter param = null;
+
+      final String sName = parser.getAttributeValue("", NAME);
+      final String sDescription = parser.getAttributeValue("", DESCRIPTION);
+      final String sClass = parser.getAttributeValue("", CLASS);
+
+      if (sClass.equals(ParameterRasterLayer.class.toString())) {
+         param = ParameterRasterLayer.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterVectorLayer.class.toString())) {
+         param = ParameterVectorLayer.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterTable.class.toString())) {
+         param = ParameterTable.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterBand.class.toString())) {
+         param = ParameterBand.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterBoolean.class.toString())) {
+         param = ParameterBoolean.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterFilepath.class.toString())) {
+         param = ParameterFilepath.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterNumericalValue.class.toString())) {
+         param = ParameterNumericalValue.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterPoint.class.toString())) {
+         param = ParameterPoint.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterSelection.class.toString())) {
+         param = ParameterSelection.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterString.class.toString())) {    	 
+         param = ParameterString.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterTableField.class.toString())) {
+         param = ParameterTableField.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterMultipleInput.class.toString())) {
+         param = ParameterMultipleInput.deserialize(parser);
+      }
+      else if (sClass.equals(ParameterFixedTable.class.toString())) {
+         param = ParameterFixedTable.deserialize(parser);
+      }
+      else {
+         return null;
+      }
+
+      param.setParameterDescription(sDescription);
+
+      param.setParameterName(sName);
+
+      return param;
+
+   }
+
+
+   /**
+    * Serializes the description of this parameter (not its value)
+    * 
+    * @param serializer
+    *                a serializer
+    * @param sCoords
+    *                The coords for representing it if it is part of a model
+    * @throws IOException
+    * @throws NullParameterAdditionalInfoException
+    */
+   public void serialize(final KXmlSerializer serializer,
+                         final String sCoords) throws IOException, NullParameterAdditionalInfoException {
+
+      serializer.text("\n");
+      serializer.text("\t\t");
+      serializer.startTag(null, INPUT);
+      serializer.attribute(null, NAME, m_sName);
+      serializer.attribute(null, DESCRIPTION, m_sDescription);
+      serializer.attribute(null, TOOLTIP, m_sTooltip);
+      serializer.attribute(null, CLASS, this.getClass().toString());
+      serializer.attribute(null, RED, Integer.toString(getColorR()));
+      serializer.attribute(null, GREEN, Integer.toString(getColorG()));
+      serializer.attribute(null, BLUE, Integer.toString(getColorB()));
+      serializer.attribute(null, ALPHA, Integer.toString(getColorAlpha()));
+      serializer.attribute(null, COORDS, sCoords);
+      serializeAttributes(serializer);
+      serializer.text("\n");
+      serializer.text("\t\t");
+      serializer.endTag(null, INPUT);
+
+   }
+
+
+   /**
+    * Returns a copy of this parameter
+    * 
+    * @return a copy of this parameter
+    */
+   public Parameter getNewInstance() {
+
+      Parameter param;
+      try {
+         param = this.getClass().newInstance();
+         param.setParameterDescription(m_sDescription);
+         param.setParameterTooltip(m_sTooltip);
+         param.setParameterName(m_sName);
+         param.setParameterAdditionalInfo(m_ParameterAdditionalInfo);
+         //System.out.println ("\t*** VALUE="+ m_ParameterValue +".\n");
+         param.setParameterValue(m_ParameterValue);
+
+         return param;
+      }
+      catch (final Exception e) {
+         Sextante.addErrorToLog(e);
+         return null;
+      }
+
+   }
+
+
+   /**
+    * Returns true if the value assigned to this parameter is valid
+    * 
+    * @return true if the value assigned to this parameter is valid
+    */
+   public abstract boolean isParameterValueCorrect();
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBoolean.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBoolean.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBoolean.java	(revision 369)
@@ -0,0 +1,179 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoBoolean;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a boolean value
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterBoolean
+         extends
+            Parameter {
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Boolean";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Boolean) m_ParameterValue).toString();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Boolean) m_ParameterValue).booleanValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoBoolean) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Boolean) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Boolean.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) {}
+
+
+   public static Parameter deserialize(final KXmlParser parser) {
+
+      final ParameterBoolean param = new ParameterBoolean();
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Boolean b = (Boolean) m_ParameterValue;
+
+      return "\"" + b.toString() + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterBoolean.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter3DRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter3DRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter3DRasterLayer.java	(revision 369)
@@ -0,0 +1,195 @@
+package es.unex.sextante.parameters;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfo3DRasterLayer;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a 3D raster layer
+ * 
+ * @author volaya
+ * 
+ */
+public class Parameter3DRasterLayer
+         extends
+            ParameterDataObject {
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "3D Raster Layer";
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (I3DRasterLayer) m_ParameterValue;
+      }
+      if (((AdditionalInfo3DRasterLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+         throw new NullParameterValueException();
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoRasterLayer) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof I3DRasterLayer) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else if (value == null) {
+         if (((AdditionalInfo3DRasterLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+            return false;
+         }
+         else {
+            m_ParameterValue = null;
+            return true;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return I3DRasterLayer.class;
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bMandatory = false;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(MANDATORY) == 0) {
+                     bMandatory = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final Parameter3DRasterLayer param = new Parameter3DRasterLayer();
+      final AdditionalInfo3DRasterLayer ai = new AdditionalInfo3DRasterLayer(bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final I3DRasterLayer layer = (I3DRasterLayer) m_ParameterValue;
+
+      if (layer == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + layer.getName() + "\"";
+      }
+
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      final AdditionalInfoDataObject aido = (AdditionalInfoDataObject) m_ParameterAdditionalInfo;
+      if (m_ParameterValue == null) {
+         return !aido.getIsMandatory();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/Parameter3DRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterSelection.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterSelection.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterSelection.java	(revision 369)
@@ -0,0 +1,267 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoSelection;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a selection from a list of possible values
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterSelection
+         extends
+            Parameter {
+
+   private static final String OPTIONS = "options";
+   private static final String PATH = "path";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Selection";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).intValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).doubleValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException,
+                                            NullParameterAdditionalInfoException {
+
+      if (m_ParameterValue != null) {
+         if (m_ParameterAdditionalInfo != null) {
+            final String[] sValues = ((AdditionalInfoSelection) m_ParameterAdditionalInfo).getValues();
+            return (sValues[((Integer) m_ParameterValue).intValue()]);
+         }
+         else {
+            throw new NullParameterAdditionalInfoException();
+         }
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoSelection) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Integer) {
+         final String[] sValues = ((AdditionalInfoSelection) m_ParameterAdditionalInfo).getValues();
+         if (((Integer) value).intValue() < sValues.length) {
+            m_ParameterValue = value;
+            return true;
+         }
+         else {
+            return false;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Integer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoSelection ais = (AdditionalInfoSelection) m_ParameterAdditionalInfo;
+      if (ais != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         final String[] sFields = ais.getValues();
+         String s = sFields[0];
+         for (int i = 1; i < sFields.length; i++) {
+            s = s + ";" + sFields[i];
+         }
+         serializer.attribute(null, NAME, OPTIONS);
+         serializer.attribute(null, VALUE, s);
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, PATH);
+         serializer.attribute(null, VALUE, ais.getSelectionPath());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sValues = null;
+      String sPath = null;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(OPTIONS) == 0) {
+                     sValues = parser.getAttributeValue("", VALUE);
+                  }
+                  if (sName.compareTo(PATH) == 0) {
+                      sPath = parser.getAttributeValue("", VALUE);
+                   }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterSelection param = new ParameterSelection();
+      final AdditionalInfoSelection ai = new AdditionalInfoSelection(sValues.split("\\;"));
+      if ( sPath != null )
+    	  ai.setSelectionPath(sPath);
+      param.setParameterAdditionalInfo(ai);
+      
+      return param;
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Integer i = (Integer) m_ParameterValue;
+
+      return "\"" + i.toString() + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return m_ParameterValue != null;
+
+   }
+
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterSelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/FixedTableModel.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/FixedTableModel.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/FixedTableModel.java	(revision 369)
@@ -0,0 +1,372 @@
+
+
+package es.unex.sextante.parameters;
+
+import java.util.ArrayList;
+
+import javax.swing.table.AbstractTableModel;
+
+
+/**
+ * A table model to be used for a fixed table parameter
+ * 
+ * @see ParameterFixedTable
+ * @author volaya
+ * 
+ */
+public class FixedTableModel
+         extends
+            AbstractTableModel {
+
+   String[]    m_sColumnNames;
+   ArrayList[] m_Data;
+   boolean     m_bIsNumberOfRowsFixed;
+
+
+   /**
+    * Creates a new table
+    * 
+    * @param sColumnNames
+    *                names of columns(fields) in table
+    * @param iRows
+    *                number of rows in table
+    * @param bIsNumberOfRowsFixed
+    *                true if new rows can be added
+    */
+   public FixedTableModel(final String[] sColumnNames,
+                          final int iRows,
+                          final boolean bIsNumberOfRowsFixed) {
+
+      int i, j;
+
+      m_sColumnNames = sColumnNames;
+      m_bIsNumberOfRowsFixed = bIsNumberOfRowsFixed;
+      m_Data = new ArrayList[sColumnNames.length];
+
+      for (i = 0; i < m_sColumnNames.length; i++) {
+         m_Data[i] = new ArrayList();
+         for (j = 0; j < iRows; j++) {
+            m_Data[i].add("0");
+         }
+      }
+
+   }
+
+
+   /**
+    * use this method to clone the table.
+    * 
+    * @param fixedTableModel
+    * @return a new instance of fixedTableModel
+    */
+   public static FixedTableModel newInstance(final FixedTableModel fixedTableModel) {
+
+      final FixedTableModel newFixedTableModel = new FixedTableModel(fixedTableModel.getColumnNames(),
+               fixedTableModel.getRowCount(), fixedTableModel.isNumberOfRowsFixed());
+      newFixedTableModel.setData(fixedTableModel.getData());
+
+      return newFixedTableModel;
+
+   }
+
+
+   /**
+    * Sets the attributes of the table
+    * 
+    * @param sColumnNames
+    *                names of columns(fields)
+    * @param data
+    *                table data
+    * @param bIsNumberOfRowsFixed
+    *                true if new rows can be added
+    * @return true if data is consistent
+    */
+   public boolean setAttributes(final String[] sColumnNames,
+                                final ArrayList[] data,
+                                final boolean bIsNumberOfRowsFixed) {
+
+      if (data.length == sColumnNames.length) {
+         this.setData(data);
+         m_sColumnNames = sColumnNames;
+         m_bIsNumberOfRowsFixed = bIsNumberOfRowsFixed;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   /**
+    * Returns the number of columns
+    * 
+    * @return Number of columns(fields)
+    */
+   public int getColumnCount() {
+
+      return m_sColumnNames.length;
+
+   }
+
+
+   /**
+    * Returns the number of rows
+    * 
+    * @return Number of rows
+    */
+   public int getRowCount() {
+
+      return m_Data[0].size();
+
+   }
+
+
+   /**
+    * Returns the name of a column
+    * 
+    * @param iCol
+    *                the index of the column
+    * @return Name of column iCol
+    */
+   @Override
+   public String getColumnName(final int iCol) {
+
+      return m_sColumnNames[iCol];
+
+   }
+
+
+   /**
+    * Returns an array of strings with column names
+    * 
+    * @return An array of strings with column names
+    */
+   public String[] getColumnNames() {
+
+      return m_sColumnNames;
+
+   }
+
+
+   /**
+    * Returns the value at a cell
+    * 
+    * @param iRow
+    *                the row
+    * @param iCol
+    *                the column
+    * @return the value at cell [iRow, iCol]
+    */
+   public Object getValueAt(final int iRow,
+                            final int iCol) {
+
+      return m_Data[iCol].get(iRow);
+
+   }
+
+
+   /**
+    * Returns the class of a field
+    * 
+    * @param iField
+    *                the index of the field
+    * @return the class of the given field
+    */
+   @Override
+   public Class getColumnClass(final int iField) {
+
+      return getValueAt(0, iField).getClass();
+
+   }
+
+
+   @Override
+   public boolean isCellEditable(final int iRow,
+                                 final int iCol) {
+
+      return true;
+
+   }
+
+
+   @Override
+   public void setValueAt(final Object value,
+                          final int iRow,
+                          final int iCol) {
+
+      try {
+         //final Double d = new Double(Double.parseDouble(value.toString()));
+         if (iRow < getRowCount()) {
+            m_Data[iCol].set(iRow, value.toString());
+            fireTableCellUpdated(iRow, iCol);
+         }
+      }
+      catch (final Exception e) {
+      }
+
+   }
+
+
+   /**
+    * Adds a new row to the table, only if possible
+    * 
+    */
+   public void addRow() {
+
+      int i;
+
+      if (!m_bIsNumberOfRowsFixed) {
+         for (i = 0; i < m_sColumnNames.length; i++) {
+            m_Data[i].add(new Double(0));
+         }
+      }
+
+      this.fireTableRowsInserted(m_Data[0].size(), m_Data[0].size());
+
+   }
+
+
+   /**
+    * removes row iRow, if number of rows is not fixed
+    * 
+    * @param iRow
+    *                the index of the row to remove
+    */
+   public void removeRow(final int iRow) {
+
+      int i;
+      if (!m_bIsNumberOfRowsFixed) {
+         for (i = 0; i < m_sColumnNames.length; i++) {
+            m_Data[i].remove(iRow);
+         }
+      }
+
+      this.fireTableRowsDeleted(iRow, iRow);
+   }
+
+
+   public ArrayList[] getData() {
+
+      return m_Data;
+
+   }
+
+
+   public boolean setData(final ArrayList[] data) {
+
+      int i, j;
+
+      if (data.length == m_sColumnNames.length) {
+         for (i = 0; i < m_Data.length; i++) {
+            m_Data[i].clear();
+            for (j = 0; j < data[i].size(); j++) {
+               //m_Data[i].add(new Double(((Double) data[i].get(j)).doubleValue()));
+               m_Data[i].add(data[i].get(j));
+            }
+         }
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   /**
+    * Returns true if the number of rows in the table is fixed
+    * 
+    * @return true if the number of rows in the table is fixed
+    */
+   public boolean isNumberOfRowsFixed() {
+
+      return m_bIsNumberOfRowsFixed;
+
+   }
+
+
+   /**
+    * Sets whether the number of rows can be modified or not
+    * 
+    * @param bIsNumberOfRowsFixed
+    *                indicates whether the number of rows can be modified or not
+    */
+   public void setIsNumberOfRowsFixed(final boolean bIsNumberOfRowsFixed) {
+
+      m_bIsNumberOfRowsFixed = bIsNumberOfRowsFixed;
+
+   }
+
+
+   /**
+    * Returns the dimensions of the table as a string
+    * 
+    * @return a String in the form "x by y" with the dimensions of the table
+    */
+   public String getDimensionsAsString() {
+
+      final StringBuffer s = new StringBuffer();
+
+      s.append(Integer.toString(getRowCount()));
+      s.append(" X ");
+      s.append(Integer.toString(getColumnCount()));
+
+      return s.toString();
+
+   }
+
+
+   @Override
+   public String toString() {
+
+      int i, j;
+      final StringBuffer sb = new StringBuffer("[");
+
+      for (i = 0; i < getRowCount(); i++) {
+         sb.append("[");
+         for (j = 0; j < getColumnCount(); j++) {
+            sb.append(getValueAt(i, j));
+            if (j < getColumnCount() - 1) {
+               sb.append("|");
+            }
+         }
+         if (i < getRowCount() - 1) {
+            sb.append("],");
+         }
+         else {
+            sb.append("]");
+         }
+      }
+      sb.append("]");
+
+      return sb.toString();
+
+   }
+
+
+   /**
+    * Returns a Comma-Separated Values version of the table
+    * 
+    * @return a Comma-Separated Values version of the table
+    */
+   public String getAsCSV() {
+
+      int i, j;
+      final StringBuffer sb = new StringBuffer("");
+
+      for (i = 0; i < getRowCount(); i++) {
+         for (j = 0; j < getColumnCount(); j++) {
+            sb.append(getValueAt(i, j));
+            if ((i != getRowCount() - 1) || (j != getColumnCount() - 1)) {
+               sb.append(",");
+            }
+
+         }
+      }
+
+      return sb.toString();
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/FixedTableModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTable.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTable.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTable.java	(revision 369)
@@ -0,0 +1,191 @@
+package es.unex.sextante.parameters;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoTable;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a table
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterTable
+         extends
+            ParameterDataObject {
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Table";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (ITable) m_ParameterValue;
+      }
+      if (((AdditionalInfoTable) m_ParameterAdditionalInfo).getIsMandatory()) {
+         throw new NullParameterValueException();
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoTable) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof ITable) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else if (value == null) {
+         if (((AdditionalInfoTable) m_ParameterAdditionalInfo).getIsMandatory()) {
+            return false;
+         }
+         else {
+            m_ParameterValue = null;
+            return true;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return ITable.class;
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bMandatory = false;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(MANDATORY) == 0) {
+                     bMandatory = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterTable param = new ParameterTable();
+      final AdditionalInfoTable ai = new AdditionalInfoTable(bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final ITable table = (ITable) m_ParameterValue;
+
+      if (table == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + table.getName() + "\"";
+      }
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      final AdditionalInfoDataObject aido = (AdditionalInfoDataObject) m_ParameterAdditionalInfo;
+      if (m_ParameterValue == null) {
+         return !aido.getIsMandatory();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterPoint.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterPoint.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterPoint.java	(revision 369)
@@ -0,0 +1,181 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoPoint;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a point
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterPoint
+         extends
+            Parameter {
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Point";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Point2D) m_ParameterValue);
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoPoint) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Point2D) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Point2D.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) {
+
+      final ParameterPoint param = new ParameterPoint();
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Point2D pt = (Point2D) m_ParameterValue;
+      final String s = "\"" + Double.toString(pt.getX()) + "," + Double.toString(pt.getY()) + "\"";
+
+      return s;
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return m_ParameterValue != null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterPoint.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableField.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableField.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableField.java	(revision 369)
@@ -0,0 +1,278 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableField;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a field in a table or in the attributes table of a vector layer
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterTableField
+         extends
+            Parameter {
+
+   private static final String PARENT    = "parent";
+   private static final String MANDATORY = "mandatory";
+    private String fieldName;
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Table Field";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return ((Integer) m_ParameterValue).intValue();
+      }
+      throw new NullParameterValueException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (fieldName != null) {
+         return fieldName;
+      }
+
+      return null;
+
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoTableField) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof Integer) {
+         m_ParameterValue = value;
+         return true;
+      }
+      if (value instanceof String) {
+          this.fieldName = (String) value;
+      }
+      return false;
+   }
+
+
+   public boolean setParameterValue(final int iValue) {
+
+      final Integer Value = new Integer(iValue);
+      m_ParameterValue = Value;
+      return true;
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Integer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoTableField aitf = (AdditionalInfoTableField) m_ParameterAdditionalInfo;
+      if (aitf != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, PARENT);
+         serializer.attribute(null, VALUE, aitf.getParentParameterName());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MANDATORY);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aitf.getIsMandatory()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sParent = null;
+      boolean bMandatory = true;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(PARENT) == 0) {
+                     sParent = parser.getAttributeValue("", VALUE);
+                  }
+                  else if (sName.compareTo(PARENT) == 0) {
+                     final String sMandatory = parser.getAttributeValue("", VALUE);
+                     bMandatory = Boolean.parseBoolean(sMandatory);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterTableField param = new ParameterTableField();
+      final AdditionalInfoTableField ai = new AdditionalInfoTableField(sParent, bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final Integer i = (Integer) m_ParameterValue;
+
+      return "\"" + i.toString() + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return m_ParameterValue != null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFilepath.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFilepath.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFilepath.java	(revision 369)
@@ -0,0 +1,279 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoFilepath;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a filepath
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterFilepath
+         extends
+            Parameter {
+
+   private static final String OPENDIALOG = "isopendialog";
+   private static final String FOLDER     = "folder";
+   private static final String EXTENSION  = "extension";
+   private static final String VOXEL      = "voxel"; 
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Filepath";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (String) m_ParameterValue;
+      }
+      throw new NullParameterValueException();
+   }
+
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoFilepath) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+	   
+      if (value instanceof String) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else {    	 
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return String.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoFilepath aifp = (AdditionalInfoFilepath) m_ParameterAdditionalInfo;
+      if (aifp != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         
+         serializer.startTag(null, ATTRIBUTE);
+         	serializer.attribute(null, NAME, FOLDER);
+         	serializer.attribute(null, VALUE, (Boolean.valueOf(aifp.isFolder())).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         
+         serializer.text("\n");
+         serializer.text("\t\t\t");         
+         
+         serializer.startTag(null, ATTRIBUTE);
+         	serializer.attribute(null, NAME, OPENDIALOG);
+         	serializer.attribute(null, VALUE, (new Boolean(aifp.isOpenDialog())).toString());
+         serializer.endTag(null, ATTRIBUTE);
+         
+         serializer.text("\n");
+         serializer.text("\t\t\t");         
+         
+         serializer.startTag(null, ATTRIBUTE);
+         	serializer.attribute(null, NAME, VOXEL);
+         	serializer.attribute(null, VALUE, (new Boolean(aifp.getIsVoxelData())).toString());
+         serializer.endTag(null, ATTRIBUTE);
+
+         final StringBuffer exts = new StringBuffer();
+         final String[] sExts = aifp.getExtensions();
+         if ( sExts != null && sExts.length > 0 ) {
+        	 serializer.text("\n");
+        	 serializer.text("\t\t\t");         
+        	 serializer.startTag(null, ATTRIBUTE);
+        	 serializer.attribute(null, NAME, EXTENSION);
+        	 for (int i = 0; i < sExts.length; i++) {
+        		 exts.append(sExts[i]);
+        		 if (i < sExts.length - 1) {
+        			 exts.append(",");
+        		 }
+        	 }
+        	 serializer.attribute(null, VALUE, exts.toString());
+        	 serializer.endTag(null, ATTRIBUTE);
+         }
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bFolder = false;
+      boolean bOpenDialog = false;
+      boolean bIsVoxel = false;
+      
+      String sExt[] = null;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(EXTENSION) == 0) {
+                     sExt = parser.getAttributeValue("", VALUE).split(",");
+                  }
+                  else if (sName.compareTo(FOLDER) == 0) {
+                     bFolder = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+                  else if (sName.compareTo(OPENDIALOG) == 0) {
+                     bOpenDialog = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+                  else if (sName.compareTo(VOXEL) == 0) {
+                      bIsVoxel = parser.getAttributeValue("", VALUE).equals("true");
+                  }                  
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterFilepath param = new ParameterFilepath();
+      final AdditionalInfoFilepath ai = new AdditionalInfoFilepath(bFolder, bOpenDialog, bIsVoxel, sExt);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final String s = (String) m_ParameterValue;
+
+      return "\"" + s + "\"";
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterFilepath.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableFilter.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableFilter.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableFilter.java	(revision 369)
@@ -0,0 +1,262 @@
+package es.unex.sextante.parameters;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoTableFilter;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+import org.gvsig.expressionevaluator.Expression;
+/**
+ * A parameter representing a field in a table or in the attributes table of a vector layer
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterTableFilter
+         extends
+            Parameter {
+
+   private static final String PARENT    = "parent";
+   private static final String MANDATORY = "mandatory";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Table Filter";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   public ArrayList getParameterValueAsMultipleTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public double getParameterValueAsDouble() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean getParameterValueAsBoolean() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException {
+       
+      throw new WrongParameterTypeException();
+      
+   }
+
+   @Override
+   public Point2D getParameterValueAsPoint() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoTableFilter) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+      try {
+          m_ParameterValue = value;
+      } catch (Exception ex) {
+       return false;
+   }
+      return true;
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return Integer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      final AdditionalInfoTableFilter aitf = (AdditionalInfoTableFilter) m_ParameterAdditionalInfo;
+      if (aitf != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, PARENT);
+         serializer.attribute(null, VALUE, aitf.getParentParameterName());
+         serializer.endTag(null, ATTRIBUTE);
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, MANDATORY);
+         serializer.attribute(null, VALUE, Boolean.valueOf(aitf.getIsMandatory()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      String sParent = null;
+      boolean bMandatory = true;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(PARENT) == 0) {
+                     sParent = parser.getAttributeValue("", VALUE);
+                  }
+                  else if (sName.compareTo(PARENT) == 0) {
+                     final String sMandatory = parser.getAttributeValue("", VALUE);
+                     bMandatory = Boolean.parseBoolean(sMandatory);
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterTableFilter param = new ParameterTableFilter();
+      final AdditionalInfoTableFilter ai = new AdditionalInfoTableFilter(sParent, bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      //final Integer i = (Integer) m_ParameterValue;
+      if (m_ParameterValue!=null) {
+          Expression value = (Expression) m_ParameterValue;
+        return "\"" + value.getPhrase() + "\"";
+      } else {
+          return "";
+      }
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      return m_ParameterValue != null;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterTableFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterRasterLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterRasterLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterRasterLayer.java	(revision 369)
@@ -0,0 +1,194 @@
+package es.unex.sextante.parameters;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoRasterLayer;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a raster layer
+ * 
+ * @author volaya
+ * 
+ */
+public class ParameterRasterLayer
+         extends
+            ParameterDataObject {
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Raster Layer";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (IRasterLayer) m_ParameterValue;
+      }
+      if (((AdditionalInfoRasterLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+         throw new NullParameterValueException();
+      }
+      else {
+         return null;
+      }
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoRasterLayer) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+      if (value instanceof IRasterLayer) {
+         m_ParameterValue = value;
+         return true;
+      }
+      else if (value == null) {
+         if (((AdditionalInfoRasterLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+            return false;
+         }
+         else {
+            m_ParameterValue = null;
+            return true;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return IRasterLayer.class;
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bMandatory = false;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(MANDATORY) == 0) {
+                     bMandatory = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+      final ParameterRasterLayer param = new ParameterRasterLayer();
+      final AdditionalInfoRasterLayer ai = new AdditionalInfoRasterLayer(bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final IRasterLayer layer = (IRasterLayer) m_ParameterValue;
+
+      if (layer == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + layer.getName() + "\"";
+      }
+
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      final AdditionalInfoDataObject aido = (AdditionalInfoDataObject) m_ParameterAdditionalInfo;
+      if (m_ParameterValue == null) {
+         return !aido.getIsMandatory();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterRasterLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterVectorLayer.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterVectorLayer.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterVectorLayer.java	(revision 369)
@@ -0,0 +1,227 @@
+package es.unex.sextante.parameters;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.kxml2.io.KXmlSerializer;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import es.unex.sextante.additionalInfo.AdditionalInfo;
+import es.unex.sextante.additionalInfo.AdditionalInfoDataObject;
+import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer;
+import es.unex.sextante.dataObjects.I3DRasterLayer;
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.dataObjects.ITable;
+import es.unex.sextante.dataObjects.IVectorLayer;
+import es.unex.sextante.exceptions.NullParameterAdditionalInfoException;
+import es.unex.sextante.exceptions.NullParameterValueException;
+import es.unex.sextante.exceptions.WrongParameterTypeException;
+
+/**
+ * A parameter representing a vector layer
+ *
+ * @author volaya
+ *
+ */
+public class ParameterVectorLayer
+         extends
+            ParameterDataObject {
+
+
+   private static final String TYPE = "shape_type";
+
+
+   @Override
+   public String getParameterTypeName() {
+
+      return "Vector Layer";
+
+   }
+
+
+   @Override
+   public IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public I3DRasterLayer getParameterValueAs3DRasterLayer() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public ITable getParameterValueAsTable() throws WrongParameterTypeException {
+
+      throw new WrongParameterTypeException();
+
+   }
+
+
+   @Override
+   public IVectorLayer getParameterValueAsVectorLayer() throws NullParameterValueException {
+
+      if (m_ParameterValue != null) {
+         return (IVectorLayer) m_ParameterValue;
+      }
+      if (((AdditionalInfoVectorLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+         throw new NullParameterValueException();
+      }
+      else {
+         return null;
+      }
+   }
+
+
+   @Override
+   public boolean setParameterAdditionalInfo(final AdditionalInfo additionalInfo) {
+
+      if (additionalInfo instanceof AdditionalInfoVectorLayer) {
+         m_ParameterAdditionalInfo = additionalInfo;
+         return true;
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public boolean setParameterValue(final Object value) {
+
+        if (value instanceof IVectorLayer) {
+            final AdditionalInfoVectorLayer ai = (AdditionalInfoVectorLayer) m_ParameterAdditionalInfo;
+            if (ai.isAvailableForShapeType(((IVectorLayer) value).getShapeType())) {
+                m_ParameterValue = value;
+                return true;
+            } else {
+                return false;
+            }
+        }
+      else if (value == null) {
+         if (((AdditionalInfoVectorLayer) m_ParameterAdditionalInfo).getIsMandatory()) {
+            return false;
+         }
+         else {
+            m_ParameterValue = null;
+            return true;
+         }
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   @Override
+   public Class getParameterClass() {
+
+      return IVectorLayer.class;
+
+   }
+
+
+   @Override
+   protected void serializeAttributes(final KXmlSerializer serializer) throws NullParameterAdditionalInfoException, IOException {
+
+      super.serializeAttributes(serializer);
+
+      final AdditionalInfoVectorLayer aivl = (AdditionalInfoVectorLayer) m_ParameterAdditionalInfo;
+      if (aivl != null) {
+         serializer.text("\n");
+         serializer.text("\t\t\t");
+         serializer.startTag(null, ATTRIBUTE);
+         serializer.attribute(null, NAME, TYPE);
+         serializer.attribute(null, VALUE, new Integer(aivl.getShapeType()).toString());
+         serializer.endTag(null, ATTRIBUTE);
+      }
+      else {
+         throw new NullParameterAdditionalInfoException();
+      }
+
+   }
+
+
+   public static Parameter deserialize(final KXmlParser parser) throws XmlPullParserException, IOException {
+
+      boolean bMandatory = false;
+      int iShapeType = 0;
+
+      int tag = parser.nextTag();
+
+      boolean bOver = false;
+      while (!bOver) {
+         switch (tag) {
+            case XmlPullParser.START_TAG:
+               if (parser.getName().compareTo(ATTRIBUTE) == 0) {
+                  final String sName = parser.getAttributeValue("", NAME);
+                  if (sName.compareTo(MANDATORY) == 0) {
+                     bMandatory = parser.getAttributeValue("", VALUE).equals("true");
+                  }
+                  else if (sName.compareTo(TYPE) == 0) {
+                     iShapeType = Integer.parseInt(parser.getAttributeValue("", VALUE));
+                  }
+               }
+               break;
+            case XmlPullParser.END_TAG:
+               if (parser.getName().compareTo(INPUT) == 0) {
+                  bOver = true;
+               }
+               break;
+            case XmlPullParser.TEXT:
+               break;
+         }
+
+         if (!bOver) {
+            tag = parser.next();
+         }
+
+      }
+
+
+      final ParameterVectorLayer param = new ParameterVectorLayer();
+      final AdditionalInfoVectorLayer ai = new AdditionalInfoVectorLayer(iShapeType, bMandatory);
+      param.setParameterAdditionalInfo(ai);
+
+      return param;
+
+   }
+
+
+   @Override
+   public String getCommandLineParameter() {
+
+      final IVectorLayer layer = (IVectorLayer) m_ParameterValue;
+
+      if (layer == null) {
+         return "\"#\"";
+      }
+      else {
+         return "\"" + layer.getName() + "\"";
+      }
+
+   }
+
+
+   @Override
+   public boolean isParameterValueCorrect() {
+
+      final AdditionalInfoDataObject aido = (AdditionalInfoDataObject) m_ParameterAdditionalInfo;
+      if (m_ParameterValue == null) {
+         return !aido.getIsMandatory();
+      }
+      else {
+         return true;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/parameters/ParameterVectorLayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/org/gvsig/toolbox/core/ToolboxCoreLibrary.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/org/gvsig/toolbox/core/ToolboxCoreLibrary.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/org/gvsig/toolbox/core/ToolboxCoreLibrary.java	(revision 369)
@@ -0,0 +1,36 @@
+package org.gvsig.toolbox.core;
+
+import java.util.Locale;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.Library;
+import org.gvsig.tools.library.LibraryException;
+
+public class ToolboxCoreLibrary extends AbstractLibrary {
+
+	public ToolboxCoreLibrary() {
+		super();
+	}
+
+	@Override
+	public void doRegistration() {
+		this.registerAs(ToolboxCoreLibrary.class, Library.TYPE.IMPL);
+	}
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+		if (!Messages.hasLocales()) {
+			Messages.addLocale(Locale.getDefault());
+		}
+
+		Messages.addResourceFamily("org.gvsig.toolbox.core.i18n.text",
+				ToolboxCoreLibrary.class.getClassLoader(),
+				ToolboxCoreLibrary.class.getClass().getName()); 
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+	}
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/java/org/gvsig/toolbox/core/ToolboxCoreLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_fr.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_fr.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_fr.properties	(revision 369)
@@ -0,0 +1,10 @@
+#Modified by DOKSoft PropEditor. http://www.doksoft.com
+#Fri Feb 18 11:30:32 CET 2011
+vector=Vectoriel
+raster=Couche matricielle
+[New_model]=[Nouveau mod\u00e8le]
+chart=graphique
+table=table
+text=texte
+Toolbox=Bo\u00eete \u00e0 outils
+Toolbox_models=Mod\u00e8les
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text.properties	(revision 369)
@@ -0,0 +1,17 @@
+[New_model]=[Nuevo modelo]
+
+chart=gr\u00e1fico
+
+raster=raster
+
+text=texto
+
+table=tabla
+
+vector=vectorial
+
+Java_code=C\u00f3digo Java
+
+Toolbox=Caja de herramientas
+
+Toolbox_models=Modelos
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_en.properties
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_en.properties	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_en.properties	(revision 369)
@@ -0,0 +1,17 @@
+[New_model]=[New model]
+
+chart=chart
+
+raster=raster
+
+text=text
+
+table=table
+
+vector=vector
+
+Java_code=Java code
+
+Toolbox=Toolbox
+
+Toolbox_models=Models

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/org/gvsig/toolbox/core/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 369)
@@ -0,0 +1 @@
+org.gvsig.toolbox.core.ToolboxCoreLibrary
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.core
___________________________________________________________________
Added: svn:ignore
   + target

.settings

.project

.classpath


Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/jep-2.4.0.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/jep-2.4.0.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/trove-0.1.8.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/trove-0.1.8.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/Jama-1.0.2.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/lib/Jama-1.0.2.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/MANIFEST.MF
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/MANIFEST.MF	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/MANIFEST.MF	(revision 369)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.7.0
+Created-By: 16.3-b01 (Sun Microsystems Inc.)
+Implementation-Version: 0.7
+Built-Date: 2011-12-14 14:01:08
+

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/simpleStats/SimpleStats.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/simpleStats/SimpleStats.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/simpleStats/SimpleStats.java	(revision 369)
@@ -0,0 +1,171 @@
+package es.unex.sextante.math.simpleStats;
+
+
+/**
+ * A class to calculate some basic statistics
+ * 
+ * @author volaya
+ * 
+ */
+public class SimpleStats {
+
+   //private final ArrayList m_Values;
+   private double m_dSum;
+   private double m_dRMS;
+   private double m_dMean;
+   private double m_dVariance;
+   private double m_dMax, m_dMin;
+   private double m_dStdDev;
+   //private boolean   m_bCalculated;
+   private int    m_iCount;
+   private double m_dM2;
+
+
+   public SimpleStats() {
+
+      //m_Values = new ArrayList();
+      //m_bCalculated = false;
+      m_iCount = 0;
+      m_dMax = Double.NEGATIVE_INFINITY;
+      m_dMin = Double.MAX_VALUE;
+      m_dSum = 0;
+      m_dRMS = 0;
+      m_dM2 = 0;
+
+   }
+
+
+   /**
+    * adds a new value to the list of values
+    * 
+    * @param dValue
+    *                the value
+    */
+   public void addValue(final double dValue) {
+
+      m_iCount++;
+
+      final double dDelta = dValue - m_dMean;
+      m_dMean = m_dMean + dDelta / m_iCount;
+      m_dM2 = m_dM2 + dDelta * (dValue - m_dMean);
+      m_dVariance = m_dM2 / (m_iCount - 1);
+
+      m_dSum += dValue;
+      m_dRMS += dValue * dValue;
+      m_dMax = Math.max(m_dMax, dValue);
+      m_dMin = Math.min(m_dMin, dValue);
+
+      m_dStdDev = Math.sqrt(m_dVariance);
+      m_dRMS = Math.sqrt(m_dRMS / m_iCount);
+
+   }
+
+
+   /**
+    * Returns the coefficient of variation
+    * 
+    * @return the coefficient of variation
+    */
+   public double getCoeffOfVar() {
+
+      return m_dVariance / m_dMean;
+
+   }
+
+
+   /**
+    * Return the number of values added
+    * 
+    * @return the number of values added
+    */
+   public int getCount() {
+
+      return m_iCount;
+
+   }
+
+
+   /**
+    * Returns the maximum value
+    * 
+    * @return the maximum value
+    */
+   public double getMax() {
+
+      return m_dMax;
+
+   }
+
+
+   /**
+    * Returns the mean value
+    * 
+    * @return the mean value
+    */
+   public double getMean() {
+
+      return m_dMean;
+
+   }
+
+
+   /**
+    * Returns the minimum value
+    * 
+    * @return the minimum value
+    */
+   public double getMin() {
+
+      return m_dMin;
+
+   }
+
+
+   /**
+    * Returns the Root Mean Squared
+    * 
+    * @return the Root Mean Squared
+    */
+   public double getRMS() {
+
+      return m_dRMS;
+
+   }
+
+
+   /**
+    * Returns the standard deviation
+    * 
+    * @return the standard deviation
+    */
+   public double getStdDev() {
+
+      return m_dStdDev;
+
+   }
+
+
+   /**
+    * Returns the sum of all values
+    * 
+    * @return the sum of all values
+    */
+   public double getSum() {
+
+      return m_dSum;
+
+   }
+
+
+   /**
+    * Returns the variance
+    * 
+    * @return the variance
+    */
+   public double getVariance() {
+
+      return m_dVariance;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/simpleStats/SimpleStats.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/pdf/PDF.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/pdf/PDF.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/pdf/PDF.java	(revision 369)
@@ -0,0 +1,817 @@
+/*************************************************************
+ *
+ * A reduced version of Michael Thomas Flanagan's Stat Class
+ * with PDFs and CDFs
+ *
+ * http://www.ee.ucl.ac.uk/~mflanaga/java/Stat.html
+ *
+ **************************************************************/
+
+package es.unex.sextante.math.pdf;
+
+/**
+ * Statistical functions with PDFs and CDFs. Based on Michael Thomas Flanagan's Stat Class
+ *
+ * @author volaya
+ *
+ */
+public class PDF {
+
+   // GAMMA FUNCTIONS
+   // Lanczos Gamma Function approximation - N (number of coefficients -1)
+   private static int         lgfN     = 6;
+
+   // Lanczos Gamma Function approximation - Coefficients
+   private static double[]    lgfCoeff = { 1.000000000190015, 76.18009172947146, -86.50532032941677, 24.01409824083091,
+            -1.231739572450155, 0.1208650973866179E-2, -0.5395239384953E-5 };
+
+   // Lanczos Gamma Function approximation - small gamma
+   private static double      lgfGamma = 5.0;
+
+   // Maximum number of iterations allowed in Incomplete Gamma Function
+   // calculations
+   private static int         igfiter  = 1000;
+
+   // Tolerance used in terminating series in Incomplete Gamma Function
+   // calculations
+   private static double      igfeps   = 1e-8;
+
+   public static final double FPMIN    = 1e-300;
+
+
+   // BETA DISTRIBUTIONS AND FUNCTIONS
+   // beta distribution cdf
+   public static double betaCDF(final double alpha,
+                                final double beta,
+                                final double limit) {
+
+      return betaCDF(0.0D, 1.0D, alpha, beta, limit);
+   }
+
+
+   // beta distribution pdf
+   public static double betaCDF(final double min,
+                                final double max,
+                                final double alpha,
+                                final double beta,
+                                final double limit) {
+
+      if (alpha <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, alpha, " + alpha + "must be greater than zero");
+      }
+      if (beta <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, beta, " + beta + "must be greater than zero");
+      }
+      if (limit < min) {
+         throw new IllegalArgumentException("limit, " + limit + ", must be greater than or equal to the minimum value, " + min);
+      }
+      if (limit > max) {
+         throw new IllegalArgumentException("limit, " + limit + ", must be less than or equal to the maximum value, " + max);
+      }
+      return PDF.regularisedBetaFunction(alpha, beta, (limit - min) / (max - min));
+   }
+
+
+   // Beta function
+   public static double betaFunction(final double z,
+                                     final double w) {
+
+      return Math.exp(logGamma(z) + logGamma(w) - logGamma(z + w));
+   }
+
+
+   // beta distribution pdf
+   public static double betaPDF(final double alpha,
+                                final double beta,
+                                final double x) {
+
+      return betaPDF(0.0D, 1.0D, alpha, beta, x);
+   }
+
+
+   // beta distribution pdf
+   public static double betaPDF(final double min,
+                                final double max,
+                                final double alpha,
+                                final double beta,
+                                final double x) {
+
+      if (alpha <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, alpha, " + alpha + "must be greater than zero");
+      }
+      if (beta <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, beta, " + beta + "must be greater than zero");
+      }
+      if (x < min) {
+         throw new IllegalArgumentException("x, " + x + ", must be greater than or equal to the minimum value, " + min);
+      }
+      if (x > max) {
+         throw new IllegalArgumentException("x, " + x + ", must be less than or equal to the maximum value, " + max);
+      }
+      final double pdf = Math.pow(x - min, alpha - 1) * Math.pow(max - x, beta - 1) / Math.pow(max - min, alpha + beta - 1);
+      return pdf / PDF.betaFunction(alpha, beta);
+   }
+
+
+   // Returns a binomial mass probabilty function
+   public static double binomial(final double p,
+                                 final int n,
+                                 final int k) {
+
+      if (k < 0 || n < 0) {
+         throw new IllegalArgumentException("\nn and k must be greater than or equal to zero");
+      }
+      if (k > n) {
+         throw new IllegalArgumentException("\nk is greater than n");
+      }
+      return Math.floor(0.5D + Math.exp(PDF.logFactorial(n) - PDF.logFactorial(k) - PDF.logFactorial(n - k))) * Math.pow(p, k)
+             * Math.pow(1.0D - p, n - k);
+   }
+
+
+   // Returns the binomial cumulative probabilty
+   public static double binomialCDF(final double p,
+                                    final int n,
+                                    final int k) {
+
+      if (p < 0.0D || p > 1.0D) {
+         throw new IllegalArgumentException("\np must lie between 0 and 1");
+      }
+      if (k < 0 || n < 0) {
+         throw new IllegalArgumentException("\nn and k must be greater than or equal to zero");
+      }
+      if (k > n) {
+         throw new IllegalArgumentException("\nk is greater than n");
+      }
+      return PDF.regularisedBetaFunction(k, n - k + 1, p);
+   }
+
+
+   // Chi-Square Probability Density Function
+   // nu = the degrees of freedom
+   public static double chiSquare(double chiSquare,
+                                  final int nu) {
+
+      if (nu <= 0) {
+         throw new IllegalArgumentException("The degrees of freedom [nu], " + nu + ", must be greater than zero");
+      }
+      final double dnu = (double) nu;
+      return Math.pow(0.5D, dnu / 2.0D) * Math.pow(chiSquare, dnu / 2.0D - 1.0D) * Math.exp(-chiSquare / 2.0D)
+             / PDF.gammaFunction(dnu / 2.0D);
+   }
+
+
+   // CHI SQUARE
+   // Chi-Square Cumulative Distribution Function
+   // probability that an observed chi-square value for a correct model should
+   // be less than chiSquare
+   // nu = the degrees of freedom
+   public static double chiSquareCDF(final double chiSquare,
+                                     final int nu) {
+
+      if (nu <= 0) {
+         throw new IllegalArgumentException("The degrees of freedom [nu], " + nu + ", must be greater than zero");
+      }
+      return PDF.regularisedGammaFunction((double) nu / 2.0D, chiSquare / 2.0D);
+   }
+
+
+   // Complementary Regularised Incomplete Gamma Function Q(a,x) = 1 - P(a,x) =
+   // 1 - integral from zero to x of (exp(-t)t^(a-1))dt
+   public static double complementaryRegularisedGammaFunction(final double a,
+                                                              final double x) {
+
+      if (a < 0.0D || x < 0.0D) {
+         throw new IllegalArgumentException("\nFunction defined only for a >= 0 and x>=0");
+      }
+      double igf = 0.0D;
+
+      if (x != 0.0D) {
+         if (x == 1.0D / 0.0D) {
+            igf = 1.0D;
+         }
+         else {
+            if (x < a + 1.0D) {
+               // Series representation
+               igf = 1.0D - incompleteGammaSer(a, x);
+            }
+            else {
+               // Continued fraction representation
+               igf = 1.0D - incompleteGammaFract(a, x);
+            }
+         }
+      }
+      return igf;
+   }
+
+
+   // Incomplete fraction summation used in the method regularisedBetaFunction
+   // modified Lentz's method
+   public static double contFract(final double a,
+                                  final double b,
+                                  final double x) {
+
+      final int maxit = 500;
+      final double eps = 3.0e-7;
+      final double aplusb = a + b;
+      final double aplus1 = a + 1.0D;
+      final double aminus1 = a - 1.0D;
+      double c = 1.0D;
+      double d = 1.0D - aplusb * x / aplus1;
+      if (Math.abs(d) < PDF.FPMIN) {
+         d = FPMIN;
+      }
+      d = 1.0D / d;
+      double h = d;
+      double aa = 0.0D;
+      double del = 0.0D;
+      int i = 1, i2 = 0;
+      boolean test = true;
+      while (test) {
+         i2 = 2 * i;
+         aa = i * (b - i) * x / ((aminus1 + i2) * (a + i2));
+         d = 1.0D + aa * d;
+         if (Math.abs(d) < PDF.FPMIN) {
+            d = FPMIN;
+         }
+         c = 1.0D + aa / c;
+         if (Math.abs(c) < PDF.FPMIN) {
+            c = FPMIN;
+         }
+         d = 1.0D / d;
+         h *= d * c;
+         aa = -(a + i) * (aplusb + i) * x / ((a + i2) * (aplus1 + i2));
+         d = 1.0D + aa * d;
+         if (Math.abs(d) < PDF.FPMIN) {
+            d = FPMIN;
+         }
+         c = 1.0D + aa / c;
+         if (Math.abs(c) < PDF.FPMIN) {
+            c = FPMIN;
+         }
+         d = 1.0D / d;
+         del = d * c;
+         h *= del;
+         i++;
+         if (Math.abs(del - 1.0D) < eps) {
+            test = false;
+         }
+         if (i > maxit) {
+            test = false;
+         }
+      }
+      return h;
+
+   }
+
+
+   // Hyperbolic cosine of a double number
+   public static double cosh(double a) {
+
+      return 0.5D * (Math.exp(a) + Math.exp(-a));
+   }
+
+
+   // Error Function
+   public static double erf(final double x) {
+
+      double erf = 0.0D;
+      if (x != 0.0) {
+         if (x == 1.0D / 0.0D) {
+            erf = 1.0D;
+         }
+         else {
+            if (x >= 0) {
+               erf = PDF.regularisedGammaFunction(0.5, x * x);
+            }
+            else {
+               erf = -PDF.regularisedGammaFunction(0.5, x * x);
+            }
+         }
+      }
+      return erf;
+   }
+
+
+   // Exponential probability
+   public static double exponential(final double mu,
+                                    final double sigma,
+                                    final double x) {
+
+      double arg = (x - mu) / sigma;
+      double y = 0.0D;
+      if (arg >= 0.0D) {
+         y = Math.exp(-arg) / sigma;
+      }
+      return y;
+   }
+
+
+   // Exponential cumulative distribution function
+   // probability that a variate will assume a value less than the upperlimit
+   public static double exponentialCDF(final double mu,
+                                       final double sigma,
+                                       final double upperlimit) {
+
+      double arg = (upperlimit - mu) / sigma;
+      double y = 0.0D;
+      if (arg > 0.0D) {
+         y = 1.0D - Math.exp(-arg);
+      }
+      return y;
+   }
+
+
+   // factorial of n
+   // Argument is of type double but must be, numerically, an integer
+   // factorial returned as double but is, numerically, should be an integer
+   // numerical rounding may makes this an approximation after n = 21
+   public static double factorial(final double n) {
+
+      if (n < 0 || (n - Math.floor(n)) != 0) {
+         throw new IllegalArgumentException(
+                  "\nn must be a positive integer\nIs a Gamma funtion [Fmath.gamma(x)] more appropriate?");
+      }
+      double f = 1.0D;
+      for (int i = 1; i <= n; i++) {
+         f *= i;
+      }
+      return f;
+   }
+
+
+   // Gamma distribution - standard
+   // probablity density function
+   public static double gamma(final double gamma,
+                              double x) {
+
+      if (x < 0.0D) {
+         throw new IllegalArgumentException("The variable, x, " + x + "must be equal to or greater than zero");
+      }
+      if (gamma <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, " + gamma + "must be greater than zero");
+      }
+      return Math.pow(x, gamma - 1) * Math.exp(-x) / gammaFunction(gamma);
+   }
+
+
+   // Gamma distribution - standard
+   // cumulative distribution function
+   public static double gammaCDF(final double gamma,
+                                 final double upperLimit) {
+
+      if (upperLimit < 0.0D) {
+         throw new IllegalArgumentException("The upper limit, " + upperLimit + "must be equal to or greater than zero");
+      }
+      if (gamma <= 0.0D) {
+         throw new IllegalArgumentException("The shape parameter, " + gamma + "must be greater than zero");
+      }
+      return regularisedGammaFunction(gamma, upperLimit);
+   }
+
+
+   // Gamma function
+   // Lanczos approximation (6 terms)
+   public static double gammaFunction(double x) {
+
+      double xcopy = x;
+      double first = x + lgfGamma + 0.5;
+      double second = lgfCoeff[0];
+      double fg = 0.0D;
+
+      if (x >= 0.0) {
+         if (x >= 1.0D && x - (int) x == 0.0D) {
+            fg = PDF.factorial(x) / x;
+         }
+         else {
+            first = Math.pow(first, x + 0.5) * Math.exp(-first);
+            for (int i = 1; i <= lgfN; i++) {
+               second += lgfCoeff[i] / ++xcopy;
+            }
+            fg = first * Math.sqrt(2.0 * Math.PI) * second / x;
+         }
+      }
+      else {
+         fg = -Math.PI / (x * PDF.gammaFunction(-x) * Math.sin(Math.PI * x));
+      }
+      return fg;
+   }
+
+
+   // Regularised Incomplete Gamma Function P(a,x) = integral from zero to x of
+   // (exp(-t)t^(a-1))dt
+   // Continued Fraction representation of the function - valid for x >= a + 1
+   // This method follows the general procedure used in Numerical Recipes for
+   // C,
+   // The Art of Scientific Computing
+   // by W H Press, S A Teukolsky, W T Vetterling & B P Flannery
+   // Cambridge University Press, http://www.nr.com/
+   public static double incompleteGammaFract(final double a,
+                                             double x) {
+
+      if (a < 0.0D || x < 0.0D) {
+         throw new IllegalArgumentException("\nFunction defined only for a >= 0 and x>=0");
+      }
+      if (x < a + 1) {
+         throw new IllegalArgumentException("\nx < a+1   Use Series Representation");
+      }
+
+      int i = 0;
+      double ii = 0;
+      double igf = 0.0D;
+      boolean check = true;
+
+      final double loggamma = PDF.logGamma(a);
+      double numer = 0.0D;
+      double incr = 0.0D;
+      double denom = x - a + 1.0D;
+      double first = 1.0D / denom;
+      double term = 1.0D / FPMIN;
+      double prod = first;
+
+      while (check) {
+         ++i;
+         ii = (double) i;
+         numer = -ii * (ii - a);
+         denom += 2.0D;
+         first = numer * first + denom;
+         if (Math.abs(first) < PDF.FPMIN) {
+            first = PDF.FPMIN;
+         }
+         term = denom + numer / term;
+         if (Math.abs(term) < PDF.FPMIN) {
+            term = PDF.FPMIN;
+         }
+         first = 1.0D / first;
+         incr = first * term;
+         prod *= incr;
+         if (Math.abs(incr - 1.0D) < igfeps) {
+            check = false;
+         }
+         if (i >= PDF.igfiter) {
+            check = false;
+         }
+      }
+      igf = 1.0D - Math.exp(-x + a * Math.log(x) - loggamma) * prod;
+      return igf;
+   }
+
+
+   // Regularised Incomplete Gamma Function P(a,x) = integral from zero to x of
+   // (exp(-t)t^(a-1))dt
+   // Series representation of the function - valid for x < a + 1
+   public static double incompleteGammaSer(double a,
+                                           double x) {
+
+      if (a < 0.0D || x < 0.0D) {
+         throw new IllegalArgumentException("\nFunction defined only for a >= 0 and x>=0");
+      }
+      if (x >= a + 1) {
+         throw new IllegalArgumentException("\nx >= a+1   use Continued Fraction Representation");
+      }
+
+      int i = 0;
+      double igf = 0.0D;
+      boolean check = true;
+
+      final double acopy = a;
+      double sum = 1.0 / a;
+      double incr = sum;
+      final double loggamma = PDF.logGamma(a);
+
+      while (check) {
+         ++i;
+         ++a;
+         incr *= x / a;
+         sum += incr;
+         if (Math.abs(incr) < Math.abs(sum) * PDF.igfeps) {
+            igf = sum * Math.exp(-x + acopy * Math.log(x) - loggamma);
+            check = false;
+         }
+         if (i >= PDF.igfiter) {
+            check = false;
+            igf = sum * Math.exp(-x + acopy * Math.log(x) - loggamma);
+         }
+      }
+      return igf;
+   }
+
+
+   // log to base e of the factorial of n
+   // Argument is of type double but must be, numerically, an integer
+   // log[e](factorial) returned as double
+   // numerical rounding may makes this an approximation
+   public static double logFactorial(final double n) {
+
+      if (n < 0 || (n - Math.floor(n)) != 0) {
+         throw new IllegalArgumentException(
+                  "\nn must be a positive integer\nIs a Gamma funtion [Fmath.gamma(x)] more appropriate?");
+      }
+      double f = 0.0D;
+      double iCount = 2.0D;
+      while (iCount <= n) {
+         f += Math.log(iCount);
+         iCount += 1.0D;
+      }
+      return f;
+   }
+
+
+   // log to base e of the factorial of n
+   // log[e](factorial) returned as double
+   // numerical rounding may makes this an approximation
+   public static double logFactorial(final int n) {
+
+      if (n < 0 || (n - (int) n) != 0) {
+         throw new IllegalArgumentException(
+                  "\nn must be a positive integer\nIs a Gamma funtion [Fmath.gamma(x)] more appropriate?");
+      }
+      double f = 0.0D;
+      for (int i = 2; i <= n; i++) {
+         f += Math.log(i);
+      }
+      return f;
+   }
+
+
+   // log to base e of the Gamma function
+   // Lanczos approximation (6 terms)
+   // Retained for backward compatibility
+   public static double logGamma(final double x) {
+
+      double xcopy = x;
+      double fg = 0.0D;
+      double first = x + lgfGamma + 0.5;
+      double second = lgfCoeff[0];
+
+      if (x >= 0.0) {
+         if (x >= 1.0 && x - (int) x == 0.0) {
+            fg = logFactorial(x) - Math.log(x);
+         }
+         else {
+            first -= (x + 0.5) * Math.log(first);
+            for (int i = 1; i <= lgfN; i++) {
+               second += lgfCoeff[i] / ++xcopy;
+            }
+            fg = Math.log(Math.sqrt(2.0 * Math.PI) * second / x) - first;
+         }
+      }
+      else {
+         fg = Math.PI / (PDF.gammaFunction(1.0D - x) * Math.sin(Math.PI * x));
+
+         if (fg != 1.0 / 0.0 && fg != -1.0 / 0.0) {
+            if (fg < 0) {
+               throw new IllegalArgumentException("\nThe gamma function is negative");
+            }
+            else {
+               fg = Math.log(fg);
+            }
+         }
+      }
+      return fg;
+   }
+
+
+   // Logistic probability density function
+   // mu = location parameter, beta = scale parameter
+   public static double logistic(final double mu,
+                                 final double beta,
+                                 final double x) {
+
+      return square(sech((x - mu) / (2.0D * beta))) / (4.0D * beta);
+   }
+
+
+   // Logistic cumulative distribution function
+   // probability that a variate will assume a value less than the upperlimit
+   // mu = location parameter, beta = scale parameter
+   public static double logisticCDF(final double mu,
+                                    final double beta,
+                                    final double upperlimit) {
+
+      return 0.5D * (1.0D + tanh((upperlimit - mu) / (2.0D * beta)));
+   }
+
+
+   // Lorentzian probability
+   public static double lorentzian(final double mu,
+                                   final double gamma,
+                                   final double x) {
+
+      final double arg = gamma / 2.0D;
+      return (1.0D / Math.PI) * arg / (square(mu - x) + arg * arg);
+   }
+
+
+   // Lorentzian cumulative distribution function
+   // probability that a variate will assume a value less than the upperlimit
+   public static double lorentzianCDF(final double mu,
+                                      final double gamma,
+                                      final double upperlimit) {
+
+      final double arg = (upperlimit - mu) / (gamma / 2.0D);
+      return (1.0D / Math.PI) * (Math.atan(arg) + Math.PI / 2.0);
+   }
+
+
+   // Gaussian (normal) probability
+   // mean = the mean, sd = standard deviation
+   public static double normal(final double mean,
+                               final double sd,
+                               final double x) {
+
+      return Math.exp(-square((x - mean) / sd) / 2.0) / (sd * Math.sqrt(2.0D * Math.PI));
+   }
+
+
+   // Gaussian (normal) cumulative distribution function
+   // probability that a variate will assume a value less than the upperlimit
+   // mean = the mean, sd = standard deviation
+   public static double normalCDF(final double mean,
+                                  final double sd,
+                                  final double upperlimit) {
+
+      final double arg = (upperlimit - mean) / (sd * Math.sqrt(2.0));
+      return (1.0D + PDF.erf(arg)) / 2.0D;
+   }
+
+
+   // Poisson Probability Function
+   // k is an integer greater than or equal to zero
+   // mean = mean of the Poisson distribution
+   public static double poisson(final int k,
+                                double mean) {
+
+      if (k < 0) {
+         throw new IllegalArgumentException("k must be an integer greater than or equal to 0");
+      }
+      return Math.pow(mean, k) * Math.exp(-mean) / PDF.factorial((double) k);
+   }
+
+
+   // Cumulative Poisson Probability Function
+   // probability that a number of Poisson random events will occur between 0
+   // and k (inclusive)
+   // k is an integer greater than equal to 1
+   // mean = mean of the Poisson distribution
+   public static double poissonCDF(final int k,
+                                   final double mean) {
+
+      if (k < 1) {
+         throw new IllegalArgumentException("k must be an integer greater than or equal to 1");
+      }
+      return PDF.complementaryRegularisedGammaFunction((double) k, mean);
+   }
+
+
+   // Regularised Incomplete Beta function
+   // Continued Fraction approximation (see Numerical recipies for details of
+   // method)
+   public static double regularisedBetaFunction(final double z,
+                                                final double w,
+                                                final double x) {
+
+      if (x < 0.0D || x > 1.0D) {
+         throw new IllegalArgumentException("Argument x, " + x + ", must be lie between 0 and 1 (inclusive)");
+      }
+      double ibeta = 0.0D;
+      if (x == 0.0D) {
+         ibeta = 0.0D;
+      }
+      else {
+         if (x == 1.0D) {
+            ibeta = 1.0D;
+         }
+         else {
+            // Term before continued fraction
+            ibeta = Math.exp(PDF.logGamma(z + w) - PDF.logGamma(z) - logGamma(w) + z * Math.log(x) + w * Math.log(1.0D - x));
+            // Continued fraction
+            if (x < (z + 1.0D) / (z + w + 2.0D)) {
+               ibeta = ibeta * PDF.contFract(z, w, x) / z;
+            }
+            else {
+               // Use symmetry relationship
+               ibeta = 1.0D - ibeta * PDF.contFract(w, z, 1.0D - x) / w;
+            }
+         }
+      }
+      return ibeta;
+   }
+
+
+   // Regularised Incomplete Gamma Function P(a,x) = integral from zero to x of
+   // (exp(-t)t^(a-1))dt
+   public static double regularisedGammaFunction(final double a,
+                                                 final double x) {
+
+      if (a < 0.0D || x < 0.0D) {
+         throw new IllegalArgumentException("\nFunction defined only for a >= 0 and x>=0");
+      }
+      double igf = 0.0D;
+
+      if (x < a + 1.0D) {
+         // Series representation
+         igf = incompleteGammaSer(a, x);
+      }
+      else {
+         // Continued fraction representation
+         igf = incompleteGammaFract(a, x);
+      }
+      return igf;
+   }
+
+
+   // Hyperbolic secant of a double number
+   public static double sech(final double a) {
+
+      return 1.0D / cosh(a);
+   }
+
+
+   /* returns -1 if x < 0 else returns 1 */
+   // double version
+   public static double sign(final double x) {
+
+      if (x < 0.0) {
+         return -1.0;
+      }
+      else {
+         return 1.0;
+      }
+   }
+
+
+   // Hyperbolic sine of a double number
+   public static double sinh(double a) {
+
+      return 0.5D * (Math.exp(a) - Math.exp(-a));
+   }
+
+
+   // Square of a double number
+   public static double square(final double a) {
+
+      return a * a;
+   }
+
+
+   // Returns the Student's t probability density function
+   public static double studentT(final double tValue,
+                                 final int df) {
+
+      final double ddf = (double) df;
+      double dfterm = (ddf + 1.0D) / 2.0D;
+      return ((PDF.gammaFunction(dfterm) / PDF.gammaFunction(ddf / 2)) / Math.sqrt(ddf * Math.PI))
+             * Math.pow(1.0D + tValue * tValue / ddf, -dfterm);
+   }
+
+
+   // Returns the Student's t cumulative distribution function probability
+   public static double studentTCDF(final double tValue,
+                                    final int df) {
+
+      final double ddf = (double) df;
+      final double x = ddf / (ddf + tValue * tValue);
+      return 0.5D * (1.0D + (PDF.regularisedBetaFunction(ddf / 2.0D, 0.5D, 1) - PDF.regularisedBetaFunction(ddf / 2.0D, 0.5D, x))
+                            * PDF.sign(tValue));
+   }
+
+
+   // Hyperbolic tangent of a double number
+   public static double tanh(final double a) {
+
+      return sinh(a) / cosh(a);
+   }
+
+
+   // Weibull probability
+   public static double weibull(final double mu,
+                                final double sigma,
+                                final double gamma,
+                                final double x) {
+
+      final double arg = (x - mu) / sigma;
+      double y = 0.0D;
+      if (arg >= 0.0D) {
+         y = (gamma / sigma) * Math.pow(arg, gamma - 1.0D) * Math.exp(-Math.pow(arg, gamma));
+      }
+      return y;
+   }
+
+
+   // Weibull cumulative distribution function
+   // probability that a variate will assume a value less than the upperlimit
+   public static double weibullCDF(final double mu,
+                                   final double sigma,
+                                   final double gamma,
+                                   final double upperlimit) {
+
+      final double arg = (upperlimit - mu) / sigma;
+      double y = 0.0D;
+      if (arg > 0.0D) {
+         y = 1.0D - Math.exp(-Math.pow(arg, gamma));
+      }
+      return y;
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/pdf/PDF.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/MultipleRegression.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/MultipleRegression.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/MultipleRegression.java	(revision 369)
@@ -0,0 +1,297 @@
+package es.unex.sextante.math.regression;
+
+import java.util.ArrayList;
+
+import Jama.Matrix;
+
+
+/**
+ * A class for performing multiple regressions
+ * 
+ * @author volaya
+ * 
+ */
+public class MultipleRegression {
+
+   private class MaxValues {
+
+      public int    iMax;
+
+      public double dRMax;
+
+   }
+
+   private final ArrayList m_Y = new ArrayList();
+
+   private final ArrayList m_X[];
+
+   private final double    m_dDCoeff[];
+
+   private final double    m_dRCoeff[];
+
+   private final int       m_iOrder[];
+
+
+   public MultipleRegression(final int iVariables) {
+
+      m_X = new ArrayList[iVariables];
+      for (int i = 0; i < m_X.length; i++) {
+         m_X[i] = new ArrayList();
+      }
+      m_dRCoeff = new double[iVariables + 1];
+      m_dDCoeff = new double[iVariables + 1];
+      m_iOrder = new int[iVariables + 1];
+
+   }
+
+
+   public void addValue(final double dX[],
+                        final double dY) {
+
+      if (dX.length == m_X.length) {
+         m_Y.add(new Double(dY));
+         for (int i = 0; i < dX.length; i++) {
+            m_X[i].add(new Double(dX[i]));
+         }
+      }
+
+   }
+
+
+   public boolean calculate() {
+
+      if ((m_Y.size() > m_iOrder.length - 1) && (m_iOrder.length > 0)) {
+         getRegression();
+         getCorrelation();
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   private boolean eliminate(final double[] X,
+                             final double[] Y) {
+
+      final Regression regression = new Regression();
+
+      if (regression.calculate(X, Y)) {
+         for (int i = 0; i < Y.length; i++) {
+            Y[i] -= regression.getConstant() + regression.getCoeff() * X[i];
+         }
+
+         return true;
+      }
+
+      return false;
+
+   }
+
+
+   public double getCoeff(int iVariable) {
+
+      if ((++iVariable > 0) && (iVariable < m_dDCoeff.length)) {
+         return (m_dRCoeff[iVariable]);
+      }
+
+      return 0.0;
+
+   }
+
+
+   public double getConstant() {
+
+      if (m_dRCoeff.length > 1) {
+         return (m_dRCoeff[0]);
+      }
+
+      return (0.0);
+   }
+
+
+   boolean getCorrelation() {
+
+      int i, k, nVariables, nValues;
+      double Values[][], r2_sum;
+      final MaxValues maxValues = new MaxValues();
+
+      nVariables = m_iOrder.length;
+      nValues = m_Y.size();
+
+      if ((nValues >= nVariables) && (nVariables > 1)) {
+         Values = new double[nVariables][nValues];
+
+         for (k = 0; k < nValues; k++) {
+            Values[0][k] = ((Double) m_Y.get(k)).doubleValue();
+         }
+
+         for (i = 1; i < nVariables; i++) {
+            for (k = 0; k < nValues; k++) {
+               Values[i][k] = ((Double) m_X[i - 1].get(k)).doubleValue();
+            }
+         }
+
+         m_iOrder[0] = -1;
+         m_dDCoeff[0] = -1;
+
+         for (i = 0, r2_sum = 0.0; i < nVariables - 1; i++) {
+            getCorrelation(Values, Values[0], maxValues);
+
+            r2_sum += (1.0 - r2_sum) * maxValues.dRMax;
+
+            m_iOrder[maxValues.iMax] = i;
+            m_dDCoeff[maxValues.iMax] = r2_sum;
+         }
+
+         return true;
+      }
+
+      return false;
+   }
+
+
+   boolean getCorrelation(final double[][] X,
+                          final double[] Y,
+                          final MaxValues maxValues) {
+
+      int i, n;
+      double XMax[];
+      final Regression regression = new Regression();
+
+      for (i = 1, n = 0, maxValues.iMax = -1, maxValues.dRMax = 0.0; i < X.length; i++) {
+         if ((X[i] != null) && regression.calculate(X[i], Y)) {
+            n++;
+            if ((maxValues.iMax < 0) || (maxValues.dRMax < regression.getR2())) {
+               maxValues.iMax = i;
+               maxValues.dRMax = regression.getR2();
+            }
+         }
+      }
+
+      if (n > 1) {
+         XMax = X[maxValues.iMax];
+         X[maxValues.iMax] = null;
+
+         for (i = 0; i < X.length; i++) {
+            if (X[i] != null) {
+               eliminate(XMax, X[i]);
+            }
+         }
+
+         eliminate(XMax, Y);
+      }
+
+      return (maxValues.iMax >= 1);
+   }
+
+
+   public int getOrder(int iVariable) {
+
+      if ((++iVariable > 0) && (iVariable < m_iOrder.length)) {
+         return (m_iOrder[iVariable]);
+      }
+
+      return -1;
+   }
+
+
+   public int getOrdered(final int iOrder) {
+
+      for (int i = 0; i < m_iOrder.length; i++) {
+         if (iOrder == m_iOrder[i]) {
+            return i - 1;
+         }
+      }
+
+      return -1;
+   }
+
+
+   public double getR2(int iVariable) {
+
+      if ((++iVariable > 0) && (iVariable < m_dDCoeff.length)) {
+         return (m_dDCoeff[iVariable]);
+      }
+
+      return 0.0;
+   }
+
+
+   public double getR2Change(final int iVariable) {
+
+      final int iOrder = getOrder(iVariable);
+
+      if (iOrder > 0) {
+         return (getR2(iVariable) - getR2(getOrdered(iOrder - 1)));
+      }
+
+      if (iOrder == 0) {
+         return (getR2(iVariable));
+      }
+
+      return (0.0);
+   }
+
+
+   private boolean getRegression() {
+
+      int i, j, k, nVariables, nValues;
+      double sum, B[], P[][], X[][], Y[];
+
+      nVariables = m_iOrder.length;
+      nValues = m_Y.size();
+
+      B = new double[nVariables];
+      P = new double[nVariables][nVariables];
+
+      Y = new double[nValues];
+      X = new double[nVariables][nValues];
+
+      for (k = 0; k < nValues; k++) {
+         Y[k] = ((Double) m_Y.get(k)).doubleValue();
+         X[0][k] = 1.0;
+      }
+
+      for (i = 1; i < nVariables; i++) {
+         for (k = 0; k < nValues; k++) {
+            X[i][k] = ((Double) m_X[i - 1].get(k)).doubleValue();
+         }
+      }
+
+      for (i = 0; i < nVariables; i++) {
+         for (k = 0, sum = 0.0; k < nValues; k++) {
+            sum += X[i][k] * Y[k];
+         }
+
+         B[i] = sum;
+
+         for (j = 0; j < nVariables; j++) {
+            for (k = 0, sum = 0.0; k < nValues; k++) {
+               sum += X[i][k] * X[j][k];
+            }
+            P[i][j] = sum;
+         }
+      }
+
+      final Matrix m = new Matrix(P);
+      Matrix inverse;
+      try {
+         inverse = m.inverse();
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      for (i = 0; i < nVariables; i++) {
+         for (j = 0, sum = 0.0; j < nVariables; j++) {
+            sum += inverse.get(i, j) * B[j];
+         }
+         m_dRCoeff[i] = sum;
+      }
+
+      return true;
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/MultipleRegression.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/LeastSquaresFit.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/LeastSquaresFit.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/LeastSquaresFit.java	(revision 369)
@@ -0,0 +1,226 @@
+package es.unex.sextante.math.regression;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+import Jama.Matrix;
+import Jama.QRDecomposition;
+
+/*import es.unex.sextante.libMath.Jama.Matrix;
+import es.unex.sextante.libMath.Jama.QRDecomposition;*/
+
+
+/**
+ * Least squares fitting
+ * 
+ * @author volaya
+ * 
+ */
+public class LeastSquaresFit {
+
+   private final ArrayList m_X     = new ArrayList();
+
+   private final ArrayList m_Y     = new ArrayList();
+
+   private double[]        m_dCoeffs;
+
+   private String          m_sExpression;
+
+   private double          m_dYMin = Double.MAX_VALUE;
+
+   private double          m_dXMax = Double.NEGATIVE_INFINITY;
+
+   private double          m_dXMin = Double.MAX_VALUE;
+
+   private double          m_dYMax = Double.NEGATIVE_INFINITY;
+
+
+   public void addValue(final double dX,
+                        final double dY) {
+
+      setMinMaxX(dX);
+      setMinMaxY(dY);
+
+      m_X.add(new Double(dX));
+      m_Y.add(new Double(dY));
+
+   }
+
+
+   public boolean calculate(final int iOrder) {
+
+      double dX, dY;
+      final int nk = iOrder + 1;
+
+      final double[][] alpha = new double[nk][nk];
+      final double[] beta = new double[nk];
+      double term = 0;
+
+      m_dCoeffs = new double[nk];
+
+      final int iNumPoints = m_X.size();
+
+      for (int k = 0; k < nk; k++) {
+
+         for (int j = k; j < nk; j++) {
+            term = 0.0;
+            alpha[k][j] = 0.0;
+            for (int i = 0; i < iNumPoints; i++) {
+
+               double prod1 = 1.0;
+               dX = ((Double) m_X.get(i)).doubleValue();
+               if (k > 0) {
+                  for (int m = 0; m < k; m++) {
+                     prod1 *= dX;
+                  }
+               }
+               double prod2 = 1.0;
+               if (j > 0) {
+                  for (int m = 0; m < j; m++) {
+                     prod2 *= dX;
+                  }
+               }
+
+               term = (prod1 * prod2);
+
+               alpha[k][j] += term;
+            }
+            alpha[j][k] = alpha[k][j];
+         }
+
+         for (int i = 0; i < iNumPoints; i++) {
+            dX = ((Double) m_X.get(i)).doubleValue();
+            dY = ((Double) m_Y.get(i)).doubleValue();
+            double prod1 = 1.0;
+            if (k > 0) {
+               for (int m = 0; m < k; m++) {
+                  prod1 *= dX;
+               }
+            }
+            term = (dY * prod1);
+
+            beta[k] += term;
+         }
+      }
+
+      final Matrix alpha_matrix = new Matrix(alpha);
+      final QRDecomposition alpha_QRD = new QRDecomposition(alpha_matrix);
+      final Matrix beta_matrix = new Matrix(beta, nk);
+      Matrix param_matrix;
+      try {
+         param_matrix = alpha_QRD.solve(beta_matrix);
+      }
+      catch (final Exception e) {
+         return false;
+      }
+
+      final DecimalFormat df = new DecimalFormat("####.#####");
+      final StringBuffer sb = new StringBuffer("");
+      for (int k = 0; k < nk; k++) {
+         m_dCoeffs[k] = param_matrix.get(k, 0);
+         if (k != 0) {
+            sb.append(" + " + df.format(m_dCoeffs[k]) + "x^" + Integer.toString(k));
+         }
+         else {
+            sb.append(df.format(m_dCoeffs[k]));
+         }
+      }
+
+      m_sExpression = sb.toString();
+
+      return true;
+
+   }
+
+
+   public String getExpression() {
+
+      return m_sExpression;
+
+   }
+
+
+   public int getNumPoints() {
+
+      return m_X.size();
+   }
+
+
+   public void getPoints(final double[] x,
+                         final double[] y) {
+
+      int i;
+
+      for (i = 0; i < m_X.size(); i++) {
+         x[i] = ((Double) m_X.get(i)).doubleValue();
+         y[i] = ((Double) m_Y.get(i)).doubleValue();
+      }
+
+   }
+
+
+   public double getXMax() {
+
+      return m_dXMax;
+
+   }
+
+
+   public double getXMin() {
+
+      return m_dXMin;
+
+   }
+
+
+   public double getY(final double x) {
+
+      int i;
+      double dRet = 0;
+
+      for (i = 0; i < m_dCoeffs.length; i++) {
+         dRet += m_dCoeffs[i] * Math.pow(x, i);
+      }
+
+      return dRet;
+
+   }
+
+
+   public double getYMax() {
+
+      return m_dYMax;
+
+   }
+
+
+   public double getYMin() {
+
+      return m_dYMin;
+
+   }
+
+
+   private void setMinMaxX(final double x) {
+
+      if (x > m_dXMax) {
+         m_dXMax = x;
+      }
+      if (x < m_dXMin) {
+         m_dXMin = x;
+      }
+
+   }
+
+
+   private void setMinMaxY(final double y) {
+
+      if (y > m_dYMax) {
+         m_dYMax = y;
+      }
+      if (y < m_dYMin) {
+         m_dYMin = y;
+      }
+
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/LeastSquaresFit.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/Regression.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/Regression.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/Regression.java	(revision 369)
@@ -0,0 +1,531 @@
+/*******************************************************************************
+Regression.java
+Copyright (C) Victor Olaya
+
+Adapted from SAGA, System for Automated Geographical Analysis.
+Copyrights (c) 2002-2005 by Olaf Conrad
+Portions (c) 2002 by Andre Ringeler
+Portions (c) 2005 by Victor Olaya
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *******************************************************************************/
+
+package es.unex.sextante.math.regression;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+
+/**
+ * Simple regression class
+ *
+ * @author volaya
+ *
+ */
+public class Regression {
+
+   public static final int     REGRESSION_Best_Fit = 0;
+
+   public static final int     REGRESSION_Linear   = 1;              // Y = a + b * X
+
+   public static final int     REGRESSION_Rez_X    = 2;              // Y = a + b / X
+
+   public static final int     REGRESSION_Rez_Y    = 3;              // Y = a / (b - X)
+
+   public static final int     REGRESSION_Pow      = 4;              // Y = a * X^b
+
+   public static final int     REGRESSION_Exp      = 5;              // Y = a * e^(b * X)
+
+   public static final int     REGRESSION_Log      = 6;              // Y = a + b * ln(X)
+
+   private static final double ALMOST_ZERO         = 0.0001;
+
+   private final ArrayList           m_X                 = new ArrayList();
+
+   private final ArrayList           m_Y                 = new ArrayList();
+
+   private double              m_dR;
+
+   private double              m_dCoeff;
+
+   private double              m_dConst;
+
+   private double              m_dXMin, m_dXMax, m_dYMin, m_dYMax;
+
+   private double              m_dXMean, m_dYMean;
+
+   private double              m_dXVar, m_dYVar;
+
+   private int                 m_iType;
+
+
+   public Regression() {
+
+   }
+
+
+   private double _X_Transform(double x) {
+
+      switch (m_iType) {
+         default:
+            return (x);
+
+         case REGRESSION_Rez_X:
+            if (x == 0.0) {
+               x = ALMOST_ZERO;
+            }
+            return (1.0 / x);
+
+         case REGRESSION_Pow:
+         case REGRESSION_Log:
+            if (x <= 0.0) {
+               x = ALMOST_ZERO;
+            }
+            return (Math.log(x));
+      }
+   }
+
+
+   private double _Y_Transform(double y) {
+
+      switch (m_iType) {
+         default:
+            return (y);
+
+         case REGRESSION_Rez_Y:
+            if (y == 0.0) {
+               y = ALMOST_ZERO;
+            }
+            return (1.0 / y);
+
+         case REGRESSION_Pow:
+         case REGRESSION_Exp:
+            if (y <= 0.0) {
+               y = ALMOST_ZERO;
+            }
+            return (Math.log(y));
+      }
+   }
+
+
+   public void addValue(final double dX,
+                        final double dY) {
+
+      m_X.add(new Double(dX));
+      m_Y.add(new Double(dY));
+
+   }
+
+
+   public boolean calculate() {
+
+      return calculateLinear();
+
+   }
+
+
+   public boolean calculate(final double[] x,
+                            final double[] y) {
+
+      if (x.length == y.length) {
+         m_X.clear();
+         m_Y.clear();
+         for (int i = 0; i < y.length; i++) {
+            this.addValue(x[i], y[i]);
+         }
+         return calculate();
+      }
+      else {
+         return false;
+      }
+
+   }
+
+
+   public boolean calculate(final int iRegressionType) {
+
+      double d;
+
+      if (iRegressionType == REGRESSION_Best_Fit) {
+         m_iType = getBestFitType();
+      }
+      else {
+         m_iType = iRegressionType;
+      }
+
+      if (calculateLinear()) {
+
+         switch (m_iType) {
+
+            case REGRESSION_Linear:
+            default:
+               break;
+
+            case REGRESSION_Rez_X:
+               m_dXVar = 1.0 / m_dXVar;
+               break;
+
+            case REGRESSION_Rez_Y:
+               d = m_dConst;
+               m_dConst = 1.0 / m_dCoeff;
+               m_dCoeff = d * m_dCoeff;
+               m_dYVar = 1.0 / m_dYVar;
+               break;
+
+            case REGRESSION_Pow:
+               m_dConst = Math.exp(m_dConst);
+               m_dXVar = Math.exp(m_dXVar);
+               m_dYVar = Math.exp(m_dYVar);
+               break;
+
+            case REGRESSION_Exp:
+               m_dConst = Math.exp(m_dConst);
+               m_dYVar = Math.exp(m_dYVar);
+               break;
+
+            case REGRESSION_Log:
+               m_dXVar = Math.exp(m_dXVar);
+               break;
+         }
+
+         if (m_iType != REGRESSION_Linear) {
+            calculateMinMaxMean();
+         }
+
+         return true;
+      }
+
+      return false;
+   }
+
+
+   private boolean calculateLinear() {
+
+      int i;
+      double x, y, s_xx, s_xy, s_x, s_y, s_dx2, s_dy2, s_dxdy;
+
+      if (m_X.size() > 1) {
+
+         m_dXMean = m_dXMin = m_dXMax = _X_Transform(((Double) m_X.get(0)).doubleValue());
+         m_dYMean = m_dYMin = m_dYMax = _Y_Transform(((Double) m_Y.get(0)).doubleValue());
+
+         for (i = 1; i < m_X.size(); i++) {
+            m_dXMean += (x = _X_Transform(((Double) m_X.get(i)).doubleValue()));
+            m_dYMean += (y = _Y_Transform(((Double) m_Y.get(i)).doubleValue()));
+            setMinMaxX(x);
+            setMinMaxY(y);
+         }
+
+         m_dXMean /= m_X.size();
+         m_dYMean /= m_X.size();
+
+         if (m_dXMin < m_dXMax && m_dYMin < m_dYMax) {
+
+            s_x = s_y = s_xx = s_xy = s_dx2 = s_dy2 = s_dxdy = 0.0;
+
+            for (i = 0; i < m_X.size(); i++) {
+
+               x = _X_Transform(((Double) m_X.get(i)).doubleValue());
+               y = _Y_Transform(((Double) m_Y.get(i)).doubleValue());
+
+               s_x += x;
+               s_y += y;
+               s_xx += x * x;
+               s_xy += x * y;
+
+               x -= m_dXMean;
+               y -= m_dYMean;
+
+               s_dx2 += x * x;
+               s_dy2 += y * y;
+               s_dxdy += x * y;
+            }
+
+            m_dXVar = s_dx2 / m_X.size();
+            m_dYVar = s_dy2 / m_X.size();
+
+            m_dCoeff = s_dxdy / s_dx2;
+            if (m_X.size() * s_xx - s_x * s_x != 0) {
+               m_dConst = (s_xx * s_y - s_x * s_xy) / (m_X.size() * s_xx - s_x * s_x);
+            }
+            else {
+               m_dConst = 0;
+            }
+            m_dR = s_dxdy / Math.sqrt(s_dx2 * s_dy2);
+
+            return true;
+         }
+      }
+
+      return false;
+
+   }
+
+
+   private void calculateMinMaxMean() {
+
+      int i;
+      double x, y;
+
+      if (m_X.size() > 1) {
+         m_dXMean = m_dXMin = m_dXMax = _X_Transform(((Double) m_X.get(0)).doubleValue());
+         m_dYMean = m_dYMin = m_dYMax = _Y_Transform(((Double) m_Y.get(0)).doubleValue());
+         for (i = 1; i < m_X.size(); i++) {
+            m_dXMean += (x = ((Double) m_X.get(i)).doubleValue());
+            m_dYMean += (y = ((Double) m_Y.get(i)).doubleValue());
+            setMinMaxX(x);
+            setMinMaxY(y);
+         }
+         m_dXMean /= m_X.size();
+         m_dYMean /= m_X.size();
+      }
+
+   }
+
+
+   private int getBestFitType() {
+
+      int i;
+      int iType = 1;
+      final int iTypes = 6;
+      double m_dBestR = 0;
+
+      m_dR = 0;
+
+      for (i = 1; i < iTypes + 1; i++) {
+         calculate(i);
+         if (m_dR > m_dBestR) {
+            iType = i;
+            m_dBestR = m_dR;
+         }
+      }
+
+      return iType;
+
+   }
+
+
+   public double getCoeff() {
+
+      return m_dCoeff;
+
+   }
+
+
+   public double getConstant() {
+
+      return m_dConst;
+
+   }
+
+
+   public String getExpression() {
+
+      final DecimalFormat df = new DecimalFormat("####.####");
+
+      switch (m_iType) {
+         case REGRESSION_Linear:
+            return " y = " + df.format(m_dConst) + " + " + df.format(m_dCoeff) + "x";
+
+         case REGRESSION_Rez_X:
+            return " y = " + df.format(m_dConst) + " + " + df.format(m_dCoeff) + "/x";
+
+         case REGRESSION_Rez_Y:
+            return " y = " + df.format(m_dConst) + " / (" + df.format(m_dCoeff) + "- x)";
+
+         case REGRESSION_Pow:
+            return " y = " + df.format(m_dConst) + "x^" + df.format(m_dCoeff);
+
+         case REGRESSION_Exp:
+            return " y = " + df.format(m_dConst) + " � e^(" + df.format(m_dCoeff) + "x)";
+
+         case REGRESSION_Log:
+            return " y = " + df.format(m_dConst) + " + " + df.format(m_dCoeff) + " � ln(x)";
+      }
+
+      return "";
+
+   }
+
+
+   public double getR() {
+
+      return m_dR;
+
+   }
+
+
+   public double getR2() {
+
+      return m_dR * m_dR;
+
+   }
+
+
+   public void getRestrictedSample(final double[] x,
+                                   final double[] y,
+                                   final int nPoints) {
+
+      int i;
+      int iIndex;
+
+      for (i = 0; i < nPoints; i++) {
+         iIndex = (int) (Math.random() * m_X.size());
+         x[i] = ((Double) m_X.get(iIndex)).doubleValue();
+         y[i] = ((Double) m_Y.get(iIndex)).doubleValue();
+      }
+
+   }
+
+
+   public double getX(double y) {
+
+      if (m_X.size() > 0.0) {
+         switch (m_iType) {
+            case REGRESSION_Linear: // Y = a + b * X -> X = (Y - a) / b
+               if (m_dCoeff != 0.0) {
+                  return ((m_dConst * y) / m_dCoeff);
+               }
+
+            case REGRESSION_Rez_X: // Y = a + b / X -> X = b / (Y - a)
+               if ((y = y - m_dConst) != 0.0) {
+                  return (m_dCoeff / y);
+               }
+
+            case REGRESSION_Rez_Y: // Y = a / (b - X) -> X = b - a / Y
+               if (y != 0.0) {
+                  return (m_dCoeff - m_dConst / y);
+               }
+
+            case REGRESSION_Pow: // Y = a * X^b -> X = (Y / a)^(1 / b)
+               if (m_dConst != 0.0 && m_dCoeff != 0.0) {
+                  return (Math.pow(y / m_dConst, 1.0 / m_dCoeff));
+               }
+
+            case REGRESSION_Exp: // Y = a * e^(b * X) -> X = ln(Y / a) / b
+               if (m_dConst != 0.0 && (y = y / m_dConst) > 0.0 && m_dCoeff != 0.0) {
+                  return (Math.log(y) / m_dCoeff);
+               }
+
+            case REGRESSION_Log: // Y = a + b * ln(X) -> X = e^((Y - a) / b)
+               if (m_dCoeff != 0.0) {
+                  return (Math.exp((y - m_dConst) / m_dCoeff));
+               }
+         }
+      }
+
+      return (Double.NEGATIVE_INFINITY );
+   }
+
+
+   public double getXMax() {
+
+      return m_dXMax;
+
+   }
+
+
+   public double getXMin() {
+
+      return m_dXMin;
+
+   }
+
+
+   public double getXVar() {
+
+      return m_dXVar;
+
+   }
+
+
+   public double getY(double x) {
+
+      if (m_X.size() > 0.0) {
+         switch (m_iType) {
+            case REGRESSION_Linear: // Y = a + b * X
+               return (m_dConst + m_dCoeff * x);
+
+            case REGRESSION_Rez_X: // Y = a + b / X
+               if (x != 0.0) {
+                  return (m_dConst + m_dCoeff / x);
+               }
+
+            case REGRESSION_Rez_Y: // Y = a / (b - X)
+               if ((x = m_dCoeff - x) != 0.0) {
+                  return (m_dConst / x);
+               }
+
+            case REGRESSION_Pow: // Y = a * X^b
+               return (m_dConst * Math.pow(x, m_dCoeff));
+
+            case REGRESSION_Exp: // Y = a e^(b * X)
+               return (m_dConst * Math.exp(m_dCoeff * x));
+
+            case REGRESSION_Log: // Y = a + b * ln(X)
+               if (x > 0.0) {
+                  return (m_dConst + m_dCoeff * Math.log(x));
+               }
+         }
+      }
+
+      return (Double.NEGATIVE_INFINITY );
+   }
+
+
+   public double getYMax() {
+
+      return m_dYMax;
+
+   }
+
+
+   public double getYMin() {
+
+      return m_dYMin;
+
+   }
+
+
+   public double getYVar() {
+
+      return m_dYVar;
+
+   }
+
+
+   private void setMinMaxX(final double x) {
+
+      if (x > m_dXMax) {
+         m_dXMax = x;
+      }
+      if (x < m_dXMin) {
+         m_dXMin = x;
+      }
+
+   }
+
+
+   private void setMinMaxY(final double y) {
+
+      if (y > m_dYMax) {
+         m_dYMax = y;
+      }
+      if (y < m_dYMin) {
+         m_dYMin = y;
+      }
+
+   }
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/es/unex/sextante/math/regression/Regression.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/RTree.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/RTree.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/RTree.java	(revision 369)
@@ -0,0 +1,995 @@
+//   RTree.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//   Copyright (C) 2008 Aled Morris <aled@sourceforge.net>
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+package com.infomatiq.jsi.rtree;
+
+import gnu.trove.TIntArrayList;
+import gnu.trove.TIntObjectHashMap;
+import gnu.trove.TIntProcedure;
+import gnu.trove.TIntStack;
+
+import java.util.Properties;
+
+import com.infomatiq.jsi.IntProcedure;
+import com.infomatiq.jsi.Point;
+import com.infomatiq.jsi.Rectangle;
+import com.infomatiq.jsi.SpatialIndex;
+
+/**
+ * <p>
+ * This is a lightweight RTree implementation, specifically designed for the following features (in order of importance):
+ * <ul>
+ * <li>Fast intersection query performance. To achieve this, the RTree uses only main memory to store entries. Obviously this
+ * will only improve performance if there is enough physical memory to avoid paging.</li>
+ * <li>Low memory requirements.</li>
+ * <li>Fast add performance.</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * The main reason for the high speed of this RTree implementation is the avoidance of the creation of unnecessary objects, mainly
+ * achieved by using primitive collections from the trove4j library.
+ * </p>
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public class RTree
+         implements
+            SpatialIndex {
+
+   private static final String  version                       = "1.0b2p1";
+
+   // parameters of the tree
+   private final static int     DEFAULT_MAX_NODE_ENTRIES      = 10;
+   int                          maxNodeEntries;
+   int                          minNodeEntries;
+
+   // map of nodeId -> node object
+   // [x] TODO eliminate this map - it should not be needed. Nodes
+   // can be found by traversing the tree.
+   private final TIntObjectHashMap    nodeMap                       = new TIntObjectHashMap();
+
+   // internal consistency checking - set to true if debugging tree corruption
+   private final static boolean INTERNAL_CONSISTENCY_CHECKING = false;
+
+   // used to mark the status of entries during a node split
+   private final static int     ENTRY_STATUS_ASSIGNED         = 0;
+   private final static int     ENTRY_STATUS_UNASSIGNED       = 1;
+   private byte[]               entryStatus                   = null;
+   private byte[]               initialEntryStatus            = null;
+
+   // stacks used to store nodeId and entry index of each node
+   // from the root down to the leaf. Enables fast lookup
+   // of nodes when a split is propagated up the tree.
+   private final TIntStack            parents                       = new TIntStack();
+   private final TIntStack            parentsEntry                  = new TIntStack();
+
+   // initialisation
+   private int                  treeHeight                    = 1;                      // leaves are always level 1
+   private int                  rootNodeId                    = 0;
+   private int                  size                          = 0;
+
+   // Enables creation of new nodes
+   private int                  highestUsedNodeId             = rootNodeId;
+
+   // Deleted node objects are retained in the nodeMap,
+   // so that they can be reused. Store the IDs of nodes
+   // which can be reused.
+   private final TIntStack            deletedNodeIds                = new TIntStack();
+
+   // List of nearest rectangles. Use a member variable to
+   // avoid recreating the object each time nearest() is called.
+   private final TIntArrayList        nearestIds                    = new TIntArrayList();
+
+   // Inner class used as a bridge between the trove4j TIntProcedure
+   // and the SpatialIndex IntProcedure. This is used because
+   // the nearest rectangles must be stored as they are found, in
+   // case a closer one is found later.
+   //
+   // A single instance of this class is used to avoid creating a new
+   // one every time nearest() is called.
+   private class TIntProcedureVisit
+            implements
+               TIntProcedure {
+      public IntProcedure m_intProcedure = null;
+
+
+      public void setProcedure(final IntProcedure ip) {
+         m_intProcedure = ip;
+      }
+
+
+      public boolean execute(final int i) {
+         m_intProcedure.execute(i);
+         return true;
+      }
+   };
+
+   private final TIntProcedureVisit visitProc = new TIntProcedureVisit();
+
+
+   /**
+    * Constructor. Use init() method to initialize parameters of the RTree.
+    */
+   public RTree() {
+      return; // NOP
+   }
+
+
+   //-------------------------------------------------------------------------
+   // public implementation of SpatialIndex interface:
+   //  init(Properties)
+   //  add(Rectangle, int)
+   //  delete(Rectangle, int)
+   //  nearest(Point, IntProcedure, float)
+   //  intersects(Rectangle, IntProcedure)
+   //  contains(Rectangle, IntProcedure)
+   //  size()
+   //-------------------------------------------------------------------------
+   /**
+    * <p>
+    * Initialize implementation dependent properties of the RTree. Currently implemented properties are:
+    * <ul>
+    * <li>MaxNodeEntries</li>
+    * This specifies the maximum number of entries in a node. The default value is 10, which is used if the property is not
+    * specified, or is less than 2.
+    * <li>MinNodeEntries</li>
+    * This specifies the minimum number of entries in a node. The default value is half of the MaxNodeEntries value (rounded
+    * down), which is used if the property is not specified or is less than 1.
+    * </ul>
+    * </p>
+    *
+    * @see com.infomatiq.jsi.SpatialIndex#init(Properties)
+    */
+   public void init(final Properties props) {
+      maxNodeEntries = Integer.parseInt(props.getProperty("MaxNodeEntries", "0"));
+      minNodeEntries = Integer.parseInt(props.getProperty("MinNodeEntries", "0"));
+
+      // Obviously a node with less than 2 entries cannot be split.
+      // The node splitting algorithm will work with only 2 entries
+      // per node, but will be inefficient.
+      if (maxNodeEntries < 2) {
+         maxNodeEntries = DEFAULT_MAX_NODE_ENTRIES;
+      }
+
+      // The MinNodeEntries must be less than or equal to (int) (MaxNodeEntries / 2)
+      if (minNodeEntries < 1 || minNodeEntries > maxNodeEntries / 2) {
+         minNodeEntries = maxNodeEntries / 2;
+      }
+
+      entryStatus = new byte[maxNodeEntries];
+      initialEntryStatus = new byte[maxNodeEntries];
+
+      for (int i = 0; i < maxNodeEntries; i++) {
+         initialEntryStatus[i] = ENTRY_STATUS_UNASSIGNED;
+      }
+
+      final Node root = new Node(rootNodeId, 1, maxNodeEntries);
+      nodeMap.put(rootNodeId, root);
+
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#add(Rectangle, int)
+    */
+   public void add(final Rectangle r,
+                   final int id) {
+
+      add(r.copy(), id, 1);
+
+      size++;
+   }
+
+
+   /**
+    * Adds a new entry at a specified level in the tree
+    */
+   private void add(final Rectangle r,
+                    final int id,
+                    final int level) {
+      // I1 [Find position for new record] Invoke ChooseLeaf to select a
+      // leaf node L in which to place r
+      final Node n = chooseNode(r, level);
+      Node newLeaf = null;
+
+      // I2 [Add record to leaf node] If L has room for another entry,
+      // install E. Otherwise invoke SplitNode to obtain L and LL containing
+      // E and all the old entries of L
+      if (n.entryCount < maxNodeEntries) {
+         n.addEntryNoCopy(r, id);
+      }
+      else {
+         newLeaf = splitNode(n, r, id);
+      }
+
+      // I3 [Propagate changes upwards] Invoke AdjustTree on L, also passing LL
+      // if a split was performed
+      final Node newNode = adjustTree(n, newLeaf);
+
+      // I4 [Grow tree taller] If node split propagation caused the root to
+      // split, create a new root whose children are the two resulting nodes.
+      if (newNode != null) {
+         final int oldRootNodeId = rootNodeId;
+         final Node oldRoot = getNode(oldRootNodeId);
+
+         rootNodeId = getNextNodeId();
+         treeHeight++;
+         final Node root = new Node(rootNodeId, treeHeight, maxNodeEntries);
+         root.addEntry(newNode.mbr, newNode.nodeId);
+         root.addEntry(oldRoot.mbr, oldRoot.nodeId);
+         nodeMap.put(rootNodeId, root);
+      }
+
+      if (INTERNAL_CONSISTENCY_CHECKING) {
+         checkConsistency(rootNodeId, treeHeight, null);
+      }
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#delete(Rectangle, int)
+    */
+   public boolean delete(final Rectangle r,
+                         final int id) {
+      // FindLeaf algorithm inlined here. Note the "official" algorithm
+      // searches all overlapping entries. This seems inefficient to me,
+      // as an entry is only worth searching if it contains (NOT overlaps)
+      // the rectangle we are searching for.
+      //
+      // Also the algorithm has been changed so that it is not recursive.
+
+      // FL1 [Search subtrees] If root is not a leaf, check each entry
+      // to determine if it contains r. For each entry found, invoke
+      // findLeaf on the node pointed to by the entry, until r is found or
+      // all entries have been checked.
+      parents.clear();
+      parents.push(rootNodeId);
+
+      parentsEntry.clear();
+      parentsEntry.push(-1);
+      Node n = null;
+      int foundIndex = -1; // index of entry to be deleted in leaf
+
+      while (foundIndex == -1 && parents.size() > 0) {
+         n = getNode(parents.peek());
+         final int startIndex = parentsEntry.peek() + 1;
+
+         if (!n.isLeaf()) {
+
+            boolean contains = false;
+            for (int i = startIndex; i < n.entryCount; i++) {
+               if (n.entries[i].contains(r)) {
+                  parents.push(n.ids[i]);
+                  parentsEntry.pop();
+                  parentsEntry.push(i); // this becomes the start index when the child has been searched
+                  parentsEntry.push(-1);
+                  contains = true;
+                  break; // ie go to next iteration of while()
+               }
+            }
+            if (contains) {
+               continue;
+            }
+         }
+         else {
+            foundIndex = n.findEntry(r, id);
+         }
+
+         parents.pop();
+         parentsEntry.pop();
+      } // while not found
+
+      if (foundIndex != -1) {
+         n.deleteEntry(foundIndex, minNodeEntries);
+         condenseTree(n);
+         size--;
+      }
+
+      // shrink the tree if possible (i.e. if root node has exactly one entry,and that
+      // entry is not a leaf node, delete the root (it's entry becomes the new root)
+      Node root = getNode(rootNodeId);
+      while (root.entryCount == 1 && treeHeight > 1) {
+         root.entryCount = 0;
+         rootNodeId = root.ids[0];
+         treeHeight--;
+         root = getNode(rootNodeId);
+      }
+
+      return (foundIndex != -1);
+   }
+
+
+   public int nearest(final Point p) {
+
+      final Node rootNode = getNode(rootNodeId);
+      nearest(p, rootNode, Float.MAX_VALUE);
+      final int iIndex = nearestIds.get(0);
+      return iIndex;
+
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#intersects(Rectangle, IntProcedure)
+    */
+   public void intersects(final Rectangle r,
+                          final IntProcedure v) {
+      final Node rootNode = getNode(rootNodeId);
+      intersects(r, v, rootNode);
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#contains(Rectangle, IntProcedure)
+    */
+   public void contains(final Rectangle r,
+                        final IntProcedure v) {
+      // find all rectangles in the tree that are contained by the passed rectangle
+      // written to be non-recursive (should model other searches on this?)
+
+      parents.clear();
+      parents.push(rootNodeId);
+
+      parentsEntry.clear();
+      parentsEntry.push(-1);
+
+      // TODO: possible shortcut here - could test for intersection with the
+      // MBR of the root node. If no intersection, return immediately.
+
+      while (parents.size() > 0) {
+         final Node n = getNode(parents.peek());
+         final int startIndex = parentsEntry.peek() + 1;
+
+         if (!n.isLeaf()) {
+            // go through every entry in the index node to check
+            // if it intersects the passed rectangle. If so, it
+            // could contain entries that are contained.
+            boolean intersects = false;
+            for (int i = startIndex; i < n.entryCount; i++) {
+               if (r.intersects(n.entries[i])) {
+                  parents.push(n.ids[i]);
+                  parentsEntry.pop();
+                  parentsEntry.push(i); // this becomes the start index when the child has been searched
+                  parentsEntry.push(-1);
+                  intersects = true;
+                  break; // ie go to next iteration of while()
+               }
+            }
+            if (intersects) {
+               continue;
+            }
+         }
+         else {
+            // go through every entry in the leaf to check if
+            // it is contained by the passed rectangle
+            for (int i = 0; i < n.entryCount; i++) {
+               if (r.contains(n.entries[i])) {
+                  v.execute(n.ids[i]);
+               }
+            }
+         }
+         parents.pop();
+         parentsEntry.pop();
+      }
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#size()
+    */
+   public int size() {
+      return size;
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#getBounds()
+    */
+   public Rectangle getBounds() {
+      Rectangle bounds = null;
+
+      final Node n = getNode(getRootNodeId());
+      if (n != null && n.getMBR() != null) {
+         bounds = n.getMBR().copy();
+      }
+      return bounds;
+   }
+
+
+   /**
+    * @see com.infomatiq.jsi.SpatialIndex#getVersion()
+    */
+   public String getVersion() {
+      return "RTree-" + version;
+   }
+
+
+   //-------------------------------------------------------------------------
+   // end of SpatialIndex methods
+   //-------------------------------------------------------------------------
+
+   /**
+    * Get the next available node ID. Reuse deleted node IDs if possible
+    */
+   private int getNextNodeId() {
+      int nextNodeId = 0;
+      if (deletedNodeIds.size() > 0) {
+         nextNodeId = deletedNodeIds.pop();
+      }
+      else {
+         nextNodeId = 1 + highestUsedNodeId++;
+      }
+      return nextNodeId;
+   }
+
+
+   /**
+    * Get a node object, given the ID of the node.
+    */
+   public Node getNode(final int index) {
+      return (Node) nodeMap.get(index);
+   }
+
+
+   /**
+    * Get the highest used node ID
+    */
+   public int getHighestUsedNodeId() {
+      return highestUsedNodeId;
+   }
+
+
+   /**
+    * Get the root node ID
+    */
+   public int getRootNodeId() {
+      return rootNodeId;
+   }
+
+
+   /**
+    * Split a node. Algorithm is taken pretty much verbatim from Guttman's original paper.
+    *
+    * @return new node object.
+    */
+   private Node splitNode(final Node n,
+                          final Rectangle newRect,
+                          final int newId) {
+      // [Pick first entry for each group] Apply algorithm pickSeeds to
+      // choose two entries to be the first elements of the groups. Assign
+      // each to a group.
+
+      // debug code
+      float initialArea = 0;
+      //if (log.isDebugEnabled()) {
+      final Rectangle union = n.mbr.union(newRect);
+      initialArea = union.area();
+      //}
+
+      System.arraycopy(initialEntryStatus, 0, entryStatus, 0, maxNodeEntries);
+
+      Node newNode = null;
+      newNode = new Node(getNextNodeId(), n.level, maxNodeEntries);
+      nodeMap.put(newNode.nodeId, newNode);
+
+      pickSeeds(n, newRect, newId, newNode); // this also sets the entryCount to 1
+
+      // [Check if done] If all entries have been assigned, stop. If one
+      // group has so few entries that all the rest must be assigned to it in
+      // order for it to have the minimum number m, assign them and stop.
+      while (n.entryCount + newNode.entryCount < maxNodeEntries + 1) {
+         if (maxNodeEntries + 1 - newNode.entryCount == minNodeEntries) {
+            // assign all remaining entries to original node
+            for (int i = 0; i < maxNodeEntries; i++) {
+               if (entryStatus[i] == ENTRY_STATUS_UNASSIGNED) {
+                  entryStatus[i] = ENTRY_STATUS_ASSIGNED;
+                  n.mbr.add(n.entries[i]);
+                  n.entryCount++;
+               }
+            }
+            break;
+         }
+         if (maxNodeEntries + 1 - n.entryCount == minNodeEntries) {
+            // assign all remaining entries to new node
+            for (int i = 0; i < maxNodeEntries; i++) {
+               if (entryStatus[i] == ENTRY_STATUS_UNASSIGNED) {
+                  entryStatus[i] = ENTRY_STATUS_ASSIGNED;
+                  newNode.addEntryNoCopy(n.entries[i], n.ids[i]);
+                  n.entries[i] = null;
+               }
+            }
+            break;
+         }
+
+         // [Select entry to assign] Invoke algorithm pickNext to choose the
+         // next entry to assign. Add it to the group whose covering rectangle
+         // will have to be enlarged least to accommodate it. Resolve ties
+         // by adding the entry to the group with smaller area, then to the
+         // the one with fewer entries, then to either. Repeat from S2
+         pickNext(n, newNode);
+      }
+
+      n.reorganize(this);
+
+      // check that the MBR stored for each node is correct.
+      if (INTERNAL_CONSISTENCY_CHECKING) {
+         if (!n.mbr.equals(calculateMBR(n))) {
+            //log.error("Error: splitNode old node MBR wrong");
+         }
+
+         if (!newNode.mbr.equals(calculateMBR(newNode))) {
+            //log.error("Error: splitNode new node MBR wrong");
+         }
+      }
+
+      // debug code
+      //    if (log.isDebugEnabled()) {
+      //      float newArea = n.mbr.area() + newNode.mbr.area();
+      //      float percentageIncrease = (100 * (newArea - initialArea)) / initialArea;
+      //      log.debug("Node " + n.nodeId + " split. New area increased by " + percentageIncrease + "%");
+      //    }
+
+      return newNode;
+   }
+
+
+   /**
+    * Pick the seeds used to split a node. Select two entries to be the first elements of the groups
+    */
+   private void pickSeeds(final Node n,
+                          final Rectangle newRect,
+                          final int newId,
+                          final Node newNode) {
+      // Find extreme rectangles along all dimension. Along each dimension,
+      // find the entry whose rectangle has the highest low side, and the one
+      // with the lowest high side. Record the separation.
+      float maxNormalizedSeparation = 0;
+      int highestLowIndex = 0;
+      int lowestHighIndex = 0;
+
+      // for the purposes of picking seeds, take the MBR of the node to include
+      // the new rectangle aswell.
+      n.mbr.add(newRect);
+
+      //    if (log.isDebugEnabled()) {
+      //      log.debug("pickSeeds(): NodeId = " + n.nodeId + ", newRect = " + newRect);
+      //    }
+
+      for (int d = 0; d < Rectangle.DIMENSIONS; d++) {
+         float tempHighestLow = newRect.min[d];
+         int tempHighestLowIndex = -1; // -1 indicates the new rectangle is the seed
+
+         float tempLowestHigh = newRect.max[d];
+         int tempLowestHighIndex = -1;
+
+         for (int i = 0; i < n.entryCount; i++) {
+            final float tempLow = n.entries[i].min[d];
+            if (tempLow >= tempHighestLow) {
+               tempHighestLow = tempLow;
+               tempHighestLowIndex = i;
+            }
+            else { // ensure that the same index cannot be both lowestHigh and highestLow
+               final float tempHigh = n.entries[i].max[d];
+               if (tempHigh <= tempLowestHigh) {
+                  tempLowestHigh = tempHigh;
+                  tempLowestHighIndex = i;
+               }
+            }
+
+            // PS2 [Adjust for shape of the rectangle cluster] Normalize the separations
+            // by dividing by the widths of the entire set along the corresponding
+            // dimension
+            final float normalizedSeparation = (tempHighestLow - tempLowestHigh) / (n.mbr.max[d] - n.mbr.min[d]);
+
+            if (normalizedSeparation > 1 || normalizedSeparation < -1) {
+               //log.error("Invalid normalized separation");
+            }
+
+            //        if (log.isDebugEnabled()) {
+            //          log.debug("Entry " + i + ", dimension " + d + ": HighestLow = " + tempHighestLow +
+            //                    " (index " + tempHighestLowIndex + ")" + ", LowestHigh = " +
+            //                    tempLowestHigh + " (index " + tempLowestHighIndex + ", NormalizedSeparation = " + normalizedSeparation);
+            //        }
+
+            // PS3 [Select the most extreme pair] Choose the pair with the greatest
+            // normalized separation along any dimension.
+            if (normalizedSeparation > maxNormalizedSeparation) {
+               maxNormalizedSeparation = normalizedSeparation;
+               highestLowIndex = tempHighestLowIndex;
+               lowestHighIndex = tempLowestHighIndex;
+            }
+         }
+      }
+
+      // highestLowIndex is the seed for the new node.
+      if (highestLowIndex == -1) {
+         newNode.addEntry(newRect, newId);
+      }
+      else {
+         newNode.addEntryNoCopy(n.entries[highestLowIndex], n.ids[highestLowIndex]);
+         n.entries[highestLowIndex] = null;
+
+         // move the new rectangle into the space vacated by the seed for the new node
+         n.entries[highestLowIndex] = newRect;
+         n.ids[highestLowIndex] = newId;
+      }
+
+      // lowestHighIndex is the seed for the original node.
+      if (lowestHighIndex == -1) {
+         lowestHighIndex = highestLowIndex;
+      }
+
+      entryStatus[lowestHighIndex] = ENTRY_STATUS_ASSIGNED;
+      n.entryCount = 1;
+      n.mbr.set(n.entries[lowestHighIndex].min, n.entries[lowestHighIndex].max);
+   }
+
+
+   /**
+    * Pick the next entry to be assigned to a group during a node split.
+    *
+    * [Determine cost of putting each entry in each group] For each entry not yet in a group, calculate the area increase required
+    * in the covering rectangles of each group
+    */
+   private int pickNext(final Node n,
+                        final Node newNode) {
+      float maxDifference = Float.NEGATIVE_INFINITY;
+      int next = 0;
+      int nextGroup = 0;
+
+      maxDifference = Float.NEGATIVE_INFINITY;
+
+      //    if (log.isDebugEnabled()) {
+      //      log.debug("pickNext()");
+      //    }
+
+      for (int i = 0; i < maxNodeEntries; i++) {
+         if (entryStatus[i] == ENTRY_STATUS_UNASSIGNED) {
+
+            //        if (n.entries[i] == null) {
+            //          log.error("Error: Node " + n.nodeId + ", entry " + i + " is null");
+            //        }
+
+            final float nIncrease = n.mbr.enlargement(n.entries[i]);
+            final float newNodeIncrease = newNode.mbr.enlargement(n.entries[i]);
+            final float difference = Math.abs(nIncrease - newNodeIncrease);
+
+            if (difference > maxDifference) {
+               next = i;
+
+               if (nIncrease < newNodeIncrease) {
+                  nextGroup = 0;
+               }
+               else if (newNodeIncrease < nIncrease) {
+                  nextGroup = 1;
+               }
+               else if (n.mbr.area() < newNode.mbr.area()) {
+                  nextGroup = 0;
+               }
+               else if (newNode.mbr.area() < n.mbr.area()) {
+                  nextGroup = 1;
+               }
+               else if (newNode.entryCount < maxNodeEntries / 2) {
+                  nextGroup = 0;
+               }
+               else {
+                  nextGroup = 1;
+               }
+               maxDifference = difference;
+            }
+            //        if (log.isDebugEnabled()) {
+            //          log.debug("Entry " + i + " group0 increase = " + nIncrease + ", group1 increase = " + newNodeIncrease +
+            //                    ", diff = " + difference + ", MaxDiff = " + maxDifference + " (entry " + next + ")");
+            //        }
+         }
+      }
+
+      entryStatus[next] = ENTRY_STATUS_ASSIGNED;
+
+      if (nextGroup == 0) {
+         n.mbr.add(n.entries[next]);
+         n.entryCount++;
+      }
+      else {
+         // move to new node.
+         newNode.addEntryNoCopy(n.entries[next], n.ids[next]);
+         n.entries[next] = null;
+      }
+
+      return next;
+   }
+
+
+   /**
+    * Recursively searches the tree for the nearest entry. Other queries call execute() on an IntProcedure when a matching entry
+    * is found; however nearest() must store the entry Ids as it searches the tree, in case a nearer entry is found. Uses the
+    * member variable nearestIds to store the nearest entry IDs.
+    *
+    * [x] TODO rewrite this to be non-recursive?
+    */
+   private float nearest(final Point p,
+                         final Node n,
+                         float nearestDistance) {
+      for (int i = 0; i < n.entryCount; i++) {
+         final float tempDistance = n.entries[i].distance(p);
+         if (n.isLeaf()) { // for leaves, the distance is an actual nearest distance
+            if (tempDistance < nearestDistance) {
+               nearestDistance = tempDistance;
+               nearestIds.clear();
+            }
+            if (tempDistance <= nearestDistance) {
+               nearestIds.add(n.ids[i]);
+            }
+         }
+         else { // for index nodes, only go into them if they potentially could have
+            // a rectangle nearer than actualNearest
+            if (tempDistance <= nearestDistance) {
+               // search the child node
+               nearestDistance = nearest(p, getNode(n.ids[i]), nearestDistance);
+            }
+         }
+      }
+      return nearestDistance;
+   }
+
+
+   /**
+    * Recursively searches the tree for all intersecting entries. Immediately calls execute() on the passed IntProcedure when a
+    * matching entry is found.
+    *
+    * [x] TODO rewrite this to be non-recursive? Make sure it doesn't slow it down.
+    */
+   private void intersects(final Rectangle r,
+                           final IntProcedure v,
+                           final Node n) {
+      for (int i = 0; i < n.entryCount; i++) {
+         if (r.intersects(n.entries[i])) {
+            if (n.isLeaf()) {
+               v.execute(n.ids[i]);
+            }
+            else {
+               final Node childNode = getNode(n.ids[i]);
+               intersects(r, v, childNode);
+            }
+         }
+      }
+   }
+
+   /**
+    * Used by delete(). Ensures that all nodes from the passed node up to the root have the minimum number of entries.
+    *
+    * Note that the parent and parentEntry stacks are expected to contain the nodeIds of all parents up to the root.
+    */
+   private final Rectangle oldRectangle = new Rectangle(0, 0, 0, 0);
+
+
+   private void condenseTree(final Node l) {
+      // CT1 [Initialize] Set n=l. Set the list of eliminated
+      // nodes to be empty.
+      Node n = l;
+      Node parent = null;
+      int parentEntry = 0;
+
+      final TIntStack eliminatedNodeIds = new TIntStack();
+
+      // CT2 [Find parent entry] If N is the root, go to CT6. Otherwise
+      // let P be the parent of N, and let En be N's entry in P
+      while (n.level != treeHeight) {
+         parent = getNode(parents.pop());
+         parentEntry = parentsEntry.pop();
+
+         // CT3 [Eliminiate under-full node] If N has too few entries,
+         // delete En from P and add N to the list of eliminated nodes
+         if (n.entryCount < minNodeEntries) {
+            parent.deleteEntry(parentEntry, minNodeEntries);
+            eliminatedNodeIds.push(n.nodeId);
+         }
+         else {
+            // CT4 [Adjust covering rectangle] If N has not been eliminated,
+            // adjust EnI to tightly contain all entries in N
+            if (!n.mbr.equals(parent.entries[parentEntry])) {
+               oldRectangle.set(parent.entries[parentEntry].min, parent.entries[parentEntry].max);
+               parent.entries[parentEntry].set(n.mbr.min, n.mbr.max);
+               parent.recalculateMBR(oldRectangle);
+            }
+         }
+         // CT5 [Move up one level in tree] Set N=P and repeat from CT2
+         n = parent;
+      }
+
+      // CT6 [Reinsert orphaned entries] Reinsert all entries of nodes in set Q.
+      // Entries from eliminated leaf nodes are reinserted in tree leaves as in
+      // Insert(), but entries from higher level nodes must be placed higher in
+      // the tree, so that leaves of their dependent subtrees will be on the same
+      // level as leaves of the main tree
+      while (eliminatedNodeIds.size() > 0) {
+         final Node e = getNode(eliminatedNodeIds.pop());
+         for (int j = 0; j < e.entryCount; j++) {
+            add(e.entries[j], e.ids[j], e.level);
+            e.entries[j] = null;
+         }
+         e.entryCount = 0;
+         deletedNodeIds.push(e.nodeId);
+      }
+   }
+
+
+   /**
+    * Used by add(). Chooses a leaf to add the rectangle to.
+    */
+   private Node chooseNode(final Rectangle r,
+                           final int level) {
+      // CL1 [Initialize] Set N to be the root node
+      Node n = getNode(rootNodeId);
+      parents.clear();
+      parentsEntry.clear();
+
+      // CL2 [Leaf check] If N is a leaf, return N
+      while (true) {
+         //      if (n == null) {
+         //        log.error("Could not get root node (" + rootNodeId + ")");
+         //      }
+
+         if (n.level == level) {
+            return n;
+         }
+
+         // CL3 [Choose subtree] If N is not at the desired level, let F be the entry in N
+         // whose rectangle FI needs least enlargement to include EI. Resolve
+         // ties by choosing the entry with the rectangle of smaller area.
+         float leastEnlargement = n.getEntry(0).enlargement(r);
+         int index = 0; // index of rectangle in subtree
+         for (int i = 1; i < n.entryCount; i++) {
+            final Rectangle tempRectangle = n.getEntry(i);
+            final float tempEnlargement = tempRectangle.enlargement(r);
+            if ((tempEnlargement < leastEnlargement)
+                || ((tempEnlargement == leastEnlargement) && (tempRectangle.area() < n.getEntry(index).area()))) {
+               index = i;
+               leastEnlargement = tempEnlargement;
+            }
+         }
+
+         parents.push(n.nodeId);
+         parentsEntry.push(index);
+
+         // CL4 [Descend until a leaf is reached] Set N to be the child node
+         // pointed to by Fp and repeat from CL2
+         n = getNode(n.ids[index]);
+      }
+   }
+
+
+   /**
+    * Ascend from a leaf node L to the root, adjusting covering rectangles and propagating node splits as necessary.
+    */
+   private Node adjustTree(Node n,
+                           Node nn) {
+      // AT1 [Initialize] Set N=L. If L was split previously, set NN to be
+      // the resulting second node.
+
+      // AT2 [Check if done] If N is the root, stop
+      while (n.level != treeHeight) {
+
+         // AT3 [Adjust covering rectangle in parent entry] Let P be the parent
+         // node of N, and let En be N's entry in P. Adjust EnI so that it tightly
+         // encloses all entry rectangles in N.
+         Node parent = getNode(parents.pop());
+         final int entry = parentsEntry.pop();
+
+         //      if (parent.ids[entry] != n.nodeId) {
+         //        log.error("Error: entry " + entry + " in node " +
+         //             parent.nodeId + " should point to node " +
+         //             n.nodeId + "; actually points to node " + parent.ids[entry]);
+         //      }
+
+         if (!parent.entries[entry].equals(n.mbr)) {
+            parent.entries[entry].set(n.mbr.min, n.mbr.max);
+            parent.mbr.set(parent.entries[0].min, parent.entries[0].max);
+            for (int i = 1; i < parent.entryCount; i++) {
+               parent.mbr.add(parent.entries[i]);
+            }
+         }
+
+         // AT4 [Propagate node split upward] If N has a partner NN resulting from
+         // an earlier split, create a new entry Enn with Ennp pointing to NN and
+         // Enni enclosing all rectangles in NN. Add Enn to P if there is room.
+         // Otherwise, invoke splitNode to produce P and PP containing Enn and
+         // all P's old entries.
+         Node newNode = null;
+         if (nn != null) {
+            if (parent.entryCount < maxNodeEntries) {
+               parent.addEntry(nn.mbr, nn.nodeId);
+            }
+            else {
+               newNode = splitNode(parent, nn.mbr.copy(), nn.nodeId);
+            }
+         }
+
+         // AT5 [Move up to next level] Set N = P and set NN = PP if a split
+         // occurred. Repeat from AT2
+         n = parent;
+         nn = newNode;
+
+         parent = null;
+         newNode = null;
+      }
+
+      return nn;
+   }
+
+
+   /**
+    * Check the consistency of the tree.
+    */
+   private void checkConsistency(final int nodeId,
+                                 final int expectedLevel,
+                                 final Rectangle expectedMBR) {
+      // go through the tree, and check that the internal data structures of
+      // the tree are not corrupted.
+      final Node n = getNode(nodeId);
+
+      if (n == null) {
+         //log.error("Error: Could not read node " + nodeId);
+      }
+
+      if (n.level != expectedLevel) {
+         //log.error("Error: Node " + nodeId + ", expected level " + expectedLevel + ", actual level " + n.level);
+      }
+
+      final Rectangle calculatedMBR = calculateMBR(n);
+
+      if (!n.mbr.equals(calculatedMBR)) {
+         //log.error("Error: Node " + nodeId + ", calculated MBR does not equal stored MBR");
+      }
+
+      if (expectedMBR != null && !n.mbr.equals(expectedMBR)) {
+         // log.error("Error: Node " + nodeId + ", expected MBR (from parent) does not equal stored MBR");
+      }
+
+      // Check for corruption where a parent entry is the same object as the child MBR
+      if (expectedMBR != null && n.mbr.sameObject(expectedMBR)) {
+         //log.error("Error: Node " + nodeId + " MBR using same rectangle object as parent's entry");
+      }
+
+      for (int i = 0; i < n.entryCount; i++) {
+         if (n.entries[i] == null) {
+            //log.error("Error: Node " + nodeId + ", Entry " + i + " is null");
+         }
+
+         if (n.level > 1) { // if not a leaf
+            checkConsistency(n.ids[i], n.level - 1, n.entries[i]);
+         }
+      }
+   }
+
+
+   /**
+    * Given a node object, calculate the node MBR from it's entries. Used in consistency checking
+    */
+   private Rectangle calculateMBR(final Node n) {
+      final Rectangle mbr = new Rectangle(n.entries[0].min, n.entries[0].max);
+
+      for (int i = 1; i < n.entryCount; i++) {
+         mbr.add(n.entries[i]);
+      }
+      return mbr;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/RTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/Node.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/Node.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/Node.java	(revision 369)
@@ -0,0 +1,177 @@
+//   Node.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+package com.infomatiq.jsi.rtree;
+
+import com.infomatiq.jsi.Rectangle;
+
+/**
+ * <p>
+ * Used by RTree. There are no public methods in this class.
+ * </p>
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public class Node {
+   int         nodeId  = 0;
+   Rectangle   mbr     = null;
+   Rectangle[] entries = null;
+   int[]       ids     = null;
+   int         level;
+   int         entryCount;
+
+
+   Node(final int nodeId,
+        final int level,
+        final int maxNodeEntries) {
+      this.nodeId = nodeId;
+      this.level = level;
+      entries = new Rectangle[maxNodeEntries];
+      ids = new int[maxNodeEntries];
+   }
+
+
+   void addEntry(final Rectangle r,
+                 final int id) {
+      ids[entryCount] = id;
+      entries[entryCount] = r.copy();
+      entryCount++;
+      if (mbr == null) {
+         mbr = r.copy();
+      }
+      else {
+         mbr.add(r);
+      }
+   }
+
+
+   void addEntryNoCopy(final Rectangle r,
+                       final int id) {
+      ids[entryCount] = id;
+      entries[entryCount] = r;
+      entryCount++;
+      if (mbr == null) {
+         mbr = r.copy();
+      }
+      else {
+         mbr.add(r);
+      }
+   }
+
+
+   // Return the index of the found entry, or -1 if not found
+   int findEntry(final Rectangle r,
+                 final int id) {
+      for (int i = 0; i < entryCount; i++) {
+         if (id == ids[i] && r.equals(entries[i])) {
+            return i;
+         }
+      }
+      return -1;
+   }
+
+
+   // delete entry. This is done by setting it to null and copying the last entry into its space.
+   void deleteEntry(final int i,
+                    final int minNodeEntries) {
+      final int lastIndex = entryCount - 1;
+      final Rectangle deletedRectangle = entries[i];
+      entries[i] = null;
+      if (i != lastIndex) {
+         entries[i] = entries[lastIndex];
+         ids[i] = ids[lastIndex];
+         entries[lastIndex] = null;
+      }
+      entryCount--;
+
+      // if there are at least minNodeEntries, adjust the MBR.
+      // otherwise, don't bother, as the node will be
+      // eliminated anyway.
+      if (entryCount >= minNodeEntries) {
+         recalculateMBR(deletedRectangle);
+      }
+   }
+
+
+   // oldRectangle is a rectangle that has just been deleted or made smaller.
+   // Thus, the MBR is only recalculated if the OldRectangle influenced the old MBR
+   void recalculateMBR(final Rectangle deletedRectangle) {
+      if (mbr.edgeOverlaps(deletedRectangle)) {
+         mbr.set(entries[0].min, entries[0].max);
+
+         for (int i = 1; i < entryCount; i++) {
+            mbr.add(entries[i]);
+         }
+      }
+   }
+
+
+   public int getEntryCount() {
+      return entryCount;
+   }
+
+
+   public Rectangle getEntry(final int index) {
+      if (index < entryCount) {
+         return entries[index];
+      }
+      return null;
+   }
+
+
+   public int getId(final int index) {
+      if (index < entryCount) {
+         return ids[index];
+      }
+      return -1;
+   }
+
+
+   /**
+    * eliminate null entries, move all entries to the start of the source node
+    */
+   void reorganize(final RTree rtree) {
+      int countdownIndex = rtree.maxNodeEntries - 1;
+      for (int index = 0; index < entryCount; index++) {
+         if (entries[index] == null) {
+            while (entries[countdownIndex] == null && countdownIndex > index) {
+               countdownIndex--;
+            }
+            entries[index] = entries[countdownIndex];
+            ids[index] = ids[countdownIndex];
+            entries[countdownIndex] = null;
+         }
+      }
+   }
+
+
+   boolean isLeaf() {
+      return (level == 1);
+   }
+
+
+   public int getLevel() {
+      return level;
+   }
+
+
+   public Rectangle getMBR() {
+      return mbr;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/rtree/Node.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/IntProcedure.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/IntProcedure.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/IntProcedure.java	(revision 369)
@@ -0,0 +1,36 @@
+//   IntProcedure.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+package com.infomatiq.jsi;
+
+/**
+ * Interface that defines a procedure to be executed, that takes an int parameter
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public interface IntProcedure {
+   /**
+    * @param id
+    *                integer value
+    *
+    * @return flag to indicate whether to continue executing the procedure. Return true to continue executing, or false to prevent
+    *         any more calls to this method.
+    */
+   public boolean execute(int id);
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/IntProcedure.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Rectangle.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Rectangle.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Rectangle.java	(revision 369)
@@ -0,0 +1,401 @@
+//   Rectangle.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+package com.infomatiq.jsi;
+
+import java.util.Arrays;
+
+/**
+ * Currently hardcoded to 2 dimensions, but could be extended.
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public class Rectangle {
+   /**
+    * Number of dimensions in a rectangle. In theory this could be exended to three or more dimensions.
+    */
+   public final static int DIMENSIONS = 2;
+
+   /**
+    * array containing the minimum value for each dimension; ie { min(x), min(y) }
+    */
+   public float[]          max;
+
+   /**
+    * array containing the maximum value for each dimension; ie { max(x), max(y) }
+    */
+   public float[]          min;
+
+
+   /**
+    * Constructor.
+    *
+    * @param x1
+    *                coordinate of any corner of the rectangle
+    * @param y1
+    *                (see x1)
+    * @param x2
+    *                coordinate of the opposite corner
+    * @param y2
+    *                (see x2)
+    */
+   public Rectangle(final float x1,
+                    final float y1,
+                    final float x2,
+                    final float y2) {
+      min = new float[DIMENSIONS];
+      max = new float[DIMENSIONS];
+      set(x1, y1, x2, y2);
+   }
+
+
+   /**
+    * Constructor.
+    *
+    * @param min
+    *                array containing the minimum value for each dimension; ie { min(x), min(y) }
+    * @param max
+    *                array containing the maximum value for each dimension; ie { max(x), max(y) }
+    */
+   public Rectangle(final float[] min,
+                    final float[] max) {
+      if (min.length != DIMENSIONS || max.length != DIMENSIONS) {
+         throw new RuntimeException("Error in Rectangle constructor: " + "min and max arrays must be of length " + DIMENSIONS);
+      }
+
+      this.min = new float[DIMENSIONS];
+      this.max = new float[DIMENSIONS];
+
+      set(min, max);
+   }
+
+
+   /**
+    * Sets the size of the rectangle.
+    *
+    * @param x1
+    *                coordinate of any corner of the rectangle
+    * @param y1
+    *                (see x1)
+    * @param x2
+    *                coordinate of the opposite corner
+    * @param y2
+    *                (see x2)
+    */
+   public void set(final float x1,
+                   final float y1,
+                   final float x2,
+                   final float y2) {
+      min[0] = Math.min(x1, x2);
+      min[1] = Math.min(y1, y2);
+      max[0] = Math.max(x1, x2);
+      max[1] = Math.max(y1, y2);
+   }
+
+
+   /**
+    * Sets the size of the rectangle.
+    *
+    * @param min
+    *                array containing the minimum value for each dimension; ie { min(x), min(y) }
+    * @param max
+    *                array containing the maximum value for each dimension; ie { max(x), max(y) }
+    */
+   public void set(final float[] min,
+                   final float[] max) {
+      System.arraycopy(min, 0, this.min, 0, DIMENSIONS);
+      System.arraycopy(max, 0, this.max, 0, DIMENSIONS);
+   }
+
+
+   /**
+    * Make a copy of this rectangle
+    *
+    * @return copy of this rectangle
+    */
+   public Rectangle copy() {
+      return new Rectangle(min, max);
+   }
+
+
+   /**
+    * Determine whether an edge of this rectangle overlies the equivalent edge of the passed rectangle
+    */
+   public boolean edgeOverlaps(final Rectangle r) {
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (min[i] == r.min[i] || max[i] == r.max[i]) {
+            return true;
+         }
+      }
+      return false;
+   }
+
+
+   /**
+    * Determine whether this rectangle intersects the passed rectangle
+    *
+    * @param r
+    *                The rectangle that might intersect this rectangle
+    *
+    * @return true if the rectangles intersect, false if they do not intersect
+    */
+   public boolean intersects(final Rectangle r) {
+      // Every dimension must intersect. If any dimension
+      // does not intersect, return false immediately.
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (max[i] < r.min[i] || min[i] > r.max[i]) {
+            return false;
+         }
+      }
+      return true;
+   }
+
+
+   /**
+    * Determine whether this rectangle contains the passed rectangle
+    *
+    * @param r
+    *                The rectangle that might be contained by this rectangle
+    *
+    * @return true if this rectangle contains the passed rectangle, false if it does not
+    */
+   public boolean contains(final Rectangle r) {
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (max[i] < r.max[i] || min[i] > r.min[i]) {
+            return false;
+         }
+      }
+      return true;
+   }
+
+
+   /**
+    * Determine whether this rectangle is contained by the passed rectangle
+    *
+    * @param r
+    *                The rectangle that might contain this rectangle
+    *
+    * @return true if the passed rectangle contains this rectangle, false if it does not
+    */
+   public boolean containedBy(final Rectangle r) {
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (max[i] > r.max[i] || min[i] < r.min[i]) {
+            return false;
+         }
+      }
+      return true;
+   }
+
+
+   /**
+    * Return the distance between this rectangle and the passed point. If the rectangle contains the point, the distance is zero.
+    *
+    * @param p
+    *                Point to find the distance to
+    *
+    * @return distance beween this rectangle and the passed point.
+    */
+   public float distance(final Point p) {
+      float distanceSquared = 0;
+      for (int i = 0; i < DIMENSIONS; i++) {
+         final float greatestMin = Math.max(min[i], p.coordinates[i]);
+         final float leastMax = Math.min(max[i], p.coordinates[i]);
+         if (greatestMin > leastMax) {
+            distanceSquared += ((greatestMin - leastMax) * (greatestMin - leastMax));
+         }
+      }
+      return (float) Math.sqrt(distanceSquared);
+   }
+
+
+   /**
+    * Return the distance between this rectangle and the passed rectangle. If the rectangles overlap, the distance is zero.
+    *
+    * @param r
+    *                Rectangle to find the distance to
+    *
+    * @return distance between this rectangle and the passed rectangle
+    */
+
+   public float distance(final Rectangle r) {
+      float distanceSquared = 0;
+      for (int i = 0; i < DIMENSIONS; i++) {
+         final float greatestMin = Math.max(min[i], r.min[i]);
+         final float leastMax = Math.min(max[i], r.max[i]);
+         if (greatestMin > leastMax) {
+            distanceSquared += ((greatestMin - leastMax) * (greatestMin - leastMax));
+         }
+      }
+      return (float) Math.sqrt(distanceSquared);
+   }
+
+
+   /**
+    * Return the squared distance from this rectangle to the passed point
+    */
+   private float distanceSquared(final int dimension,
+                                 final float point) {
+      float distanceSquared = 0;
+      float tempDistance = point - max[dimension];
+      for (int i = 0; i < 2; i++) {
+         if (tempDistance > 0) {
+            distanceSquared = (tempDistance * tempDistance);
+            break;
+         }
+         tempDistance = min[dimension] - point;
+      }
+      return distanceSquared;
+   }
+
+
+   /**
+    * Return the furthst possible distance between this rectangle and the passed rectangle.
+    *
+    * Find the distance between this rectangle and each corner of the passed rectangle, and use the maximum.
+    *
+    */
+   public float furthestDistance(final Rectangle r) {
+      float distanceSquared = 0;
+
+      for (int i = 0; i < DIMENSIONS; i++) {
+         distanceSquared += Math.max(distanceSquared(i, r.min[i]), distanceSquared(i, r.max[i]));
+      }
+
+      return (float) Math.sqrt(distanceSquared);
+   }
+
+
+   /**
+    * Calculate the area by which this rectangle would be enlarged if added to the passed rectangle. Neither rectangle is altered.
+    *
+    * @param r
+    *                Rectangle to union with this rectangle, in order to compute the difference in area of the union and the
+    *                original rectangle
+    */
+   public float enlargement(final Rectangle r) {
+      final float enlargedArea = (Math.max(max[0], r.max[0]) - Math.min(min[0], r.min[0]))
+                           * (Math.max(max[1], r.max[1]) - Math.min(min[1], r.min[1]));
+
+      return enlargedArea - area();
+   }
+
+
+   /**
+    * Compute the area of this rectangle.
+    *
+    * @return The area of this rectangle
+    */
+   public float area() {
+      return (max[0] - min[0]) * (max[1] - min[1]);
+   }
+
+
+   /**
+    * Computes the union of this rectangle and the passed rectangle, storing the result in this rectangle.
+    *
+    * @param r
+    *                Rectangle to add to this rectangle
+    */
+   public void add(final Rectangle r) {
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (r.min[i] < min[i]) {
+            min[i] = r.min[i];
+         }
+         if (r.max[i] > max[i]) {
+            max[i] = r.max[i];
+         }
+      }
+   }
+
+
+   /**
+    * Find the the union of this rectangle and the passed rectangle. Neither rectangle is altered
+    *
+    * @param r
+    *                The rectangle to union with this rectangle
+    */
+   public Rectangle union(final Rectangle r) {
+      final Rectangle union = this.copy();
+      union.add(r);
+      return union;
+   }
+
+
+   /**
+    * Determine whether this rectangle is equal to a given object. Equality is determined by the bounds of the rectangle.
+    *
+    * @param o
+    *                The object to compare with this rectangle
+    */
+   @Override
+   public boolean equals(final Object o) {
+      boolean equals = false;
+      if (o instanceof Rectangle) {
+         final Rectangle r = (Rectangle) o;
+         if (Arrays.equals(r.min, min) && Arrays.equals(r.max, max)) {
+            equals = true;
+         }
+      }
+      return equals;
+   }
+
+
+   /**
+    * Determine whether this rectangle is the same as another object
+    *
+    * Note that two rectangles can be equal but not the same object, if they both have the same bounds.
+    *
+    * @param o
+    *                The object to compare with this rectangle.
+    */
+   public boolean sameObject(final Object o) {
+      return super.equals(o);
+   }
+
+
+   /**
+    * Return a string representation of this rectangle, in the form: (1.2, 3.4), (5.6, 7.8)
+    *
+    * @return String String representation of this rectangle.
+    */
+   @Override
+   public String toString() {
+      final StringBuffer sb = new StringBuffer();
+
+      // min coordinates
+      sb.append('(');
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (i > 0) {
+            sb.append(", ");
+         }
+         sb.append(min[i]);
+      }
+      sb.append("), (");
+
+      // max coordinates
+      for (int i = 0; i < DIMENSIONS; i++) {
+         if (i > 0) {
+            sb.append(", ");
+         }
+         sb.append(max[i]);
+      }
+      sb.append(')');
+      return sb.toString();
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Rectangle.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/SpatialIndex.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/SpatialIndex.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/SpatialIndex.java	(revision 369)
@@ -0,0 +1,126 @@
+//   SpatialIndex.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+package com.infomatiq.jsi;
+
+import java.util.Properties;
+
+/**
+ * Defines methods that must be implemented by all spatial indexes. This includes the RTree and its variants.
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public interface SpatialIndex {
+
+   /**
+    * Initializes any implementation dependent properties of the spatial index. For example, RTree implementations will have a
+    * NodeSize property.
+    *
+    * @param props
+    *                The set of properties used to initialize the spatial index.
+    */
+   public void init(Properties props);
+
+
+   /**
+    * Adds a new rectangle to the spatial index
+    *
+    * @param r
+    *                The rectangle to add to the spatial index.
+    * @param id
+    *                The ID of the rectangle to add to the spatial index. The result of adding more than one rectangle with the
+    *                same ID is undefined.
+    */
+   public void add(Rectangle r,
+                   int id);
+
+
+   /**
+    * Deletes a rectangle from the spatial index
+    *
+    * @param r
+    *                The rectangle to delete from the spatial index
+    * @param id
+    *                The ID of the rectangle to delete from the spatial index
+    *
+    * @return true if the rectangle was deleted false if the rectangle was not found, or the rectangle was found but with a
+    *         different ID
+    */
+   public boolean delete(Rectangle r,
+                         int id);
+
+
+   /**
+    * Finds the nearest point to the passed rectangle.
+    *
+    * @param p
+    *                The point for which this method finds the nearest neighbour.
+    *
+    * This should be as small as possible to minimise the search time.
+    *
+    * Use Float.POSITIVE_INFINITY to guarantee that the nearest rectangle is found, no matter how far away, although this will
+    * slow down the algorithm.
+    */
+   public int nearest(Point p);
+
+
+   /**
+    * Finds all rectangles that intersect the passed rectangle.
+    *
+    * @param r
+    *                The rectangle for which this method finds intersecting rectangles.
+    *
+    * @param ip
+    *                The IntProcedure whose execute() method is is called for each intersecting rectangle.
+    */
+   public void intersects(Rectangle r,
+                          IntProcedure ip);
+
+
+   /**
+    * Finds all rectangles contained by the passed rectangle.
+    *
+    * @param r
+    *                The rectangle for which this method finds contained rectangles.
+    *
+    * @param v
+    *                The visitor whose visit() method is is called for each contained rectangle.
+    */
+   public void contains(Rectangle r,
+                        IntProcedure v);
+
+
+   /**
+    * Returns the number of entries in the spatial index
+    */
+   public int size();
+
+
+   /**
+    * Returns the bounds of all the entries in the spatial index, or null if there are no entries.
+    */
+   public Rectangle getBounds();
+
+
+   /**
+    * Returns a string identifying the type of spatial index, and the version number, eg "SimpleIndex-0.1"
+    */
+   public String getVersion();
+
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/SpatialIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Point.java
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Point.java	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Point.java	(revision 369)
@@ -0,0 +1,53 @@
+//   Point.java
+//   Java Spatial Index Library
+//   Copyright (C) 2002 Infomatiq Limited
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License, or (at your option) any later version.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+package com.infomatiq.jsi;
+
+/**
+ * Currently hardcoded to 2 dimensions, but could be extended.
+ *
+ * @author aled@sourceforge.net
+ * @version 1.0b2p1
+ */
+public class Point {
+   /**
+    * Number of dimensions in a point. In theory this could be exended to three or more dimensions.
+    */
+   private final static int DIMENSIONS = 2;
+
+   /**
+    * The (x, y) coordinates of the point.
+    */
+   public float[]           coordinates;
+
+
+   /**
+    * Constructor.
+    *
+    * @param x
+    *                The x coordinate of the point
+    * @param y
+    *                The y coordinate of the point
+    */
+   public Point(final float x,
+                final float y) {
+      coordinates = new float[DIMENSIONS];
+      coordinates[0] = x;
+      coordinates[1] = y;
+   }
+}

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/src/main/java/com/infomatiq/jsi/Point.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/pom.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/pom.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/pom.xml	(revision 369)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<groupId>org.gvsig</groupId>
+	<artifactId>org.gvsig.toolbox.math</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.toolbox</artifactId>
+		<version>1.0.65</version>
+	</parent>
+	
+	<dependencies>
+		<dependency>
+			<groupId>gnu.trove</groupId>
+			<artifactId>trove</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			  <groupId>org.gvsig.legacy</groupId>
+			  <artifactId>jama</artifactId>
+			  <scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/build.xml
===================================================================
--- org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/build.xml	(revision 0)
+++ org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/build.xml	(revision 369)
@@ -0,0 +1,32 @@
+<project name="SEXTANTE_LIB" default="generate-without-source" basedir=".">
+    <description>
+        SEXTANTE_LIB
+    </description>
+    <property name="version.number" value="0.7"/>
+
+  <target name="generate-without-source"
+    description="generate the distribution without the source file">
+
+       <tstamp>
+         <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
+       </tstamp>
+
+    <manifest file="MANIFEST.MF">
+        <attribute name="Implementation-Version"
+            value="${version.number}"/>
+        <attribute name="Built-Date" value="${TODAY}"/>
+   </manifest>
+
+    <jar jarfile="../dist/libMath.jar" manifest="MANIFEST.MF">
+        <fileset dir="bin">
+            <include name="**"/>
+        </fileset>
+    </jar>
+  	
+    <copy todir="../dist">
+  	  <fileset dir="lib" includes="**"/>
+    </copy>
+
+  </target>
+
+</project>
\ No newline at end of file

Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math/build.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65/org.gvsig.toolbox.math
___________________________________________________________________
Added: svn:ignore
   + .classpath

.project

.settings

target



Property changes on: org.gvsig.toolbox/tags/org.gvsig.toolbox-1.0.65
___________________________________________________________________
Added: svn:ignore
   + .project
target


