Package com.cognite.client.util.geo
Class LineStrings
java.lang.Object
com.cognite.client.util.geo.LineStrings
Helper class for working with
LineString objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 LineStringCreate aLineStringobject based on a set of geoPoints.static LineStringCreate aLineStringobject based on a set of geoPoints.
-
Constructor Details
-
LineStrings
public LineStrings()
-
-
Method Details
-
of
Create aLineStringobject based on a set of geoPoints.- Parameters:
points- The set of Points representing the LineString.- Returns:
- The
LineStringrepresenting the geo feature.
-
of
Create aLineStringobject based on a set of geoPoints.- Parameters:
points- The set of Points representing the LineString.- Returns:
- The
LineStringrepresenting the geo feature.
-
of
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
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
-