Class GeoJson


  • @Deprecated(since="2.0",
                forRemoval=true)
    public final class GeoJson
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    use the driver-provided types instead
    Factory class for creating GeoJSON types. See the documentation for all the types.
    • Method Detail

      • polygon

        public static Polygon polygon​(Point... points)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new Polygon representing a GeoJSON Polygon type. This helper method uses polygon(LineString, LineString...) to create the Polygon. If you need to create Polygons with interior rings (holes), use that method.
        Parameters:
        points - an ordered series of Points that make up the polygon. The first and last points should be the same to close the polygon
        Returns:
        a Polygon as defined by the points.
        Throws:
        IllegalArgumentException - if the start and end points are not the same
        See Also:
        polygon(LineString, LineString...), GeoJSON
        Since server release
        2.4
      • lineString

        public static LineString lineString​(Point... points)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new LineString representing a GeoJSON LineString type.
        Parameters:
        points - an ordered series of Points that make up the line
        Returns:
        a LineString instance representing a series of ordered points that make up a line
        See Also:
        GeoJSON
        Since server release
        2.4
      • polygon

        public static Polygon polygon​(LineString exteriorBoundary,
                                      LineString... interiorBoundaries)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Lets you create a Polygon representing a GeoJSON Polygon type. This method is especially useful for defining polygons with inner rings.
        Parameters:
        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 polygon
        interiorBoundaries - optional varargs that let you define the boundaries for any holes inside the polygon
        Returns:
        a PolygonBuilder to be used to build up the required Polygon
        Throws:
        IllegalArgumentException - if the start and end points are not the same
        See Also:
        GeoJSON
        Since server release
        2.4
      • multiPoint

        public static MultiPoint multiPoint​(Point... points)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new MultiPoint representing a GeoJSON MultiPoint type.
        Parameters:
        points - a set of points that make up the MultiPoint object
        Returns:
        a MultiPoint object containing all the given points
        See Also:
        GeoJSON
        Since server release
        2.6
      • multiLineString

        public static MultiLineString multiLineString​(LineString... lines)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new MultiLineString representing a GeoJSON MultiLineString type.
        Parameters:
        lines - a set of lines that make up the MultiLineString object
        Returns:
        a MultiLineString object containing all the given lines
        See Also:
        GeoJSON
        Since server release
        2.6
      • multiPolygon

        public static MultiPolygon multiPolygon​(Polygon... polygons)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new MultiPolygon representing a GeoJSON MultiPolygon type.
        Parameters:
        polygons - a series of polygons (which may contain inner rings)
        Returns:
        a MultiPolygon object containing all the given polygons
        See Also:
        GeoJSON
        Since server release
        2.6
      • geometryCollection

        public static GeometryCollection geometryCollection​(Geometry... geometries)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Return a GeometryCollection that will let you create a GeoJSON GeometryCollection.
        Parameters:
        geometries - a series of Geometry instances that will make up this GeometryCollection
        Returns:
        a GeometryCollection made up of all the geometries
        See Also:
        GeoJSON
        Since server release
        2.6
      • convertPoints

        @MorphiaInternal
        public static List<Position> convertPoints​(List<Point> values)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Parameters:
        values - the values to convert
        Returns:
        the converted values
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • convertLineStrings

        @MorphiaInternal
        public static List<List<Position>> convertLineStrings​(List<LineString> values)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Parameters:
        values - the values to convert
        Returns:
        the converted values
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.