map2loop.sampler.SamplerDecimator#

class map2loop.sampler.SamplerDecimator(decimation: int = 1)#

Bases: Sampler

Decimator sampler class which decimates the geo data frame based on the decimation value ie. decimation = 10 means take every tenth point Note: This only works on data frames with lists of points with columns “X” and “Y”

Initialiser for decimator sampler

Parameters:

decimation (int, optional) – stride of the points to sample. Defaults to 1.

__init__(decimation: int = 1)#

Initialiser for decimator sampler

Parameters:

decimation (int, optional) – stride of the points to sample. Defaults to 1.

Methods

__init__([decimation])

Initialiser for decimator sampler

sample(spatial_data[, map_data])

Execute sample method takes full point data, samples the data and returns the decimated points

type()

Getter for subclass type label

sample(spatial_data: GeoDataFrame, map_data: MapData | None = None) DataFrame#

Execute sample method takes full point data, samples the data and returns the decimated points

Parameters:

spatial_data (geopandas.GeoDataFrame) – the data frame to sample

Returns:

pandas.DataFrame – the sampled data points

type()#

Getter for subclass type label

Returns:

str – Name of subclass