geowombat.polygons_to_points(data, df, frac=1.0, min_frac_area=None, all_touched=False, id_column='id', n_jobs=1, **kwargs)#

Converts polygons to points.

  • data (DataArray or Dataset) – The xarray.DataArray or xarray.Dataset.

  • df (GeoDataFrame) – The geopandas.GeoDataFrame containing the geometry to rasterize.

  • frac (Optional[float]) – A fractional subset of points to extract in each feature.

  • min_frac_area (Optional[int | float]) – A minimum polygon area to use frac. Otherwise, use all samples within a polygon.

  • all_touched (Optional[bool]) – The all_touched argument is passed to rasterio.features.rasterize.

  • id_column (Optional[str]) – The ‘id’ column.

  • n_jobs (Optional[int]) – The number of features to rasterize in parallel.

  • kwargs (Optional[dict]) – Keyword arguments passed to multiprocessing.Pool().imap.