changeset 248:191b7d18c79e

Minor fixes for metadata information.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 10 Aug 2011 14:39:31 +0200
parents 30e10eb9ac68
children 4c59d8c36418
files ChangeLog src/java/de/intevation/mxd/reader/FeatureLayerReader.java src/java/de/intevation/mxd/writer/MapScriptWriter.java
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 10 13:23:29 2011 +0200
+++ b/ChangeLog	Wed Aug 10 14:39:31 2011 +0200
@@ -1,3 +1,11 @@
+2011-08-10  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Write the projection metadata only if needed.
+
+	* src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
+	  Fixed the attributes for layer extent.
+
 2011-08-10  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Wed Aug 10 13:23:29 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Wed Aug 10 14:39:31 2011 +0200
@@ -219,10 +219,10 @@
                 "extent_max_x",
                 String.valueOf(rect.getXMax()));
             layerElement.setAttribute(
-                "extent_y_min",
+                "extent_min_y",
                 String.valueOf(rect.getYMin()));
             layerElement.setAttribute(
-                "extent_y_max",
+                "extent_max_y",
                 String.valueOf(rect.getYMax()));
         }
         catch(IOException ioe) {
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Aug 10 13:23:29 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Aug 10 14:39:31 2011 +0200
@@ -205,8 +205,11 @@
         map.setUnits(units);
 
 	String srs = map.getMetaData("ows_srs");
-	srs += " EPSG:" + mapNode.getAttribute("projection");
-	map.setMetaData("ows_srs", srs);
+	String mproj = mapNode.getAttribute("projection");
+	if(srs.indexOf(mproj) < 0) {
+	    srs += " EPSG:" + mproj;
+	    map.setMetaData("ows_srs", srs);
+	}
     }
 
     /**
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)