|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.geometry.standard.AbstractDefaultGeometry org.deegree.geometry.standard.primitive.DefaultOrientableCurve
public class DefaultOrientableCurve
Default implementation of OrientableCurve
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Curve |
---|
Curve.CurveType |
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.GeometricPrimitive |
---|
GeometricPrimitive.PrimitiveType |
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry |
---|
Geometry.GeometryType |
Field Summary |
---|
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry |
---|
env, jtsFactory, jtsGeometry, pm |
Constructor Summary | |
---|---|
DefaultOrientableCurve(String id,
ICRS crs,
Curve baseCurve,
boolean isReversed)
Creates a new DefaultOrientableCurve instance from the given parameters. |
Method Summary | |
---|---|
boolean |
contains(Geometry geometry)
Tests whether this geometry contains the specified geometry. |
boolean |
crosses(Geometry geometry)
Tests whether this geometry crosses the specified geometry. |
boolean |
equals(Geometry geometry)
Tests whether this geometry is equal to the specified geometry. |
LineString |
getAsLineString()
Returns a linear interpolated representation of the curve. |
Curve |
getBaseCurve()
Returns the Curve that this OrientableCurve is based on. |
Pair<Point,Point> |
getBoundary()
The boundary of a curve is the set of points at either end of the curve. |
Geometry |
getBuffer(Measure distance)
Return a new Geometry that contains all points with a distance from this Geometry that is less than or
equal to the specified distance. |
Points |
getControlPoints()
Convenience method for accessing the control points of linear interpolated curves. |
Geometry |
getConvexHull()
Returns the convex hull of the geometry. |
int |
getCoordinateDimension()
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in. |
ICRS |
getCoordinateSystem()
Returns the associated spatial reference system. |
List<CurveSegment> |
getCurveSegments()
Returns the segments that constitute this curve. |
Curve.CurveType |
getCurveType()
Must always return Curve.CurveType.OrientableCurve . |
Geometry |
getDifference(Geometry geometry)
Returns the set-theoretic difference of this and the passed Geometry . |
Measure |
getDistance(Geometry geometry,
Unit requestedUnit)
Returns the minimum distance between this and the specified geometry. |
Point |
getEndPoint()
Returns the end point of the curve. |
Envelope |
getEnvelope()
Returns the minimal bounding box of the geometry. |
Geometry.GeometryType |
getGeometryType()
Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY . |
String |
getId()
Returns the id of the geometry. |
Geometry |
getIntersection(Geometry geometry)
Returns the set-theoretic intersection of this and the passed Geometry . |
com.vividsolutions.jts.geom.Geometry |
getJTSGeometry()
Returns an equivalent (or best-fit) JTS geometry object. |
Measure |
getLength(Unit requestedUnit)
|
PrecisionModel |
getPrecision()
Returns the PrecisionModel of the geometry. |
GeometricPrimitive.PrimitiveType |
getPrimitiveType()
Must always return GeometricPrimitive.PrimitiveType.Curve . |
Point |
getStartPoint()
Returns the start point of the curve. |
Geometry |
getUnion(Geometry geometry)
Returns the set-theoretic union of this and the passed Geometry . |
boolean |
intersects(Geometry geometry)
Tests whether this geometry intersects the specified geometry. |
boolean |
isBeyond(Geometry geometry,
Measure distance)
Tests whether this geometry is beyond a specified distance of a second geometry. |
boolean |
isClosed()
Returns whether the curve forms a closed loop. |
boolean |
isDisjoint(Geometry geometry)
Tests whether this geometry is disjoint from the specified geometry. |
boolean |
isReversed()
Returns whether the orientation of this curve is reversed compared to the base curve. |
boolean |
isWithin(Geometry geometry)
tests whether the value of a geometric is topological located within this geometry. |
boolean |
isWithinDistance(Geometry geometry,
Measure distance)
Tests whether this geometry is within a specified distance of a second geometry. |
boolean |
overlaps(Geometry geometry)
Tests whether this geometry overlaps the specified geometry. |
boolean |
touches(Geometry geometry)
Tests whether this geometry touches the specified geometry. |
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry |
---|
buildJTSGeometry, createFromJTS, getAsDefaultGeometry, getCentroid, getGMLProperties, isSFSCompliant, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.geometry.Geometry |
---|
getCentroid, isSFSCompliant, setCoordinateSystem, setGMLProperties, setId, setPrecision |
Methods inherited from interface org.deegree.commons.tom.gml.GMLObject |
---|
getGMLProperties |
Constructor Detail |
---|
public DefaultOrientableCurve(String id, ICRS crs, Curve baseCurve, boolean isReversed)
DefaultOrientableCurve
instance from the given parameters.
id
- identifier of the created geometry objectcrs
- coordinate reference systembaseCurve
- base curveisReversed
- set to true, if the order of the base curve shall be reversedMethod Detail |
---|
public String getId()
Geometry
In a GML representation of the geometry, this corresponds to the gml:id
(GML 3 and later) or
gid
(GML 2) attribute of the geometry element.
getId
in interface Object
getId
in interface Geometry
getId
in class AbstractDefaultGeometry
public ICRS getCoordinateSystem()
Geometry
getCoordinateSystem
in interface Geometry
getCoordinateSystem
in class AbstractDefaultGeometry
public LineString getAsLineString()
Curve
NOTE: This method is only safe to use when the curve is a LineString
or LinearRing
or it only
consists of LineStringSegment
s. In any other case it will fail.
getAsLineString
in interface Curve
public List<CurveSegment> getCurveSegments()
Curve
getCurveSegments
in interface Curve
public Curve.CurveType getCurveType()
OrientableCurve
Curve.CurveType.OrientableCurve
.
getCurveType
in interface Curve
getCurveType
in interface OrientableCurve
Curve.CurveType.OrientableCurve
public Curve getBaseCurve()
OrientableCurve
Curve
that this OrientableCurve
is based on.
getBaseCurve
in interface OrientableCurve
Curve
public boolean isReversed()
OrientableCurve
isReversed
in interface OrientableCurve
public Point getEndPoint()
Curve
getEndPoint
in interface Curve
public Point getStartPoint()
Curve
getStartPoint
in interface Curve
public boolean contains(Geometry geometry)
Geometry
contains
in interface Geometry
contains
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
contains geometry
public boolean crosses(Geometry geometry)
Geometry
crosses
in interface Geometry
crosses
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
crosses geometry
public Geometry getDifference(Geometry geometry)
Geometry
Geometry
.
getDifference
in interface Geometry
getDifference
in class AbstractDefaultGeometry
geometry
- other geometry, must not be null
null
(empty set)public Measure getDistance(Geometry geometry, Unit requestedUnit)
Geometry
getDistance
in interface Geometry
getDistance
in class AbstractDefaultGeometry
geometry
- second geometryrequestedUnit
- unit of the
public boolean equals(Geometry geometry)
Geometry
equals
in interface Geometry
equals
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
is equal to geometry
public Pair<Point,Point> getBoundary()
Curve
getBoundary
in interface Curve
List
shall
be retrunedpublic Geometry getBuffer(Measure distance)
Geometry
Geometry
that contains all points with a distance from this Geometry that is less than or
equal to the specified distance.
getBuffer
in interface Geometry
getBuffer
in class AbstractDefaultGeometry
public Geometry getConvexHull()
Geometry
getConvexHull
in interface Geometry
getConvexHull
in class AbstractDefaultGeometry
public int getCoordinateDimension()
Geometry
getCoordinateDimension
in interface Geometry
public Envelope getEnvelope()
Geometry
getEnvelope
in interface Geometry
getEnvelope
in class AbstractDefaultGeometry
public Measure getLength(Unit requestedUnit)
getLength
in interface Curve
public PrecisionModel getPrecision()
Geometry
PrecisionModel
of the geometry.
getPrecision
in interface Geometry
getPrecision
in class AbstractDefaultGeometry
public Geometry getIntersection(Geometry geometry)
Geometry
Geometry
.
getIntersection
in interface Geometry
getIntersection
in class AbstractDefaultGeometry
geometry
- other geometry, must not be null
null
(empty set)public boolean intersects(Geometry geometry)
Geometry
intersects
in interface Geometry
intersects
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
intersects geometry
public boolean isDisjoint(Geometry geometry)
Geometry
isDisjoint
in interface Geometry
isDisjoint
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
is disjoint from geometry
public boolean overlaps(Geometry geometry)
Geometry
overlaps
in interface Geometry
overlaps
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
overlaps geometry
public boolean touches(Geometry geometry)
Geometry
touches
in interface Geometry
touches
in class AbstractDefaultGeometry
geometry
- the Geometry
to test this Geometry
against
Geometry
touches geometry
public boolean isBeyond(Geometry geometry, Measure distance)
Geometry
isBeyond
in interface Geometry
isBeyond
in class AbstractDefaultGeometry
geometry
- second geometry
distance
public boolean isClosed()
Curve
isClosed
in interface Curve
public boolean isWithin(Geometry geometry)
Geometry
Geometry.contains(Geometry)
method
isWithin
in interface Geometry
isWithin
in class AbstractDefaultGeometry
public boolean isWithinDistance(Geometry geometry, Measure distance)
Geometry
isWithinDistance
in interface Geometry
isWithinDistance
in class AbstractDefaultGeometry
geometry
- second geometry
distance
public Geometry getUnion(Geometry geometry)
Geometry
Geometry
.
getUnion
in interface Geometry
getUnion
in class AbstractDefaultGeometry
geometry
- other geometry, must not be null
public GeometricPrimitive.PrimitiveType getPrimitiveType()
Curve
GeometricPrimitive.PrimitiveType.Curve
.
getPrimitiveType
in interface Curve
getPrimitiveType
in interface GeometricPrimitive
GeometricPrimitive.PrimitiveType.Curve
public Geometry.GeometryType getGeometryType()
GeometricPrimitive
Geometry.GeometryType#PRIMITIVE_GEOMETRY
.
getGeometryType
in interface Geometry
getGeometryType
in interface GeometricPrimitive
Geometry.GeometryType#PRIMITIVE_GEOMETRY
public Points getControlPoints()
Curve
NOTE: This method is only safe to use when the curve is a LineString
or LinearRing
or it only
consists of LineStringSegment
s. In any other case it will fail.
getControlPoints
in interface Curve
public com.vividsolutions.jts.geom.Geometry getJTSGeometry()
AbstractDefaultGeometry
getJTSGeometry
in class AbstractDefaultGeometry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |