TaggedLineSegment class
- Inheritance
-
- Object
- LineSegment
- TaggedLineSegment
Constructors
- TaggedLineSegment(Coordinate p0, Coordinate p1, Geometry? parent, int index)
- TaggedLineSegment.fromCoordinates(Coordinate p0, Coordinate p1)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index ↔ int?
-
getter/setter pair
- p0 ↔ Coordinate
-
getter/setter pairinherited
- p1 ↔ Coordinate
-
getter/setter pairinherited
- parent ↔ Geometry?
-
A {@link LineSegment} which is tagged with its location in a parent {@link Geometry}.
Used to index the segments in a geometry and recover the segment locations
from the index.
/
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
angle(
) → double -
Computes the angle that the vector defined by this segment
makes with the X-axis.
The angle will be in the range
-PI, PI
radians.inherited -
closestPoint(
Coordinate p) → Coordinate -
Computes the closest point on this line segment to another point.
@param p the point to find the closest point to
@return a Coordinate which is the closest point on the line segment to the point p
inherited
-
closestPoints(
LineSegment line) → List< Coordinate> -
Computes the closest points on two line segments.
inherited
-
compareTo(
dynamic o) → int -
Compares this object with the specified object for order.
Uses the standard lexicographic ordering for the points in the LineSegment.
inherited
-
distance(
LineSegment ls) → double -
Computes the distance between this line segment and another segment.
inherited
-
distanceCoord(
Coordinate p) → double -
Computes the distance between this line segment and a given point.
inherited
-
distancePerpendicular(
Coordinate p) → double -
Computes the perpendicular distance between the (infinite) line defined
by this line segment and a point.
inherited
-
equals(
Object o) → bool -
Returns
true
ifother
has the same values for its points.inherited -
equalsTopo(
LineSegment other) → bool -
Returns
true
ifother
is topologically equal to this LineSegment (e.g. irrespective of orientation).inherited -
getCoordinate(
int i) → Coordinate -
inherited
-
getIndex(
) → int? -
getLength(
) → double -
Computes the length of the line segment.
@return the length of the line segment
inherited
-
getParent(
) → Geometry? -
intersection(
LineSegment line) → Coordinate? -
Computes an intersection point between two line segments, if there is one.
There may be 0, 1 or many intersection points between two segments.
If there are 0, null is returned. If there is 1 or more,
exactly one of them is returned
(chosen at the discretion of the algorithm).
If more information is required about the details of the intersection,
the {@link RobustLineIntersector} class should be used.
inherited
-
isHorizontal(
) → bool -
Tests whether the segment is horizontal.
inherited
-
isVertical(
) → bool -
Tests whether the segment is vertical.
inherited
-
lineIntersection(
LineSegment line) → Coordinate? -
Computes the intersection point of the lines of infinite extent defined
by two line segments (if there is one).
There may be 0, 1 or an infinite number of intersection points
between two lines.
If there is a unique intersection point, it is returned.
Otherwise, null is returned.
If more information is required about the details of the intersection,
the {@link RobustLineIntersector} class should be used.
inherited
-
maxX(
) → double -
Gets the maximum X ordinate.
@return the maximum X ordinate
inherited
-
maxY(
) → double -
Gets the maximum Y ordinate.
@return the maximum Y ordinate
inherited
-
midPoint(
) → Coordinate -
Computes the midpoint of the segment
inherited
-
minX(
) → double -
Gets the minimum X ordinate.
@return the minimum X ordinate
inherited
-
minY(
) → double -
Gets the minimum Y ordinate.
@return the minimum Y ordinate
inherited
-
normalize(
) → void -
Puts the line segment into a normalized form.
This is useful for using line segments in maps and indexes when
topological equality rather than exact equality is desired.
A segment in normalized form has the first point smaller
than the second (according to the standard ordering on {@link Coordinate}).
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orientationIndex(
LineSegment seg) → int -
Determines the orientation of a LineSegment relative to this segment.
The concept of orientation is specified as follows:
Given two line segments A and L,
inherited
-
orientationIndexCoord(
Coordinate p) → int -
Determines the orientation index of a {@link Coordinate} relative to this segment.
The orientation index is as defined in {@link Orientation#computeOrientation}.
inherited
-
pointAlong(
double segmentLengthFraction) → Coordinate -
Computes the {@link Coordinate} that lies a given
fraction along the line defined by this segment.
A fraction of
0.0
returns the start point of the segment; a fraction of1.0
returns the end point of the segment. If the fraction is < 0.0 or > 1.0 the point returned will lie before the start or beyond the end of the segment.inherited -
pointAlongOffset(
double segmentLengthFraction, double offsetDistance) → Coordinate -
Computes the {@link Coordinate} that lies a given
fraction along the line defined by this segment and offset from
the segment by a given distance.
A fraction of
0.0
offsets from the start point of the segment; a fraction of1.0
offsets from the end point of the segment. The computed point is offset to the left of the line if the offset distance is positive, to the right if negative.inherited -
project(
LineSegment seg) → LineSegment? -
Project a line segment onto this line segment and return the resulting
line segment. The returned line segment will be a subset of
the target line line segment. This subset may be null, if
the segments are oriented in such a way that there is no projection.
inherited
-
projectCoord(
Coordinate p) → Coordinate -
Compute the projection of a point onto the line determined
by this line segment.
inherited
-
projectionFactor(
Coordinate p) → double -
Computes the Projection Factor for the projection of the point p
onto this LineSegment. The Projection Factor is the constant r
by which the vector for this segment must be multiplied to
equal the vector for the projection of p on the line
defined by this segment.
inherited
-
reverse(
) → void -
Reverses the direction of the line segment.
inherited
-
segmentFraction(
Coordinate inputPt) → double -
Computes the fraction of distance (in
0.0, 1.0
) that the projection of a point occurs along this line segment. If the point is beyond either ends of the line segment, the closest fractional value (0.0 or 1.0) is returned.inherited -
setCoordinates(
Coordinate p0, Coordinate p1) → void -
inherited
-
setCoordinatesFromLinesegment(
LineSegment ls) → void -
inherited
-
toGeometry(
GeometryFactory geomFactory) → LineString -
Creates a LineString with the same coordinates as this segment
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited