points_to_polyline#

geodesic.boson.points_to_polyline(track_id_field, sort_field, point_feature_limit=None, input_collection=None, output_collection=None)[source]#

Create polyline/linestring features from an ordered sequence of points.

Parameters:
  • track_id_field (str) – field in the properties that contains the track ID. Points will be grouped together on this field.

  • sort_field (str) – field in the properties that contains the sort order. This field can be a datetime field or a numeric field.

  • point_feature_limit (int, optional) – maximum number of point features to use when creating the polylines. Defaults to None (server’s default limit, 500000).

  • input_collection (str, optional) – name of the input collection to apply transform to. Defaults to None (all collections)

  • output_collection (str, optional) – name of the virtual collection that the transform will be applied to. Defaults to None (no virtual collection created)

Examples

>>> # Create ship tracks based on a vessel's MMSI
>>> transform = points_to_polyline(
...     track_id_field="MMSI",
...     sort_field="timestamp"
... )
>>> # Create linear pipeline geometries based on a pipeline ID
>>> transform = points_to_polyline(
...     track_id_field="pipeline_id",
...     sort_field="mile_marker"
... )