public final class GeoJson extends Object
| Modifier and Type | Method and Description |
|---|---|
static GeometryCollection |
geometryCollection(Geometry... geometries)
Return a GeometryCollection that will let you create a GeoJSON GeometryCollection.
|
static LineString |
lineString(Point... points)
Create a new LineString representing a GeoJSON LineString type.
|
static MultiLineString |
multiLineString(LineString... lines)
Create a new MultiLineString representing a GeoJSON MultiLineString type.
|
static MultiPoint |
multiPoint(Point... points)
Create a new MultiPoint representing a GeoJSON MultiPoint type.
|
static MultiPolygon |
multiPolygon(Polygon... polygons)
Create a new MultiPolygon representing a GeoJSON MultiPolygon type.
|
static Point |
point(double latitude,
double longitude)
Create a new Point representing a GeoJSON point type.
|
static Polygon |
polygon(LineString exteriorBoundary,
LineString... interiorBoundaries)
Lets you create a Polygon representing a GeoJSON Polygon type.
|
static Polygon |
polygon(Point... points)
Create a new Polygon representing a GeoJSON Polygon type.
|
public static Point point(double latitude, double longitude)
PointBuilder.latitude - the point's latitude coordinatelongitude - the point's longitude coordinatePointBuilder,
GeoJSONpublic static Polygon polygon(Point... points)
polygon(LineString, LineString...) to
create the Polygon. If you need to create Polygons with interior rings (holes), use that method.points - an ordered series of Points that make up the polygon. The first and last points should be the same to close the
polygonIllegalArgumentException - if the start and end points are not the samepolygon(LineString, LineString...),
GeoJSONpublic static LineString lineString(Point... points)
public static Polygon polygon(LineString exteriorBoundary, LineString... interiorBoundaries)
exteriorBoundary - a LineString that contains a series of Points that make up the polygon. The first and last points should
be the same to close the polygoninteriorBoundaries - optional varargs that let you define the boundaries for any holes inside the polygonIllegalArgumentException - if the start and end points are not the samepublic static MultiPoint multiPoint(Point... points)
public static MultiLineString multiLineString(LineString... lines)
public static MultiPolygon multiPolygon(Polygon... polygons)
public static GeometryCollection geometryCollection(Geometry... geometries)