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 GeometryCollection 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)
latitude - the point's latitude coordinatelongitude - the point's longitude coordinatePointBuilderpublic static LineString lineString(Point... points)
points - an ordered series of Points that make up the linepublic static Polygon polygon(Point... points)
org.mongodb.morphia.geo.GeoJson#polygon(LineString, LineString...) to create the
Polygon. If you need to create Polygons with interior rings (holes), use that method.
Supported by server versions 2.4 and above.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...)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)
points - a set of points that make up the MultiPoint objectpublic static MultiLineString multiLineString(LineString... lines)
lines - a set of lines that make up the MultiLineString objectpublic static MultiPolygon multiPolygon(Polygon... polygons)
polygons - a series of polygons (which may contain inner rings)public static GeometryCollection geometryCollection(Geometry... geometries)
geometries - a series of Geometry instances that will make up this GeometryCollection