[Schmitzm-commits] r471 - in trunk/src/schmitzm/geotools: . gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 14 18:44:02 CEST 2009


Author: alfonx
Date: 2009-10-14 18:44:02 +0200 (Wed, 14 Oct 2009)
New Revision: 471

Modified:
   trunk/src/schmitzm/geotools/JTSUtil.java
   trunk/src/schmitzm/geotools/gui/GridPanel.java
   trunk/src/schmitzm/geotools/gui/JMapPane.java
   trunk/src/schmitzm/geotools/gui/RasterPositionLabel.java
Log:
* For compatibility with 1.3 atlases, the "unit" attribute for columns is now optional
* Changed all CRS.findMathTransform() calls to use lenient transforms if BW parameters are not found
* No more NPE if AtlasStyler is open and the layer has been removed and then the dialog is closed.
* Catching the "out of bounds" org.jdesktop.swingx.VerticalLayout exception and not show it to the poor user.
* Some i8n for the AtlasStyler double label feature

Modified: trunk/src/schmitzm/geotools/JTSUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/JTSUtil.java	2009-10-14 16:20:26 UTC (rev 470)
+++ trunk/src/schmitzm/geotools/JTSUtil.java	2009-10-14 16:44:02 UTC (rev 471)
@@ -76,7 +76,7 @@
     Envelope destEnv = null;
       MathTransform transform;
 	try {
-		transform = CRS.findMathTransform(sourceCRS, destCRS);
+		transform = CRS.findMathTransform(sourceCRS, destCRS, true);
 		destEnv = JTS.transform(sourceEnv,transform);
 	} catch (FactoryException e) {
 		LOGGER.warn("CRS tranformation for JTS envelope not successfully",e);
@@ -98,7 +98,7 @@
     Coordinate destCoord = null;
     MathTransform transform;
     try {
-        transform = CRS.findMathTransform(sourceCRS, destCRS);
+        transform = CRS.findMathTransform(sourceCRS, destCRS, true);
         destCoord = JTS.transform(sourceCoord,null,transform);
     } catch (FactoryException e) {
         LOGGER.warn("CRS tranformation for JTS coordinate not successful",e);

Modified: trunk/src/schmitzm/geotools/gui/GridPanel.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/GridPanel.java	2009-10-14 16:20:26 UTC (rev 470)
+++ trunk/src/schmitzm/geotools/gui/GridPanel.java	2009-10-14 16:44:02 UTC (rev 471)
@@ -172,8 +172,8 @@
         // Der Effizienz halber, die Transformation nur neu ermitteln
         // wenn sich das Karten-CRS geaendert hat
         if ( mapToGrid == null || gridToMap == null || transformedMapCRS == null || !transformedMapCRS.equals(mapCRS) ) {
-          mapToGrid = CRS.findMathTransform(mapCRS, gridCRS);
-          gridToMap = CRS.findMathTransform(gridCRS, mapCRS);
+          mapToGrid = CRS.findMathTransform(mapCRS, gridCRS, true);
+          gridToMap = CRS.findMathTransform(gridCRS, mapCRS, true);
           // CRS merken, fuer das Transformation erstellt wurde
           transformedMapCRS = mapCRS;
         }

Modified: trunk/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-10-14 16:20:26 UTC (rev 470)
+++ trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-10-14 16:44:02 UTC (rev 471)
@@ -2453,7 +2453,7 @@
 				// only to calculations if the CRS differ
 				try {
 					MathTransform fToMap;
-					fToMap = CRS.findMathTransform(fCRS, mapCRS);
+					fToMap = CRS.findMathTransform(fCRS, mapCRS, true);
 					// centre is transformed to the mapCRS
 					centre = JTS.transform(centre, null, fToMap);
 				} catch (FactoryException e) {

Modified: trunk/src/schmitzm/geotools/gui/RasterPositionLabel.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/RasterPositionLabel.java	2009-10-14 16:20:26 UTC (rev 470)
+++ trunk/src/schmitzm/geotools/gui/RasterPositionLabel.java	2009-10-14 16:44:02 UTC (rev 471)
@@ -153,7 +153,7 @@
 				// Koordinaten in CRS des Rasters umrechnen
 				final MathTransform mapToGrid = CRS.findMathTransform(mapPane
 						.getContext().getCoordinateReferenceSystem(), gc
-						.getCoordinateReferenceSystem());
+						.getCoordinateReferenceSystem(), true);
 				mapToGrid.transform(new GeneralDirectPosition(actPos_MapCRS),
 						actPos_GridCRS);
 				// Wert im Raster ermitteln
@@ -211,7 +211,7 @@
 				// Koordinaten in CRS des Rasters umrechnen
 				final MathTransform mapToGrid = CRS.findMathTransform(mapPane
 						.getContext().getCoordinateReferenceSystem(), gcr
-						.getCrs());
+						.getCrs(), true);
 				mapToGrid.transform(new GeneralDirectPosition(actPos_MapCRS),
 						actPos_GridCRS);
 				// Wert im Raster ermitteln



More information about the Schmitzm-commits mailing list