Mercurial > mxd2map
annotate src/java/de/intevation/mxd/reader/CartoLineSymbolReader.java @ 67:5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 25 May 2011 15:48:55 +0200 |
parents | 9fca9e09b966 |
children | 7eba97e8201b |
rev | line source |
---|---|
65
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.mxd.reader; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 import java.io.IOException; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 import java.awt.Color; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 import org.apache.log4j.Logger; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 import com.esri.arcgis.display.ISymbol; |
67
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
10 import com.esri.arcgis.display.ILineSymbol; |
65
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import com.esri.arcgis.display.CartographicLineSymbol; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 import com.esri.arcgis.display.esriSimpleLineStyle; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 import com.esri.arcgis.display.IRgbColor; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 import com.esri.arcgis.display.RgbColor; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 import com.esri.arcgis.display.esriLineCapStyle; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 import com.esri.arcgis.display.esriLineJoinStyle; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 import org.w3c.dom.Element; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 import de.intevation.mxd.utils.MapToXMLUtils; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 * Reads cartoline symbol information. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 * |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 public class CartoLineSymbolReader implements ISymbolReader{ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 * The logger. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 private static final Logger logger = |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 Logger.getLogger(CartoLineSymbolReader.class); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 * Private member. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 private Element renderer; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 private CartographicLineSymbol symbol; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 private MapToXMLUtils util; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 public CartoLineSymbolReader(ISymbol symbol) |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 throws Exception { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 logger.debug("contructor()"); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 if(symbol instanceof CartographicLineSymbol) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 this.symbol = (CartographicLineSymbol)symbol; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 else { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 throw new Exception("Not a CartographicLineSymbol!"); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 |
67
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
54 |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
55 public CartoLineSymbolReader(ILineSymbol symbol) |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
56 throws Exception { |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
57 logger.debug("contructor()"); |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
58 if(symbol instanceof CartographicLineSymbol) { |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
59 this.symbol = (CartographicLineSymbol)symbol; |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
60 } |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
61 else { |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
62 throw new Exception("Not a CartographicLineSymbol!"); |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
63 } |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
64 } |
5ed9e720b6cd
Read the hash symbol in the hash line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
65
diff
changeset
|
65 |
65
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 * Setter for the parent XML element. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 * |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 * @param parent The XML parent node. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 public void setParent(Element parent) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 this.renderer = parent; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 * Setter for XML document helper. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 * |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 * @param util The helper class for storing map information. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 public void setUtil(MapToXMLUtils util) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 this.util = util; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
83 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
84 /** |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
85 * Reads the symbol attributes. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
86 * |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 * @return The XML node. |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
88 */ |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
89 public Element read() |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
90 throws IOException { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
91 logger.debug("read()"); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
92 Element symbolElement; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
93 try { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
94 symbolElement = util.addSymbol(renderer); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
95 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
96 catch(Exception e) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
97 e.printStackTrace(); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
98 return null; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
99 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
100 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
101 symbolElement.setAttribute("name", symbol.getNameString()); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
102 symbolElement.setAttribute("style", "line"); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
103 if(symbol.getColor() instanceof IRgbColor) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
104 IRgbColor color = (IRgbColor)symbol.getColor(); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
105 Color c = new Color ( |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
106 color.getRed(), |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
107 color.getGreen(), |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
108 color.getBlue()); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
109 symbolElement.setAttribute("color", String.valueOf(c.getRGB())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
110 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
111 else { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
112 RgbColor col = new RgbColor(); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
113 col.setRGB(symbol.getColor().getRGB()); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
114 Color c = new Color ( |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
115 col.getRed(), |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
116 col.getGreen(), |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
117 col.getBlue()); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
118 symbolElement.setAttribute("color", String.valueOf(c.getRGB())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
119 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
120 int cap = symbol.getCap(); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
121 String capStyle = "butt"; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
122 switch(cap) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
123 case esriLineCapStyle.esriLCSRound: capStyle = "round"; break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
124 case esriLineCapStyle.esriLCSSquare: capStyle = "square"; break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
125 default: break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
126 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
127 int join = symbol.getJoin(); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
128 String joinStyle = "bevel"; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
129 switch(join) { |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
130 case esriLineJoinStyle.esriLJSRound: joinStyle = "round"; break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
131 case esriLineJoinStyle.esriLJSMitre: joinStyle = "miter"; break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
132 default: break; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
133 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
134 symbolElement.setAttribute("cap", capStyle); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
135 symbolElement.setAttribute("join", joinStyle); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
136 symbolElement.setAttribute( |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
137 "linestart", |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
138 String.valueOf(symbol.getLineStartOffset())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
139 symbolElement.setAttribute( |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
140 "miterlimit", |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
141 String.valueOf(symbol.getMiterLimit())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
142 symbolElement.setAttribute( |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
143 "offset", |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
144 String.valueOf(symbol.getOffset())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
145 symbolElement.setAttribute("width", String.valueOf(symbol.getWidth())); |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
146 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
147 //TODO Read further attributes depending on the Mapscript functionality: |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
148 // Template, MarkerSymbol, LineDecorations |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
149 |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
150 return symbolElement; |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
151 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
152 } |
9fca9e09b966
Added cartographic line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
153 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |