API for Project-Handling in GeoRegions.jl
Setting up GeoRegions.jl in a Project
GeoRegions.setupGeoRegions Function
setupGeoRegions(;
path :: AbstractString = pwd(),
overwrite :: Bool = false
) -> nothing
Setup the directory specified by path
with files for custom GeoRegion
s. If overwrite = true
, then any preexisting files are overwritten.
Keyword Arguments
path
: The path where the template list of custom GeoRegions will be copied to. Defaults to the current working directorypwd()
.overwrite
: If template files exist in this folder, overwrite?
GeoRegions.deleteGeoRegions Function
deleteGeoRegions(;
path :: AbstractString = pwd(),
recursive :: Bool = false,
) -> nothing
Reset all the files containing GeoRegion information back to the default. If recursive = true
, delete the entire directory.
Keyword Arguments
path
: The path where the list of custom GeoRegions will be retrieved from. Defaults to the current working directorypwd()
.recursive
: If true, then delete the hidden.georegions
folder entirely.
Handling custom lists of GeoRegions.jl
GeoRegions.loadGeoRegions Function
loadGeoRegions(;
path :: AbstractString = pwd(),
custom :: Bool = true,
giorgi :: Bool = false,
srex :: Bool = false,
ar6 :: Bool = false,
) -> gvec :: Vector{<:GeoRegion}
Extract information for all custom GeoRegions in the project defined by defined by path
.
Arguments
path
: Path where all custom GeoRegions for the project are saved into.custom
: Iftrue
, custom, user-defined list of GeoRegions will be displayed.giorgi
: Iftrue
ANDpredefined = true
, display predefined GF GeoRegions. Default isfalse
.srex
: Iftrue
ANDpredefined = true
, display predefined SREX GeoRegions. Default isfalse
.ar6
: Iftrue
ANDpredefined = true
, display predefined IPCC AR6 GeoRegions. Default isfalse
.
Returns
gvec
: Vector containing all the GeoRegions in the directory defined bypath
.
GeoRegions.addGeoRegions Function
addGeoRegions(
src :: AbstractString,
dst :: AbstractString = pwd();
overwrite :: Bool = false,
verbose :: Bool = false,
dogeopath :: Bool = true
) -> nothing
Copy all custom GeoRegions from the project directory defined by src
into a new project directory defined by dst
.
Arguments
src
: The project path where the list of custom GeoRegions will be copied from.dst
: The project path where the list of custom GeoRegions will be copied into.
Keyword Arguments
overwrite
: Iftrue
, override any custom GeoRegions that have the sameID
s as those in the filefname
.verbose
: Verbose logging for ease of monitoring? Default isfalse
.dogeopath
: Iftrue
, then the appends.georegions
to the end ofsrc
if it isn't already specified. Default istrue