类 GeoJSONUtil


  • public class GeoJSONUtil
    extends Object
    • 构造器详细资料

      • GeoJSONUtil

        public GeoJSONUtil()
    • 方法详细资料

      • toShape

        public static Shape toShape​(Geometry geometry)
        Convert GeoJSON geometry to shape
        参数:
        geometry - The geometry
        返回:
        Shape
      • fromShape

        public static Geometry fromShape​(Shape shape)
        Convert shape to GeoJSON geometry
        参数:
        shape - The shape
        返回:
        Geometry
      • fromShape

        public static Point fromShape​(PointShape pointShape)
        Convert PointShape to GeoJSON Point
        参数:
        pointShape - The PointShape object
        返回:
        GeoJSON Point object
      • toShape

        public static PointShape toShape​(Point point)
        Convert GeoJSON Point to PointShape
        参数:
        point - The GeoJSON Point object
        返回:
        PointShape object
      • fromShape

        public static Geometry fromShape​(PolylineShape polylineShape)
        Convert PolylineShape to GeoJSON LineString or MultiLineString
        参数:
        polylineShape - The PolylineShape object
        返回:
        GeoJSON LineString or MultiLineString object
      • toShape

        public static PolylineShape toShape​(LineString lineString)
        Convert GeoJSON LineString to PolylineShape
        参数:
        lineString - The GeoJSON LineString object
        返回:
        PolylineShape object
      • toShape

        public static PolylineShape toShape​(MultiLineString lineString)
        Convert GeoJSON LineString to PolylineShape
        参数:
        lineString - The GeoJSON LineString object
        返回:
        PolylineShape object
      • fromShape

        public static Geometry fromShape​(PolygonShape polygonShape)
        Convert PolygonShape to GeoJSON Polygon or MultiPolygon
        参数:
        polygonShape - The PolygonShape object
        返回:
        GeoJSON Polygon or MultiPolygon object
      • toShape

        public static PolygonShape toShape​(Polygon polygon)
        Convert GeoJSON Polygon to PolygonShape
        参数:
        polygon - The GeoJSON Polygon object
        返回:
        PolygonShape object
      • toShape

        public static PolygonShape toShape​(MultiPolygon multiPolygon)
        Convert GeoJSON MultiPolygon to PolygonShape
        参数:
        multiPolygon - The GeoJSON MultiPolygon object
        返回:
        PolygonShape object
      • getShapeType

        public static ShapeTypes getShapeType​(Geometry geometry)
        Get shape type from GeoJSON geometry
        参数:
        geometry - GeoJSON geometry
        返回:
        Shape type
      • getShapeType

        public static ShapeTypes getShapeType​(Feature feature)
        Get shape type from GeoJSON feature
        参数:
        feature - GeoJSON feature
        返回:
        Shape type
      • getLegendBreak

        public static ColorBreak getLegendBreak​(Feature feature)
        Get legend break from GeoJSON feature
        参数:
        feature - GeoJSON feature
        返回:
        Legend break