compute_id#

geodesic.boson.compute_id(input_collection=None, output_collection=None)[source]#

Compute an ID for each feature in the search response.

This middleware will compute an ID for each feature in the search response. The ID is computed by hashing the properties and geometry of the feature. This is useful for when you want to uniquely identify each feature in the search response when the features do not have an existing ID.

Parameters:
  • 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)

Returns:

middleware to compute an ID for each feature in the search response

Return type:

Middleware

Examples

>>> # Compute an ID for each feature in the search response
>>> transform = compute_id()