changeset 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 5991c1f90f91
children 02df1dbc2166
files ChangeLog src/java/de/intevation/mxd/writer/FillStyleWriter.java src/java/de/intevation/mxd/writer/LineStyleWriter.java
diffstat 3 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jun 20 16:01:17 2011 +0200
+++ b/ChangeLog	Mon Jun 20 17:41:55 2011 +0200
@@ -1,3 +1,9 @@
+2011-06-20  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/FillStyleWriter.java,
+	  src/java/de/intevation/mxd/writer/LineStyleWriter.java:
+	  Do not write lines or outlines if their width is smaller than 1.0.
+
 2011-06-20  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Jun 20 16:01:17 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Jun 20 17:41:55 2011 +0200
@@ -120,7 +120,12 @@
         logger.debug("writeOutline()");
         //write transparent outline
         colorObj color = new colorObj(-1, -1, -1, -4);
-
+        if(symbolElement.hasAttribute("width")) {
+            double w = Double.parseDouble(symbolElement.getAttribute("width"));
+            if (w < 1.0) {
+                return;
+            }
+        }
         //write new style for the outline
         //TODO write further attribute like pattern etc.
         Color oCol = Color.decode(
--- 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)