raster_tools.zonal.extract_points_eager#

raster_tools.zonal.extract_points_eager(points, raster, column_name='extracted', skip_validation=True, axis=0)[source]#

Extract the raster cell values using point features

Note

This function is partially eager. The x and y values for the target points are computed. The result is still a lazy dask DataFrame.

This finds the grid cells that the points fall into and extracts the value at each point. The input feature will be partially computed to make sure that all of the geometries are points, unless skip_validation is set to True.

Parameters
  • points (str, Vector) – The points to use for extracting data.

  • raster (str, Raster) – The raster to pull data from.

  • column_name (str, optional) – The column name to use for the extracted data points. Default is “extracted”.

  • skip_validation (bool, optional) – If True, the input points is not validated to make sure that all features are points. This prevents partially computing the data. Default is True.

  • axis (int, optional) – If 0 band column and values will be appended to a dataframe. Otherwise band values will be append to the columns named after the prefix and band of a dataframe

Returns

The columns names depend on the value of axis and are based on the “band” and `column_name variable. If axis = 0, the output band column within the dataframe identifies the band the value was extracted from. The values within the column named after the column name variable are the extracted values from the given band. Otherwise, the column names within the dataframe are appended to the column_name prefix and provide the extracted values. NaN values in the extracted column are where there was missing data in the raster or the point was outside the raster’s domain.

Return type

dask.dataframe.DataFrame