Srtmnet
source module isofit.data.cli.srtmnet
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/
Functions
-
getVersion — Retrieves the available versions and verifies the requested version is valid. Times out after 10 seconds if the server is unavailable.
-
download — Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/.
-
validate — Validates an sRTMnet installation
-
detectInstalled — Attempt to detect a currently installed sRTMnet model and, if present, save that information back to the ini for future reference
-
compare — Compares an existing sRTMnet file against some other provided version
-
isUpToDate — Checks the installed version against the latest release
-
update — Checks for an update and executes a new download if it is needed
-
download_cli — Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/. Only HDF5 versions are supported at this time.
-
validate_cli — Validates the installation of sRTMnet as well as checks for updates
source getVersion(version='latest')
Retrieves the available versions and verifies the requested version is valid. Times out after 10 seconds if the server is unavailable.
Parameters
-
version : str, default="latest" — Version of sRTMnet to pull
Returns
-
str — Requested version
source download(path=None, tag='latest', overwrite=False, **_)
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/.
Parameters
-
output : str | None — Path to output as. If None, defaults to the ini path
-
tag : str — sRTMnet version to pull
-
overwrite : bool, default=False — Overwrite an existing installation
-
**_ : dict — Ignores unused params that may be used by other validate functions. This is to maintain compatibility with other functions
source validate(path=None, checkForUpdate=True, debug=print, error=print, **_)
Validates an sRTMnet installation
Parameters
-
path : str, default=None — Path to verify. If None, defaults to the ini path
-
checkForUpdate : bool, default=True — Checks for updates if the path is valid
-
debug : function, default=print — Print function to use for debug messages, eg. logging.debug
-
error : function, default=print — Print function to use for error messages, eg. logging.error
-
**_ : dict — Ignores unused params that may be used by other validate functions. This is to maintain compatibility with env.validate
Returns
-
bool — True if valid, False otherwise
source detectInstalled(path: str = None)
Attempt to detect a currently installed sRTMnet model and, if present, save that information back to the ini for future reference
Parameters
-
path : str, default=None — Path to check. If None, defaults to the ini path
source compare(file, name, version, error=print)
Compares an existing sRTMnet file against some other provided version
Parameters
-
file : str — sRTMnet model or aux file name
-
name : str — File type name for reporting with
-
version : packaging.version.Version, default=None — Version to compare against. If not given, retrieves the latest version from the server
-
error : function, default=print — Print function to use for error messages, eg. logging.error
Returns
-
bool — True if the current version is not the latest, False otherwise
source isUpToDate(path=None, tag='latest', debug=print, error=print, **_)
Checks the installed version against the latest release
Parameters
-
path : str, default=None — Path to update. If None, defaults to the ini path
-
debug : function, default=print — Print function to use for debug messages, eg. logging.debug
-
error : function, default=print — Print function to use for error messages, eg. logging.error
-
**_ : dict — Ignores unused params that may be used by other validate functions. This is to maintain compatibility with other functions
Returns
-
bool — True if the path is up to date, False otherwise
Notes
The Github workflows watch for the string "[x]" to determine if the cache needs to update the data of this module. If your module does not include this string, the workflows will never detect updates.
source update(check=False, **kwargs)
Checks for an update and executes a new download if it is needed
Parameters
-
check : bool, default=False — Just check if an update is available, do not download
-
**kwargs : dict — Additional key-word arguments to pass to download()
source download_cli(**kwargs)
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/. Only HDF5 versions are supported at this time.
Run isofit download paths to see default path locations.
There are two ways to specify output directory:
- isofit --path srtmnet /path/sRTMnet download sRTMnet: Override the ini file. This will save the provided path for future reference.
- isofit download sRTMnet --path /path/sRTMnet: Temporarily set the output location. This will not be saved in the ini and may need to be manually set.
It is recommended to use the first style so the download path is remembered in the future.
source validate_cli(**kwargs)
Validates the installation of sRTMnet as well as checks for updates