geoutils.operators.PointNeighbours#
- class geoutils.operators.PointNeighbours(max_points=None, radius=None)[source]#
Define a point neighborhood by a max number of points inside a radius.
Pass a PointNeighbours to an Interpolator/Reducer to change which nearby points it uses. For example,
InverseDistance(neighborhood=PointNeighbours(max_points=12, radius=50))uses up to 12 points within 50 coordinate units. Distances are measured in X/Y, so the radius defines a circle around each requested position. A Reducer can use the same neighborhood when grid() combines nearby point values.from geoutils.operators import PointNeighbours from geoutils.operators.interpolator import InverseDistance from geoutils.operators.reducer import Mean nearby = PointNeighbours(max_points=12, radius=50) gridded = points.grid(ref=reference_raster, resampling=InverseDistance(neighborhood=nearby)) averaged = points.grid(ref=reference_raster, resampling=Mean(neighborhood=nearby))
- Parameters:
- __init__(max_points=None, radius=None)#
Methods
__init__([max_points, radius])Attributes
max_pointsradius