lmpy.tools.create_rare_species_model

Create a rare species model by intersecting convex hull and ecoregions.

Module Contents

Functions

cli()

Command-line interface for creating a rare species model.

create_rare_species_model(points, ecoregions_filename, model_raster_filename, raster_format=AUTO_FORMAT, nodata_value=-9999, burn_value=50)

Create a rare species model from a convex hull intersected with ecoregions.

write_tiff(out_filename, model_data, cell_size, min_x, max_y, epsg, nodata_value)

Write model data to tiff file.

lmpy.tools.create_rare_species_model.cli()[source]

Command-line interface for creating a rare species model.

lmpy.tools.create_rare_species_model.create_rare_species_model(points, ecoregions_filename, model_raster_filename, raster_format=AUTO_FORMAT, nodata_value=- 9999, burn_value=50)[source]

Create a rare species model from a convex hull intersected with ecoregions.

Parameters
  • points (list of Point) – A list of occurrence points to use for model.

  • ecoregions_filename (str) – The file location for the ecoregions data.

  • model_raster_filename (str) – The file location to write the model raster.

  • raster_format (str) – The output raster format (default: auto - use filename).

  • nodata_value (int) – The value to use for nodata in the model raster.

  • burn_value (int) – The burn value to use for model presence.

lmpy.tools.create_rare_species_model.write_tiff(out_filename, model_data, cell_size, min_x, max_y, epsg, nodata_value)[source]

Write model data to tiff file.

Parameters
  • out_filename (str) – The file location to write the raster.

  • model_data (numpy.ndarray) – Raster data in the form of a matrix or array.

  • cell_size (number) – The desired size of each raster cell in map units.

  • min_x (number) – The minimum x value for the raster in map units.

  • max_y (number) – The maximum y value for the raster in map units.

  • epsg (int) – The EPSG code to use to define the map projection.

  • nodata_value (number) – The value to be considered “nodata” in the raster.