Revision 21047 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/Geometry.java
Geometry.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
4 | 4 |
* |
... | ... | |
20 | 20 |
* |
21 | 21 |
* Generalitat Valenciana |
22 | 22 |
* Conselleria d'Infraestructures i Transport |
23 |
* Av. Blasco Ib��ez, 50
|
|
23 |
* Av. Blasco Ib??ez, 50
|
|
24 | 24 |
* 46010 VALENCIA |
25 | 25 |
* SPAIN |
26 | 26 |
* |
... | ... | |
55 | 55 |
import org.gvsig.fmap.geom.type.GeometryType; |
56 | 56 |
|
57 | 57 |
/** |
58 |
* Interfaz de Geometr?a. |
|
59 |
* |
|
60 |
* @author $author$ |
|
58 |
* Root interface in the geometry model. |
|
61 | 59 |
*/ |
62 | 60 |
public interface Geometry extends Shape, Serializable { |
63 | 61 |
|
62 |
/** |
|
63 |
* Predefined geometry types in the model |
|
64 |
*/ |
|
64 | 65 |
public interface TYPES { |
65 | 66 |
/** |
66 | 67 |
* Unknown or not defined type. |
... | ... | |
129 | 130 |
public final static int Z=8192; |
130 | 131 |
} |
131 | 132 |
|
132 |
|
|
133 |
// /** Tipo de geometr?a de esta interfaz*/ |
|
134 |
// public final static int GEOM_TYPE = TYPES.NULL; |
|
135 |
|
|
136 | 133 |
public static int BEST = 0; |
137 | 134 |
public static int N = 1; |
138 | 135 |
public static int NE = 2; |
... | ... | |
147 | 144 |
public static int STRETCHINGHANDLER=1; |
148 | 145 |
|
149 | 146 |
/** |
150 |
* Obtiene el tipo de la geometr?a
|
|
147 |
* Returns the FShape type of the geometry.
|
|
151 | 148 |
* |
152 |
* @return una de las constantes de FShape: POINT, LINE, POLIGON
|
|
153 |
* @deprecated |
|
149 |
* @return One FShape constant: {@link FShape}
|
|
150 |
* @deprecated Use {@link getType} instead
|
|
154 | 151 |
*/ |
155 | 152 |
public int getShapeType(); |
156 | 153 |
|
157 | 154 |
/** |
158 |
* Devuelve el valor de la cte del tipo de geometr?a. |
|
155 |
* If this geometry is a predefined interface then this method returns one of {@link Geometry.TYPES} contants.<br> |
|
156 |
* If this geometry is an extended type then this method returns a runtime constant that identifies its type. |
|
157 |
* By convention this value is stored in a constant called GEOM_TYPE within the geometry class, for instance: Point2D.GEOM_TYPE. |
|
159 | 158 |
* |
160 |
* @return |
|
159 |
* @return If this geometry is a predefined interface then one of {@link Geometry.TYPES} or a runtime constant if |
|
160 |
* it is an extended type. |
|
161 | 161 |
*/ |
162 | 162 |
public int getType(); |
163 | 163 |
|
164 | 164 |
/** |
165 |
* Clona la Geometr�a.
|
|
165 |
* Creates a clone of this geometry
|
|
166 | 166 |
* |
167 |
* @return Geometr�a clonada.
|
|
167 |
* @return A clone of this geometry.
|
|
168 | 168 |
*/ |
169 | 169 |
public Geometry cloneGeometry(); |
170 | 170 |
|
171 | 171 |
/** |
172 |
* Devuelve true si la geometr�a intersecta con el rect�ngulo que se pasa |
|
173 |
* como par�metro. |
|
172 |
* Returns true if this geometry intersects the rectangle passed as parameter |
|
174 | 173 |
* |
175 |
* @param r Rect�ngulo.
|
|
174 |
* @param r Rectangle.
|
|
176 | 175 |
* |
177 |
* @return True, si intersecta.
|
|
176 |
* @return True, if <code>this</code> intersects <code>r</code>.
|
|
178 | 177 |
*/ |
179 | 178 |
public boolean intersects(Rectangle2D r); |
180 |
/** |
|
181 |
* Devuelve true si la geometr�a contiene al rect�ngulo que se pasa |
|
182 |
* como par�metro. |
|
183 |
* |
|
184 |
* @param r Rect�ngulo. |
|
185 |
* |
|
186 |
* @return True, si intersecta. |
|
187 |
*/ |
|
188 |
//boolean contains(IGeometry g); |
|
189 | 179 |
|
190 | 180 |
/** |
191 |
* Se usa en las strategies de dibujo para comprobar de manera r�pida |
|
192 |
* si intersecta con el rect�ngulo visible |
|
181 |
* Used by the drawing strategies to quickly test whether this geometry |
|
182 |
* intersects with the visible rectangle. |
|
183 |
* |
|
193 | 184 |
* @param x |
194 |
* @param y |
|
195 |
* @param w |
|
196 |
* @param h |
|
197 |
* @return |
|
185 |
* @param y
|
|
186 |
* @param w Width
|
|
187 |
* @param h Height
|
|
188 |
* @return true if <code>this</code> intersects the rectangle defined by the parameters
|
|
198 | 189 |
*/ |
199 | 190 |
public boolean fastIntersects(double x, double y, double w, double h); |
200 | 191 |
|
201 | 192 |
/** |
202 |
* Devuelve el Rect�ngulo que ocupa la geometr�a.
|
|
193 |
* Returns this geometry's boundary rectangle.
|
|
203 | 194 |
* |
204 |
* @return Rect�ngulo.
|
|
195 |
* @return Boundary rectangle.
|
|
205 | 196 |
*/ |
206 | 197 |
public Rectangle2D getBounds2D(); |
207 | 198 |
|
208 | 199 |
/** |
209 |
* Reproyecta la geometr�a a partir del transformador de coordenadas.
|
|
200 |
* Reprojects this geometry by the coordinate transformer passed as parameter.
|
|
210 | 201 |
* |
211 | 202 |
* @param ct Coordinate Transformer. |
212 | 203 |
*/ |
213 | 204 |
public void reProject(ICoordTrans ct); |
214 | 205 |
|
215 | 206 |
/** |
216 |
* Devuelve el GeneralPathXIterator con la informaci�n relativa a la geometr�a.
|
|
217 |
* @param at TODO
|
|
207 |
* Returns the GeneralPathXIterator with this geometry's information
|
|
208 |
* @param at AffineTransform
|
|
218 | 209 |
* |
219 | 210 |
* @return PathIterator. |
220 | 211 |
*/ |
221 | 212 |
public PathIterator getPathIterator(AffineTransform at); |
222 | 213 |
|
223 | 214 |
/** |
224 |
* It returns the handlers of the geomety, |
|
225 |
* these they can be of two types is straightening and of seleccion.
|
|
215 |
* It returns the handlers of the geometry,
|
|
216 |
* these they can be of two types is straightening and of selection.
|
|
226 | 217 |
* |
227 | 218 |
* @param type Type of handlers |
228 | 219 |
* |
... | ... | |
246 | 237 |
public boolean isSimple(); |
247 | 238 |
|
248 | 239 |
/** |
249 |
* @param index |
|
250 |
* @return |
|
240 |
* Invokes a geometry operation given its index and context |
|
241 |
* @param index unique index of the operation. Operation code. |
|
242 |
* @return object returned by the operation. |
|
251 | 243 |
*/ |
252 | 244 |
public Object invokeOperation(int index, GeometryOperationContext ctx) throws GeometryOperationNotSupportedException, GeometryOperationException; |
253 | 245 |
|
246 |
/** |
|
247 |
* Instance of the GeometryType associated to this geometry |
|
248 |
* @return |
|
249 |
*/ |
|
254 | 250 |
public GeometryType getGeometryType(); |
255 | 251 |
|
256 | 252 |
} |
Also available in: Unified diff