Class LinearRing
- java.lang.Object
-
- com.github.filosganga.geogson.model.AbstractGeometry<LinearPositions>
-
- com.github.filosganga.geogson.model.LinearGeometry
-
- com.github.filosganga.geogson.model.LineString
-
- com.github.filosganga.geogson.model.LinearRing
-
- All Implemented Interfaces:
Geometry<LinearPositions>,Serializable
public class LinearRing extends LineString
A closedLineString. JeoGson reference: @see http://geojson.org/geojson-spec.html#linestring. eg:LinearRing lr = LinearRing.of( Point.of(1,1), Point.of(1,2), Point.of(2,2), Point.of(2,1), Point.of(1,1) )- 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 LinearRing(LinearPositions positions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LinearRingof(Point... points)Create a LinearRing from the given points.static LinearRingof(Iterable<Point> points)Create a LinearRing from the given points.static LinearRingof(Stream<Point> points)Create a LinearRing from the given points.Geometry.Typetype()Returns the Geometry type.-
Methods inherited from class com.github.filosganga.geogson.model.LineString
isClosed
-
Methods inherited from class com.github.filosganga.geogson.model.LinearGeometry
points, toLinearRing, toLineString, toMultiPoint
-
-
-
-
Constructor Detail
-
LinearRing
public LinearRing(LinearPositions positions)
-
-
Method Detail
-
of
public static LinearRing of(Point... points)
Create a LinearRing from the given points.- Parameters:
points- Point sequence composed at least by 4 points, with the first and the last that are the same.- Returns:
- a LinearRing
-
of
public static LinearRing of(Iterable<Point> points)
Create a LinearRing from the given points.- Parameters:
points- Point Iterable composed at least by 4 points, with the first and the last that are the same.- Returns:
- a LinearRing
-
of
public static LinearRing of(Stream<Point> points)
Create a LinearRing from the given points.- Parameters:
points- Point Iterable composed at least by 4 points, with the first and the last that are the same.- Returns:
- a LinearRing
-
type
public Geometry.Type type()
Description copied from interface:GeometryReturns the Geometry type.- Specified by:
typein interfaceGeometry<LinearPositions>- Overrides:
typein classLineString- Returns:
- Type
-
-