Class LineStrings


  • public class LineStrings
    extends Object
    Helper class for working with LineString objects.
    • Constructor Detail

      • LineStrings

        public LineStrings()
    • Method Detail

      • of

        public static LineString of​(Point... points)
        Create a LineString object based on a set of geo Points.
        Parameters:
        points - The set of Points representing the LineString.
        Returns:
        The LineString representing the geo feature.
      • of

        public static LineString of​(List<Point> points)
        Create a LineString object based on a set of geo Points.
        Parameters:
        points - The set of Points representing the LineString.
        Returns:
        The LineString representing the geo feature.
      • of

        public static LineString of​(double[][] coordinates)
                             throws Exception
        Create a LineString object based on a list of point coordinates. Each entry in the list is a list of coordinate pairs or a triplet: long, lat and an optional elevation. The coordinate datum is World Geodetic System 1984 (WGS 84), with longitude and latitude units of decimal degrees. The optional elevation is expressed in height in meters above or below the WGS 84 reference ellipsoid. For example, [[30.0, 40.0], [35.0, 45.0]].
        Parameters:
        coordinates - The coordinate pairs/triplets for the LineString.
        Returns:
        The LineString representing the geo feature.
        Throws:
        Exception
      • of

        public static LineString of​(double... coordinates)
                             throws Exception
        Create a LineString object based on a set of coordinates. The coordinates must be in pairs of long, lat. I.e. this method does not accept coordinates that contain an elevation component, and you must supply an even number of coordinates in order for the input to be valid. The coordinate datum is World Geodetic System 1984 (WGS 84), with longitude and latitude units of decimal degrees. For example, the input array [30.0, 40.0, 35.0, 45.0] will be interpreted as the coordinate pairs of [[30.0, 40.0], [35.0, 45.0]].
        Parameters:
        coordinates - The coordinate pairs for the LineString.
        Returns:
        The LineString representing the geo feature.
        Throws:
        Exception