|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.iso.root.GeometryImpl
org.geotools.geometry.iso.primitive.PrimitiveImpl
org.geotools.geometry.iso.primitive.OrientablePrimitiveImpl
org.geotools.geometry.iso.primitive.OrientableCurveImpl
org.geotools.geometry.iso.primitive.CurveImpl
public class CurveImpl
Curve (Figure 11 of the ISO 19107 v5) is a descendent subtype of Primitive through OrientablePrimitive. It is the basis for 1-dimensional geometry. A curve is a continuous image of an open interval and so could be written as a parameterized function such as c(t):(a, b) -> E^n where "t" is a real parameter and E^n is Euclidean space of dimension n (usually 2 or 3, as determined by the coordinate reference system). Any other parameterization that results in the same image curve, traced in the same direction, such as any linear shifts and positive scales such as e(t) = c(a + t(b-a)):(0,1) -> E^n, is an equivalent representation of the same curve. For the sake of simplicity, Curves should be parameterized by arc length, so that the parameterization operation inherited from GenericCurve will be valid for parameters between 0 and the length of the curve. Curves are continuous, connected, and have a measurable length in terms of the coordinate system. The orientation of the curve is determined by this parameterization, and is consistent with the tangent function, which approximates the derivative function of the parameterization and shall always point in the "forward" direction. The parameterization of the reversal of the curve defined by c(t):(a, b) -> E^n would be defined by a function of the form s(t) = c(a + b - t):(a, b)?E^n. A curve is composed of one or more curve segments. Each curve segment within a curve may be defined using a different interpolation method. The curve segments are connected to one another, with the end point of each segment except the last being the start point of the next segment in the segment list.
Field Summary | |
---|---|
protected CurveBoundaryImpl |
boundary
Boundary of the Curve |
Fields inherited from class org.geotools.geometry.iso.primitive.OrientablePrimitiveImpl |
---|
proxy |
Fields inherited from class org.geotools.geometry.iso.primitive.PrimitiveImpl |
---|
complex, containedPrimitive, containingPrimitive |
Fields inherited from class org.geotools.geometry.iso.root.GeometryImpl |
---|
crs, percision |
Constructor Summary | |
---|---|
CurveImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
java.util.List<? extends org.opengis.geometry.primitive.CurveSegment> segments)
The Curve constructor takes an abstract sequential list of CurveSegments with the appropriate end-to-start relationships and creates a Curve. |
|
CurveImpl(org.opengis.geometry.coordinate.LineSegment edge)
The Curve constructor takes an abstract sequential list of CurveSegments with the appropriate end-to-start relationships and creates a Curve. |
Method Summary | |
---|---|
java.util.List<org.opengis.geometry.DirectPosition> |
asDirectPositions()
Returns the DirectPositions which define the control points of this Curve |
java.util.List<org.opengis.geometry.coordinate.LineSegment> |
asLineSegments()
The function "asLineString" constructs a line string (sequence of line segments) where the control points (ends of the segments) lie on this curve. |
LineStringImpl |
asLineString()
|
LineStringImpl |
asLineString(double spacing,
double offset)
|
CurveImpl |
clone()
|
protected org.opengis.geometry.primitive.OrientablePrimitive |
createProxy()
|
boolean |
equals(java.lang.Object obj)
|
org.opengis.geometry.DirectPosition |
forConstructiveParam(double cp)
|
org.opengis.geometry.DirectPosition |
forParam(double distance)
|
org.opengis.geometry.primitive.CurveBoundary |
getBoundary()
|
org.opengis.geometry.complex.CompositeCurve |
getComposite()
|
int |
getDimension(org.opengis.geometry.DirectPosition point)
The method dimension returns the inherent dimension of
this Object, which is less than or equal to the coordinate dimension. |
double |
getEndConstructiveParam()
|
double |
getEndParam()
|
org.opengis.geometry.DirectPosition |
getEndPoint()
The operations "endPoint" shall return the DirectPositions of the last point, respectively on the GenericCurve. |
org.opengis.geometry.Envelope |
getEnvelope()
|
org.opengis.geometry.coordinate.ParamForPoint |
getParamForPoint(org.opengis.geometry.DirectPosition p)
The operation "paramForPoint" shall return the parameter for this GenericCurve at the passed DirectPosition. |
org.opengis.geometry.primitive.OrientableCurve[] |
getProxy()
Returns an array with two orientable primitives, whereas the first one is "this" object and the second one the field proxy |
org.opengis.geometry.DirectPosition |
getRepresentativePoint()
|
protected CurveSegmentImpl |
getSegmentAt(double dist)
|
java.util.List<org.opengis.geometry.primitive.CurveSegment> |
getSegments()
|
double |
getStartConstructiveParam()
|
double |
getStartParam()
|
org.opengis.geometry.DirectPosition |
getStartPoint()
The operations "startPoint" shall return the DirectPositions of the first point, respectively on the GenericCurve. |
double[] |
getTangent(double distance)
|
int |
hashCode()
|
boolean |
isSimple()
|
double |
length()
This third form of the operation length returns length(0.0,length) |
double |
length(double par1,
double par2)
|
double |
length(org.opengis.geometry.coordinate.Position point1,
org.opengis.geometry.coordinate.Position point2)
|
CurveImpl |
merge(CurveImpl other)
Constructs a new Curve by merging this Curve with another Curve The two input curves will not be modified. |
void |
split(double distance)
|
java.lang.String |
toString()
|
org.opengis.geometry.Geometry |
transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS,
org.opengis.referencing.operation.MathTransform transform)
|
Methods inherited from class org.geotools.geometry.iso.primitive.OrientableCurveImpl |
---|
getPrimitive |
Methods inherited from class org.geotools.geometry.iso.primitive.OrientablePrimitiveImpl |
---|
getOrientation |
Methods inherited from class org.geotools.geometry.iso.primitive.PrimitiveImpl |
---|
addComplex, addContainedPrimitive, addContainingPrimitive, getComplexes, getContainedPrimitives, getContainingPrimitives, getMaximalComplex |
Methods inherited from class org.geotools.geometry.iso.root.GeometryImpl |
---|
castToGeometryImpl, castToGeometryImpl, contains, contains, cRelate, crosses, difference, disjoint, distance, equals, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDistance, getMbRegion, getPositionFactory, getPrecision, intersection, intersects, isCycle, isMutable, overlaps, relate, symmetricDifference, toImmutable, touches, transform, union, within |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.geometry.primitive.OrientableCurve |
---|
getPrimitive |
Methods inherited from interface org.opengis.geometry.primitive.OrientablePrimitive |
---|
getOrientation |
Methods inherited from interface org.opengis.geometry.primitive.Primitive |
---|
getComplexes, getContainedPrimitives, getContainingPrimitives |
Methods inherited from interface org.opengis.geometry.Geometry |
---|
distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getMaximalComplex, getMbRegion, getPrecision, isCycle, isMutable, toImmutable, transform |
Methods inherited from interface org.opengis.geometry.TransfiniteSet |
---|
contains, contains, difference, equals, intersection, intersects, symmetricDifference, union |
Field Detail |
---|
protected CurveBoundaryImpl boundary
Constructor Detail |
---|
public CurveImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, java.util.List<? extends org.opengis.geometry.primitive.CurveSegment> segments) throws java.lang.IllegalArgumentException
crs
- segments
-
IllegalArgumentException,
- if the array of CurveSegments is empty or does not fulfill
the requirements of the CurveSegments
java.lang.IllegalArgumentException
public CurveImpl(org.opengis.geometry.coordinate.LineSegment edge)
factory
- segments
- containedPrimitive
- containingPrimitive
- complex
-
java.lang.IllegalArgumentException
Method Detail |
---|
public org.opengis.geometry.primitive.OrientableCurve[] getProxy()
OrientableCurveImpl
getProxy
in interface org.opengis.geometry.primitive.Curve
getProxy
in interface org.opengis.geometry.primitive.Primitive
getProxy
in class OrientableCurveImpl
public CurveImpl clone() throws java.lang.CloneNotSupportedException
clone
in interface org.opengis.geometry.Geometry
clone
in class GeometryImpl
java.lang.CloneNotSupportedException
protected org.opengis.geometry.primitive.OrientablePrimitive createProxy()
createProxy
in class OrientablePrimitiveImpl
public org.opengis.geometry.primitive.CurveBoundary getBoundary()
getBoundary
in interface org.opengis.geometry.Geometry
getBoundary
in interface org.opengis.geometry.primitive.OrientableCurve
getBoundary
in interface org.opengis.geometry.primitive.Primitive
getBoundary
in class OrientableCurveImpl
public org.opengis.geometry.Envelope getEnvelope()
getEnvelope
in interface org.opengis.geometry.Geometry
getEnvelope
in class GeometryImpl
public void split(double distance)
distance
- protected CurveSegmentImpl getSegmentAt(double dist)
dist
-
public org.opengis.geometry.DirectPosition getStartPoint()
getStartPoint
in interface org.opengis.geometry.coordinate.GenericCurve
DirectPosition2D
valuepublic org.opengis.geometry.DirectPosition getEndPoint()
getEndPoint
in interface org.opengis.geometry.coordinate.GenericCurve
DirectPosition2D
valuepublic org.opengis.geometry.coordinate.ParamForPoint getParamForPoint(org.opengis.geometry.DirectPosition p)
getParamForPoint
in interface org.opengis.geometry.coordinate.GenericCurve
p
- an DirectPosition2D
value
public org.opengis.geometry.DirectPosition forParam(double distance)
forParam
in interface org.opengis.geometry.coordinate.GenericCurve
public double length(double par1, double par2)
length
in interface org.opengis.geometry.coordinate.GenericCurve
public double length()
public java.util.List<org.opengis.geometry.coordinate.LineSegment> asLineSegments()
LineString
valuepublic LineStringImpl asLineString(double spacing, double offset)
asLineString
in interface org.opengis.geometry.coordinate.GenericCurve
public LineStringImpl asLineString()
public int getDimension(org.opengis.geometry.DirectPosition point)
dimension
returns the inherent dimension of
this Object, which is less than or equal to the coordinate dimension. The
dimension of a collection of geometric objects is the largest dimension
of any of its pieces. Points are 0-dimensional, curves are 1-dimensional,
surfaces are 2-dimensional, and solids are 3-dimensional. Locally, the
dimension of a geometric object at a point is the dimension of a local
neighborhood of the point - that is the dimension of any coordinate
neighborhood of the point. Dimension is unambiguously defined only for
DirectPositions interior to this Object. If the passed DirectPosition2D
is NULL, then the method returns the largest possible dimension for any
DirectPosition2D in this Object.
getDimension
in interface org.opengis.geometry.Geometry
getDimension
in class GeometryImpl
point
- a DirectPosition2D
value
int
valuepublic org.opengis.geometry.DirectPosition getRepresentativePoint()
getRepresentativePoint
in interface org.opengis.geometry.Geometry
getRepresentativePoint
in class GeometryImpl
public boolean isSimple()
isSimple
in interface org.opengis.geometry.Geometry
public java.util.List<org.opengis.geometry.primitive.CurveSegment> getSegments()
getSegments
in interface org.opengis.geometry.primitive.Curve
public org.opengis.geometry.complex.CompositeCurve getComposite()
getComposite
in interface org.opengis.geometry.primitive.OrientableCurve
getComposite
in interface org.opengis.geometry.primitive.Primitive
getComposite
in class OrientableCurveImpl
public double[] getTangent(double distance)
getTangent
in interface org.opengis.geometry.coordinate.GenericCurve
public double getStartParam()
getStartParam
in interface org.opengis.geometry.coordinate.GenericCurve
public double getEndParam()
getEndParam
in interface org.opengis.geometry.coordinate.GenericCurve
public double getStartConstructiveParam()
getStartConstructiveParam
in interface org.opengis.geometry.coordinate.GenericCurve
public double getEndConstructiveParam()
getEndConstructiveParam
in interface org.opengis.geometry.coordinate.GenericCurve
public org.opengis.geometry.DirectPosition forConstructiveParam(double cp)
forConstructiveParam
in interface org.opengis.geometry.coordinate.GenericCurve
public double length(org.opengis.geometry.coordinate.Position point1, org.opengis.geometry.coordinate.Position point2)
length
in interface org.opengis.geometry.coordinate.GenericCurve
public java.util.List<org.opengis.geometry.DirectPosition> asDirectPositions()
public CurveImpl merge(CurveImpl other)
other
-
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public org.opengis.geometry.Geometry transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS, org.opengis.referencing.operation.MathTransform transform) throws org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException
transform
in interface org.opengis.geometry.Geometry
transform
in class GeometryImpl
org.opengis.geometry.MismatchedDimensionException
org.opengis.referencing.operation.TransformException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |