Skip to content

r.out.maxent_swd

Exports map data as input to MaxEnt in SWD format

r.out.maxent_swd [-z] [alias_input=name] [env_maps=name [,name,...]] [alias_names=string] [bgr_output=name] [alias_output=name] [bgr_mask=name] [species_masks=name [,name,...]] [species_output=name] [species_names=string] [null_value=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.out.maxent_swd alias_input=name

grass.script.run_command("r.out.maxent_swd", alias_input=None, env_maps=None, alias_names=None, bgr_output=None, alias_output=None, bgr_mask=None, species_masks=None, species_output=None, species_names=None, null_value=-9999, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.out.maxent_swd", alias_input="name")

Parameters

alias_input=name
    File containg map and alias name(s) for environmental parameter(s)
env_maps=name [,name,...]
    Environmental parameter map(s)
alias_names=string
    Alias names for environmental parameter map(s)
bgr_output=name
    Output SWD file for the environmental data of the background landscape
alias_output=name
    CSV-like output file with alias names in first column and map names in second column, separated by comma
bgr_mask=name
    Map to be used as mask for the background landscape
species_masks=name [,name,...]
    Raster map(s) of specie occurence
species_output=name
    Output SWD file for the specie(s) related environmental data
species_names=string
    Alias-name(s) for species to be used in MaxEnt SWD file instead of map names, separated by comma (default: map names).
null_value=integer
    Integer representing NO DATA cell value (default: -9999)
    Default: -9999
-z
    Zoom computational region to species data (may speed up processing)
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

alias_input : str, optional
    File containg map and alias name(s) for environmental parameter(s)
    Used as: input, file, name
env_maps : str | list[str], optional
    Environmental parameter map(s)
    Used as: input, raster, name
alias_names : str, optional
    Alias names for environmental parameter map(s)
bgr_output : str, optional
    Output SWD file for the environmental data of the background landscape
    Used as: output, file, name
alias_output : str, optional
    CSV-like output file with alias names in first column and map names in second column, separated by comma
    Used as: output, file, name
bgr_mask : str, optional
    Map to be used as mask for the background landscape
    Used as: input, raster, name
species_masks : str | list[str], optional
    Raster map(s) of specie occurence
    Used as: input, raster, name
species_output : str, optional
    Output SWD file for the specie(s) related environmental data
    Used as: output, file, name
species_names : str, optional
    Alias-name(s) for species to be used in MaxEnt SWD file instead of map names, separated by comma (default: map names).
null_value : int, optional
    Integer representing NO DATA cell value (default: -9999)
    Default: -9999
flags : str, optional
    Allowed values: z
    z
        Zoom computational region to species data (may speed up processing)
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

The script is intended to produce a set of SWD files as input to MaxEnt >= 3.3.3e using r.stats.

The SWD file format is a simple CSV-like file file format as described in Elith et al. 2011. Generally it looks like:
specie_name,X,Y,parameter_1,parameter_2,...

your_species,1.1,1.1,2,4.7,...

The first column always contains the name of the species, followed by two columns for the X- and Y-coordinates. Then each column represents one environmental parameter. In contrast to r.stats only integer values are accepted to represent NO DATA.

A background SWD file is always produced while species output can be omitted.

Multiple species can be processed, but each has to be in an individual raster map. Map names of the maps containing the environmental parameters can be replaced by short names, which should be used in MaxEnt >= 3.3.3.e.

Results from MaxEnt can either be imported using r.in.xyz or calculated from MaxEnt lambdas file using the r.maxent.lambdas.

SEE ALSO

r.stats, r.what, r.in.xyz,, r.maxent.lambdas

  • Steven J. Phillips, Miroslav Dudík, Robert E. Schapire. 2020: Maxent software for modeling species niches and distributions (Version 3.4.1). Available from url: https://biodiversityinformatics.amnh.org/open_source/maxent and https://github.com/mrmaxent/Maxent
  • Steven J. Phillips, Miroslav Dudík, Robert E. Schapire. 2004: A maximum entropy approach to species distribution modeling. In Proceedings of the Twenty-First International Conference on Machine Learning, pages 655-662, 2004.
  • Steven J. Phillips, Robert P. Anderson, Robert E. Schapire. 2006: Maximum entropy modeling of species geographic distributions. Ecological Modelling, 190:231-259, 2006.
  • Jane Elith, Steven J. Phillips, Trevor Hastie, Miroslav Dudík, Yung En Chee, Colin J. Yates. 2011: A statistical explanation of MaxEnt for ecologists. Diversity and Distributions, 17:43-57, 2011.

AUTHOR

Stefan Blumentrath, Norwegian Institute for Nature Research (NINA), https://www.nina.no

SOURCE CODE

Available at: r.out.maxent_swd source code (history)
Latest change: Friday Feb 21 10:10:05 2025 in commit 7d78fe3