comparison src/java/de/intevation/mxd/writer/MarkerStyleWriter.java @ 191:17b4aaa159ec

Added offset attributes to marker style symbols.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 16:02:57 +0200
parents 0bde090506f9
children df4e0946ef02
comparison
equal deleted inserted replaced
190:c640fb351f66 191:17b4aaa159ec
98 } 98 }
99 catch(NumberFormatException nfe) { 99 catch(NumberFormatException nfe) {
100 logger.warn("Error setting outline width."); 100 logger.warn("Error setting outline width.");
101 } 101 }
102 } 102 }
103
104 if (symbolElement.hasAttribute("x_offset")) {
105 try {
106 double val =
107 Double.parseDouble(symbolElement.getAttribute("x_offset"));
108 double r = Math.round(val);
109 style.setOffsetx(r);
110 }
111 catch (NumberFormatException nfe) {
112 logger.warn("Error setting the symbol x-offset");
113 }
114 }
115 if (symbolElement.hasAttribute("y_offset")) {
116 try {
117 double val =
118 Double.parseDouble(symbolElement.getAttribute("y_offset"));
119 double r = Math.round(val);
120 //In ArcGIS positive y offset values move the symbol upwards,
121 //in Mapserver positive values move downwards.
122 r = -r;
123 style.setOffsety(r);
124 }
125 catch (NumberFormatException nfe) {
126 logger.warn("Error setting the symbol y-offset.");
127 }
128 }
103 String symType = symbolElement.getAttribute("style"); 129 String symType = symbolElement.getAttribute("style");
104 if(symType.equals("point") || 130 if(symType.equals("point") ||
105 symType.equals("arrow") || 131 symType.equals("arrow") ||
106 symType.equals("char")) { 132 symType.equals("char")) {
107 SymbolWriter sw = new SymbolWriter(this.map, this.cl); 133 SymbolWriter sw = new SymbolWriter(this.map, this.cl);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)