public class LineString extends Geometry
Geometry
consisting of the LineSegment
s defined by
consecutive pairs of Point
s of a PointSequence
.Modifier | Constructor and Description |
---|---|
protected |
LineString(LineString base)
This constructor has been added to speed up object creation of LinearRings
|
|
LineString(PointSequence points)
Constructs a
LineString from the specified PointSequence and coordinate reference system |
|
LineString(PointSequence points,
GeometryOperations geometryOperations)
Constructs a
LineString from the specified PointSequence , coordinate reference system
and GeometryOperations implementation. |
Modifier and Type | Method and Description |
---|---|
void |
accept(GeometryVisitor visitor)
Accepts a
GeometryVisitor . |
static LineString |
createEmpty()
Constructs an empty
LineString . |
int |
getDimension()
Returns the topological dimension of this instance.
|
Point |
getEndPoint()
Returns the last
Point of this LineString . |
GeometryType |
getGeometryType()
Returns the type of this
Geometry . |
double |
getLength()
Returns the length of this
LineString in its coordinate reference system. |
PointSequence |
getPoints()
Returns the
PointCollection that is associated with this instance |
Point |
getStartPoint()
Returns the first
Point of this LineString . |
boolean |
isClosed()
Checks whether this
LineString is closed, i.e. |
boolean |
isRing()
Checks whether this
LineString is a ring, i.e. |
asBinary, asText, buffer, collectPointSets, contains, convexHull, crosses, difference, disjoint, distance, equals, getBoundary, getCoordinateDimension, getCrsId, getCrsId, getDimensionalFlag, getEnvelope, getGeometryOperations, getGeometryOperations, getNumPoints, getPointN, getSRID, hashCode, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, locateAlong, locateBetween, overlaps, relate, symDifference, toString, touches, union, within
protected LineString(LineString base)
base
- public LineString(PointSequence points, GeometryOperations geometryOperations)
LineString
from the specified PointSequence
, coordinate reference system
and GeometryOperations
implementation.points
- the PointSequence
geometryOperations
- the GeometryOperations
implementationIllegalArgumentException
- if the passed PointSequence
is non-empty and of size < 2public LineString(PointSequence points)
LineString
from the specified PointSequence
and coordinate reference systempoints
- the PointSequence
public static LineString createEmpty()
LineString
.public PointSequence getPoints()
Geometry
PointCollection
that is associated with this instancepublic double getLength()
LineString
in its coordinate reference system.LineString
in its coordinate reference system.public Point getStartPoint()
Point
of this LineString
.Point
of this LineString
.public Point getEndPoint()
Point
of this LineString
.Point
of this LineString
.public boolean isClosed()
LineString
is closed, i.e. the first Point
equals the last.LineString
is closed.public boolean isRing()
LineString
is a ring, i.e. is closed and simple.LineString
is a ring.public int getDimension()
Geometry
Geometries
.getDimension
in class Geometry
public GeometryType getGeometryType()
Geometry
Geometry
.getGeometryType
in class Geometry
GeometryType
of this instance.public void accept(GeometryVisitor visitor)
Geometry
GeometryVisitor
.
If this Geometry
instance is a GeometryCollection
then it will pass the
visitor to its contained Geometries
.
Copyright © 2015 geolatte.org. All rights reserved.