# HG changeset patch # User Raimund Renkert # Date 1309969666 -7200 # Node ID 0a1435aa33d81282f8b6927e86fe5634e0067ceb # Parent 929e09649b08f8b3593f6bfc7cf95882510e0e4b# Parent bf1ba2e069919b31e74af3fae37b40e25db314a1 Merged with Stephans commit. diff -r bf1ba2e06991 -r 0a1435aa33d8 ChangeLog --- 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 + * 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 + * src/java/de/intevation/mxd/reader/MapReader.java: Read the projection as EPSG code from the MXD file. diff -r bf1ba2e06991 -r 0a1435aa33d8 src/java/de/intevation/mxd/writer/MapScriptWriter.java --- 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;