changeset 152:8a87c796bf47

Fixed expression for the first min value.
author vc11884admin@VC11884.win.bsh.de
date Thu, 30 Jun 2011 13:48:09 +0200
parents 1623c8c99135
children 7ed49420ee5a
files ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 30 12:04:03 2011 +0200
+++ b/ChangeLog	Thu Jun 30 13:48:09 2011 +0200
@@ -1,3 +1,9 @@
+2011-06-30  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Write a ">=" expression operator for the first minimum value
+	  expression.
+
 2011-06-30  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Thu Jun 30 12:04:03 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Thu Jun 30 13:48:09 2011 +0200
@@ -272,7 +272,7 @@
             }
             co.setName (name);
             if(classElement.hasAttribute("field_count")) {
-                co.setExpression(createExpression(classElement));
+                co.setExpression(createExpression(classElement, i));
             }
             //Write symbols and styles.
             NodeList l = classElement.getChildNodes();
@@ -297,7 +297,7 @@
     }
 
 
-    private String createExpression(Element ce) {
+    private String createExpression(Element ce, int index) {
         String expression = "(";
         int count = 0;
         try {
@@ -317,7 +317,12 @@
                 expression += "[" + pre;
                 expression += ce.getAttribute("expression_field_0") + "]";
                 if(ce.hasAttribute("min_value")) {
-                    expression += " > " + ce.getAttribute("min_value");
+		    if(index == 0) {
+		        expression += " >= " + ce.getAttribute("min_value");
+		    }
+		    else {
+                        expression += " > " + ce.getAttribute("min_value");
+		    }
                     expression += " AND [";
                     expression += ce.getAttribute("expression_field_0")+ "]";
                 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)