lmpy.data_wrangling.occurrence.spatial_index_wrangler

Module containing occurrence data wranglers for filtering points.

Module Contents

Classes

SpatialIndexFilter

A data wrangler to filter points using a spatial index.

class lmpy.data_wrangling.occurrence.spatial_index_wrangler.SpatialIndexFilter(spatial_index, intersections_map, check_hit_func, **params)[source]

Bases: lmpy.data_wrangling.occurrence.base._OccurrenceDataWrangler

A data wrangler to filter points using a spatial index.

Parameters
  • spatial_index (SpatialIndex) – A SpatialIndex object that can be searched.

  • intersections_map (dict) – A dictionary of species name keys and corresponding valid intersection values.

  • check_hit_func (Method) – A function that takes two arguments (search hit, valid intersections for a species) and returns a boolean indication if the hit should be counted.

  • **params (dict) – Extra parameters to be sent to the base class.

name = SpatialIndexFilter[source]
version = 1.0[source]
_pass_condition(self, point)[source]

Assess a point to see if it passes the spatial index filter.

Parameters

point (Point) – A point object to assess.

Returns

Indication if the point passess the assessment.

Return type

bool