Both eg writing a Shapefile/GeoJSON/.. with geopandas as writing eg a netcdf file with xarray (with rasterio I think we showed how to do this)