Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/LineStyleWriter.java @ 177:9fd61f4ac0e3
Write lines with width smaller than 1 and write further line attributes.
author | raimund renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 07 Jul 2011 15:05:08 +0200 |
parents | 03daf386f19a |
children | f4eb506499f5 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/LineStyleWriter.java Thu Jul 07 14:19:56 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/LineStyleWriter.java Thu Jul 07 15:05:08 2011 +0200 @@ -52,7 +52,7 @@ w = 0; } if(w < 1.0) { - return false; + w = 1; } style.setWidth((int)w); } @@ -86,6 +86,38 @@ style.setSize (1); } } + + if(symbolElement.hasAttribute("offset")) { + double offset = 0; + try { + offset = Double.parseDouble( + symbolElement.getAttribute("offset")); + if(Math.abs(offset) < 1 && offset > 0) { + offset = 1; + } + else if (Math.abs(offset) < 1 && offset < 0) { + offset = -1; + } + style.setOffsetx(offset); + style.setOffsety(-99); + } + catch(NumberFormatException nfe) { + logger.warn("Could not set offset."); + } + } + + if(symbolElement.hasAttribute("miterlimit")) { + double miter = 0; + try { + miter = Double.parseDouble( + symbolElement.getAttribute("miterlimit")); + style.setLinejoinmaxsize(miter); + } + catch(NumberFormatException nfe) { + logger.warn("Could not set miter limit."); + } + } + String type = symbolElement.getAttribute("type"); if(type.equals("marker")) { SymbolWriter sw = new SymbolWriter(this.map, this.cl);