Class LineString
- java.lang.Object
-
- com.github.filosganga.geogson.model.AbstractGeometry<LinearPositions>
-
- com.github.filosganga.geogson.model.LinearGeometry
-
- com.github.filosganga.geogson.model.LineString
-
- All Implemented Interfaces:
Geometry<LinearPositions>,Serializable
- Direct Known Subclasses:
LinearRing
public class LineString extends LinearGeometry
Specialization of LinearGeometry composed at least by 2 points.JeoGson reference: @see http://geojson.org/geojson-spec.html#linestring.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.filosganga.geogson.model.Geometry
Geometry.Type
-
-
Constructor Summary
Constructors Constructor Description LineString(LinearPositions positions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisClosed()Return if this LineString: - Is composed by at least 4 points - The first and the last Point are the same.static LineStringof(Point... points)Creates a LineString from the given points.static LineStringof(Iterable<Point> points)Creates a LineString from the given points.static LineStringof(Stream<Point> points)Creates a LineString from the given points.Geometry.Typetype()Returns the Geometry type.-
Methods inherited from class com.github.filosganga.geogson.model.LinearGeometry
points, toLinearRing, toLineString, toMultiPoint
-
-
-
-
Constructor Detail
-
LineString
public LineString(LinearPositions positions)
-
-
Method Detail
-
of
public static LineString of(Point... points)
Creates a LineString from the given points.- Parameters:
points- Sequence of Point composed at least by 2 points.- Returns:
- a LineString
-
of
public static LineString of(Iterable<Point> points)
Creates a LineString from the given points.- Parameters:
points- Iterable of Point at least by 2 points.- Returns:
- a LineString
-
of
public static LineString of(Stream<Point> points)
Creates a LineString from the given points.- Parameters:
points- Iterable of Point at least by 2 points.- Returns:
- a LineString
-
type
public Geometry.Type type()
Description copied from interface:GeometryReturns the Geometry type.- Returns:
- Type
-
isClosed
public boolean isClosed()
Return if this LineString: - Is composed by at least 4 points - The first and the last Point are the same.For more details @see http://geojson.org/geojson-spec.html#linestring.
- Returns:
- true if this Linestring is closed false otherwise.
-
-