[MXD2map-commits] r248:191b7d18c79e

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 10 15:01:02 CEST 2011


details:   http://hg.intevation.org/geospatial/mxd2map/rev/191b7d18c79e

changeset: 248:191b7d18c79e

user:      raimund renkert <raimund.renkert at intevation.de>

date:      Wed Aug 10 14:39:31 2011 +0200

description:
Minor fixes for metadata information.


diffstat:

 ChangeLog                                                 |  8 ++++++++
 src/java/de/intevation/mxd/reader/FeatureLayerReader.java |  4 ++--
 src/java/de/intevation/mxd/writer/MapScriptWriter.java    |  7 +++++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r 30e10eb9ac68 -r 191b7d18c79e ChangeLog
--- 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 at 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 at intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
diff -r 30e10eb9ac68 -r 191b7d18c79e src/java/de/intevation/mxd/reader/FeatureLayerReader.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) {
diff -r 30e10eb9ac68 -r 191b7d18c79e src/java/de/intevation/mxd/writer/MapScriptWriter.java
--- 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);
+	}
     }
 
     /**


More information about the MXD2map-commits mailing list