lmpy.data_wrangling.occurrence.unique_localities_wrangler

Module containing occurrence data wranglers for filtering points.

Module Contents

Classes

UniqueLocalitiesFilter

Get an occurrence data wrangler unique localities for a group of points.

class lmpy.data_wrangling.occurrence.unique_localities_wrangler.UniqueLocalitiesFilter(do_reset=True, **params)[source]

Bases: lmpy.data_wrangling.occurrence.base._OccurrenceDataWrangler

Get an occurrence data wrangler unique localities for a group of points.

Parameters
  • do_reset (bool) – Reset the list of seen localities after each group.

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

name = UniqueLocalitiesFilter[source]
version = 1.0[source]
_pass_condition(point)[source]

Assess a point to see if it is unique spatially.

Parameters

point (Point) – A point object to assess.

Returns

An indication if the point is spatially unique.

Return type

bool

wrangle_points(points)[source]

Wrangle points.

Adds an optional reset step so the same filter can be used for many species.

Parameters

points (list of Point) – A list of points to wrangle.

Returns

A list of points with unique localities.

Return type

list of Point