Both accept any GDAL-supported format — Shapefile (
.shp), GeoJSON (.geojson), GeoPackage (.gpkg), or GeoParquet (.parquet).
Clipping to a region
Grouping by polygon attributes
Useintersect_polygons() to attach polygon attributes, then group by them:
Combining both
Clip to a study area and group within it:Things to know
- Plots outside all polygons get
NULLattribute values. They still contribute to non-grouped estimates, butgrp_byexcludesNULLgroups. - The first spatial query loads the DuckDB spatial extension; subsequent queries are faster.
Method signatures
self, so they chain.
See also
- Domain filtering — non-spatial filtering
- Grouping results — grouping by FIA attributes
- FIA Database API — full
FIAclass reference