Points#
Points represents a set of point geometries — individual plants,
sampling locations, detections. It subclasses
geopandas.GeoDataFrame and shares the same basics as the other types
(CRS conversions, table utilities, save() — see the
Lines page for the list).
from shapelib import read_file
points = read_file("plants.gpkg")
Neighbor distances#
The average distance from each point to its nearest neighbor — useful to estimate planting density:
avg = points.calculate_average_nearest_neighbor_distance(max_distance=30.0)
Buffering#
circles = points.buffer_m(1.0) # circular buffers, in meters -> Polygons
Rasters#
Points converts to and from raster masks:
points = Points.from_mask(mask, dataset_reader=orto)
mask = points.to_mask(dataset_reader=orto)
See Raster converters for details.