Package com.cognite.client.util.geo
Class LineStrings
- java.lang.Object
-
- com.cognite.client.util.geo.LineStrings
-
public class LineStrings extends Object
Helper class for working withLineStringobjects.
-
-
Constructor Summary
Constructors Constructor Description LineStrings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LineStringof(double... coordinates)Create aLineStringobject based on a set of coordinates.static LineStringof(double[][] coordinates)Create aLineStringobject based on a list of point coordinates.static LineStringof(Point... points)Create aLineStringobject based on a set of geoPoints.static LineStringof(List<Point> points)Create aLineStringobject based on a set of geoPoints.
-
-
-
Method Detail
-
of
public static LineString of(Point... points)
Create aLineStringobject based on a set of geoPoints.- Parameters:
points- The set of Points representing the LineString.- Returns:
- The
LineStringrepresenting the geo feature.
-
of
public static LineString of(List<Point> points)
Create aLineStringobject based on a set of geoPoints.- Parameters:
points- The set of Points representing the LineString.- Returns:
- The
LineStringrepresenting the geo feature.
-
of
public static LineString of(double[][] coordinates) throws Exception
Create aLineStringobject 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
LineStringrepresenting the geo feature. - Throws:
Exception
-
of
public static LineString of(double... coordinates) throws Exception
Create aLineStringobject 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
LineStringrepresenting the geo feature. - Throws:
Exception
-
-