Update features

async AsyncCogniteClient.geospatial.update_features(
feature_type_external_id: str,
feature: Feature | FeatureWrite | Sequence[Feature] | Sequence[FeatureWrite],
allow_crs_transformation: bool = False,
chunk_size: int | None = None,
) → Feature | FeatureList

Update features.

Deprecated since version 8.23.0: The Geospatial API is deprecated and is scheduled for removal on 2027-12-31. There is no replacement in the data modeling service; plan to stop using it. See https://docs.cognite.com/cdf/deprecated for details and migration guidance.

Parameters:
  • feature_type_external_id (str) – No description.

  • feature (Feature | FeatureWrite | Sequence[Feature] | Sequence[FeatureWrite]) – feature or list of features.

  • allow_crs_transformation (bool) – If true, then input geometries will be transformed into the Coordinate Reference System defined in the feature type specification. When it is false, then requests with geometries in Coordinate Reference System different from the ones defined in the feature type will result in CogniteAPIError exception.

  • chunk_size (int | None) – maximum number of items in a single request to the api

Returns:

Updated features

Return type:

Feature | FeatureList

Examples

Update one feature:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> my_feature = client.geospatial.create_features(
...     feature_type_external_id="my_feature_type",
...     feature=Feature(external_id="my_feature", temperature=12.4),
... )
>>> my_updated_feature = client.geospatial.update_features(
...     feature_type_external_id="my_feature_type",
...     feature=Feature(external_id="my_feature", temperature=6.237),
... )