isofit.data.cli.srtmnet
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/
Attributes
Functions
|
Retrieves the available versions and verifies the requested version is valid. Times |
|
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/. |
|
Validates an sRTMnet installation |
|
Attempt to detect a currently installed sRTMnet model and, if present, save that |
|
Compares an existing sRTMnet file against some other provided version |
|
Checks the installed version against the latest release |
|
Checks for an update and executes a new download if it is needed |
|
Downloads sRTMnet from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/. Only HDF5 versions are supported at this time. |
|
Validates the installation of sRTMnet as well as checks for updates |
Module Contents
- getVersion(version='latest')[source]
Retrieves the available versions and verifies the requested version is valid. Times out after 10 seconds if the server is unavailable.
- download(path=None, tag='latest', overwrite=False, **_)[source]
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
- validate(path=None, checkForUpdate=True, debug=print, error=print, **_)[source]
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:
True if valid, False otherwise
- Return type:
- detectInstalled(path: str = None)[source]
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
- compare(file, name, version, error=print)[source]
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:
True if the current version is not the latest, False otherwise
- Return type:
- isUpToDate(path=None, tag='latest', debug=print, error=print, **_)[source]
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:
True if the path is up to date, False otherwise
- Return type:
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.
- update(check=False, **kwargs)[source]
Checks for an update and executes a new download if it is needed
- download_cli(**kwargs)[source]
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 –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.