changeset 173:0a1435aa33d8

Merged with Stephans commit.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 06 Jul 2011 18:27:46 +0200
parents 929e09649b08 (diff) bf1ba2e06991 (current diff)
children 707f13cfba74
files ChangeLog
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 06 17:04:46 2011 +0200
+++ b/ChangeLog	Wed Jul 06 18:27:46 2011 +0200
@@ -6,6 +6,12 @@
 
 2011-07-06  Raimund Renkert  <raimund.renkert@intevation.de>
 
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Do not write the projection if the EPSG code is 0. MapScript
+	  verifies the projection before writing it to the mapfile.
+
+2011-07-06  Raimund Renkert  <raimund.renkert@intevation.de>
+
 	* src/java/de/intevation/mxd/reader/MapReader.java:
 	  Read the projection as EPSG code from the MXD file.
 
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Jul 06 17:04:46 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Jul 06 18:27:46 2011 +0200
@@ -101,8 +101,11 @@
             Double.parseDouble(mapNode.getAttribute("extent_max_x")),
             Double.parseDouble(mapNode.getAttribute("extent_max_y")));
 
-        //Set the units.
-	map.setProjection("epsg:" + mapNode.getAttribute("projection"));
+        //Set the units and projection.
+	int proj = Integer.parseInt(mapNode.getAttribute("projection"));
+	if(proj != 0) {
+	    map.setProjection("epsg:" + mapNode.getAttribute("projection"));
+	}
         String u = mapNode.getAttribute("units");
         if(u.equals("feet")) {
             units = MS_UNITS.MS_FEET;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)