[Schmitzm-commits] r1480 - in trunk: schmitzm-gt schmitzm-gt/src/main/java/de/schmitzm/geotools/gui schmitzm-gt/src/main/java/de/schmitzm/geotools/labelsearch schmitzm-gt/src/main/java/de/schmitzm/geotools/styling schmitzm-parent

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 2 22:06:49 CET 2011


Author: alfonx
Date: 2011-02-02 22:06:48 +0100 (Wed, 02 Feb 2011)
New Revision: 1480

Modified:
   trunk/schmitzm-gt/pom.xml
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/GridPanelFormatter_DHDN.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/MapRenderingStateEvent.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/labelsearch/SearchResultFeature.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
   trunk/schmitzm-parent/pom.xml
Log:
Schmitzm is prepared for Geotools 2.7! ... no more compile errors nor test errors.

Modified: trunk/schmitzm-gt/pom.xml
===================================================================
--- trunk/schmitzm-gt/pom.xml	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/pom.xml	2011-02-02 21:06:48 UTC (rev 1480)
@@ -34,7 +34,7 @@
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
-
+		
 		<dependency>
 			<groupId>org.geotools</groupId>
 			<artifactId>gt-render</artifactId>
@@ -42,6 +42,14 @@
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
+		
+		<dependency>
+			<groupId>org.geotools</groupId>
+			<artifactId>gt-epsg-hsql</artifactId>
+			<version>${geotools.version}</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
 
 		<dependency>
 			<groupId>org.geotools.xsd</groupId>

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/GridPanelFormatter_DHDN.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/GridPanelFormatter_DHDN.java	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/GridPanelFormatter_DHDN.java	2011-02-02 21:06:48 UTC (rev 1480)
@@ -12,17 +12,18 @@
 
 public class GridPanelFormatter_DHDN extends GridPanelFormatter {
 	private static final Font font = new Font(Font.MONOSPACED, Font.BOLD, 11);
-	final DecimalFormat numFormat = new DecimalFormat("###,###,###", new DecimalFormatSymbols(Locale.getDefault()));
+	final DecimalFormat numFormat = new DecimalFormat("###,###,###",
+			new DecimalFormatSymbols(Locale.getDefault()));
 
 	/**
 	 * Creates a new formatter with DHDN / 3-degree Gauss zone 1 as CRS
-	 *
+	 * 
 	 * @param crs
 	 *            the CRS the formatter can format
 	 * @throws FactoryException
 	 * @throws NoSuchAuthorityCodeException
 	 */
-	public GridPanelFormatter_DHDN()  {
+	public GridPanelFormatter_DHDN() {
 
 		// # DHDN / 3-degree Gauss zone 1
 		// <31461> +proj=tmerc +lat_0=0 +lon_0=3 +k=1.000000 +x_0=1500000 +y_0=0
@@ -32,12 +33,14 @@
 		try {
 			setCRS(CRS.decode("EPSG:31461"));
 		} catch (final Exception e) {
-			throw new RuntimeException(e);
+			throw new RuntimeException("EPSG code can not be resolved: ", e);
 		}
 	}
+
 	@Override
-	public double determineGridDistance(final GridPanel panel, final double mapMinCoord,
-			final double mapMaxCoord, final int panelSize) {
+	public double determineGridDistance(final GridPanel panel,
+			final double mapMinCoord, final double mapMaxCoord,
+			final int panelSize) {
 		final double diff = Math.abs(mapMinCoord - mapMaxCoord);
 
 		double dist;
@@ -70,7 +73,6 @@
 	@Override
 	public String formatCoordinate(final GridPanel panel, final double coord) {
 
-
 		if (panel.isVertical()) {
 			return numFormat.format(coord) + "H";
 		} else {
@@ -84,10 +86,9 @@
 		return font;
 	}
 
-
 	@Override
 	public String getId() {
-		return 	"10_DHDN";
+		return "10_DHDN";
 
 	}
 
@@ -101,5 +102,4 @@
 		return 80;
 	}
 
-
 }

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/MapRenderingStateEvent.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/MapRenderingStateEvent.java	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/MapRenderingStateEvent.java	2011-02-02 21:06:48 UTC (rev 1480)
@@ -1,8 +1,5 @@
 package de.schmitzm.geotools.gui;
 
-import org.opengis.display.canvas.RenderingState;
-
-
 /**
  * Events of this Class are fired, when rendering starts and stops. Cancels and
  * Errors are fired as Stops.

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java	2011-02-02 21:06:48 UTC (rev 1480)
@@ -58,7 +58,6 @@
 import org.geotools.swing.JMapPane;
 import org.geotools.swing.event.MapMouseEvent;
 import org.geotools.swing.event.MapPaneListener;
-import org.opengis.display.canvas.RenderingState;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.referencing.FactoryException;
@@ -124,10 +123,8 @@
 
 		try {
 			getMapContext().setCoordinateReferenceSystem(forceCrs);
-		} catch (TransformException e) {
+		} catch (Exception e) {
 			ExceptionDialog.show(this, e);
-		} catch (FactoryException e) {
-			ExceptionDialog.show(this, e);
 		}
 	}
 
@@ -1376,7 +1373,7 @@
 			if (!layer.isVisible())
 				continue;
 
-			if (layer.getTitle().equals(SPECIAL_LINES_LAYER_ID))
+			if (SPECIAL_LINES_LAYER_ID.equals(layer.getTitle()))
 				continue;
 			/*
 			 * fs = layer.getFeatureSource(); sourceCrs =

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/labelsearch/SearchResultFeature.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/labelsearch/SearchResultFeature.java	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/labelsearch/SearchResultFeature.java	2011-02-02 21:06:48 UTC (rev 1480)
@@ -33,10 +33,10 @@
 
 import org.apache.log4j.Logger;
 import org.geotools.map.MapLayer;
-import org.opengis.display.canvas.RenderingState;
 import org.opengis.feature.simple.SimpleFeature;
 
 import de.schmitzm.geotools.gui.MapRenderingStateEvent;
+import de.schmitzm.geotools.gui.RenderingState;
 import de.schmitzm.geotools.gui.SelectableXMapPane;
 import de.schmitzm.geotools.gui.XMapPaneEvent;
 import de.schmitzm.geotools.map.event.JMapPaneListener;
@@ -53,8 +53,7 @@
 	private final MapLayer mapLayer;
 
 	public SearchResultFeature(SimpleFeature feature, String title,
-			String inTitle, SelectableXMapPane mapPane,
-			MapLayer mapLayer) {
+			String inTitle, SelectableXMapPane mapPane, MapLayer mapLayer) {
 		this.feature = feature;
 		this.title = title;
 		this.inTitle = inTitle;

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2011-02-02 21:06:48 UTC (rev 1480)
@@ -55,6 +55,8 @@
 import javax.measure.unit.Unit;
 import javax.xml.transform.TransformerException;
 
+import net.miginfocom.layout.Grid;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.log4j.Logger;
 import org.geotools.brewer.color.BrewerPalette;
@@ -118,7 +120,6 @@
 import org.geotools.xml.Parser;
 import org.jdom.Element;
 import org.jdom.output.XMLOutputter;
-import org.opengis.coverage.grid.Grid;
 import org.opengis.coverage.grid.GridCoverage;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;

Modified: trunk/schmitzm-parent/pom.xml
===================================================================
--- trunk/schmitzm-parent/pom.xml	2011-02-02 20:30:14 UTC (rev 1479)
+++ trunk/schmitzm-parent/pom.xml	2011-02-02 21:06:48 UTC (rev 1480)
@@ -13,7 +13,9 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<schmitzm.version>${project.version}</schmitzm.version>
 		<geotools.version>2.6.5</geotools.version>
+<!--		<geotools.version>2.7-RC1</geotools.version> -->
 	</properties>
 
 	<issueManagement>



More information about the Schmitzm-commits mailing list