Revision 7101
trunk/extensions/extPublish/src/org/gvsig/remoteservices/conf/mapserver/MapServer.java | ||
---|---|---|
44 | 44 |
* |
45 | 45 |
* $Id$ |
46 | 46 |
* $Log$ |
47 |
* Revision 1.4 2006-09-07 11:19:40 jvhigon |
|
47 |
* Revision 1.5 2006-09-07 12:47:39 jorpiell |
|
48 |
* A?adida la expression en el classMap |
|
49 |
* |
|
50 |
* Revision 1.4 2006/09/07 11:19:40 jvhigon |
|
48 | 51 |
* AƱadido soporte para multiples class en una layer, y para layer sdentro de layer |
49 | 52 |
* |
50 | 53 |
* Revision 1.3 2006/09/01 06:59:00 luisw2 |
... | ... | |
53 | 56 |
*/ |
54 | 57 |
import java.awt.Dimension; |
55 | 58 |
import java.awt.Rectangle; |
59 |
import java.awt.geom.Rectangle2D; |
|
56 | 60 |
import java.io.File; |
57 | 61 |
import java.io.FileNotFoundException; |
58 | 62 |
import java.io.FileOutputStream; |
... | ... | |
122 | 126 |
*/ |
123 | 127 |
|
124 | 128 |
public abstract class MapServer { |
129 |
public static final String SHP_TYPE_LINE = "LINE"; |
|
130 |
public static final String SHP_TYPE_POLYLINE = "POLYLINE"; |
|
131 |
public static final String SHP_TYPE_POINT = "POINT"; |
|
132 |
public static final String SHP_TYPE_POLYGON = "POLYGON"; |
|
133 |
|
|
125 | 134 |
public static class RGB { |
126 | 135 |
int r,g,b; |
127 | 136 |
public RGB(int red,int green,int blue){ |
... | ... | |
160 | 169 |
|
161 | 170 |
static PrintStream salida = null; |
162 | 171 |
static String tabstop = ""; |
163 |
public Rectangle extent = null; |
|
172 |
public Rectangle2D extent = null;
|
|
164 | 173 |
public CRS crs = null; |
165 | 174 |
|
166 | 175 |
public void setExtent(double minx, double miny, double maxx, double maxy) { |
167 |
extent = new Rectangle(); |
|
168 |
extent.setFrameFromDiagonal(minx, miny, maxx, maxy); |
|
176 |
this.extent = new Rectangle2D.Double(minx, miny, maxx, maxy); |
|
169 | 177 |
} |
178 |
|
|
179 |
public void setExtent(Rectangle2D extent) { |
|
180 |
this.extent = extent; |
|
181 |
} |
|
182 |
|
|
170 | 183 |
|
171 |
String extentToMapString(Rectangle ext) { |
|
184 |
String extentToMapString(Rectangle2D ext) {
|
|
172 | 185 |
if (ext != null) |
173 | 186 |
return ext.getMinX()+" "+ext.getMinY()+" "+ext.getMaxX()+" "+ext.getMaxY(); |
174 | 187 |
return ""; |
... | ... | |
302 | 315 |
public String name; |
303 | 316 |
public StyleMap estilo = null; |
304 | 317 |
public String template = null; |
318 |
public String expression = null; |
|
305 | 319 |
public MapClass(String n) { |
306 | 320 |
name = n; |
307 | 321 |
} |
308 | 322 |
public void classToMap(){ |
309 | 323 |
toMapln("CLASS"); |
310 | 324 |
tabIn(); |
325 |
toMapln("EXPRESSION " + expression); |
|
311 | 326 |
toMapln("NAME \""+name+"\""); |
312 | 327 |
if (estilo != null) |
313 | 328 |
estilo.styleToMap(); |
Also available in: Unified diff