public class LineString extends Geometry
LineStringType
.
This is a curve in a two-dimensional XY-plane, represented by a set of points (with linear interpolation between them).
Constructor and Description |
---|
LineString(Point p1,
Point p2,
Point... pn)
Creates a line string from a series of 2 or more points.
|
Modifier and Type | Method and Description |
---|---|
static LineString |
fromGeoJson(String source)
Creates a line string from a GeoJSON
LineString representation.
|
static LineString |
fromWellKnownBinary(ByteBuffer source)
Creates a line string from its Well-known Binary
(WKB) representation.
|
static LineString |
fromWellKnownText(String source)
Creates a line string from its Well-known Text (WKT) representation.
|
List<Point> |
getPoints()
Returns the points composing this line string.
|
asGeoJson, asWellKnownBinary, asWellKnownText, contains, equals, hashCode, toString
public static LineString fromWellKnownText(String source)
source
- the Well-known Text representation to parse.InvalidTypeException
- if the string does not contain a valid Well-known Text
representation.public static LineString fromWellKnownBinary(ByteBuffer source)
source
- the Well-known Binary representation to parse.InvalidTypeException
- if the provided ByteBuffer
does not contain a valid
Well-known Binary representation.public static LineString fromGeoJson(String source)
source
- the GeoJSON
LineString representation to parse.InvalidTypeException
- if the string does not contain a valid GeoJSON LineString
representation.Copyright © 2012–2018. All rights reserved.