|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
public abstract class GeometryImpl
Base class for our JTS-based implementation of the various ISO 19107 geometry classes.
Nested Class Summary | |
---|---|
static class |
GeometryImpl.MathTransformFilter
This class implements JTS's CoordinateFilter interface using a GeoAPI MathTransform object to actually perform the work. |
Constructor Summary | |
---|---|
GeometryImpl()
Creates a new mutable GeometryImpl with a null CRS. |
|
GeometryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
Creates a new mutable GeometryImpl . |
|
GeometryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem,
boolean mutable)
Creates a new GeometryImpl . |
Method Summary | |
---|---|
GeometryImpl |
clone()
Returns a deep copy of this geometric object. |
protected abstract com.vividsolutions.jts.geom.Geometry |
computeJTSPeer()
Subclasses must override this method to compute the JTS equivalent of this geometry. |
boolean |
contains(org.opengis.geometry.DirectPosition point)
Returns true if the given position lies in this geometry within the tolerance of the floating point representation. |
boolean |
contains(org.opengis.geometry.TransfiniteSet pointSet)
Returns true if this geometry completely contains the given geometry. |
org.opengis.geometry.TransfiniteSet |
difference(org.opengis.geometry.TransfiniteSet pointSet)
|
double |
distance(org.opengis.geometry.Geometry otherGeometry)
|
boolean |
equals(org.opengis.geometry.TransfiniteSet pointSet)
|
org.opengis.geometry.Boundary |
getBoundary()
Returns the boundary of this geometry. |
org.opengis.geometry.Geometry |
getBuffer(double distance)
Returns an approximate buffer around this object. |
org.opengis.geometry.DirectPosition |
getCentroid()
Returns the centroid of this geometry. |
org.opengis.geometry.complex.Complex |
getClosure()
This method is not implemented. |
org.opengis.geometry.Geometry |
getConvexHull()
Returns the geometric convex hull of this geometry. |
int |
getCoordinateDimension()
Returns the dimension of the coordinates in this geometry. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the CRS that was given to the constructor. |
int |
getDimension(org.opengis.geometry.DirectPosition point)
Returns the manifold dimension of the geometry at the given point. |
double |
getDistance(org.opengis.geometry.Geometry geometry)
Returns the distance between the given geometry and this geometry. |
org.opengis.geometry.Envelope |
getEnvelope()
|
com.vividsolutions.jts.geom.Geometry |
getJTSGeometry()
Returns the JTS version of this geometry. |
java.util.Set |
getMaximalComplex()
This impementation of geometry does not support traversing this association in this direction as it would require every geometry to know about all of the larger geometries of which it is a part. |
org.opengis.geometry.Geometry |
getMbRegion()
Returns a Geometry that represents the minimum bounding region of this geometry. |
org.opengis.geometry.Precision |
getPrecision()
|
org.opengis.geometry.DirectPosition |
getRepresentativePoint()
Returns a point interior to the geometry. |
org.opengis.geometry.TransfiniteSet |
intersection(org.opengis.geometry.TransfiniteSet pointSet)
|
boolean |
intersects(org.opengis.geometry.TransfiniteSet pointSet)
|
void |
invalidateCachedJTSPeer()
This method must be called by subclasses whenever the user makes a change to the geometry so that the cached JTS object can be recreated. |
boolean |
isCycle()
|
boolean |
isMutable()
Returns true if this geometry can be changed. |
boolean |
isSimple()
Returns true if this object does not cross itself. |
static java.util.Set |
listAsSet(java.util.List list)
|
protected void |
setJTSPeer(com.vividsolutions.jts.geom.Geometry g)
This method is meant to be invoked by the JTSUtils utility class when it creates a Geometry from a JTS geometry. |
void |
setParent(JTSGeometry parent)
|
org.opengis.geometry.TransfiniteSet |
symmetricDifference(org.opengis.geometry.TransfiniteSet pointSet)
|
org.opengis.geometry.Geometry |
toImmutable()
Creates an immutable copy of this object or just returns this object if it's already immutable. |
org.opengis.geometry.Geometry |
transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS)
Attempts to find a transform from the current CRS to the new CRS and creates a new geometry by invoking that transform on each control point of this geometry. |
org.opengis.geometry.Geometry |
transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS,
org.opengis.referencing.operation.MathTransform transform)
Creates a new Geometry out of this one by invoking the given transform on each control point of this geometry. |
org.opengis.geometry.TransfiniteSet |
union(org.opengis.geometry.TransfiniteSet pointSet)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeometryImpl()
GeometryImpl
with a null CRS.
public GeometryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
GeometryImpl
.
coordinateReferenceSystem
- CRS for this geometry's vertices.public GeometryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem, boolean mutable)
GeometryImpl
.
coordinateReferenceSystem
- CRS for this geometry's vertices.mutable
- Whether or not changes will be allowed.Method Detail |
---|
public void setParent(JTSGeometry parent)
public org.opengis.geometry.Precision getPrecision()
getPrecision
in interface org.opengis.geometry.Geometry
protected abstract com.vividsolutions.jts.geom.Geometry computeJTSPeer()
public final void invalidateCachedJTSPeer()
invalidateCachedJTSPeer
in interface JTSGeometry
protected final void setJTSPeer(com.vividsolutions.jts.geom.Geometry g)
public final com.vividsolutions.jts.geom.Geometry getJTSGeometry()
getJTSGeometry
in interface JTSGeometry
public final org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.Geometry getMbRegion()
getMbRegion
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.DirectPosition getRepresentativePoint()
getRepresentativePoint
in interface org.opengis.geometry.Geometry
public org.opengis.geometry.Boundary getBoundary()
getBoundary
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.complex.Complex getClosure()
getClosure
in interface org.opengis.geometry.Geometry
public final boolean isSimple()
isSimple
in interface org.opengis.geometry.Geometry
public final boolean isCycle()
isCycle
in interface org.opengis.geometry.Geometry
public final double getDistance(org.opengis.geometry.Geometry geometry)
public final int getDimension(org.opengis.geometry.DirectPosition point)
getDimension
in interface org.opengis.geometry.Geometry
public final int getCoordinateDimension()
getCoordinateDimension
in interface org.opengis.geometry.Geometry
public final java.util.Set getMaximalComplex()
getMaximalComplex
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.Geometry transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS) throws org.opengis.referencing.operation.TransformException
transform
in interface org.opengis.geometry.Geometry
org.opengis.referencing.operation.TransformException
public final org.opengis.geometry.Geometry transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.referencing.operation.TransformException
transform
in interface org.opengis.geometry.Geometry
org.opengis.referencing.operation.TransformException
public final org.opengis.geometry.Envelope getEnvelope()
getEnvelope
in interface org.opengis.geometry.Geometry
org.opengis.geometry.coordinate.#getEnvelope()
public final org.opengis.geometry.DirectPosition getCentroid()
getCentroid
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.Geometry getConvexHull()
getConvexHull
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.Geometry getBuffer(double distance)
getBuffer
in interface org.opengis.geometry.Geometry
public final boolean isMutable()
isMutable
in interface org.opengis.geometry.Geometry
public final org.opengis.geometry.Geometry toImmutable()
toImmutable
in interface org.opengis.geometry.Geometry
public GeometryImpl clone()
clone
in interface org.opengis.geometry.Geometry
clone
in class java.lang.Object
public boolean contains(org.opengis.geometry.DirectPosition point)
contains
in interface org.opengis.geometry.TransfiniteSet
public boolean contains(org.opengis.geometry.TransfiniteSet pointSet)
contains
in interface org.opengis.geometry.TransfiniteSet
public double distance(org.opengis.geometry.Geometry otherGeometry)
distance
in interface org.opengis.geometry.Geometry
public org.opengis.geometry.TransfiniteSet difference(org.opengis.geometry.TransfiniteSet pointSet)
difference
in interface org.opengis.geometry.TransfiniteSet
public boolean equals(org.opengis.geometry.TransfiniteSet pointSet)
equals
in interface org.opengis.geometry.TransfiniteSet
public org.opengis.geometry.TransfiniteSet intersection(org.opengis.geometry.TransfiniteSet pointSet)
intersection
in interface org.opengis.geometry.TransfiniteSet
public boolean intersects(org.opengis.geometry.TransfiniteSet pointSet)
intersects
in interface org.opengis.geometry.TransfiniteSet
public org.opengis.geometry.TransfiniteSet symmetricDifference(org.opengis.geometry.TransfiniteSet pointSet)
symmetricDifference
in interface org.opengis.geometry.TransfiniteSet
public org.opengis.geometry.TransfiniteSet union(org.opengis.geometry.TransfiniteSet pointSet)
union
in interface org.opengis.geometry.TransfiniteSet
public static java.util.Set listAsSet(java.util.List list)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |