Interface LineString
-
- All Superinterfaces:
Geometry
public interface LineString extends Geometry
The driver-side representation for DSE'sLineString.This is a curve in a two-dimensional XY-plane, represented by a set of points (with linear interpolation between them).
The default implementation returned by the driver is immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LineStringfromGeoJson(String source)Creates a line string from a GeoJSON LineString representation.static LineStringfromPoints(Point p1, Point p2, Point... pn)Creates a line string from two or more points.static LineStringfromWellKnownBinary(ByteBuffer source)Creates a line string from its Well-known Binary (WKB) representation.static LineStringfromWellKnownText(String source)Creates a line string from its Well-known Text (WKT) representation.List<Point>getPoints()-
Methods inherited from interface com.datastax.dse.driver.api.core.data.geometry.Geometry
asGeoJson, asWellKnownBinary, asWellKnownText, contains
-
-
-
-
Method Detail
-
fromWellKnownText
@NonNull static LineString fromWellKnownText(@NonNull String source)
Creates a line string from its Well-known Text (WKT) representation.- Parameters:
source- the Well-known Text representation to parse.- Returns:
- the line string represented by the WKT.
- Throws:
IllegalArgumentException- if the string does not contain a valid Well-known Text representation.
-
fromWellKnownBinary
@NonNull static LineString fromWellKnownBinary(@NonNull ByteBuffer source)
Creates a line string from its Well-known Binary (WKB) representation.- Parameters:
source- the Well-known Binary representation to parse.- Returns:
- the line string represented by the WKB.
- Throws:
IllegalArgumentException- if the providedByteBufferdoes not contain a valid Well-known Binary representation.
-
fromGeoJson
@NonNull static LineString fromGeoJson(@NonNull String source)
Creates a line string from a GeoJSON LineString representation.- Parameters:
source- the GeoJSON LineString representation to parse.- Returns:
- the line string represented by the GeoJSON LineString.
- Throws:
IllegalArgumentException- if the string does not contain a valid GeoJSON LineString representation.
-
fromPoints
@NonNull static LineString fromPoints(@NonNull Point p1, @NonNull Point p2, @NonNull Point... pn)
Creates a line string from two or more points.
-
-