Skip to content

Commit

Permalink
Introduce end-of-line normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
moovida committed Dec 14, 2012
1 parent f3be66c commit 3f45256
Show file tree
Hide file tree
Showing 407 changed files with 60,111 additions and 60,110 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
904 changes: 452 additions & 452 deletions extras/deploy/testdataset/elevation.asc

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions extras/deploy/testdataset/elevation.prj
@@ -1,21 +1,21 @@
PROJCS["NAD27 / UTM zone 13N",
GEOGCS["NAD27",
DATUM["North American Datum 1927",
SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]],
TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4267"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", -105.0],
PARAMETER["latitude_of_origin", 0.0],
PARAMETER["scale_factor", 0.9996],
PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
PROJCS["NAD27 / UTM zone 13N",
GEOGCS["NAD27",
DATUM["North American Datum 1927",
SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]],
TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4267"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", -105.0],
PARAMETER["latitude_of_origin", 0.0],
PARAMETER["scale_factor", 0.9996],
PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","26713"]]
44 changes: 22 additions & 22 deletions extras/deploy/testdataset/test_linux.oms
@@ -1,22 +1,22 @@
sim = new oms3.SimBuilder(logging:'ALL').sim(name:'pitfiller') {
model {
components {
'pitfiller' 'pit'
'reader' 'rasterreader'
'writer' 'rasterwriter'
}
parameter {
'reader.file' './testdataset/elevation.asc'
'writer.file' './testdataset/pit.asc'
}
connect {
'reader.outRaster' 'pitfiller.inElev'
'pitfiller.outPit' 'writer.inRaster'
}
}
}
sim.run();
sim = new oms3.SimBuilder(logging:'ALL').sim(name:'pitfiller') {
model {
components {
'pitfiller' 'pit'
'reader' 'rasterreader'
'writer' 'rasterwriter'
}

parameter {
'reader.file' './testdataset/elevation.asc'
'writer.file' './testdataset/pit.asc'
}

connect {
'reader.outRaster' 'pitfiller.inElev'
'pitfiller.outPit' 'writer.inRaster'
}

}
}
sim.run();

44 changes: 22 additions & 22 deletions extras/deploy/testdataset/test_win.oms
@@ -1,22 +1,22 @@
sim = new oms3.SimBuilder(logging:'ALL').sim(name:'pitfiller') {
model {
components {
'pitfiller' 'pit'
'reader' 'rasterreader'
'writer' 'rasterwriter'
}
parameter {
'reader.file' '.\\testdataset\\elevation.asc'
'writer.file' '.\\testdataset\\pit.asc'
}
connect {
'reader.outRaster' 'pitfiller.inElev'
'pitfiller.outPit' 'writer.inRaster'
}
}
}
sim.run();
sim = new oms3.SimBuilder(logging:'ALL').sim(name:'pitfiller') {
model {
components {
'pitfiller' 'pit'
'reader' 'rasterreader'
'writer' 'rasterwriter'
}

parameter {
'reader.file' '.\\testdataset\\elevation.asc'
'writer.file' '.\\testdataset\\pit.asc'
}

connect {
'reader.outRaster' 'pitfiller.inElev'
'pitfiller.outPit' 'writer.inRaster'
}

}
}
sim.run();

@@ -1,47 +1,47 @@
/*
* This file is part of JGrasstools (http://www.jgrasstools.org)
* (C) HydroloGIS - www.hydrologis.com
*
* JGrasstools 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.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
package org.jgrasstools.examples;

import org.geotools.coverage.grid.GridCoverage2D;
import org.jgrasstools.gears.io.rasterreader.RasterReader;
import org.jgrasstools.gears.io.rasterwriter.RasterWriter;
import org.jgrasstools.gears.modules.r.rasterreprojector.RasterReprojector;

public class RasterReprojectionExample {

public static void main( String[] args ) throws Exception {

String inputRaster = "your input path here";
String outputRaster = "your output path here";

// read the raster
GridCoverage2D readCoverage = RasterReader.readRaster(inputRaster);

// reproject
RasterReprojector rasterReprojector = new RasterReprojector();
rasterReprojector.inRaster = readCoverage;
rasterReprojector.pCode = "EPSG:32632";
rasterReprojector.process();
GridCoverage2D outRaster = rasterReprojector.outRaster;

// write the raster
RasterWriter.writeRaster(outputRaster, outRaster);

}

}
/*
* This file is part of JGrasstools (http://www.jgrasstools.org)
* (C) HydroloGIS - www.hydrologis.com
*
* JGrasstools 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.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
package org.jgrasstools.examples;

import org.geotools.coverage.grid.GridCoverage2D;
import org.jgrasstools.gears.io.rasterreader.RasterReader;
import org.jgrasstools.gears.io.rasterwriter.RasterWriter;
import org.jgrasstools.gears.modules.r.rasterreprojector.RasterReprojector;

public class RasterReprojectionExample {

public static void main( String[] args ) throws Exception {

String inputRaster = "your input path here";
String outputRaster = "your output path here";

// read the raster
GridCoverage2D readCoverage = RasterReader.readRaster(inputRaster);

// reproject
RasterReprojector rasterReprojector = new RasterReprojector();
rasterReprojector.inRaster = readCoverage;
rasterReprojector.pCode = "EPSG:32632";
rasterReprojector.process();
GridCoverage2D outRaster = rasterReprojector.outRaster;

// write the raster
RasterWriter.writeRaster(outputRaster, outRaster);

}

}
@@ -1,46 +1,46 @@
/*
* This file is part of JGrasstools (http://www.jgrasstools.org)
* (C) HydroloGIS - www.hydrologis.com
*
* JGrasstools 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.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
package org.jgrasstools.examples;

import org.geotools.data.simple.SimpleFeatureCollection;
import org.jgrasstools.gears.io.vectorreader.VectorReader;
import org.jgrasstools.gears.io.vectorwriter.VectorWriter;
import org.jgrasstools.gears.libs.modules.JGTModel;
import org.jgrasstools.gears.modules.v.vectorreprojector.VectorReprojector;

public class VectorReprojectionExample extends JGTModel {
public static void main( String[] args ) throws Exception {

String inputVector = "your input path here";
String outputVector = "your output path here";

// read the vector
SimpleFeatureCollection readFeatureCollection = VectorReader.readVector(inputVector);

// reproject
VectorReprojector vectorReprojector = new VectorReprojector();
vectorReprojector.inVector = readFeatureCollection;
vectorReprojector.pCode = "EPSG:32632";
vectorReprojector.process();
SimpleFeatureCollection outVector = vectorReprojector.outVector;

// write the vetor
VectorWriter.writeVector(outputVector, outVector);

}
}
/*
* This file is part of JGrasstools (http://www.jgrasstools.org)
* (C) HydroloGIS - www.hydrologis.com
*
* JGrasstools 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.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
package org.jgrasstools.examples;

import org.geotools.data.simple.SimpleFeatureCollection;
import org.jgrasstools.gears.io.vectorreader.VectorReader;
import org.jgrasstools.gears.io.vectorwriter.VectorWriter;
import org.jgrasstools.gears.libs.modules.JGTModel;
import org.jgrasstools.gears.modules.v.vectorreprojector.VectorReprojector;

public class VectorReprojectionExample extends JGTModel {
public static void main( String[] args ) throws Exception {

String inputVector = "your input path here";
String outputVector = "your output path here";

// read the vector
SimpleFeatureCollection readFeatureCollection = VectorReader.readVector(inputVector);

// reproject
VectorReprojector vectorReprojector = new VectorReprojector();
vectorReprojector.inVector = readFeatureCollection;
vectorReprojector.pCode = "EPSG:32632";
vectorReprojector.process();
SimpleFeatureCollection outVector = vectorReprojector.outVector;

// write the vetor
VectorWriter.writeVector(outputVector, outVector);

}
}
74 changes: 37 additions & 37 deletions grass/pom.xml
@@ -1,37 +1,37 @@
<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>

<parent>
<groupId>org.jgrasstools</groupId>
<artifactId>jgrasstools</artifactId>
<version>0.7.7-SNAPSHOT</version>
</parent>

<groupId>org.jgrasstools</groupId>
<artifactId>jgt-grass</artifactId>
<version>0.7.7-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GRASS bindings module</name>

<!-- Project dependencies -->
<dependencies>
<dependency>
<groupId>org.jgrasstools</groupId>
<artifactId>jgt-oms3</artifactId>
<version>0.7.7-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
</exclusion>
<exclusion>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>


</project>
<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>

<parent>
<groupId>org.jgrasstools</groupId>
<artifactId>jgrasstools</artifactId>
<version>0.7.7-SNAPSHOT</version>
</parent>

<groupId>org.jgrasstools</groupId>
<artifactId>jgt-grass</artifactId>
<version>0.7.7-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GRASS bindings module</name>

<!-- Project dependencies -->
<dependencies>
<dependency>
<groupId>org.jgrasstools</groupId>
<artifactId>jgt-oms3</artifactId>
<version>0.7.7-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
</exclusion>
<exclusion>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>


</project>

0 comments on commit 3f45256

Please sign in to comment.