public class TLcdXYPolylineMSupport extends Object
ILcdSHPPolylineMSupport
is a support class for
the polylineM implementation in com.luciad.format.shp.
It adds additional operations to that implementation.
In that sense it is a visitor (??).
Conceptually, a polylineM is a polyline that has for each of its containing points a corresponding measure value (called its m-value). The mapping between points and m-values is implementation dependent.
In com.luciad.format.shp, a polylineM is implemented as a
ILcdShapeList
of TLcdSHPPolylineZ
objects.
Moreover, the polylineM is also ILcdFeatured
.
Each PolylineMSupport
supports exactly one polylineM.
This polylineM is called "the polylineM" in
the specifications of the methods of PolylineMSupport
.
This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.
Modifier and Type | Field and Description |
---|---|
static boolean |
TRACEON_GETM |
static boolean |
TRACEON_GETPOINT |
Constructor and Description |
---|
TLcdXYPolylineMSupport() |
Modifier and Type | Method and Description |
---|---|
static double |
getBeginM(ILcdShapeList aPolylineM) |
static ILcdPoint |
getBeginPoint(ILcdShapeList aPolylineM) |
static double |
getEndM(ILcdShapeList aPolylineM) |
static ILcdPoint |
getEndPoint(ILcdShapeList aPolylineM) |
static double |
getM(ILcdShapeList aPolylineM,
ILcdPoint aPoint) |
static double |
getMLength(ILcdShapeList aPolylineM) |
static ILcdPoint |
getPoint(ILcdShapeList aPolylineM,
double aM) |
static ILcdPoint |
getPoint(ILcdShapeList aPolylineM,
double aM,
double aOffset) |
static double |
getViewAngle(ILcdShapeList aPolylineM,
double aM,
ILcdModelXYWorldTransformation aMWT,
ILcdGXYViewXYWorldTransformation aVWT) |
static double |
getViewAngleOfVertex(ILcdPolyline aPolylineZ,
int aPointIndex,
ILcdModelXYWorldTransformation aMWT,
ILcdGXYViewXYWorldTransformation aVWT) |
static boolean |
interacts(ILcdShapeList aPolylineM,
double aFrom,
double aTo,
ILcdBounds aBounds) |
static boolean |
interacts(ILcdShapeList aPolylineM,
double aFrom,
double aTo,
ILcdPolygon aPolygon) |
static boolean |
interacts(ILcdShapeList aPolylineM,
double aLocation,
ILcdBounds aBounds) |
public static boolean TRACEON_GETPOINT
public static boolean TRACEON_GETM
public static double getM(ILcdShapeList aPolylineM, ILcdPoint aPoint)
public static ILcdPoint getBeginPoint(ILcdShapeList aPolylineM)
ILcdPoint
with least m-value in the polylineMpublic static ILcdPoint getEndPoint(ILcdShapeList aPolylineM)
ILcdPoint
with highest m-value in the polylineMpublic static double getBeginM(ILcdShapeList aPolylineM)
public static double getEndM(ILcdShapeList aPolylineM)
public static double getMLength(ILcdShapeList aPolylineM)
public static ILcdPoint getPoint(ILcdShapeList aPolylineM, double aM)
ILcdPoint
that has value aM
as its m-value in the polylineMpublic static ILcdPoint getPoint(ILcdShapeList aPolylineM, double aM, double aOffset)
ILcdPoint
that has value aM
as its m-value in the polylineM, and that has an offset of aOffset
(in model units) to the right of the polylineM
Note: use negative values to specify an offset to the left.public static boolean interacts(ILcdShapeList aPolylineM, double aLocation, ILcdBounds aBounds)
public static boolean interacts(ILcdShapeList aPolylineM, double aFrom, double aTo, ILcdBounds aBounds)
public static boolean interacts(ILcdShapeList aPolylineM, double aFrom, double aTo, ILcdPolygon aPolygon)
public static double getViewAngle(ILcdShapeList aPolylineM, double aM, ILcdModelXYWorldTransformation aMWT, ILcdGXYViewXYWorldTransformation aVWT)
ILcdPoint
that has value aM
as its m-value in the polylineM,
given the model to world transformation aMWT and the
world to view transformation aVWT.
If aM is outside the m values of the polylineM, the view angle is 0.0.
For a polylineM with less than two vertices, the view angle is 0.0.
For other polylineM objects, the view angle of the end vertices is the angle of the respective end segment. For other vertices, the view angle is the average of the angle of the segment arriving in the vertex and the segment starting in the vertex. For non-vertices, the view angle is the angle of the segment the point is on.
public static double getViewAngleOfVertex(ILcdPolyline aPolylineZ, int aPointIndex, ILcdModelXYWorldTransformation aMWT, ILcdGXYViewXYWorldTransformation aVWT)
For a PolylineZ with less than two points, the angle is 0.0.
For other PolylineZ objects, the view angle of the end vertices is the angle of the respective end segment. For other vertices, the view angle is the average of the angle of the segment arriving in the vertex and the segment starting in the vertex.