diff src/java/de/intevation/mxd/writer/LineStyleWriter.java @ 131:cd18c61cbcf6

Do not write lines or outlines if their width is smaller than 1.0.
author vc11884admin@VC11884.win.bsh.de
date Mon, 20 Jun 2011 17:41:55 +0200
parents f0a72d232aa8
children 7632850b9520
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/LineStyleWriter.java	Mon Jun 20 16:01:17 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/LineStyleWriter.java	Mon Jun 20 17:41:55 2011 +0200
@@ -42,6 +42,14 @@
     public boolean write(Element symbolElement) {
         logger.debug("write(Element)");
         symbolSetObj symbolSet = map.getSymbolset();
+        if(symbolElement.hasAttribute("width")) {
+            double w = Double.parseDouble(symbolElement.getAttribute("width"));
+            if(w < 1.0) {
+                return false;
+            }
+            style.setWidth((int)Double.parseDouble(
+                symbolElement.getAttribute("width")));
+        }
         if(symbolElement.hasAttribute("angle")) {
             style.setAngle(
                 Double.parseDouble(symbolElement.getAttribute("angle")));
@@ -56,10 +64,7 @@
                 -4);
             style.setColor(color);
         }
-        if(symbolElement.hasAttribute("width")) {
-            style.setWidth((int)Double.parseDouble(
-                symbolElement.getAttribute("width")));
-        }
+
         if(symbolElement.hasAttribute("size")) {
             style.setSize((int)Double.parseDouble(
                 symbolElement.getAttribute("size")));
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)