[Schmitzm-commits] r366 - branches/1.0-gt2-2.6/src/schmitzm/geotools/gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 3 11:55:32 CEST 2009


Author: alfonx
Date: 2009-09-03 11:55:31 +0200 (Thu, 03 Sep 2009)
New Revision: 366

Modified:
   branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java
Log:
* Replaced WGS84 as the fallback-default against GeoImportUtil.getDefaultCRS()

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java	2009-09-03 09:54:11 UTC (rev 365)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java	2009-09-03 09:55:31 UTC (rev 366)
@@ -105,6 +105,7 @@
 import schmitzm.geotools.GTUtil;
 import schmitzm.geotools.JTSUtil;
 import schmitzm.geotools.grid.GridUtil;
+import schmitzm.geotools.io.GeoImportUtil;
 import schmitzm.geotools.map.event.FeatureSelectedEvent;
 import schmitzm.geotools.map.event.GeneralSelectionEvent;
 import schmitzm.geotools.map.event.GridCoverageSelectedEvent;
@@ -496,7 +497,7 @@
 				isDoubleBuffered != null ? isDoubleBuffered : true,
 				renderer != null ? renderer : new ShapefileRenderer(context),
 				// renderer != null ? renderer : new StreamingRenderer(),
-				context != null ? context : new DefaultMapContext(GTUtil.WGS84));
+				context != null ? context : new DefaultMapContext(GeoImportUtil.getDefaultCRS()));
 
 		// Dieser Hint sorgt wohl dafuer, dass die Rasterpixel nicht
 		// interpoliert werden
@@ -504,8 +505,13 @@
 		// rechenintensive AntiAliasing fuer Text un Vectoren eingeschaltet
 		// werden
 		RenderingHints hints = ImageUtilities.NN_INTERPOLATION_HINT;
+		
+//		hints.put(ShapefileRenderer.SCALE_COMPUTATION_METHOD_KEY, ShapefileRenderer.SCALE_OGC);
+		
 		getRenderer().setJava2DHints(hints);
+		
 
+
 		// hints.add( new RenderingHints(RenderingHints.KEY_ANTIALIASING,
 		// RenderingHints.VALUE_ANTIALIAS_OFF ) );
 		// hints.add( new RenderingHints(RenderingHints.KEY_INTERPOLATION,
@@ -630,9 +636,9 @@
 								}
 							} catch (Exception err) {
 								LOGGER
-										.warn("CRS could not be determined from map layer. WGS84 used.");
+										.warn("CRS could not be determined from map layer. "+GeoImportUtil.getDefaultCRS().getName()+"  used.");
 								// err.printStackTrace();
-								crs = DefaultGeographicCRS.WGS84;
+								crs = GeoImportUtil.getDefaultCRS();
 							}
 							// CRS dem MapContext zuweisen
 							try {



More information about the Schmitzm-commits mailing list