|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@UML(identifier="GM_GenericCurve", specification=ISO_19107) public interface GenericCurve
Common interface for curve and
curve segment. Curve
and CurveSegment
both represent sections of curvilinear
geometry, and therefore share a number of operation signatures.
Method Summary | |
---|---|
LineString |
asLineString(double maxSpacing,
double maxOffset)
Constructs a line string (sequence of line segments) where the control points (ends of the segments) lie on this curve. |
DirectPosition |
forConstructiveParam(double cp)
Returns the direct position for a constructive parameter. |
DirectPosition |
forParam(double s)
Returns the direct position for a parameter. |
double |
getEndConstructiveParam()
Indicates the parameter used in the constructive paramerization for the end point. |
double |
getEndParam()
Indicates the parameter for the end point. |
DirectPosition |
getEndPoint()
Returns the direct position of the last point on the GenericCurve . |
ParamForPoint |
getParamForPoint(DirectPosition p)
Returns the parameter for this GenericCurve at the passed direct position. |
double |
getStartConstructiveParam()
Indicates the parameter used in the constructive paramerization for the start point. |
double |
getStartParam()
Indicates the parameter for the start point. |
DirectPosition |
getStartPoint()
Returns the direct position of the first point on the GenericCurve . |
double[] |
getTangent(double s)
Returns the tangent vector along this GenericCurve at the passed parameter
value. |
double |
length(double cparam1,
double cparam2)
Returns the length between two constructive parameters. |
double |
length(Position point1,
Position point2)
Returns the length between two points. |
Method Detail |
---|
@UML(identifier="startPoint", obligation=MANDATORY, specification=ISO_19107) DirectPosition getStartPoint()
GenericCurve
.
This differs from the boundary operator in Primitive
,
since it returns only the values of this point, not representative objects.
GenericCurve
.getStartParam()
,
getEndPoint()
@UML(identifier="endPoint", obligation=MANDATORY, specification=ISO_19107) DirectPosition getEndPoint()
GenericCurve
.
This differs from the boundary operator in Primitive
,
since it returns only the values of this point, not representative objects.
GenericCurve
.getEndParam()
,
getStartPoint()
@UML(identifier="tangent", obligation=MANDATORY, specification=ISO_19107) double[] getTangent(double s)
GenericCurve
at the passed parameter
value. This vector approximates the derivative of the parameterization of the curve. The
tangent shall be a unit vector (have length 1.0), which is consistent with the
parameterization by arc length.
s
- The parameter value along this curve.
getStartParam()
,
getEndParam()
@UML(identifier="startParam", obligation=MANDATORY, specification=ISO_19107) double getStartParam()
getStartPoint()
,
getStartConstructiveParam()
,
getEndParam()
,
forParam(double)
@UML(identifier="endParam", obligation=MANDATORY, specification=ISO_19107) double getEndParam()
getEndPoint()
,
getEndConstructiveParam()
,
getStartParam()
,
forParam(double)
@UML(identifier="startConstrParam", obligation=MANDATORY, specification=ISO_19107) double getStartConstructiveParam()
startConstructiveParam
is less than the
endConstructiveParam
, but the parameterization must be strictly monotonic
(strictly increasing, or strictly decreasing).
NOTE: Constructive parameters are often chosen for convenience of calculation, and seldom have any simple relation to arc distances, which are defined as the default parameterization. Normally, geometric constructions will use constructive parameters, as the programmer deems reasonable, and calculate arc length parameters when queried.
getStartParam()
,
getEndConstructiveParam()
,
forConstructiveParam(double)
@UML(identifier="endConstrParam", obligation=MANDATORY, specification=ISO_19107) double getEndConstructiveParam()
startConstructiveParam
is less than the
endConstructiveParam
, but the parameterization must be strictly monotonic
(strictly increasing, or strictly decreasing).
NOTE: Constructive parameters are often chosen for convenience of calculation, and seldom have any simple relation to arc distances, which are defined as the default parameterization. Normally, geometric constructions will use constructive parameters, as the programmer deems reasonable, and calculate arc length parameters when queried.
getEndParam()
,
getStartConstructiveParam()
,
forConstructiveParam(double)
@UML(identifier="constrParam", obligation=MANDATORY, specification=ISO_19107) DirectPosition forConstructiveParam(double cp)
cp
- The constructive parameter.
getStartConstructiveParam()
,
getEndConstructiveParam()
,
forParam(double)
@UML(identifier="param", obligation=MANDATORY, specification=ISO_19107) DirectPosition forParam(double s)
GenericCurve
at the distance
passed. The parameterization shall be by arc length, i.e. distance along the
GenericCurve
measured from the start point and added to the start parameter.
s
- The distance from the start point and added to the start parameter.
getStartParam()
,
getEndParam()
,
forConstructiveParam(double)
@UML(identifier="paramForPoint", obligation=MANDATORY, specification=ISO_19107) ParamForPoint getParamForPoint(DirectPosition p)
GenericCurve
at the passed direct position.
If the direct position is not on the curve, the nearest point on the curve shall be used.
p
- The direct position on the curve.
getStartPoint()
,
getEndPoint()
,
forParam(double)
@UML(identifier="length", obligation=MANDATORY, specification=ISO_19107) double length(Position point1, Position point2)
point1
- The first point, or null
for the
start point.point2
- The second point, or null
for the
end point.
@UML(identifier="length", obligation=MANDATORY, specification=ISO_19107) double length(double cparam1, double cparam2)
length
shall work directly from the constructive
parameters, allowing the direct conversion between the variables used in parameterization and
constructive parameters.
Distances between direct positions determined by the default parameterization are simply
the difference of the parameter. The length function also allows for the conversion of the
constructive parameter to the arc length parameter using the following idiom:
param = length(startConstructiveParam, constructiveParam)
+ startParam
cparam1
- The first constructive parameter.cparam2
- The second constructive parameter.
@UML(identifier="asLineString", obligation=MANDATORY, specification=ISO_19107) LineString asLineString(double maxSpacing, double maxOffset)
maxSpacing
is given (not zero), then
the distance between control points along the generated curve shall be not more than
maxSpacing
. If maxOffset
is given (not zero), the distance
between generated curve at any point and the original curve shall not be more than the
maxOffset
. If both parameters are set, then both criteria shall be met.
If the original control points of the curve lie on the curve, then they shall be included
in the returned line string's control points. If both parameters are
set to zero, then the line string returned shall be constructed from the control points of the
original curve.
NOTE: This function is useful in creating linear approximations of the curve for simple actions such as display. It is often referred to as a "stroked curve". For this purpose, themaxOffset
version is useful in maintaining a minimal representation of the curve appropriate for the display device being targeted. This function is also useful in preparing to transform a curve from one coordinate reference system to another by transforming its control points. In this case, themaxSpacing
version is more appropriate. Allowing both parameters to default to zero does not seem to have any useful geographic nor geometric interpretation unless further information is known about how the curves were constructed.
maxSpacing
- The maximal distance between control points along the generated curve,
or 0 for no constraint.maxOffset
- The maximal distance between generated curve at any point and the original
curve, or 0 for no constraint.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |