[Schmitzm-commits] r1218 - trunk/src_junit/skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 3 12:32:33 CET 2010
Author: alfonx
Date: 2010-11-03 12:32:33 +0100 (Wed, 03 Nov 2010)
New Revision: 1218
Modified:
trunk/src_junit/skrueger/geotools/StyledLayerUtilTest.java
Log:
Modified: trunk/src_junit/skrueger/geotools/StyledLayerUtilTest.java
===================================================================
--- trunk/src_junit/skrueger/geotools/StyledLayerUtilTest.java 2010-11-03 11:27:55 UTC (rev 1217)
+++ trunk/src_junit/skrueger/geotools/StyledLayerUtilTest.java 2010-11-03 11:32:33 UTC (rev 1218)
@@ -1,15 +1,19 @@
package skrueger.geotools;
+import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.awt.image.ColorModel;
import java.io.IOException;
+import org.geotools.geometry.jts.ReferencedEnvelope;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import com.vividsolutions.jts.geom.Envelope;
+
import schmitzm.swing.TestingUtil;
public class StyledLayerUtilTest {
@@ -31,6 +35,69 @@
}
@Test
+ public void testGetBoundsAndCrs1() throws IOException {
+ StyledGridCoverageReader styled = TestingUtil.TestDatasetsRaster.geotiffWithSld
+ .getStyled();
+ Envelope env = styled.getEnvelope();
+
+ assertNotNull(env);
+ assertEquals(
+ "Env[269666.0316659544 : 503516.0316659544, -106963.90575157234 : 161836.09424842766]",
+ env.toString());
+
+ ReferencedEnvelope refenv = styled.getReferencedEnvelope();
+
+ assertNotNull(refenv);
+ assertEquals(
+ "ReferencedEnvelope[269666.0316659544 : 503516.0316659544, -106963.90575157234 : 161836.09424842766]",
+ refenv.toString());
+ assertEquals("unnamed", refenv.getCoordinateReferenceSystem().getName()
+ .toString());
+ }
+
+ @Test
+ public void testGetBoundsAndCrs2() throws IOException {
+ StyledGridCoverageReader styled = TestingUtil.TestDatasetsRaster.geotiffRGBWithoutSLD
+ .getStyled();
+ Envelope env = styled.getEnvelope();
+
+ assertNotNull(env);
+ assertEquals(
+ "Env[269423.4645826937 : 504863.4645826937, -104051.22125889576 : 162438.77874110424]",
+ env.toString());
+
+ ReferencedEnvelope refenv = styled.getReferencedEnvelope();
+
+ assertNotNull(refenv);
+ assertEquals(
+ "ReferencedEnvelope[269423.4645826937 : 504863.4645826937, -104051.22125889576 : 162438.77874110424]",
+ refenv.toString());
+ assertEquals("unnamed", refenv.getCoordinateReferenceSystem().getName()
+ .toString());
+ }
+
+ @Test
+ public void testGetBoundsAndCrs3() throws IOException {
+ StyledGridCoverageReader styled = TestingUtil.TestDatasetsRaster.arcAscii
+ .getStyled();
+ Envelope env = styled.getEnvelope();
+
+ assertNotNull(env);
+ assertEquals(
+ "Env[167285.07632269844 : 722285.0763226985, 651967.6461872223 : 1440651.856713538]",
+ env.toString());
+
+ ReferencedEnvelope refenv = styled.getReferencedEnvelope();
+
+ assertNotNull(refenv);
+ assertEquals(
+ "ReferencedEnvelope[167285.07632269844 : 722285.0763226985, 651967.6461872223 : 1440651.856713538]",
+ refenv.toString());
+ assertEquals("EPSG:WGS 84", refenv.getCoordinateReferenceSystem()
+ .getName().toString());
+ }
+
+ @Test
public void testIsStyleable() throws IOException {
StyledGridCoverageReader styled = TestingUtil.TestDatasetsRaster.geotiffWithSld
.getStyled();
More information about the Schmitzm-commits
mailing list