Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 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 | 2bf35f0babd0 |
children | 7ed49420ee5a |
line wrap: on
line diff
--- 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")+ "]"; }