# HG changeset patch # User Ingo Weinzierl # Date 1269257013 0 # Node ID 0b1de7e3890773e1ee77b046bf490b630ef08aee # Parent f82e57a601242aaabb382d79e6697e7a80334a5e Adjusted mapfile templates for 'Horizontalschnitte' - display DESC column as label in a WMS layer (issue209). gnv-artifacts/trunk@815 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/ChangeLog --- 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 + + 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 Issue209 diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_flow-velocity_isolines.vm --- 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 diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_salinity_isolines.vm --- 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 diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-levels_isolines.vm --- 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 diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/doc/conf/maptemplates/horizontalcrosssection_water-temperature_isolines.vm --- 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 diff -r f82e57a60124 -r 0b1de7e38907 gnv-artifacts/src/main/java/de/intevation/gnv/utils/ShapeFileWriter.java --- 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); } }