changeset 761:0b1de7e38907

Adjusted mapfile templates for 'Horizontalschnitte' - display DESC column as label in a WMS layer (issue209). gnv-artifacts/trunk@815 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 22 Mar 2010 11:23:33 +0000
parents f82e57a60124
children b3f922908a31
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_flow-velocity_isolines.vm gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_salinity_isolines.vm gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-levels_isolines.vm gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-temperature_isolines.vm gnv-artifacts/src/main/java/de/intevation/gnv/utils/ShapeFileWriter.java
diffstat 6 files changed, 23 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Mar 22 11:23:33 2010 +0000
@@ -1,3 +1,18 @@
+2010-03-22  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue209
+
+	* doc/conf/maptemplates/horizontalcrosssection_salinity_isolines.vm,
+	  doc/conf/maptemplates/horizontalcrosssection_flow-velocity_isolines.vm,
+	  doc/conf/maptemplates/horizontalcrosssection_water-levels_isolines.vm,
+	  doc/conf/maptemplates/horizontalcrosssection_water-temperature_isolines.vm:
+	  Improved the template configuration for the given changes in rev814.
+	
+	* src/main/java/de/intevation/gnv/utils/ShapeFileWriter.java: Moved the
+	  settings of the format used to write floating point numbers into the
+	  shapefile description column into a static block of this class to avoid
+	  doing this each time converting a double value to a description.
+
 2010-03-22  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue209
--- a/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_flow-velocity_isolines.vm	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_flow-velocity_isolines.vm	Mon Mar 22 11:23:33 2010 +0000
@@ -4,6 +4,6 @@
     DATA "${info.getName()}/${info.getData()}"
     TYPE $info.getType()
     STATUS $info.getStatus()
-    LABELITEM VALUE
+    LABELITEM DESC
     #include("flow-velocity_isolines.class.vm")
 END
--- a/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_salinity_isolines.vm	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_salinity_isolines.vm	Mon Mar 22 11:23:33 2010 +0000
@@ -4,6 +4,6 @@
     DATA "${info.getName()}/${info.getData()}"
     TYPE $info.getType()
     STATUS $info.getStatus()
-    LABELITEM VALUE
+    LABELITEM DESC
     #include("salinity_isolines.class.vm")
 END
--- a/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-levels_isolines.vm	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-levels_isolines.vm	Mon Mar 22 11:23:33 2010 +0000
@@ -4,6 +4,6 @@
     DATA "${info.getName()}/${info.getData()}"
     TYPE $info.getType()
     STATUS $info.getStatus()
-    LABELITEM VALUE
+    LABELITEM DESC
     #include("water-levels_isolines.class.vm")
 END
--- a/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-temperature_isolines.vm	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-temperature_isolines.vm	Mon Mar 22 11:23:33 2010 +0000
@@ -4,6 +4,6 @@
     DATA "${info.getName()}/${info.getData()}"
     TYPE $info.getType()
     STATUS $info.getStatus()
-    LABELITEM VALUE
+    LABELITEM DESC
     #include("water-temperature_isolines.class.vm")
 END
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/ShapeFileWriter.java	Mon Mar 22 10:57:35 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/ShapeFileWriter.java	Mon Mar 22 11:23:33 2010 +0000
@@ -48,6 +48,10 @@
 
     public static final int DOUBLE_PRECISION = 3;
 
+    static {
+        format.setMaximumFractionDigits(DOUBLE_PRECISION);
+    }
+
     private ShapeFileWriter() {
     }
 
@@ -407,8 +411,6 @@
     }
 
     private static final String value2description(Double value) {
-        format.setMaximumFractionDigits(DOUBLE_PRECISION);
-
         return format.format(value);
     }
 }

http://dive4elements.wald.intevation.org