svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / Geometry.java @ 47432
History | View | Annotate | Download (32.9 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40559 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40435 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40559 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40559 | jjdelcerro | *
|
11 | 40435 | jjdelcerro | * This program is distributed in the hope that it will be useful,
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | 40559 | jjdelcerro | *
|
16 | 40435 | jjdelcerro | * You should have received a copy of the GNU General Public License
|
17 | * along with this program; if not, write to the Free Software
|
||
18 | 40559 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40435 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40559 | jjdelcerro | *
|
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 40435 | jjdelcerro | */
|
24 | package org.gvsig.fmap.geom; |
||
25 | |||
26 | import java.awt.Shape; |
||
27 | import java.awt.geom.AffineTransform; |
||
28 | import java.awt.geom.PathIterator; |
||
29 | import java.awt.geom.Rectangle2D; |
||
30 | import java.io.Serializable; |
||
31 | |||
32 | import org.cresques.cts.ICoordTrans; |
||
33 | 43785 | jjdelcerro | import org.cresques.cts.IProjection; |
34 | 40435 | jjdelcerro | |
35 | 42309 | fdiaz | import org.gvsig.fmap.geom.aggregate.MultiLine; |
36 | import org.gvsig.fmap.geom.aggregate.MultiPoint; |
||
37 | import org.gvsig.fmap.geom.aggregate.MultiPolygon; |
||
38 | 40435 | jjdelcerro | import org.gvsig.fmap.geom.handler.Handler; |
39 | import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
||
40 | import org.gvsig.fmap.geom.operation.GeometryOperationException; |
||
41 | import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
||
42 | import org.gvsig.fmap.geom.primitive.Envelope; |
||
43 | import org.gvsig.fmap.geom.primitive.GeneralPathX; |
||
44 | import org.gvsig.fmap.geom.primitive.Point; |
||
45 | import org.gvsig.fmap.geom.type.GeometryType; |
||
46 | |||
47 | /**
|
||
48 | * <p>
|
||
49 | * This interface is equivalent to the GM_Object specified in <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012"
|
||
50 | * >ISO 19107</a>. It is the root class of the geometric object taxonomy and
|
||
51 | * supports interfaces common to all geographically referenced geometric
|
||
52 | * objects.
|
||
53 | * </p>
|
||
54 | * <p>
|
||
55 | * Geometry instances are sets of direct positions in a particular coordinate
|
||
56 | * reference system. A Geometry can be regarded as an infinite set of points
|
||
57 | * that satisfies the set operation interfaces for a set of direct positions.
|
||
58 | * </p>
|
||
59 | * <p>
|
||
60 | * A geometric object shall be a combination of a coordinate geometry and a
|
||
61 | * coordinate reference system. In all of the operations, all geometric
|
||
62 | * calculations shall be done in the coordinate reference system of the first
|
||
63 | * geometric object accessed, which is normally the object whose operation is
|
||
64 | * being invoked. Returned objects shall be in the coordinate reference system
|
||
65 | * in which the calculations are done unless explicitly stated otherwise.
|
||
66 | * </p>
|
||
67 | * <p>
|
||
68 | * This class extends of the {@link Shape} class by historical reasons but this
|
||
69 | * inheritance will disappear in future versions.
|
||
70 | * </p>
|
||
71 | 43907 | jjdelcerro | *
|
72 | 40435 | jjdelcerro | * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012"
|
73 | 44612 | jjdelcerro | * >ISO 19107</a>
|
74 | 40435 | jjdelcerro | */
|
75 | 44040 | jjdelcerro | public interface Geometry extends Shape, Serializable, Comparable, Cloneable { |
76 | 45748 | fdiaz | |
77 | /**
|
||
78 | * Specifies a round join style for buffer.
|
||
79 | */
|
||
80 | public static final int JOIN_STYLE_ROUND = 1; |
||
81 | /**
|
||
82 | * Specifies a mitre join style for buffer.
|
||
83 | */
|
||
84 | public static final int JOIN_STYLE_MITRE = 2; |
||
85 | /**
|
||
86 | * Specifies a bevel join style for buffer.
|
||
87 | */
|
||
88 | public static final int JOIN_STYLE_BEVEL = 3; |
||
89 | 40435 | jjdelcerro | |
90 | 45748 | fdiaz | |
91 | 43907 | jjdelcerro | /**
|
92 | * Predefined geometry types in the model.
|
||
93 | */
|
||
94 | public interface TYPES { |
||
95 | 40435 | jjdelcerro | |
96 | 44082 | jjdelcerro | public final static int UNKNOWN = -1; |
97 | 43907 | jjdelcerro | /**
|
98 | * Any geometry.
|
||
99 | */
|
||
100 | public final static int GEOMETRY = 0; |
||
101 | 40435 | jjdelcerro | |
102 | 43907 | jjdelcerro | /**
|
103 | * A geometric element that has zero dimensions and a location
|
||
104 | * determinable by an ordered set of coordinates.
|
||
105 | */
|
||
106 | public final static int POINT = 1; |
||
107 | 40435 | jjdelcerro | |
108 | 43907 | jjdelcerro | /**
|
109 | * A straight or curved geometric element that is generated by a moving
|
||
110 | * point and that has extension only along the path of the point.
|
||
111 | */
|
||
112 | public final static int CURVE = 2; |
||
113 | 40435 | jjdelcerro | |
114 | 43907 | jjdelcerro | /**
|
115 | * A closed plane figure bounded by straight lines.
|
||
116 | */
|
||
117 | public final static int SURFACE = 3; |
||
118 | 40435 | jjdelcerro | |
119 | 43907 | jjdelcerro | /**
|
120 | * Solids in 3D.
|
||
121 | */
|
||
122 | public final static int SOLID = 4; |
||
123 | 40435 | jjdelcerro | |
124 | 43907 | jjdelcerro | /**
|
125 | * A set that can contain points, lines and polygons. This is usual in
|
||
126 | * <i>CAD</i> layers <i>(dxf, dgn, dwg)</i>.
|
||
127 | */
|
||
128 | public final static int AGGREGATE = 6; |
||
129 | /**
|
||
130 | * A set of points.
|
||
131 | */
|
||
132 | public final static int MULTIPOINT = 7; |
||
133 | 40435 | jjdelcerro | |
134 | 43907 | jjdelcerro | /**
|
135 | * A set of lines.
|
||
136 | */
|
||
137 | public final static int MULTICURVE = 8; |
||
138 | 40435 | jjdelcerro | |
139 | 43907 | jjdelcerro | /**
|
140 | * A set of polygons.
|
||
141 | */
|
||
142 | public final static int MULTISURFACE = 9; |
||
143 | 40435 | jjdelcerro | |
144 | 43907 | jjdelcerro | /**
|
145 | * A set of solids.
|
||
146 | */
|
||
147 | public final static int MULTISOLID = 10; |
||
148 | 40435 | jjdelcerro | |
149 | 43907 | jjdelcerro | /**
|
150 | * A closed plane curve every point of which is equidistant from a fixed
|
||
151 | * point within the curve.
|
||
152 | */
|
||
153 | public final static int CIRCLE = 11; |
||
154 | 40435 | jjdelcerro | |
155 | 43907 | jjdelcerro | /**
|
156 | * A continuous portion (as of a circle or ellipse) of a curved line.
|
||
157 | */
|
||
158 | public final static int ARC = 12; |
||
159 | 40435 | jjdelcerro | |
160 | 43907 | jjdelcerro | /**
|
161 | * A closed plane curve generated by a point moving in such a way that
|
||
162 | * the sums of its distances from two fixed points is a constant : a
|
||
163 | * plane section of a right circular cone that is a closed curve.
|
||
164 | */
|
||
165 | public final static int ELLIPSE = 13; |
||
166 | 40435 | jjdelcerro | |
167 | 43907 | jjdelcerro | public final static int SPLINE = 14; |
168 | 40435 | jjdelcerro | |
169 | 43907 | jjdelcerro | public final static int ELLIPTICARC = 15; |
170 | 40435 | jjdelcerro | |
171 | 43907 | jjdelcerro | /**
|
172 | * NO DATA geometry.
|
||
173 | */
|
||
174 | 45634 | fdiaz | @Deprecated
|
175 | 43907 | jjdelcerro | public final static int NULL = 16; |
176 | 40435 | jjdelcerro | |
177 | 42309 | fdiaz | public final static int COMPLEX = 17; |
178 | |||
179 | 43907 | jjdelcerro | public final static int LINE = 18; |
180 | 42309 | fdiaz | |
181 | 43907 | jjdelcerro | public final static int POLYGON = 19; |
182 | 40435 | jjdelcerro | |
183 | 43907 | jjdelcerro | public final static int RING = 20; |
184 | 42309 | fdiaz | |
185 | public final static int MULTILINE = 21; |
||
186 | |||
187 | public final static int MULTIPOLYGON = 22; |
||
188 | |||
189 | public final static int CIRCUMFERENCE = 23; |
||
190 | |||
191 | public final static int PERIELLIPSE = 24; |
||
192 | |||
193 | public final static int FILLEDSPLINE = 25; |
||
194 | |||
195 | 43907 | jjdelcerro | } |
196 | 42309 | fdiaz | |
197 | 43907 | jjdelcerro | public interface DIMENSIONS { |
198 | 40435 | jjdelcerro | |
199 | 43907 | jjdelcerro | public final static int X = 0; |
200 | public final static int Y = 1; |
||
201 | public final static int Z = 2; |
||
202 | } |
||
203 | 40435 | jjdelcerro | |
204 | 43907 | jjdelcerro | /**
|
205 | * The subtype of a geometry is related with the dimension of the geometry,
|
||
206 | * that is a combination between the spatial dimension (2D, 2ZD, 3D) and the
|
||
207 | * M coordinate or "measure".
|
||
208 | *
|
||
209 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
||
210 | */
|
||
211 | public interface SUBTYPES { |
||
212 | 40435 | jjdelcerro | |
213 | 43907 | jjdelcerro | /**
|
214 | * Geometries with two dimensions.
|
||
215 | */
|
||
216 | public final static int GEOM2D = 0; |
||
217 | 40435 | jjdelcerro | |
218 | 43907 | jjdelcerro | /**
|
219 | * Geometries with three dimensions.
|
||
220 | */
|
||
221 | public final static int GEOM3D = 1; |
||
222 | 40435 | jjdelcerro | |
223 | 43907 | jjdelcerro | /**
|
224 | * Geometries with two dimensions and with the M coordinate.
|
||
225 | */
|
||
226 | public final static int GEOM2DM = 2; |
||
227 | 40435 | jjdelcerro | |
228 | 43907 | jjdelcerro | /**
|
229 | * Geometries with three dimensions and with the M coordinate.
|
||
230 | */
|
||
231 | public final static int GEOM3DM = 3; |
||
232 | 40435 | jjdelcerro | |
233 | 43907 | jjdelcerro | /**
|
234 | * The subtype us unknown.
|
||
235 | */
|
||
236 | public final static int UNKNOWN = 4; |
||
237 | } |
||
238 | 40435 | jjdelcerro | |
239 | 43907 | jjdelcerro | /**
|
240 | * Initial value for new geometry types (it must not overlap with the basic
|
||
241 | * ones defined in TYPES).
|
||
242 | */
|
||
243 | public static final int EXTENDED_GEOMTYPE_OFFSET = 17; |
||
244 | 40435 | jjdelcerro | |
245 | 43907 | jjdelcerro | /**
|
246 | * Initial value for new geometry subtypes (it must not overlap with the
|
||
247 | * basic ones defined in SUBTYPES).
|
||
248 | */
|
||
249 | public static final int EXTENDED_GEOMSUBTYPE_OFFSET = 6; |
||
250 | 40435 | jjdelcerro | |
251 | 43907 | jjdelcerro | public interface OPERATIONS { |
252 | 41439 | jjdelcerro | |
253 | 43907 | jjdelcerro | public final static String CONVERTTOWKT = "toWKT"; |
254 | public final static String CONVERTTOWKB = "toWKB"; |
||
255 | public final static String BUFFER = "buffer"; |
||
256 | public final static String DISTANCE = "Distance"; |
||
257 | public final static String CONTAINS = "Contains"; |
||
258 | public final static String OVERLAPS = "OVERLAPS"; |
||
259 | public final static String CONVEXHULL = "ConvexHull"; |
||
260 | public final static String COVERS = "Covers"; |
||
261 | public final static String CROSSES = "Crosses"; |
||
262 | public final static String DIFFERENCE = "Difference"; |
||
263 | public final static String DISJOIN = "Disjoin"; |
||
264 | public final static String INTERSECTION = "Intersaction"; |
||
265 | public final static String INTERSECTS = "Intersects"; |
||
266 | public final static String TOUCHES = "Touches"; |
||
267 | public final static String UNION = "Union"; |
||
268 | public final static String WITHIN = "Within"; |
||
269 | public final static String COVEREDBY = "CoveredBy"; |
||
270 | 45910 | fdiaz | public final static String BOUNDARY = "Boundary"; |
271 | 43907 | jjdelcerro | } |
272 | 41439 | jjdelcerro | |
273 | 43907 | jjdelcerro | public interface ValidationStatus { |
274 | 42309 | fdiaz | |
275 | 43907 | jjdelcerro | public static final int VALID = 0; |
276 | public static final int CURRUPTED = 1; |
||
277 | public static final int UNKNOW = 2; |
||
278 | public static final int DISCONNECTED_INTERIOR = 10; |
||
279 | public static final int DUPLICATE_RINGS = 11; |
||
280 | public static final int HOLE_OUTSIDE_SHELL = 12; |
||
281 | public static final int INVALID_COORDINATE = 13; |
||
282 | public static final int NESTED_HOLES = 14; |
||
283 | public static final int NESTED_SHELLS = 15; |
||
284 | public static final int RING_NOT_CLOSED = 17; |
||
285 | public static final int RING_SELF_INTERSECTION = 18; |
||
286 | public static final int SELF_INTERSECTION = 19; |
||
287 | public static final int TOO_FEW_POINTS = 20; |
||
288 | 41439 | jjdelcerro | |
289 | 43907 | jjdelcerro | /**
|
290 | * True if the geoemtry are valid.
|
||
291 | *
|
||
292 | * @return true form valid geometries
|
||
293 | */
|
||
294 | public boolean isValid(); |
||
295 | 41439 | jjdelcerro | |
296 | 43907 | jjdelcerro | /**
|
297 | * Return the status code results of validate the geometry.
|
||
298 | *
|
||
299 | * @return validation code
|
||
300 | */
|
||
301 | public int getStatusCode(); |
||
302 | 42309 | fdiaz | |
303 | 43907 | jjdelcerro | /**
|
304 | * Return the nearest point to the problem when validate the geometry.
|
||
305 | *
|
||
306 | * If the geometry is valid, this return null.
|
||
307 | *
|
||
308 | * @return the nearest point to the problem or null.
|
||
309 | */
|
||
310 | public Point getProblemLocation(); |
||
311 | 40435 | jjdelcerro | |
312 | 43907 | jjdelcerro | /**
|
313 | * Return a human readable message explaining the cause of the problem.
|
||
314 | *
|
||
315 | * If the geometry is valid this is null.
|
||
316 | *
|
||
317 | * @return the message cause of the problem.
|
||
318 | */
|
||
319 | public String getMessage(); |
||
320 | } |
||
321 | 40435 | jjdelcerro | |
322 | 43907 | jjdelcerro | public static int BEST = 0; |
323 | /**
|
||
324 | * North.
|
||
325 | */
|
||
326 | public static int N = 1; |
||
327 | 40435 | jjdelcerro | |
328 | 43907 | jjdelcerro | /**
|
329 | * North - East.
|
||
330 | */
|
||
331 | public static int NE = 2; |
||
332 | 40435 | jjdelcerro | |
333 | 43907 | jjdelcerro | /**
|
334 | * East.
|
||
335 | */
|
||
336 | public static int E = 3; |
||
337 | 40435 | jjdelcerro | |
338 | 43907 | jjdelcerro | /**
|
339 | * South - East.
|
||
340 | */
|
||
341 | public static int SE = 4; |
||
342 | 40435 | jjdelcerro | |
343 | 43907 | jjdelcerro | /**
|
344 | * South.
|
||
345 | */
|
||
346 | public static int S = 5; |
||
347 | 40435 | jjdelcerro | |
348 | 43907 | jjdelcerro | /**
|
349 | * South - West.
|
||
350 | */
|
||
351 | public static int SW = 6; |
||
352 | 40435 | jjdelcerro | |
353 | 43907 | jjdelcerro | /**
|
354 | * West.
|
||
355 | */
|
||
356 | public static int W = 7; |
||
357 | 40435 | jjdelcerro | |
358 | 43907 | jjdelcerro | /**
|
359 | * North - West.
|
||
360 | */
|
||
361 | public static int NW = 8; |
||
362 | 40435 | jjdelcerro | |
363 | 43907 | jjdelcerro | public static int SELECTHANDLER = 0; |
364 | public static int STRETCHINGHANDLER = 1; |
||
365 | 40435 | jjdelcerro | |
366 | 43907 | jjdelcerro | /**
|
367 | * If this geometry is a predefined interface then this method returns one
|
||
368 | * of {@link Geometry.TYPES} contants.<br>
|
||
369 | * If this geometry is an extended type then this method returns a runtime
|
||
370 | * constant that identifies its type. By convention this value is stored in
|
||
371 | * a constant called .CODE within the geometry class, for instance:
|
||
372 | * Point2D.CODE.
|
||
373 | *
|
||
374 | * @return If this geometry is a predefined interface then one of
|
||
375 | * {@link Geometry.TYPES} or a runtime constant if it is an extended type.
|
||
376 | */
|
||
377 | public int getType(); |
||
378 | 40435 | jjdelcerro | |
379 | 43907 | jjdelcerro | /**
|
380 | * Creates a clone of this geometry.
|
||
381 | *
|
||
382 | * @return A clone of this geometry.
|
||
383 | */
|
||
384 | public Geometry cloneGeometry();
|
||
385 | 44040 | jjdelcerro | |
386 | public Geometry clone() throws CloneNotSupportedException; |
||
387 | 40435 | jjdelcerro | |
388 | 43907 | jjdelcerro | /**
|
389 | * Returns true if this geometry intersects the rectangle passed as
|
||
390 | * parameter.
|
||
391 | *
|
||
392 | * @param r Rectangle.
|
||
393 | *
|
||
394 | * @return True, if <code>this</code> intersects <code>r</code>.
|
||
395 | */
|
||
396 | 44612 | jjdelcerro | @Override
|
397 | 43907 | jjdelcerro | public boolean intersects(Rectangle2D r); |
398 | 40435 | jjdelcerro | |
399 | 43907 | jjdelcerro | /**
|
400 | * Used by the drawing strategies to quickly test whether this geometry
|
||
401 | * intersects with the visible rectangle.
|
||
402 | *
|
||
403 | * @param x The minimum X coordinate.
|
||
404 | * @param y The minimum Y coordinate.
|
||
405 | * @param w The width of the envelope.
|
||
406 | * @param h The height of the envelope.
|
||
407 | * @return true if <code>this</code> intersects the rectangle defined by the
|
||
408 | * parameters.
|
||
409 | */
|
||
410 | public boolean fastIntersects(double x, double y, double w, double h); |
||
411 | 40435 | jjdelcerro | |
412 | 43907 | jjdelcerro | /**
|
413 | * <p>
|
||
414 | * Returns the minimum bounding box for this Geometry. This shall be the
|
||
415 | * coordinate region spanning the minimum and maximum value for each
|
||
416 | * ordinate taken on by DirectPositions in this Geometry. The simplest
|
||
417 | * representation for an envelope consists of two DirectPositions, the first
|
||
418 | * one containing all the minimums for each ordinate, and second one
|
||
419 | * containing all the maximums.
|
||
420 | * </p>
|
||
421 | *
|
||
422 | * @return The minimum bounding box for this Geometry.
|
||
423 | */
|
||
424 | public Envelope getEnvelope();
|
||
425 | 40435 | jjdelcerro | |
426 | 43907 | jjdelcerro | /**
|
427 | * Reprojects this geometry by the coordinate transformer passed as
|
||
428 | * parameter.
|
||
429 | *
|
||
430 | * @param ct Coordinate Transformer.
|
||
431 | */
|
||
432 | public void reProject(ICoordTrans ct); |
||
433 | 40435 | jjdelcerro | |
434 | 43907 | jjdelcerro | /**
|
435 | * It applies an affine transformation to the geometry. If parameter value
|
||
436 | * is null, it will be considered an empty transformation, therefore
|
||
437 | * equivalent to the identity transformation.
|
||
438 | *
|
||
439 | * @param at The transformation to apply.
|
||
440 | */
|
||
441 | public void transform(AffineTransform at); |
||
442 | 41592 | jjdelcerro | |
443 | 43907 | jjdelcerro | /**
|
444 | * Returns the largest number n such that each direct position in a
|
||
445 | * geometric set can be associated with a subset that has the direct
|
||
446 | * position in its interior and is similar (isomorphic) to Rn, Euclidean
|
||
447 | * n-space.
|
||
448 | *
|
||
449 | * @return The dimension.
|
||
450 | */
|
||
451 | public int getDimension(); |
||
452 | 40435 | jjdelcerro | |
453 | 43907 | jjdelcerro | /**
|
454 | * Returns <code>true</code> if this Geometry has no interior point of
|
||
455 | * self-intersection or self-tangency. In mathematical formalisms, this
|
||
456 | * means that every point in the interior of the object must have a metric
|
||
457 | * neighborhood whose intersection with the object is isomorphic to an
|
||
458 | * n-sphere, where n is the dimension of this Geometry.
|
||
459 | *
|
||
460 | * @return If the geometry is simple.
|
||
461 | */
|
||
462 | public boolean isSimple(); |
||
463 | 40435 | jjdelcerro | |
464 | 43907 | jjdelcerro | public boolean isCCW() |
465 | throws GeometryOperationNotSupportedException,
|
||
466 | GeometryOperationException; |
||
467 | 40435 | jjdelcerro | |
468 | 43907 | jjdelcerro | /**
|
469 | * Invokes a geometry operation given its index and context.
|
||
470 | *
|
||
471 | * @param index Unique index of the operation. Operation code.
|
||
472 | * @param ctx The context of the geometry operation.
|
||
473 | * @return Object returned by the operation.
|
||
474 | * @throws GeometryOperationNotSupportedException It is thrown when the
|
||
475 | * operation has been not registered for this geometry.
|
||
476 | * @throws GeometryOperationException It is thrown when there is an error
|
||
477 | * executing the operation.
|
||
478 | */
|
||
479 | public Object invokeOperation(int index, GeometryOperationContext ctx) |
||
480 | throws GeometryOperationNotSupportedException,
|
||
481 | GeometryOperationException; |
||
482 | 40435 | jjdelcerro | |
483 | 43907 | jjdelcerro | /**
|
484 | * Invokes a geometry operation given its name and context.
|
||
485 | *
|
||
486 | * @param opName Operation name.
|
||
487 | * @param ctx The context of the geometry operation.
|
||
488 | * @return Object returned by the operation.
|
||
489 | * @throws GeometryOperationNotSupportedException It is thrown when the
|
||
490 | * operation has been not registered for this geometry.
|
||
491 | * @throws GeometryOperationException It is thrown when there is an error
|
||
492 | * executing the operation.
|
||
493 | */
|
||
494 | public Object invokeOperation(String opName, GeometryOperationContext ctx) |
||
495 | throws GeometryOperationNotSupportedException,
|
||
496 | GeometryOperationException; |
||
497 | 42309 | fdiaz | |
498 | 43907 | jjdelcerro | /**
|
499 | * Instance of the GeometryType associated to this geometry.
|
||
500 | *
|
||
501 | * @return The geometry type.
|
||
502 | */
|
||
503 | public GeometryType getGeometryType();
|
||
504 | 43002 | fdiaz | |
505 | 43909 | jjdelcerro | public Object convertTo(String format) throws GeometryOperationNotSupportedException, |
506 | GeometryOperationException; |
||
507 | |||
508 | 43907 | jjdelcerro | /**
|
509 | * Return a byte array with the equivalent in WKB format of the Geometry.
|
||
510 | *
|
||
511 | * Utility method to wrap the invocation to the operation
|
||
512 | * {@link OPERATIONS#CONVERTTOWKB}.
|
||
513 | *
|
||
514 | * @return the WKB version of the geometry
|
||
515 | 44612 | jjdelcerro | * @throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
|
516 | * @throws org.gvsig.fmap.geom.operation.GeometryOperationException
|
||
517 | 43907 | jjdelcerro | */
|
518 | public byte[] convertToWKB() throws GeometryOperationNotSupportedException, |
||
519 | GeometryOperationException; |
||
520 | 40435 | jjdelcerro | |
521 | 45734 | omartinez | public String convertToHexEWKB() throws GeometryOperationNotSupportedException, |
522 | GeometryOperationException; |
||
523 | |||
524 | 45425 | jjdelcerro | public String convertToHexWKB() throws GeometryOperationNotSupportedException, |
525 | GeometryOperationException; |
||
526 | |||
527 | public byte[] convertToWKBQuietly(); |
||
528 | |||
529 | public String convertToHexWKBQuietly(); |
||
530 | |||
531 | 43907 | jjdelcerro | public byte[] convertToWKB(int srs) |
532 | throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
533 | 42771 | jbadia | |
534 | 43907 | jjdelcerro | public byte[] convertToWKBForcingType(int srs, int type) |
535 | throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
536 | 42771 | jbadia | |
537 | 43907 | jjdelcerro | /**
|
538 | * Return a byte array with the equivalent in EWKB format of the Geometry.
|
||
539 | *
|
||
540 | * Utility method to wrap the invocation to the operation
|
||
541 | * {@link OPERATIONS#CONVERTTOEWKB}.
|
||
542 | *
|
||
543 | * @return the EWKB version of the geometry
|
||
544 | 44612 | jjdelcerro | * @throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
|
545 | * @throws org.gvsig.fmap.geom.operation.GeometryOperationException
|
||
546 | 43907 | jjdelcerro | */
|
547 | public byte[] convertToEWKB() throws GeometryOperationNotSupportedException, GeometryOperationException; |
||
548 | 42771 | jbadia | |
549 | 43907 | jjdelcerro | public byte[] convertToEWKB(int srs) |
550 | throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
551 | 40435 | jjdelcerro | |
552 | 43907 | jjdelcerro | public byte[] convertToEWKBForcingType(int srs, int type) |
553 | throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
554 | 40435 | jjdelcerro | |
555 | 43907 | jjdelcerro | /**
|
556 | * Return a string with the equivalent in WKT format of the Geometry.
|
||
557 | *
|
||
558 | * This is a utility method to wrap the invocation to the operation
|
||
559 | * {@link OPERATIONS#CONVERTTOWKT}.
|
||
560 | *
|
||
561 | * @return the WKT version of the geometry.
|
||
562 | *
|
||
563 | * @throws GeometryOperationNotSupportedException
|
||
564 | * @throws GeometryOperationException
|
||
565 | */
|
||
566 | public String convertToWKT() throws GeometryOperationNotSupportedException, |
||
567 | GeometryOperationException; |
||
568 | 42441 | fdiaz | |
569 | 45425 | jjdelcerro | public String convertToWKTQuietly(); |
570 | |||
571 | 43907 | jjdelcerro | /**
|
572 | * Computes a buffer area around this geometry having the given width
|
||
573 | *
|
||
574 | * This is a utility method to wrap the invocation to the operation
|
||
575 | * {@link OPERATIONS#BUFFER}.
|
||
576 | *
|
||
577 | * @param distance the width of the buffer
|
||
578 | *
|
||
579 | * @return a new Geometry with the computed buffer.
|
||
580 | *
|
||
581 | * @throws GeometryOperationNotSupportedException
|
||
582 | * @throws GeometryOperationException
|
||
583 | */
|
||
584 | public Geometry buffer(double distance) |
||
585 | throws GeometryOperationNotSupportedException,
|
||
586 | GeometryOperationException; |
||
587 | 40435 | jjdelcerro | |
588 | 45748 | fdiaz | |
589 | |||
590 | /**
|
||
591 | * Computes a buffer area around this geometry having the given width, the joinStyle and the capButt
|
||
592 | *
|
||
593 | * This is a utility method to wrap the invocation to the operation
|
||
594 | * {@link OPERATIONS#BUFFER}.
|
||
595 | *
|
||
596 | * @param distance the width of the buffer
|
||
597 | * @param joinStyle the join style can be JOIN_STYLE_ROUND, JOIN_STYLE_MITRE, JOIN_STYLE_BEVEL,
|
||
598 | * @param capButt true if not add a cap
|
||
599 | *
|
||
600 | * @return a new Geometry with the computed buffer.
|
||
601 | *
|
||
602 | * @throws GeometryOperationNotSupportedException
|
||
603 | * @throws GeometryOperationException
|
||
604 | */
|
||
605 | public Geometry buffer(double distance, int joinStyle, boolean capButt) |
||
606 | throws GeometryOperationNotSupportedException,
|
||
607 | GeometryOperationException; |
||
608 | |||
609 | |||
610 | 45762 | fdiaz | /**
|
611 | *
|
||
612 | * @param distance
|
||
613 | * @return
|
||
614 | * @throws GeometryOperationNotSupportedException
|
||
615 | * @throws GeometryOperationException
|
||
616 | */
|
||
617 | 43907 | jjdelcerro | public Geometry offset(double distance) |
618 | throws GeometryOperationNotSupportedException,
|
||
619 | GeometryOperationException; |
||
620 | 40435 | jjdelcerro | |
621 | 43907 | jjdelcerro | /**
|
622 | 45762 | fdiaz | *
|
623 | * @param joinStyle
|
||
624 | * @param distance
|
||
625 | * @return
|
||
626 | * @throws GeometryOperationNotSupportedException
|
||
627 | * @throws GeometryOperationException
|
||
628 | */
|
||
629 | public Geometry offset(int joinStyle, double distance) |
||
630 | throws GeometryOperationNotSupportedException,
|
||
631 | GeometryOperationException; |
||
632 | |||
633 | /**
|
||
634 | 43907 | jjdelcerro | * Tests whether this geometry contains the specified geometry.
|
635 | *
|
||
636 | * This is a utility method to wrap the invocation to the operation
|
||
637 | * {@link OPERATIONS#CONTAINS}.
|
||
638 | *
|
||
639 | * @param geometry the Geometry with which to compare this Geometry
|
||
640 | *
|
||
641 | * @return if this Geometry contains the specified geometry
|
||
642 | *
|
||
643 | * @throws GeometryOperationNotSupportedException
|
||
644 | * @throws GeometryOperationException
|
||
645 | */
|
||
646 | public boolean contains(Geometry geometry) |
||
647 | throws GeometryOperationNotSupportedException,
|
||
648 | GeometryOperationException; |
||
649 | 42309 | fdiaz | |
650 | 43907 | jjdelcerro | /**
|
651 | * Returns the minimum distance between this Geometry and the specified
|
||
652 | * geometry.
|
||
653 | *
|
||
654 | * This is a utility method to wrap the invocation to the operation
|
||
655 | * {@link OPERATIONS#DISTANCE}.
|
||
656 | *
|
||
657 | 44612 | jjdelcerro | * @param other
|
658 | 43907 | jjdelcerro | * @return the distance between the geometries
|
659 | *
|
||
660 | * @throws GeometryOperationNotSupportedException
|
||
661 | * @throws GeometryOperationException
|
||
662 | */
|
||
663 | public double distance(Geometry other) |
||
664 | throws GeometryOperationNotSupportedException,
|
||
665 | GeometryOperationException; |
||
666 | 40435 | jjdelcerro | |
667 | 43907 | jjdelcerro | public Geometry[] closestPoints(Geometry other) |
668 | throws GeometryOperationNotSupportedException,
|
||
669 | GeometryOperationException; |
||
670 | 40435 | jjdelcerro | |
671 | 43907 | jjdelcerro | boolean isWithinDistance(Geometry other, double distance) |
672 | throws GeometryOperationNotSupportedException,
|
||
673 | GeometryOperationException; |
||
674 | 40435 | jjdelcerro | |
675 | 43907 | jjdelcerro | /**
|
676 | * Tests whether this geometry overlaps the specified geometry.
|
||
677 | *
|
||
678 | * This is a utility method to wrap the invocation to the operation
|
||
679 | * {@link OPERATIONS#OVERLAPS}.
|
||
680 | *
|
||
681 | * @param geometry the Geometry with which to compare this Geometry
|
||
682 | *
|
||
683 | * @return true if the two geometries overlap.
|
||
684 | *
|
||
685 | * @throws GeometryOperationNotSupportedException
|
||
686 | * @throws GeometryOperationException
|
||
687 | */
|
||
688 | public boolean overlaps(Geometry geometry) |
||
689 | throws GeometryOperationNotSupportedException,
|
||
690 | GeometryOperationException; |
||
691 | 42309 | fdiaz | |
692 | 43907 | jjdelcerro | public Geometry convexHull() throws GeometryOperationNotSupportedException, |
693 | GeometryOperationException; |
||
694 | 42309 | fdiaz | |
695 | 43907 | jjdelcerro | public boolean coveredBy(Geometry geometry) |
696 | throws GeometryOperationNotSupportedException,
|
||
697 | GeometryOperationException; |
||
698 | 40435 | jjdelcerro | |
699 | 43907 | jjdelcerro | public boolean covers(Geometry geometry) |
700 | throws GeometryOperationNotSupportedException,
|
||
701 | GeometryOperationException; |
||
702 | 40435 | jjdelcerro | |
703 | 43907 | jjdelcerro | public boolean crosses(Geometry geometry) |
704 | throws GeometryOperationNotSupportedException,
|
||
705 | GeometryOperationException; |
||
706 | 40435 | jjdelcerro | |
707 | 43907 | jjdelcerro | public Geometry difference(Geometry other)
|
708 | throws GeometryOperationNotSupportedException,
|
||
709 | GeometryOperationException; |
||
710 | 40435 | jjdelcerro | |
711 | 43907 | jjdelcerro | public boolean disjoint(Geometry geometry) |
712 | throws GeometryOperationNotSupportedException,
|
||
713 | GeometryOperationException; |
||
714 | 40435 | jjdelcerro | |
715 | 43907 | jjdelcerro | public Geometry intersection(Geometry other)
|
716 | throws GeometryOperationNotSupportedException,
|
||
717 | GeometryOperationException; |
||
718 | 42309 | fdiaz | |
719 | 43907 | jjdelcerro | public boolean intersects(Geometry geometry) |
720 | throws GeometryOperationNotSupportedException,
|
||
721 | GeometryOperationException; |
||
722 | 40435 | jjdelcerro | |
723 | 43907 | jjdelcerro | public Geometry snapTo(Geometry other, double snapTolerance) |
724 | throws GeometryOperationNotSupportedException,
|
||
725 | GeometryOperationException; |
||
726 | 40435 | jjdelcerro | |
727 | 43907 | jjdelcerro | public boolean touches(Geometry geometry) |
728 | throws GeometryOperationNotSupportedException,
|
||
729 | GeometryOperationException; |
||
730 | 40435 | jjdelcerro | |
731 | 43907 | jjdelcerro | public Geometry union(Geometry other)
|
732 | throws GeometryOperationNotSupportedException,
|
||
733 | GeometryOperationException; |
||
734 | 42309 | fdiaz | |
735 | 43907 | jjdelcerro | public boolean within(Geometry geometry) |
736 | throws GeometryOperationNotSupportedException,
|
||
737 | GeometryOperationException; |
||
738 | 40435 | jjdelcerro | |
739 | 43907 | jjdelcerro | public Point centroid() throws GeometryOperationNotSupportedException, GeometryOperationException; |
740 | 42309 | fdiaz | |
741 | 43907 | jjdelcerro | /**
|
742 | * This method returns a point which is inside the geometry. This is useful
|
||
743 | * for mathematical purposes but it is very unlikely to be a suitable place
|
||
744 | * for a label, for example.
|
||
745 | *
|
||
746 | *
|
||
747 | * @return an interior point
|
||
748 | * @throws GeometryOperationNotSupportedException
|
||
749 | * @throws GeometryOperationException
|
||
750 | */
|
||
751 | public Point getInteriorPoint() throws GeometryOperationNotSupportedException, GeometryOperationException; |
||
752 | 40435 | jjdelcerro | |
753 | 43907 | jjdelcerro | public double area() throws GeometryOperationNotSupportedException, GeometryOperationException; |
754 | 42309 | fdiaz | |
755 | 43907 | jjdelcerro | public double perimeter() throws GeometryOperationNotSupportedException, GeometryOperationException; |
756 | 42309 | fdiaz | |
757 | 43907 | jjdelcerro | /**
|
758 | * Rotates the geometry by radAngle radians using the given coordinates as
|
||
759 | * center of rotation. Rotating with a positive angle rotates points on the
|
||
760 | * positive x axis toward the positive y axis. In most cases, we assume x
|
||
761 | * increases rightwards and y increases upwards, so in most cases, a
|
||
762 | * positive angle will mean counter-clockwise rotation.
|
||
763 | *
|
||
764 | * @param radAngle the amount of rotation, in radians
|
||
765 | * @param basex x coordinate of center of rotation
|
||
766 | * @param basey y coordinate of center of rotation
|
||
767 | */
|
||
768 | public void rotate(double radAngle, double basex, double basey); |
||
769 | 42309 | fdiaz | |
770 | 43907 | jjdelcerro | /**
|
771 | * Shifts geometry by given amount in x and y axes
|
||
772 | *
|
||
773 | * @param dx
|
||
774 | * @param dy
|
||
775 | */
|
||
776 | public void move(double dx, double dy); |
||
777 | 42309 | fdiaz | |
778 | 43907 | jjdelcerro | /**
|
779 | * Scales geometry in x and y axes by given scale factors using the given
|
||
780 | * point as center of projection.
|
||
781 | *
|
||
782 | * @param basePoint
|
||
783 | * @param sx scale factor in x axis
|
||
784 | * @param sy scale factor in y axis
|
||
785 | */
|
||
786 | public void scale(Point basePoint, double sx, double sy); |
||
787 | 42309 | fdiaz | |
788 | 43907 | jjdelcerro | /**
|
789 | * Check if the geometry is valid.
|
||
790 | *
|
||
791 | * @return true if the geometry is valid.
|
||
792 | */
|
||
793 | public boolean isValid(); |
||
794 | 42309 | fdiaz | |
795 | 43907 | jjdelcerro | /**
|
796 | * Check if the geometry is valid and returns the validation status.
|
||
797 | *
|
||
798 | * @return the ValidationStatus
|
||
799 | */
|
||
800 | public ValidationStatus getValidationStatus();
|
||
801 | 42309 | fdiaz | |
802 | 43907 | jjdelcerro | /**
|
803 | * Try to fix the geometry and return the new geometry. If the geometry is
|
||
804 | * valid return the same geometry. If the geometry is corrupt or can't fix
|
||
805 | * it, return null.
|
||
806 | *
|
||
807 | * @return the new fixed geometry
|
||
808 | */
|
||
809 | public Geometry makeValid();
|
||
810 | 42309 | fdiaz | |
811 | 43907 | jjdelcerro | //
|
812 | // ===============================================
|
||
813 | //
|
||
814 | /**
|
||
815 | 44612 | jjdelcerro | * @param affineTransform
|
816 | 43907 | jjdelcerro | * @return the awt shape used to display the geometry. It applies a
|
817 | * tranformation before to return the coordinates of the shape
|
||
818 | * @deprecated this class inherits of {@link Shape} by historical reasons.
|
||
819 | * This method has been added just to control the usage of the {@link Shape}
|
||
820 | * class but it will removed in a future.
|
||
821 | */
|
||
822 | public Shape getShape(AffineTransform affineTransform); |
||
823 | 41489 | jjdelcerro | |
824 | 43907 | jjdelcerro | /**
|
825 | * @return the awt shape used to display the geometry.
|
||
826 | * @deprecated this class inherits of {@link Shape} by historical reasons.
|
||
827 | * This method has been added just to control the usage of the {@link Shape}
|
||
828 | * class but it will removed in a future.
|
||
829 | */
|
||
830 | public Shape getShape(); |
||
831 | 42309 | fdiaz | |
832 | 43907 | jjdelcerro | /**
|
833 | * Returns this geometry's boundary rectangle.
|
||
834 | *
|
||
835 | * @deprecated use getEnvelope.
|
||
836 | * @return Boundary rectangle.
|
||
837 | */
|
||
838 | 44612 | jjdelcerro | @Override
|
839 | 43907 | jjdelcerro | public Rectangle2D getBounds2D(); |
840 | 42309 | fdiaz | |
841 | 43907 | jjdelcerro | /**
|
842 | * If applies an affine transformation and returns the GeneralPathXIterator
|
||
843 | * with this geometry's information.
|
||
844 | *
|
||
845 | * @param at The transformation to apply.
|
||
846 | * @return The GeneralPathXIterator with this geometry's information.
|
||
847 | * @deprecated don't use PathIterator over geometries, use instead specific
|
||
848 | * API for each operation. If not has API for that operation let the project
|
||
849 | * team.
|
||
850 | *
|
||
851 | */
|
||
852 | 44612 | jjdelcerro | @Override
|
853 | 43907 | jjdelcerro | public PathIterator getPathIterator(AffineTransform at); |
854 | 42309 | fdiaz | |
855 | 43907 | jjdelcerro | /**
|
856 | * It returns the handlers of the geometry, these they can be of two types
|
||
857 | * is straightening and of selection.
|
||
858 | *
|
||
859 | * @param type Type of handlers.
|
||
860 | *
|
||
861 | * @deprecated don't use Handlers over geometries, use instead specific API
|
||
862 | * for each operation. If not has API for that operation let the project
|
||
863 | * team.
|
||
864 | * @return The handlers.
|
||
865 | 40435 | jjdelcerro | */
|
866 | 43907 | jjdelcerro | public Handler[] getHandlers(int type); |
867 | 42309 | fdiaz | |
868 | 43907 | jjdelcerro | /**
|
869 | * If applies an affine transformation and returns the GeneralPathXIterator
|
||
870 | * with this geometry's information.
|
||
871 | *
|
||
872 | * @param at The affine transformation.
|
||
873 | * @param flatness
|
||
874 | *
|
||
875 | * @return The GeneralPathXIterator with this geometry's information.
|
||
876 | * @deprecated don't use PathIterator over geometries, use instead specific
|
||
877 | * API for each operation. If not has API for that operation let the project
|
||
878 | * team.
|
||
879 | 40435 | jjdelcerro | */
|
880 | 43907 | jjdelcerro | @Override
|
881 | PathIterator getPathIterator(AffineTransform at, double flatness); |
||
882 | 40435 | jjdelcerro | |
883 | 43907 | jjdelcerro | /**
|
884 | * Useful to have the real shape behind the scenes. May be uses to edit it
|
||
885 | * knowing it it is a Circle, Ellipse, etc.
|
||
886 | *
|
||
887 | * @return The awt shape
|
||
888 | * @deprecated
|
||
889 | */
|
||
890 | public Shape getInternalShape(); |
||
891 | 40435 | jjdelcerro | |
892 | 43907 | jjdelcerro | /**
|
893 | * Get GeneralPathIterator, to do registered operations to it.
|
||
894 | *
|
||
895 | * @return The GeneralPathX.
|
||
896 | * @deprecated don't use GeneralPathX over geometries, use instead specific
|
||
897 | * API for each operation. If not has API for that operation let the project
|
||
898 | * team.
|
||
899 | */
|
||
900 | public GeneralPathX getGeneralPath();
|
||
901 | 40435 | jjdelcerro | |
902 | 43907 | jjdelcerro | /**
|
903 | * Converts the geometry to be points and makes with them a multiPoint
|
||
904 | *
|
||
905 | * @return MultiPoint
|
||
906 | * @throws GeometryException
|
||
907 | */
|
||
908 | 42309 | fdiaz | public MultiPoint toPoints() throws GeometryException; |
909 | |||
910 | /**
|
||
911 | * Converts the geometry to be lines and makes with them a multiLine
|
||
912 | 43907 | jjdelcerro | *
|
913 | 42309 | fdiaz | * @return
|
914 | * @throws GeometryException
|
||
915 | */
|
||
916 | public MultiLine toLines() throws GeometryException; |
||
917 | |||
918 | /**
|
||
919 | * Converts the geometry to be polygons and makes with them a multiPolygon
|
||
920 | 43907 | jjdelcerro | *
|
921 | 42309 | fdiaz | * @return
|
922 | * @throws GeometryException
|
||
923 | */
|
||
924 | public MultiPolygon toPolygons() throws GeometryException; |
||
925 | |||
926 | 42359 | fdiaz | /**
|
927 | 43907 | jjdelcerro | * Flip the coordinates of the geometry. If the geometry is aggregate also
|
928 | * revert the primitives collection.
|
||
929 | 42359 | fdiaz | *
|
930 | * @throws GeometryOperationNotSupportedException
|
||
931 | * @throws GeometryOperationException
|
||
932 | */
|
||
933 | 42309 | fdiaz | public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException; |
934 | |||
935 | 42359 | fdiaz | /**
|
936 | 43907 | jjdelcerro | * Ensures the orientation of the geometry according to the parameter,
|
937 | * flipping it if necessary. If the geometry is a polygon, ensures the
|
||
938 | * orientation of its perimeter and ensures the opposite orientation of
|
||
939 | * their holes.
|
||
940 | 42359 | fdiaz | *
|
941 | * @param ccw
|
||
942 | * @return
|
||
943 | * @throws GeometryOperationNotSupportedException
|
||
944 | * @throws GeometryOperationException
|
||
945 | */
|
||
946 | 42309 | fdiaz | public boolean ensureOrientation(boolean ccw) throws GeometryOperationNotSupportedException, GeometryOperationException; |
947 | |||
948 | 42359 | fdiaz | /**
|
949 | 43907 | jjdelcerro | * Returns true if passed as a parameter geometry is completely out of
|
950 | * geometry.
|
||
951 | 42359 | fdiaz | *
|
952 | * @param geometry
|
||
953 | * @return
|
||
954 | * @throws GeometryOperationNotSupportedException
|
||
955 | * @throws GeometryOperationException
|
||
956 | */
|
||
957 | 42309 | fdiaz | public boolean out(Geometry geometry) throws GeometryOperationNotSupportedException, GeometryOperationException; |
958 | 43002 | fdiaz | |
959 | 47432 | fdiaz | /**
|
960 | *
|
||
961 | * @return
|
||
962 | * @throws GeometryOperationNotSupportedException
|
||
963 | * @throws GeometryOperationException
|
||
964 | * @deprecated use forceSubtype(Geometry.SUBTYPES.GEOM2D)
|
||
965 | */
|
||
966 | 44612 | jjdelcerro | public Geometry force2D() throws GeometryOperationNotSupportedException, GeometryOperationException; |
967 | |||
968 | 47432 | fdiaz | // public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
|
969 | //
|
||
970 | // public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
971 | //
|
||
972 | // public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
|
||
973 | |||
974 | public Geometry forceSubtype(int subtype) throws GeometryOperationNotSupportedException, GeometryOperationException; |
||
975 | |||
976 | 43002 | fdiaz | /**
|
977 | * Return true if the geometry can be transformed by the affine transform
|
||
978 | *
|
||
979 | * @param at the affine transform
|
||
980 | * @return
|
||
981 | */
|
||
982 | public boolean canBeTransformed(AffineTransform at); |
||
983 | |||
984 | /**
|
||
985 | 43907 | jjdelcerro | * Return true if the geometry can be reprojected by the coordinate
|
986 | * transformation
|
||
987 | 43002 | fdiaz | *
|
988 | * @param ct the coordinate transformation
|
||
989 | * @return
|
||
990 | */
|
||
991 | public boolean canBeReprojected(ICoordTrans ct); |
||
992 | |||
993 | 44352 | jjdelcerro | public void setProjection(String projection); |
994 | |||
995 | 43785 | jjdelcerro | public void setProjection(IProjection projection); |
996 | 43907 | jjdelcerro | |
997 | 43785 | jjdelcerro | public void setProjectionIffNull(IProjection projection); |
998 | |||
999 | public IProjection getProjection();
|
||
1000 | 45910 | fdiaz | |
1001 | /**
|
||
1002 | * Return the boundary
|
||
1003 | * @return
|
||
1004 | */
|
||
1005 | public Geometry boundary();
|
||
1006 | |||
1007 | 46667 | fdiaz | @Override
|
1008 | public boolean equals(Object obj); |
||
1009 | 47385 | fdiaz | |
1010 | public Geometry fix();
|
||
1011 | 46667 | fdiaz | |
1012 | 47385 | fdiaz | |
1013 | 46667 | fdiaz | |
1014 | 40435 | jjdelcerro | } |