Meta

Get coords from features

turf.invariant.get_coords_from_features(features: Any, allowed_types: Sequence = None) → List[source]

Retrieves coords from Features. Features must be a GeoJSON, a Feature object or a list of coordinates, otherwise it raises an exception.

Parameters
  • features – Any input value(s)

  • allowed_types – allowed Feature types

Returns

list with extracted coords

Get coords from features

turf.invariant.get_coords_from_geometry(geometry: Any, allowed_types: Sequence = None, raise_exception: bool = True) → List[source]

Retrieves coords from a given Geometry. Geometry must be a GeoJSON, a Geometry object or a list of coordinates, otherwise it raises an exception.

Parameters
  • geometry – Any input value(s)

  • allowed_types – allowed Feature types

  • raise_exception – if an exception should be raised or if it should be silent

Returns

list with extracted coords

Get geometry from features

turf.invariant.get_geometry_from_features(features: Any, allowed_types: Sequence = None) → List[source]

Retrieves Geometries from Features. Features must be a GeoJSON, a Feature object or a list of coordinates, otherwise it raises an exception.

Parameters
  • features – Any input value(s)

  • allowed_types – allowed Feature types

Returns

list with extracted coords