gvsig-sldtools / org.gvsig.sld / org.gvsig.sldsupport / org.gvsig.sldsupport.lib / org.gvsig.sldsupport.lib.api / src / main / java / org / gvsig / sldsupport / sld / filter / operator / spatial / SLDDistanceBufferOperator.java @ 46
History | View | Annotate | Download (3.19 KB)
1 |
/*******************************************************************************
|
---|---|
2 |
*
|
3 |
* gvSIG. Desktop Geographic Information System.
|
4 |
*
|
5 |
* Copyright (C) 2007-2013 gvSIG Association.
|
6 |
*
|
7 |
* This program is free software; you can redistribute it and/or
|
8 |
* modify it under the terms of the GNU General Public License
|
9 |
* as published by the Free Software Foundation; either version 3
|
10 |
* of the License, or (at your option) any later version.
|
11 |
*
|
12 |
* This program is distributed in the hope that it will be useful,
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
* GNU General Public License for more details.
|
16 |
*
|
17 |
* You should have received a copy of the GNU General Public License
|
18 |
* along with this program; if not, write to the Free Software
|
19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20 |
* MA 02110-1301, USA.
|
21 |
*
|
22 |
* For any additional information, do not hesitate to contact us
|
23 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
24 |
*
|
25 |
*******************************************************************************/
|
26 |
package org.gvsig.sldsupport.sld.filter.operator.spatial; |
27 |
|
28 |
import org.gvsig.sldsupport.sld.filter.operator.SLDSpatialOperator; |
29 |
|
30 |
public class SLDDistanceBufferOperator extends SLDSpatialOperator { |
31 |
|
32 |
public static String DISTANCE_BUFFER_OPERATOR_DWITHIN = "DWithin"; |
33 |
public static String DISTANCE_BUFFER_OPERATOR_BEYOND = "Beyond"; |
34 |
|
35 |
public static String DISTANCE_BUFFER_OPERATOR_UNIT_METER = "Meter"; |
36 |
public static String DISTANCE_BUFFER_OPERATOR_UNIT_KILOMETER = "Kilometer"; |
37 |
public static String DISTANCE_BUFFER_OPERATOR_UNIT_INCH = "Inch"; |
38 |
|
39 |
protected String distOpName = null; |
40 |
protected String literalGeometry = null; |
41 |
protected double distance = 0; |
42 |
protected String uom = null; |
43 |
|
44 |
public SLDDistanceBufferOperator(
|
45 |
String dist_op_name,
|
46 |
String literal_geometry,
|
47 |
double dist,
|
48 |
String _unit) {
|
49 |
|
50 |
distOpName = dist_op_name; |
51 |
literalGeometry = literal_geometry; |
52 |
distance = dist; |
53 |
uom = _unit; |
54 |
} |
55 |
|
56 |
/**
|
57 |
* Geometry in GML format used in the operation
|
58 |
* (not the feature's geometry)
|
59 |
* @return
|
60 |
*/
|
61 |
public String getGeometry() { |
62 |
return literalGeometry;
|
63 |
} |
64 |
|
65 |
public double getDistance() { |
66 |
return distance;
|
67 |
} |
68 |
|
69 |
/**
|
70 |
* Can be a URI to use a measure unit from a dictionary
|
71 |
*
|
72 |
* Unit of measure. Recommended strings:
|
73 |
*
|
74 |
* "http://www.opengeospatial.org/sld/units/metre"
|
75 |
* "http://www.opengeospatial.org/sld/units/feet"
|
76 |
* "http://www.opengeospatial.org/sld/units/pixel"
|
77 |
*
|
78 |
* If null is returned, pixel will be used
|
79 |
*
|
80 |
* @return
|
81 |
*/
|
82 |
public String getUnit() { |
83 |
return uom;
|
84 |
} |
85 |
|
86 |
public String getDistOpName() { |
87 |
return distOpName;
|
88 |
} |
89 |
|
90 |
public void setDistOpName(String distOpName) { |
91 |
this.distOpName = distOpName;
|
92 |
} |
93 |
|
94 |
public String getLiteralGeometry() { |
95 |
return literalGeometry;
|
96 |
} |
97 |
|
98 |
public void setLiteralGeometry(String literalGeometry) { |
99 |
this.literalGeometry = literalGeometry;
|
100 |
} |
101 |
|
102 |
public void setDistance(double distance) { |
103 |
this.distance = distance;
|
104 |
} |
105 |
|
106 |
public void setUom(String uom) { |
107 |
this.uom = uom;
|
108 |
} |
109 |
|
110 |
|
111 |
|
112 |
} |