📄 geometry.java
字号:
/*$************************************************************************************************ ** ** $Id: Geometry.java,v 1.15.2.2 2004/05/18 11:20:28 desruisseaux Exp $ ** ** $Source: /cvsroot/geoapi/src/org/opengis/spatialschema/geometry/Geometry.java,v $ ** ** Copyright (C) 2003 Open GIS Consortium, Inc. All Rights Reserved. http://www.opengis.org/Legal/ ** *************************************************************************************************/package org.opengis.spatialschema.geometry;import java.util.Set;import org.opengis.referencing.crs.CoordinateReferenceSystem;import org.opengis.referencing.operation.IncompatibleOperationException;import org.opengis.referencing.operation.MathTransform;import org.opengis.referencing.operation.TransformException;import org.opengis.spatialschema.geometry.complex.Complex;/** * Root class of the geometric object taxonomy. <code>Geometry</code> supports interfaces common * to all geographically referenced geometric objects. <code>Geometry</code> instances are sets * of direct positions in a particular coordinate reference system. A <code>Geometry</code> can * be regarded as an infinite set of points that satisfies the set operation interfaces for a set * of direct positions, {@link TransfiniteSet TransfiniteSet<DirectPosition>}. * * @UML type GM_Object * @rename Renamed as <code>Geometry</code> in order to avoid ambiguity with * {@link java.lang.Object}. * * @author ISO/DIS 19107 * @author <A HREF="http://www.opengis.org">OpenGIS® consortium</A> * @version 2.0 */public interface Geometry extends TransfiniteSet { /** * Returns the coordinate reference system used in {@linkplain DirectPosition direct position} * coordinates. If <code>null</code>, then this <code>Geometry</code> uses the coordinate reference * system from another <code>Geometry</code> in which it is contained. * * The most common example where the coordinate reference system is <code>null</code> is the elements * and subcomplexes of a maximal {@linkplain Complex complex}. The {@linkplain Complex complex} can * carry the {@linkplain CoordinateReferenceSystem coordinate reference system} for all * {@linkplain org.opengis.spatialschema.geometry.primitive.Primitive primitive} elements * and for all {@link Complex} subcomplexes. * <br><br> * This association is only navigable from <code>Geometry</code> to {@linkplain CoordinateReferenceSystem * coordinate reference system}. This means that the coordinate reference system objects in a data set do * not keep a list of <code>Geometry</code>s that use them. * * @return The coordinate reference system used in {@linkplain DirectPosition direct position} * coordinates. * @UML association CRS * * @see #getCoordinateDimension */ public CoordinateReferenceSystem getCoordinateReferenceSystem(); /** * Returns a region in the coordinate reference system that contains this <code>Geometry</code>. * The default shall be to return an instance of an appropriate <code>Geometry</code> subclass * that represents the same spatial set returned from {@link #getEnvelope}. The most common * use of <code>mbRegion</code> will be to support indexing methods that use extents other * than minimum bounding rectangles (MBR or envelopes). This does not restrict the returned * <code>Geometry</code> from being a non-vector geometric representation, although those * types are not defined within this specification. * * @return The minimum bounding region. * @UML operation mbRegion * * @see #getEnvelope * @see #getBoundary */ public Geometry getMbRegion(); /** * Returns a point value that is guaranteed to be on this <code>Geometry</code>. The default * logic may be to use the {@linkplain DirectPosition direct position} of the point returned by * {@link #getCentroid} if that point is on the object. Another use of representative point may * be for the placement of labels in systems based on graphic presentation. * * @return The representative point. * @UML operation representativePoint * * @see #getCentroid */ public DirectPosition getRepresentativePoint(); /** * Returns a finite set of <code>Geometry</code>s containing all of the direct positions on the * boundary of this <code>Geometry</code>. These object collections shall have further internal * structure where appropriate. The finite set of <code>Geometry</code>s returned shall be in * the same coordinate reference system as this <code>Geometry</code>. If the <code>Geometry</code> * is in a {@linkplain Complex complex}, then the boundary <code>Geometry</code>s returned shall be * in the same {@linkplain Complex complex}. If the <code>Geometry</code> is not in any * {@linkplain Complex complex}, then the boundary <code>Geometry</code>s returned may have been * constructed in response to the operation. The elements of a boundary shall be smaller in * dimension than the original element. * * @return The sets of positions on the boundary. * @UML operation boundary * * @see #getMbRegion * @see #getClosure * @see #getBuffer * @see #getDistance */ public Boundary getBoundary(); /** * Returns a finite set of <code>Geometry</code>s containing all of the points on the boundary of * this <code>Geometry</code> and this object (the union of the object and its boundary). These * object collections shall have further internal structure where appropriate. The finite set * of <code>Geometry</code>s returned shall be in the same coordinate reference system as this * <code>Geometry</code>. If the <code>Geometry</code> is in a {@linkplain Complex complex}, then the boundary * <code>Geometry</code>s returned shall be in the same {@linkplain Complex complex}. If the * <code>Geometry</code> is not in any {@linkplain Complex complex}, then the boundary * <code>Geometry</code>s returned may have been constructed in response to the operation. * * @return The sets of points on the union of this object and its boundary. * @UML operation closure * * @see #getBoundary */ public Complex getClosure(); /** * Returns <code>true</code> if this <code>Geometry</code> has no interior point of * self-intersection or selftangency. In mathematical formalisms, this means that * every point in the interior of the object must have a metric neighborhood whose * intersection with the object is isomorphic to an <var>n</var>-sphere, where <var>n</var> * is the dimension of this <code>Geometry</code>. * <br><br> * Since most coordinate geometries are represented, either directly or indirectly by functions * from regions in Euclidean space of their topological dimension, the easiest test for * simplicity to require that a function exist that is one-to-one and bicontinuous * (continuous in both directions). Such a function is a topological isomorphism. This test * does not work for "closed" objects (that is, objects for which {@link #isCycle} returns * <code>true</code>). * * @return <code>true</code> if this object has no interior point of self-intersection or * selftangency. * @UML operation isSimple * * @see #isCycle */ public boolean isSimple(); /** * Returns <code>true</code> if this <code>Geometry</code> has an empty boundary after topological * simplification (removal of overlaps between components in non-structured aggregates, such as * subclasses of {@link org.opengis.spatialschema.geometry.aggregate.Aggregate}). This condition is alternatively * referred to as being "closed" as in a "closed curve." This creates some confusion since there * are two distinct and incompatible definitions for the word "closed". The use of the word cycle * is rarer (generally restricted to the field of algebraic topology), but leads to less confusion. * Essentially, an object is a cycle if it is isomorphic to a geometric object that is the * boundary of a region in some Euclidean space. Thus a curve is a cycle if it is isomorphic * to a circle (has the same start and end point). A surface is a cycle if it isomorphic to the * surface of a sphere, or some torus. A solid, with finite size, in a space of dimension 3 is * never a cycle. * * @return <code>true</code> if this <code>Geometry</code> has an empty boundary after * topological simplification. * @UML operation isCycle * * @see #isSimple */ public boolean isCycle(); /** * Returns the distance between this <code>Geometry</code> and another <code>Geometry</code>. * This distance is defined to be the greatest lower bound of the set of distances between * all pairs of points that include one each from each of the two <code>Geometry</code>s. A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -